[coinor-bonmin] 01/02: Imported Upstream version 1.7.4

Miles Lubin mlubin-guest at moszumanska.debian.org
Tue Nov 4 03:08:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

mlubin-guest pushed a commit to branch master
in repository coinor-bonmin.

commit f59b9ae5b6093321d5a2454569d3057a2a7db2de
Author: Miles Lubin <miles.lubin at gmail.com>
Date:   Mon Nov 3 22:06:52 2014 -0500

    Imported Upstream version 1.7.4
---
 AUTHORS                                            |    24 +
 INSTALL                                            |    54 +
 LICENSE                                            |   213 +
 Makefile.am                                        |   104 +
 Makefile.in                                        |   907 +
 README                                             |    67 +
 bonmin-uninstalled.pc.in                           |    10 +
 bonmin.pc.in                                       |    12 +
 config.guess                                       |  1516 ++
 config.sub                                         |  1626 ++
 configure                                          | 26646 +++++++++++++++++++
 configure.ac                                       |   196 +
 depcomp                                            |   530 +
 doc/BONMIN_ReferenceManual.hpp                     |    89 +
 doc/BONMIN_UsersManual.pdf                         |   Bin 0 -> 327992 bytes
 doc/BONMIN_UsersManual.tex                         |    27 +
 doc/Head.tex                                       |    19 +
 doc/Install.tex                                    |   125 +
 doc/Intro.tex                                      |   181 +
 doc/Makefile                                       |    19 +
 doc/Obtain.tex                                     |    87 +
 doc/bib.tex                                        |    90 +
 doc/bonmin.css                                     |     1 +
 doc/bonmin.sty                                     |   203 +
 doc/genHtml.sh                                     |    15 +
 doc/htrick.sty                                     |     5 +
 doc/ltrick.sty                                     |     6 +
 doc/option_pages/Head.tex                          |    19 +
 doc/option_pages/bonmin.sty                        |   203 +
 doc/option_pages/genHtml.sh                        |    14 +
 doc/option_pages/genOptionsDocs.sh                 |    13 +
 doc/option_pages/htrick.sty                        |     5 +
 doc/option_pages/ltrick.sty                        |     7 +
 doc/option_pages/options_list_TEMPLATE.tex         |    11 +
 doc/option_pages/options_list_bonmin_content.tex   |     1 +
 doc/option_pages/options_list_filter_content.tex   |     1 +
 doc/option_pages/options_list_ipopt_content.tex    |     1 +
 doc/options.tex                                    |   417 +
 doc/options_list.tex                               |    16 +
 doc/options_list_bonmin_content.tex                |  1580 ++
 doc/options_list_filter_content.tex                |   188 +
 doc/options_list_ipopt_content.tex                 |  4526 ++++
 doc/options_set.tex                                |   223 +
 doc/options_table.tex                              |   157 +
 doc/use.tex                                        |   192 +
 examples/CppExample/Makefile.in                    |    88 +
 examples/CppExample/MyBonmin.cpp                   |   102 +
 examples/CppExample/MyTMINLP.cpp                   |   217 +
 examples/CppExample/MyTMINLP.hpp                   |   180 +
 examples/CppExample/Mybonmin.opt                   |     1 +
 examples/OptionDocGen/DocGen.cpp                   |    58 +
 examples/OptionDocGen/Makefile.in                  |    88 +
 examples/OptionDocGen/MyTMINLP.cpp                 |   217 +
 examples/OptionDocGen/MyTMINLP.hpp                 |   180 +
 examples/amplExamples/toy.mod                      |    22 +
 experimental/Bcp/BB_cut.cpp                        |    54 +
 experimental/Bcp/BB_cut.hpp                        |    52 +
 experimental/Bcp/BM.cpp                            |   145 +
 experimental/Bcp/BM.hpp                            |   473 +
 experimental/Bcp/BM.par                            |    24 +
 experimental/Bcp/BM_lp.cpp                         |   330 +
 experimental/Bcp/BM_lp_branch.cpp                  |  1074 +
 experimental/Bcp/BM_pack.cpp                       |   204 +
 experimental/Bcp/BM_tm.cpp                         |   341 +
 experimental/Bcp/Makefile.am                       |   151 +
 experimental/Bcp/Makefile.in                       |   742 +
 experimental/Bcp/README                            |     3 +
 experimental/Bcp/ampl_bcp.patch                    |   318 +
 experimental/RobotBonmin/BonNWayChoose.cpp         |   591 +
 experimental/RobotBonmin/BonNWayChoose.hpp         |   124 +
 experimental/RobotBonmin/BonNWayObject.cpp         |   353 +
 experimental/RobotBonmin/BonNWayObject.hpp         |   203 +
 experimental/RobotBonmin/Makefile.am               |    49 +
 experimental/RobotBonmin/Makefile.in               |   614 +
 experimental/RobotBonmin/Robot-bonmin.cpp          |    88 +
 experimental/RobotBonmin/RobotSetup.cpp            |   190 +
 experimental/RobotBonmin/RobotSetup.hpp            |    87 +
 .../Separable/BonHeuristicInnerApproximation.cpp   |   480 +
 .../Separable/BonHeuristicInnerApproximation.hpp   |    80 +
 experimental/Separable/BonOuterDescription.cpp     |   378 +
 experimental/Separable/BonOuterDescription.hpp     |    38 +
 experimental/Separable/Makefile.am                 |    54 +
 experimental/Separable/Makefile.in                 |   620 +
 experimental/Separable/Sepa.cpp                    |    89 +
 .../Separable/SepaHeuristicInnerApproximation.cpp  |   498 +
 .../Separable/SepaHeuristicInnerApproximation.hpp  |    86 +
 experimental/Separable/SepaSetup.cpp               |   139 +
 experimental/Separable/SepaSetup.hpp               |    85 +
 experimental/Separable/SepaTMINLP2OsiLP.cpp        |   512 +
 experimental/Separable/SepaTMINLP2OsiLP.hpp        |    82 +
 install-sh                                         |   323 +
 ltmain.sh                                          |  6863 +++++
 missing                                            |   360 +
 src/Algorithms/Ampl/BonAmplSetup.cpp               |    99 +
 src/Algorithms/Ampl/BonAmplSetup.hpp               |    32 +
 src/Algorithms/Ampl/Makefile.am                    |    73 +
 src/Algorithms/Ampl/Makefile.in                    |   636 +
 src/Algorithms/BonBabSetupBase.cpp                 |   866 +
 src/Algorithms/BonBabSetupBase.hpp                 |   386 +
 src/Algorithms/BonBonminSetup.cpp                  |   920 +
 src/Algorithms/BonBonminSetup.hpp                  |    95 +
 src/Algorithms/BonCbcLpStrategy.cpp                |   163 +
 src/Algorithms/BonCbcLpStrategy.hpp                |    45 +
 src/Algorithms/BonSolverHelp.cpp                   |   216 +
 src/Algorithms/BonSolverHelp.hpp                   |    50 +
 src/Algorithms/BonSubMipSolver.cpp                 |   596 +
 src/Algorithms/BonSubMipSolver.hpp                 |   143 +
 src/Algorithms/Branching/BonChooseVariable.cpp     |  1148 +
 src/Algorithms/Branching/BonChooseVariable.hpp     |   345 +
 .../Branching/BonCurvBranchingSolver.cpp           |   188 +
 .../Branching/BonCurvBranchingSolver.hpp           |    77 +
 src/Algorithms/Branching/BonLpBranchingSolver.cpp  |   231 +
 src/Algorithms/Branching/BonLpBranchingSolver.hpp  |    80 +
 src/Algorithms/Branching/BonPseudoCosts.cpp        |    39 +
 src/Algorithms/Branching/BonPseudoCosts.hpp        |    91 +
 src/Algorithms/Branching/BonQpBranchingSolver.cpp  |   118 +
 src/Algorithms/Branching/BonQpBranchingSolver.hpp  |    68 +
 src/Algorithms/Branching/BonRandomChoice.cpp       |    56 +
 src/Algorithms/Branching/BonRandomChoice.hpp       |    68 +
 src/Algorithms/Branching/Makefile.am               |    91 +
 src/Algorithms/Branching/Makefile.in               |   661 +
 src/Algorithms/Makefile.am                         |   109 +
 src/Algorithms/Makefile.in                         |   773 +
 src/Algorithms/OaGenerators/BonDummyHeuristic.cpp  |    50 +
 src/Algorithms/OaGenerators/BonDummyHeuristic.hpp  |    53 +
 src/Algorithms/OaGenerators/BonEcpCuts.cpp         |   179 +
 src/Algorithms/OaGenerators/BonEcpCuts.hpp         |    97 +
 src/Algorithms/OaGenerators/BonFpForMinlp.cpp      |   303 +
 src/Algorithms/OaGenerators/BonFpForMinlp.hpp      |    61 +
 src/Algorithms/OaGenerators/BonOACutGenerator2.cpp |   314 +
 src/Algorithms/OaGenerators/BonOACutGenerator2.hpp |    56 +
 src/Algorithms/OaGenerators/BonOAMessages.cpp      |    40 +
 src/Algorithms/OaGenerators/BonOAMessages.hpp      |    44 +
 src/Algorithms/OaGenerators/BonOaDecBase.cpp       |   457 +
 src/Algorithms/OaGenerators/BonOaDecBase.hpp       |   297 +
 src/Algorithms/OaGenerators/BonOaFeasChecker.cpp   |   170 +
 src/Algorithms/OaGenerators/BonOaFeasChecker.hpp   |    73 +
 src/Algorithms/OaGenerators/BonOaNlpOptim.cpp      |   196 +
 src/Algorithms/OaGenerators/BonOaNlpOptim.hpp      |   116 +
 src/Algorithms/OaGenerators/Makefile.am            |    95 +
 src/Algorithms/OaGenerators/Makefile.in            |   665 +
 src/Algorithms/QuadCuts/BonArraysHelpers.hpp       |    52 +
 src/Algorithms/QuadCuts/BonLinearCutsGenerator.cpp |   154 +
 src/Algorithms/QuadCuts/BonLinearCutsGenerator.hpp |    75 +
 src/Algorithms/QuadCuts/BonOuterApprox.cpp         |   177 +
 src/Algorithms/QuadCuts/BonOuterApprox.hpp         |   123 +
 src/Algorithms/QuadCuts/BonQuadCut.cpp             |   150 +
 src/Algorithms/QuadCuts/BonQuadCut.hpp             |   217 +
 src/Algorithms/QuadCuts/BonQuadRow.cpp             |   310 +
 src/Algorithms/QuadCuts/BonQuadRow.hpp             |   122 +
 src/Algorithms/QuadCuts/BonTMINLP2Quad.cpp         |   504 +
 src/Algorithms/QuadCuts/BonTMINLP2Quad.hpp         |   191 +
 src/Algorithms/QuadCuts/BonTMINLPLinObj.cpp        |   211 +
 src/Algorithms/QuadCuts/BonTMINLPLinObj.hpp        |   216 +
 src/Algorithms/QuadCuts/BonTMatrix.cpp             |   216 +
 src/Algorithms/QuadCuts/BonTMatrix.hpp             |   167 +
 src/Algorithms/QuadCuts/Makefile.am                |   114 +
 src/Algorithms/QuadCuts/Makefile.in                |   683 +
 src/Algorithms/QuadCuts/next                       |   123 +
 src/Apps/BonMin.cpp                                |    98 +
 src/Apps/BonNodeSolver.cpp                         |   112 +
 src/Apps/Makefile.am                               |   108 +
 src/Apps/Makefile.in                               |   666 +
 src/CbcBonmin/BonBabInfos.cpp                      |    43 +
 src/CbcBonmin/BonBabInfos.hpp                      |    57 +
 src/CbcBonmin/BonCbc.cpp                           |   700 +
 src/CbcBonmin/BonCbc.hpp                           |   127 +
 src/CbcBonmin/BonCbcNlpStrategy.cpp                |   172 +
 src/CbcBonmin/BonCbcNlpStrategy.hpp                |    98 +
 src/CbcBonmin/BonCbcNode.cpp                       |   167 +
 src/CbcBonmin/BonCbcNode.hpp                       |   133 +
 src/CbcBonmin/BonDiver.cpp                         |   859 +
 src/CbcBonmin/BonDiver.hpp                         |   424 +
 src/CbcBonmin/BonGuessHeuristic.cpp                |    75 +
 src/CbcBonmin/BonGuessHeuristic.hpp                |    46 +
 src/CbcBonmin/Heuristics/BonDummyPump.cpp          |    80 +
 src/CbcBonmin/Heuristics/BonDummyPump.hpp          |    43 +
 .../Heuristics/BonFixAndSolveHeuristic.cpp         |    91 +
 .../Heuristics/BonFixAndSolveHeuristic.hpp         |    43 +
 src/CbcBonmin/Heuristics/BonHeuristicDive.cpp      |   365 +
 src/CbcBonmin/Heuristics/BonHeuristicDive.hpp      |    88 +
 .../Heuristics/BonHeuristicDiveFractional.cpp      |   127 +
 .../Heuristics/BonHeuristicDiveFractional.hpp      |    67 +
 src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.cpp   |   490 +
 src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.hpp   |    83 +
 .../Heuristics/BonHeuristicDiveMIPFractional.cpp   |   129 +
 .../Heuristics/BonHeuristicDiveMIPFractional.hpp   |    67 +
 .../Heuristics/BonHeuristicDiveMIPVectorLength.cpp |   180 +
 .../Heuristics/BonHeuristicDiveMIPVectorLength.hpp |    74 +
 .../Heuristics/BonHeuristicDiveVectorLength.cpp    |   178 +
 .../Heuristics/BonHeuristicDiveVectorLength.hpp    |    74 +
 src/CbcBonmin/Heuristics/BonHeuristicFPump.cpp     |   559 +
 src/CbcBonmin/Heuristics/BonHeuristicFPump.hpp     |   111 +
 .../Heuristics/BonHeuristicLocalBranching.cpp      |   138 +
 .../Heuristics/BonHeuristicLocalBranching.hpp      |    59 +
 src/CbcBonmin/Heuristics/BonHeuristicRINS.cpp      |   136 +
 src/CbcBonmin/Heuristics/BonHeuristicRINS.hpp      |    55 +
 .../Heuristics/BonLocalSolverBasedHeuristic.cpp    |   122 +
 .../Heuristics/BonLocalSolverBasedHeuristic.hpp    |   102 +
 src/CbcBonmin/Heuristics/BonMilpRounding.cpp       |   363 +
 src/CbcBonmin/Heuristics/BonMilpRounding.hpp       |    74 +
 src/CbcBonmin/Heuristics/BonPumpForMinlp.cpp       |    79 +
 src/CbcBonmin/Heuristics/BonPumpForMinlp.hpp       |    45 +
 src/CbcBonmin/Heuristics/Makefile.am               |   116 +
 src/CbcBonmin/Heuristics/Makefile.in               |   699 +
 src/CbcBonmin/Makefile.am                          |   137 +
 src/CbcBonmin/Makefile.in                          |   850 +
 .../bonminamplinterface-uninstalled.pc.in          |    10 +
 src/CbcBonmin/bonminamplinterface.pc.in            |    12 +
 src/Interfaces/Ampl/BonAmplInterface.cpp           |   132 +
 src/Interfaces/Ampl/BonAmplInterface.hpp           |    64 +
 src/Interfaces/Ampl/BonAmplTMINLP.cpp              |   865 +
 src/Interfaces/Ampl/BonAmplTMINLP.hpp              |   332 +
 src/Interfaces/Ampl/BonSolReader.cpp               |    70 +
 src/Interfaces/Ampl/BonSolReader.hpp               |    62 +
 src/Interfaces/Ampl/Makefile.am                    |    77 +
 src/Interfaces/Ampl/Makefile.in                    |   640 +
 src/Interfaces/Ampl/sos_kludge.cpp                 |    46 +
 src/Interfaces/BonAuxInfos.cpp                     |    94 +
 src/Interfaces/BonAuxInfos.hpp                     |   110 +
 src/Interfaces/BonBoundsReader.cpp                 |   121 +
 src/Interfaces/BonBoundsReader.hpp                 |    82 +
 src/Interfaces/BonBranchingTQP.cpp                 |   337 +
 src/Interfaces/BonBranchingTQP.hpp                 |   197 +
 src/Interfaces/BonColReader.cpp                    |    66 +
 src/Interfaces/BonColReader.hpp                    |    77 +
 src/Interfaces/BonCurvatureEstimator.cpp           |   816 +
 src/Interfaces/BonCurvatureEstimator.hpp           |   236 +
 src/Interfaces/BonCutStrengthener.cpp              |   606 +
 src/Interfaces/BonCutStrengthener.hpp              |   244 +
 src/Interfaces/BonExitCodes.hpp                    |    12 +
 src/Interfaces/BonMsgUtils.hpp                     |    15 +
 src/Interfaces/BonOsiTMINLPInterface.cpp           |  3126 +++
 src/Interfaces/BonOsiTMINLPInterface.hpp           |  1342 +
 src/Interfaces/BonRegisteredOptions.cpp            |   368 +
 src/Interfaces/BonRegisteredOptions.hpp            |   225 +
 src/Interfaces/BonStartPointReader.cpp             |    54 +
 src/Interfaces/BonStartPointReader.hpp             |    85 +
 src/Interfaces/BonStrongBranchingSolver.cpp        |    46 +
 src/Interfaces/BonStrongBranchingSolver.hpp        |    69 +
 src/Interfaces/BonTMINLP.cpp                       |   134 +
 src/Interfaces/BonTMINLP.hpp                       |   420 +
 src/Interfaces/BonTMINLP2OsiLP.cpp                 |    51 +
 src/Interfaces/BonTMINLP2OsiLP.hpp                 |   164 +
 src/Interfaces/BonTMINLP2TNLP.cpp                  |   698 +
 src/Interfaces/BonTMINLP2TNLP.hpp                  |   509 +
 src/Interfaces/BonTNLP2FPNLP.cpp                   |   461 +
 src/Interfaces/BonTNLP2FPNLP.hpp                   |   264 +
 src/Interfaces/BonTNLPSolver.cpp                   |   293 +
 src/Interfaces/BonTNLPSolver.hpp                   |   241 +
 src/Interfaces/BonTypes.hpp                        |   102 +
 src/Interfaces/BonminConfig.h                      |    45 +
 src/Interfaces/Filter/BonBqpdSolver.cpp            |   957 +
 src/Interfaces/Filter/BonBqpdSolver.hpp            |   423 +
 src/Interfaces/Filter/BonBqpdWarmStart.cpp         |    97 +
 src/Interfaces/Filter/BonBqpdWarmStart.hpp         |   102 +
 src/Interfaces/Filter/BonFilterSolver.cpp          |   782 +
 src/Interfaces/Filter/BonFilterSolver.hpp          |   348 +
 src/Interfaces/Filter/BonFilterTypes.hpp           |    10 +
 src/Interfaces/Filter/BonFilterWarmStart.cpp       |   141 +
 src/Interfaces/Filter/BonFilterWarmStart.hpp       |   139 +
 src/Interfaces/Filter/Makefile.am                  |    84 +
 src/Interfaces/Filter/Makefile.in                  |   651 +
 .../Ipopt/BonIpoptInteriorWarmStarter.cpp          |   221 +
 .../Ipopt/BonIpoptInteriorWarmStarter.hpp          |   103 +
 src/Interfaces/Ipopt/BonIpoptSolver.cpp            |   480 +
 src/Interfaces/Ipopt/BonIpoptSolver.hpp            |   188 +
 src/Interfaces/Ipopt/BonIpoptWarmStart.cpp         |   120 +
 src/Interfaces/Ipopt/BonIpoptWarmStart.hpp         |   148 +
 src/Interfaces/Ipopt/Makefile.am                   |    77 +
 src/Interfaces/Ipopt/Makefile.in                   |   644 +
 src/Interfaces/Makefile.am                         |   150 +
 src/Interfaces/Makefile.in                         |   867 +
 src/Interfaces/config.h.in                         |   105 +
 src/Interfaces/config_bonmin.h.in                  |    18 +
 src/Interfaces/config_bonmin_default.h             |    17 +
 src/Interfaces/config_default.h                    |    20 +
 test/InterfaceTest.cpp                             |   402 +
 test/Makefile.am                                   |    81 +
 test/Makefile.in                                   |   608 +
 test/bonmin.opt                                    |   156 +
 test/mytoy.nl                                      |    55 +
 test/toy.mps.gz                                    |   Bin 0 -> 225 bytes
 283 files changed, 105853 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..a5a8f2c
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,24 @@
+ 
+
+ Pierre Bonami, project manager (CNRS),
+ John J. Forrest (IBM Copr.),
+ Carl Laird, (Carnegie Mellon University),
+ Lazlo Ladanyi (IBM Copr.),
+ Jon Lee (IBM Copr.)
+ Francois Margot (Carnegie Mellon University)
+ Andreas Waechter (IBM Copr.)
+ Claudia D'amborsio (Universita di Bologna, various improvement for non-convex problems).
+ Pietro Belotti (Lehigh).
+ Stefan Vigerske (Humboldt-University, found and fixed many bugs when developping the GAMSlink for Bonmin)
+ Hassan Hijazi (Orange Labs, experimental code for separable problems + various improvements)
+  
+
+We would also like to acknoweldge  <br>
+ L.T. Biegler (Carnegie Mellon University)  <br>
+ A.R. Conn (IBM)  <br>
+ G. Cornuejols (LIF Marseille, Carnegie Mellon University)  <br>
+ I.E. Grossmann (Carnegie Mellon University)  <br>
+ J. Lee (IBM)  <br>
+ A. Lodi (IBM, Universita di Bologna)  <br>
+ N. Sawaya (Carnegie Mellon University)  <br>
+for their advices, help and other contributions to the underlying algorithms.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..4078822
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,54 @@
+Detailed installation instructions for Bonmin can be found in the Users Manual at
+http://www.coin-or.org/Bonmin/Intro.html
+
+Standard installation instructions for COIN-OR projects can be found at
+
+https://projects.coin-or.org/BuildTools
+
+I - Installing Bonmin
+The build process of Bonmin uses the standard GNU Autotools
+
+It has been successfully compiled and run on the following platforms:
+ - Linux using g++ version 4.5
+ - Windows using version Cygwin 1.5.18
+ - Mac OS X using gcc 4.5
+
+Note that Bonmin reauires a certain number of third parties dependencies. Please visit:
+https://projects.coin-or.org/Bonmin/wiki/ThirdParty
+to find out how to obtain and install them.
+
+Bonmin is then compiled and installed using the commands:
+
+% ./configure
+% make
+% make install
+
+This installs the executable bonmin in the bin subdirectory of the
+installation direcory.
+
+The configure script attempts to find all of the machine specific settings
+(compiler, libraries,...) necessary to compile and run the code. Although
+{\tt configure} should find most of the standard ones, you may have to
+manually specify a few of the settings. The options for the configure
+script can be found by issuing the command
+
+% ./configure --help
+
+For a more in depth description of these options, the reader is invited
+to refer to the COIN-OR BuildTools trac page at:
+https://projects.coin-or.org/BuildTools/
+
+II - BUILDING THE DOCUMENTATION
+The documentation for Bonmin consists of a users' manual and a reference
+manual. You can build a local copy of the reference manual provided that
+you have Latex
+and Doxygen installed on your machine. To do it Issue the command
+
+% make doxydoc
+It calls Doxygen to build a copy of the reference manual. An html version
+of the reference manual can then be accessed in doc/html/index.html.
+
+III - RUNNING THE TEST PROGRAMS
+By issuing the command
+% make test
+you build and run the automatic test program for Bonmin.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c9990a7
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,213 @@
+Common Public License Version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+    a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+
+    b) in the case of each subsequent Contributor:
+
+    i) changes to the Program, and
+
+    ii) additions to the Program;
+
+    where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+    a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+    b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+    c) Recipient understands that although each Contributor grants the licenses
+to its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+    d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright license set
+forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+    a) it complies with the terms and conditions of this Agreement; and
+
+    b) its license agreement:
+
+    i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+    ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+    iii) states that any provisions which differ from this Agreement are offered
+by that Contributor alone and not by any other party; and
+
+    iv) states that source code for the Program is available from such
+Contributor, and informs licensees how to obtain it in a reasonable manner on or
+through a medium customarily used for software exchange. 
+
+When the Program is made available in source code form:
+
+    a) it must be made available under this Agreement; and
+
+    b) a copy of this Agreement must be included with each copy of the Program. 
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement, including but not limited to the risks and costs of
+program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such Recipient
+under this Agreement shall terminate as of the date such litigation is filed. In
+addition, if Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
+as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..970fdf1
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,104 @@
+# Copyright (C) 2006, 2008 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 1767 2011-01-08 18:53:36Z stefan $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          Subdirectories                              #
+########################################################################
+
+# Here list all subdirectories into which to recurse
+SUBDIRS = src/Interfaces \
+	  src/Algorithms \
+	  src/CbcBonmin \
+	  src/Apps
+
+# We don't want to compile the test subdirectory, unless the test target is
+# specified.  But we need to list it as subdirectory to make sure that it is
+# included in the tarball
+
+if ALWAYS_FALSE
+  SUBDIRS += test
+endif
+
+########################################################################
+#             Additional files to be included in tarball               #
+########################################################################
+
+# Here we need include all files that are not mentioned in other Makefiles
+
+EXTRA_DIST = \
+	doc/Bonmin_ReferenceManual.hpp \
+	doc/Bonm-Min_UsersManual.pdf \
+	doc/Bonm-Min_UsersManual.tex \
+	doc/BOUM_Intro.tex \
+	doc/options.tex \
+	test/InterfaceTest.cpp \
+	test/CppExample/MyTMINLP.hpp \
+	test/CppExample/MyTMINLP.cpp \
+	test/CppExample/MyBonmin.cpp \
+	test/mytoy.nl
+
+########################################################################
+#                           Extra Targets                              #
+########################################################################
+
+.PHONY: doc test unitTest userman astyle nodeSolver
+
+test: unitTest
+
+unitTest: all
+	cd test; $(MAKE) test
+
+nodeSolver: all
+	cd src/Apps; $(MAKE) nodeSolver
+
+doc:	userman
+
+userman: $(top_srcdir)/doc/BONMIN_UsersManual.tex
+	cd $(top_srcdir)/doc && pdflatex BONMIN_UsersManual.tex
+
+install-exec-local: install-doc
+
+uninstall-local: uninstall-doc
+
+astyle:
+	cd src/Algorithms; $(MAKE) astyle
+	cd src/Algorithms/Ampl; $(MAKE) astyle
+	cd src/Algorithms/Branching; $(MAKE) astyle
+	cd src/Algorithms/OaGenerators; $(MAKE) astyle
+	cd src/Apps; $(MAKE) astyle
+	cd src/CbcBonmin; $(MAKE) astyle
+	cd src/Interfaces; $(MAKE) astyle
+	cd src/Interfaces/Ampl; $(MAKE) astyle
+	cd src/Interfaces/Filter; $(MAKE) astyle
+	cd src/Interfaces/Ipopt; $(MAKE) astyle
+	
+########################################################################
+#                  Installation of the .pc file                        #
+########################################################################
+
+pkgconfiglibdir = $(libdir)/pkgconfig
+pkgconfiglib_DATA = bonmin.pc
+if COIN_HAS_ASL
+pkgconfiglib_DATA += bonminamplinterface.pc
+endif
+
+########################################################################
+#                         Maintainer Stuff                             #
+########################################################################
+
+# Files that are generated and should be cleaned with make distclean
+DISTCLEANFILES = \
+	Test/*.$(OBJEXT) \
+	Test/unitTest$(EXEEXT) \
+	Test/CppExample/*.$(OBJEXT) \
+	Test/CppExample/CppExample$(EXEEXT) \
+	Test/testtoy.nl
+
+include BuildTools/Makemain.inc
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..adab20e
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,907 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2008 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Eclipse Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+########################################################################
+#                    Documentation installation                        #
+########################################################################
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+
+# We don't want to compile the test subdirectory, unless the test target is
+# specified.  But we need to list it as subdirectory to make sure that it is
+# included in the tarball
+ at ALWAYS_FALSE@am__append_1 = test
+ at COIN_HAS_ASL_TRUE@am__append_2 = bonminamplinterface.pc
+DIST_COMMON = README $(am__configure_deps) \
+	$(srcdir)/BuildTools/Makemain.inc $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/bonmin-uninstalled.pc.in \
+	$(srcdir)/bonmin.pc.in $(top_srcdir)/configure \
+	$(top_srcdir)/examples/CppExample/Makefile.in \
+	$(top_srcdir)/examples/CppExample/MyBonmin.cpp \
+	$(top_srcdir)/examples/CppExample/MyTMINLP.cpp \
+	$(top_srcdir)/examples/CppExample/MyTMINLP.hpp \
+	$(top_srcdir)/examples/OptionDocGen/Makefile.in \
+	$(top_srcdir)/src/CbcBonmin/bonminamplinterface-uninstalled.pc.in \
+	$(top_srcdir)/src/CbcBonmin/bonminamplinterface.pc.in AUTHORS \
+	INSTALL config.guess config.sub depcomp install-sh ltmain.sh \
+	missing
+ at HAVE_EXTERNALS_TRUE@am__append_3 = Dependencies
+ at HAVE_EXTERNALS_TRUE@am__append_4 = .Dependencies-stamp
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES = examples/OptionDocGen/Makefile \
+	examples/CppExample/Makefile bonmin.pc bonmin-uninstalled.pc \
+	bonminamplinterface.pc bonminamplinterface-uninstalled.pc
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgconfiglibdir)"
+pkgconfiglibDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfiglib_DATA)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = src/Interfaces src/Algorithms src/CbcBonmin src/Apps \
+	test
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          Subdirectories                              #
+########################################################################
+
+# Here list all subdirectories into which to recurse
+SUBDIRS = src/Interfaces src/Algorithms src/CbcBonmin src/Apps \
+	$(am__append_1)
+
+########################################################################
+#             Additional files to be included in tarball               #
+########################################################################
+
+# Here we need include all files that are not mentioned in other Makefiles
+EXTRA_DIST = doc/Bonmin_ReferenceManual.hpp \
+	doc/Bonm-Min_UsersManual.pdf doc/Bonm-Min_UsersManual.tex \
+	doc/BOUM_Intro.tex doc/options.tex test/InterfaceTest.cpp \
+	test/CppExample/MyTMINLP.hpp test/CppExample/MyTMINLP.cpp \
+	test/CppExample/MyBonmin.cpp test/mytoy.nl $(am__append_3)
+
+########################################################################
+#                  Installation of the .pc file                        #
+########################################################################
+pkgconfiglibdir = $(libdir)/pkgconfig
+pkgconfiglib_DATA = bonmin.pc $(am__append_2)
+
+########################################################################
+#                         Maintainer Stuff                             #
+########################################################################
+
+# Files that are generated and should be cleaned with make distclean
+DISTCLEANFILES = Test/*.$(OBJEXT) Test/unitTest$(EXEEXT) \
+	Test/CppExample/*.$(OBJEXT) \
+	Test/CppExample/CppExample$(EXEEXT) Test/testtoy.nl \
+	$(am__append_4) $(VPATH_DISTCLEANFILES)
+DocFiles = README AUTHORS LICENSE
+DocInstallDir = $(datadir)/coin/doc/$(PACKAGE_NAME)
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/BuildTools/Makemain.inc $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+examples/OptionDocGen/Makefile: $(top_builddir)/config.status $(top_srcdir)/examples/OptionDocGen/Makefile.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+examples/CppExample/Makefile: $(top_builddir)/config.status $(top_srcdir)/examples/CppExample/Makefile.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+bonmin.pc: $(top_builddir)/config.status $(srcdir)/bonmin.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+bonmin-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/bonmin-uninstalled.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+bonminamplinterface.pc: $(top_builddir)/config.status $(top_srcdir)/src/CbcBonmin/bonminamplinterface.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+bonminamplinterface-uninstalled.pc: $(top_builddir)/config.status $(top_srcdir)/src/CbcBonmin/bonminamplinterface-uninstalled.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-pkgconfiglibDATA: $(pkgconfiglib_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgconfiglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfiglibdir)"
+	@list='$(pkgconfiglib_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(pkgconfiglibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfiglibdir)/$$f'"; \
+	  $(pkgconfiglibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfiglibdir)/$$f"; \
+	done
+
+uninstall-pkgconfiglibDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgconfiglib_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pkgconfiglibdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgconfiglibdir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkdir_p) $(distdir)/. $(distdir)/BuildTools $(distdir)/doc $(distdir)/examples/CppExample $(distdir)/examples/OptionDocGen $(distdir)/src/CbcBonmin $(distdir)/test $(distdir)/test/CppExample
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(pkgconfiglibdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfiglibDATA
+
+install-exec-am: install-exec-local
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-local \
+	uninstall-pkgconfiglibDATA
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+	check-am clean clean-generic clean-libtool clean-recursive \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-generic distclean-libtool distclean-recursive \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-exec-local install-info install-info-am install-man \
+	install-pkgconfiglibDATA install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am uninstall-local \
+	uninstall-pkgconfiglibDATA
+
+
+########################################################################
+#                           Extra Targets                              #
+########################################################################
+
+.PHONY: doc test unitTest userman astyle nodeSolver
+
+test: unitTest
+
+unitTest: all
+	cd test; $(MAKE) test
+
+nodeSolver: all
+	cd src/Apps; $(MAKE) nodeSolver
+
+doc:	userman
+
+userman: $(top_srcdir)/doc/BONMIN_UsersManual.tex
+	cd $(top_srcdir)/doc && pdflatex BONMIN_UsersManual.tex
+
+install-exec-local: install-doc
+
+uninstall-local: uninstall-doc
+
+astyle:
+	cd src/Algorithms; $(MAKE) astyle
+	cd src/Algorithms/Ampl; $(MAKE) astyle
+	cd src/Algorithms/Branching; $(MAKE) astyle
+	cd src/Algorithms/OaGenerators; $(MAKE) astyle
+	cd src/Apps; $(MAKE) astyle
+	cd src/CbcBonmin; $(MAKE) astyle
+	cd src/Interfaces; $(MAKE) astyle
+	cd src/Interfaces/Ampl; $(MAKE) astyle
+	cd src/Interfaces/Filter; $(MAKE) astyle
+	cd src/Interfaces/Ipopt; $(MAKE) astyle
+
+install-doc: $(DocFiles)
+	test -z "$(DocInstallDir)" || $(mkdir_p) "$(DESTDIR)$(DocInstallDir)"
+	for file in $(DocFiles); do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  if test -f "$$dir$$file"; then $(INSTALL_DATA) "$$dir$$file" "$(DESTDIR)$(DocInstallDir)/$$file"; fi; \
+	done
+
+uninstall-doc:
+	for file in $(DocFiles); do \
+	  rm -f "$(DESTDIR)$(DocInstallDir)/$$file"; \
+	done
+
+########################################################################
+#                         Maintainer Stuff                             #
+########################################################################
+
+# Make sure acinclude is using most recent coin.m4
+ at MAINTAINER_MODE_TRUE@$(srcdir)/acinclude.m4: $(BUILDTOOLSDIR)/coin.m4
+ at MAINTAINER_MODE_TRUE@	cat $(LIBTOOLM4) $< > $@
+
+# Make sure the autotools scripts are up to date
+ at MAINTAINER_MODE_TRUE@$(AUX_DIR)/install-sh: $(BUILDTOOLSDIR)/install-sh
+ at MAINTAINER_MODE_TRUE@	cp $< $@
+
+ at MAINTAINER_MODE_TRUE@$(AUX_DIR)/missing: $(BUILDTOOLSDIR)/missing
+ at MAINTAINER_MODE_TRUE@	cp $< $@
+
+ at MAINTAINER_MODE_TRUE@$(AUX_DIR)/config.guess: $(BUILDTOOLSDIR)/config.guess
+ at MAINTAINER_MODE_TRUE@	cp $< $@
+
+ at MAINTAINER_MODE_TRUE@$(AUX_DIR)/config.sub: $(BUILDTOOLSDIR)/config.sub
+ at MAINTAINER_MODE_TRUE@	cp $< $@
+
+ at MAINTAINER_MODE_TRUE@$(AUX_DIR)/depcomp: $(BUILDTOOLSDIR)/depcomp
+ at MAINTAINER_MODE_TRUE@	cp $< $@
+
+ at MAINTAINER_MODE_TRUE@$(AUX_DIR)/ltmain.sh: $(BUILDTOOLSDIR)/ltmain.sh
+ at MAINTAINER_MODE_TRUE@	cp $< $@
+
+# Take care of updating externals (if Dependencies file exists)
+ at HAVE_EXTERNALS_TRUE@@MAINTAINER_MODE_TRUE@$(top_builddir)/Makefile: .Dependencies-stamp
+
+ at HAVE_EXTERNALS_TRUE@@MAINTAINER_MODE_TRUE at .Dependencies-stamp: $(srcdir)/Dependencies
+ at HAVE_EXTERNALS_TRUE@@MAINTAINER_MODE_TRUE@	cd $(srcdir); BuildTools/set_externals Dependencies
+ at HAVE_EXTERNALS_TRUE@@MAINTAINER_MODE_TRUE@	touch .Dependencies-stamp
+
+ at HAVE_EXTERNALS_TRUE@@MAINTAINER_MODE_TRUE at update-externals: .Dependencies-stamp
+ at HAVE_EXTERNALS_TRUE@@MAINTAINER_MODE_TRUE@	cd $(srcdir); svn update
+
+.PHONY: install-doc uninstall-doc update-externals
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/README b/README
new file mode 100644
index 0000000..9bcef9c
--- /dev/null
+++ b/README
@@ -0,0 +1,67 @@
+README file for Bonmin
+
+Bonmin (Basic Open-source Nonlinear Mixed INteger programming) is an
+open-source code for solving general MINLP (Mixed Integer NonLinear
+Programming) problems.
+
+It is distributed on COINOR (www.coin-or.org) under the CPL (Common Public
+License). The CPL is a license approved by the OSI (Open Source
+Initiative), thus Bonmin is OSI Certified Open Source Software.
+
+Bonmin features several algorithms
+ - B-BB is a NLP-based branch-and-bound algorithm,
+ - B-OA is an outer-approximation decomposition algorithm,
+ - B-QG is an implementation of  Quesada and Grossmann's branch-and-cut
+ algorithm,
+ - B-Hyb is a hybrid outer-approximation based branch-and-cut algorithm.
+
+
+Bonmin documentation consists of a users' manual and a refernece
+manual they may be found on-line at the project web-site or can be built
+from the project source distribution. Instructions are provided in the
+INSTALL file.
+
+
+BONMIN MAINTAINER : Pierre Bonami (contact at pbonami at andrew.cmu.edu)
+
+
+BONMIN WEB-PAGE : https://projects.coin-or.org/Bonmin
+
+
+BONMIN MAILING LIST : http://list.coin-or.org/mailman/listinfo/bonmin
+
+
+For obtaining support, reporting bug, requesting feature you should
+write to the mailing-list (or if it does not exists yet to the project
+maintainer).
+
+
+For contributing code you should either contact the project maintainer
+or write to the mailing list. You will find legal requirement here :
+http://www.coin-or.org/contributions.html#contributions.
+
+
+
+This project was initiated in 2004 by IBM and Carnegie Mellon University
+as part of a joint effort to study algorithm for MINLP.
+
+You may find additional informations on at
+http://egon.cheme.cmu.edu/ibm/page.htm.
+In partivular
+ - A publicly available library of test instances of Convex MINLPs,
+ - Research papers on new algorithmic procedures for MINLP.
+
+
+DEPENDENCIES : Bonmin depends on the following external software : -
+COIN-OR software : CoinUtils, Cbc, Cgl, Clp, Ipopt
+- Others : blas, lapck, HSL.
+
+EXTERNAL RESSOURCES : COIN-OR : www.coin-or.org Common Public License :
+http://www.opensource.org/licenses/cpl.php
+
+IBM-CMU Open Source MINLP web page :
+http://egon.cheme.cmu.edu/ibm/page.htm
+
+Bonmin is available on NEOS :
+http://www-neos.mcs.anl.gov/
+
diff --git a/bonmin-uninstalled.pc.in b/bonmin-uninstalled.pc.in
new file mode 100644
index 0000000..b582a44
--- /dev/null
+++ b/bonmin-uninstalled.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+libdir=@ABSBUILDDIR@/src/CbcBonmin
+
+Name: Bonmin
+Description: Basic Open-source Nonlinear Mixed Integer programming
+URL: https://projects.coin-or.org/Bonmin
+Version: @PACKAGE_VERSION@
+Libs: ${libdir}/libbonmin.la @BONMINLIB_PCLIBS@
+Cflags: -I at abs_source_dir@/src -I at abs_source_dir@/src/Algorithms -I at abs_source_dir@/src/Algorithms/Branching -I at abs_source_dir@/src/Algorithms/OaGenerators -I at abs_source_dir@/src/Algorithms/QuadCuts -I at abs_source_dir@/src/CbcBonmin -I at abs_source_dir@/src/CbcBonmin/Heuristics -I at abs_source_dir@/src/Interfaces -I at abs_source_dir@/src/Interfaces/Ipopt -I at ABSBUILDDIR@/src/Interfaces
+Requires: @BONMINLIB_PCREQUIRES@
diff --git a/bonmin.pc.in b/bonmin.pc.in
new file mode 100644
index 0000000..731ac4a
--- /dev/null
+++ b/bonmin.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/coin
+
+Name: Bonmin
+Description: Basic Open-source Nonlinear Mixed Integer programming
+URL: https://projects.coin-or.org/Bonmin
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lbonmin @BONMINLIB_PCLIBS@
+Cflags: -I${includedir}
+Requires: @BONMINLIB_PCREQUIRES@
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..951383e
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1516 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
+
+timestamp='2007-05-17'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:SunOS:5.*:* | ix86xen: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:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86) 
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa:Linux:*:*)
+    	echo xtensa-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://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 at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..c060f44
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1626 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
+
+timestamp='2007-04-29'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the 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
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+        c4x-* | tic4x-*)
+        	os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+        mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..9402d0c
--- /dev/null
+++ b/configure
@@ -0,0 +1,26646 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for Bonmin 1.7.4.
+#
+# Report bugs to <bonmin at list.coin-or.org>.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+#
+#
+# Copyright 2006, 2008 International Business Machines and others.
+# All Rights Reserved.
+# This file is part of the open source package BONMIN which is distributed
+# under the Common Public License.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+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
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; 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'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# 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
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  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
+
+       ;;
+  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_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    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=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # 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 before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, 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
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\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 sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+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$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# 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'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+# 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
+
+# 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`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Bonmin'
+PACKAGE_TARNAME='bonmin'
+PACKAGE_VERSION='1.7.4'
+PACKAGE_STRING='Bonmin 1.7.4'
+PACKAGE_BUGREPORT='bonmin at list.coin-or.org'
+
+ac_unique_file="src/CbcBonmin/BonCbc.hpp"
+ac_default_prefix=`pwd`
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if 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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os ALWAYS_FALSE_TRUE ALWAYS_FALSE_FALSE have_svnversion BONMIN_SVN_REV CDEFS ADD_CFLAGS DBG_CFLAGS OPT_CFLAGS sol [...]
+ac_subst_files=''
+
+# 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.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+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
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -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 | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$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" ;;
+
+  -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'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    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 ;;
+
+  -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 ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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 ;;
+
+  -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'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    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; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    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 paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+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
+
+
+# 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 its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CDEFS_set=${CDEFS+set}
+ac_env_CDEFS_value=$CDEFS
+ac_cv_env_CDEFS_set=${CDEFS+set}
+ac_cv_env_CDEFS_value=$CDEFS
+ac_env_ADD_CFLAGS_set=${ADD_CFLAGS+set}
+ac_env_ADD_CFLAGS_value=$ADD_CFLAGS
+ac_cv_env_ADD_CFLAGS_set=${ADD_CFLAGS+set}
+ac_cv_env_ADD_CFLAGS_value=$ADD_CFLAGS
+ac_env_DBG_CFLAGS_set=${DBG_CFLAGS+set}
+ac_env_DBG_CFLAGS_value=$DBG_CFLAGS
+ac_cv_env_DBG_CFLAGS_set=${DBG_CFLAGS+set}
+ac_cv_env_DBG_CFLAGS_value=$DBG_CFLAGS
+ac_env_OPT_CFLAGS_set=${OPT_CFLAGS+set}
+ac_env_OPT_CFLAGS_value=$OPT_CFLAGS
+ac_cv_env_OPT_CFLAGS_set=${OPT_CFLAGS+set}
+ac_cv_env_OPT_CFLAGS_value=$OPT_CFLAGS
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_MPICC_set=${MPICC+set}
+ac_env_MPICC_value=$MPICC
+ac_cv_env_MPICC_set=${MPICC+set}
+ac_cv_env_MPICC_value=$MPICC
+ac_env_CXXDEFS_set=${CXXDEFS+set}
+ac_env_CXXDEFS_value=$CXXDEFS
+ac_cv_env_CXXDEFS_set=${CXXDEFS+set}
+ac_cv_env_CXXDEFS_value=$CXXDEFS
+ac_env_ADD_CXXFLAGS_set=${ADD_CXXFLAGS+set}
+ac_env_ADD_CXXFLAGS_value=$ADD_CXXFLAGS
+ac_cv_env_ADD_CXXFLAGS_set=${ADD_CXXFLAGS+set}
+ac_cv_env_ADD_CXXFLAGS_value=$ADD_CXXFLAGS
+ac_env_DBG_CXXFLAGS_set=${DBG_CXXFLAGS+set}
+ac_env_DBG_CXXFLAGS_value=$DBG_CXXFLAGS
+ac_cv_env_DBG_CXXFLAGS_set=${DBG_CXXFLAGS+set}
+ac_cv_env_DBG_CXXFLAGS_value=$DBG_CXXFLAGS
+ac_env_OPT_CXXFLAGS_set=${OPT_CXXFLAGS+set}
+ac_env_OPT_CXXFLAGS_value=$OPT_CXXFLAGS
+ac_cv_env_OPT_CXXFLAGS_set=${OPT_CXXFLAGS+set}
+ac_cv_env_OPT_CXXFLAGS_value=$OPT_CXXFLAGS
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_MPICXX_set=${MPICXX+set}
+ac_env_MPICXX_value=$MPICXX
+ac_cv_env_MPICXX_set=${MPICXX+set}
+ac_cv_env_MPICXX_value=$MPICXX
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
+ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_env_ADD_FFLAGS_set=${ADD_FFLAGS+set}
+ac_env_ADD_FFLAGS_value=$ADD_FFLAGS
+ac_cv_env_ADD_FFLAGS_set=${ADD_FFLAGS+set}
+ac_cv_env_ADD_FFLAGS_value=$ADD_FFLAGS
+ac_env_DBG_FFLAGS_set=${DBG_FFLAGS+set}
+ac_env_DBG_FFLAGS_value=$DBG_FFLAGS
+ac_cv_env_DBG_FFLAGS_set=${DBG_FFLAGS+set}
+ac_cv_env_DBG_FFLAGS_value=$DBG_FFLAGS
+ac_env_OPT_FFLAGS_set=${OPT_FFLAGS+set}
+ac_env_OPT_FFLAGS_value=$OPT_FFLAGS
+ac_cv_env_OPT_FFLAGS_set=${OPT_FFLAGS+set}
+ac_cv_env_OPT_FFLAGS_value=$OPT_FFLAGS
+ac_env_MPIF77_set=${MPIF77+set}
+ac_env_MPIF77_value=$MPIF77
+ac_cv_env_MPIF77_set=${MPIF77+set}
+ac_cv_env_MPIF77_value=$MPIF77
+
+#
+# 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 Bonmin 1.7.4 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 \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+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]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --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]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of Bonmin 1.7.4:";;
+   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          compile all projects with debug options tests
+                          (implies --disable-shared)
+  --enable-debug-bonmin compile project Bonmin with debug compiler flags
+
+  --enable-msvc           Prefer (i)cl/ifort/link over GNU on MinGW/Cygwin.
+  --enable-static[=PKGS]
+                          build static libraries [default=no]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --enable-shared[=PKGS]
+                          build shared libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-pkg-config    disable use of pkg-config (if available)
+  --disable-interpackage-dependencies
+                          disables deduction of Makefile dependencies from
+                          package linker flags
+  --disable-cplex-libcheck
+                          skip the link check at configuration time
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-bonmin-verbosity specify the debug verbosity level for project Bonmin
+  --with-bonmin-checklevel
+                          specify the sanity check level for project Bonmin
+  --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-coin-instdir     prefix of installation directory for precompiled
+                          COIN packages
+
+  --with-coindepend-lib linker flags for using package CoinDepend
+  --with-coindepend-incdir
+                          directory with header files for using package
+                          CoinDepend
+  --with-coindepend-datadir
+                          directory with data files for using package
+                          CoinDepend
+  --with-asl-lib linker flags for using package ASL
+  --with-asl-incdir directory with header files for using package ASL
+  --with-asl-datadir directory with data files for using package ASL
+  --with-osicpx-lib linker flags for using package OsiCpx
+  --with-osicpx-incdir directory with header files for using package OsiCpx
+  --with-osicpx-datadir directory with data files for using package OsiCpx
+  --with-cplex-incdir specify the header file directory for library Cplex
+  --with-cplex-lib specify the flags used to link with the library Cplex
+  --with-filtersqp        specify library for FilterSQP (or BUILD for
+                          compilation)
+  --with-filtersqp-lib linker flags for using package FilterSQP
+  --with-filtersqp-incdir directory with header files for using package
+                          FilterSQP
+  --with-filtersqp-datadir
+                          directory with data files for using package
+                          FilterSQP
+
+Some influential environment variables:
+  CDEFS       Additional -D flags to be used when compiling C code.
+  ADD_CFLAGS  Additional C compiler options
+  DBG_CFLAGS  Debug C compiler options
+  OPT_CFLAGS  Optimize C compiler options
+  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>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  MPICC       C MPI Compiler
+  CXXDEFS     Additional -D flags to be used when compiling C++ code.
+  ADD_CXXFLAGS
+              Additional C++ compiler options
+  DBG_CXXFLAGS
+              Debug C++ compiler options
+  OPT_CXXFLAGS
+              Optimize C++ compiler options
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  MPICXX      C++ MPI Compiler
+  CPP         C preprocessor
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  PKG_CONFIG  path to pkg-config utility
+  ADD_FFLAGS  Additional Fortran compiler options
+  DBG_FFLAGS  Debug Fortran compiler options
+  OPT_FFLAGS  Optimize Fortran compiler options
+  MPIF77      Fortran MPI Compiler
+
+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 <bonmin at list.coin-or.org>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style 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
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+Bonmin configure 1.7.4
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+
+Copyright 2006, 2008 International Business Machines and others.
+All Rights Reserved.
+This file is part of the open source package BONMIN which is distributed
+under the Common Public License.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Bonmin $as_me 1.7.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+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`
+hostinfo               = `(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
+
+} >&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_sep=
+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_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    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: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+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,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf 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 -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >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 -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; 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 `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# List one file in the package so that the configure script can test
+# whether the package is actually there
+
+
+# Where should everything be installed by default?  Here, we want it
+# to be installed directly in 'bin', 'lib', 'include' subdirectories
+# of the directory where configure is run.  The default would be
+# /usr/local.
+
+
+#############################################################################
+#                         Standard build tool stuff                         #
+#############################################################################
+
+# Get the system type
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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 $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_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_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { 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=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_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
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+# If this project depends on external projects, the Externals file in
+# the source root directory contains definition of where to find those
+# externals.  The following macro ensures that those externals are
+# retrieved by svn if they are not there yet.
+
+# As backup, we make sure we don't loose an FLIBS if it has been set
+# by the user
+save_FLIBS="$FLIBS"
+
+# A useful makefile conditional that is always false
+
+
+if false; then
+  ALWAYS_FALSE_TRUE=
+  ALWAYS_FALSE_FALSE='#'
+else
+  ALWAYS_FALSE_TRUE='#'
+  ALWAYS_FALSE_FALSE=
+fi
+
+
+# We set the following variable so that we know later in AC_COIN_FINALIZE
+# that we are in a project main directory
+coin_projectdir=yes
+
+# Set the project's version numbers
+
+
+cat >>confdefs.h <<_ACEOF
+#define BONMIN_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+  coin_majorver=`echo $PACKAGE_VERSION | sed -n -e 's/^\([0-9]*\).*/\1/gp'`
+  coin_minorver=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.\([0-9]*\).*/\1/gp'`
+  coin_releasever=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/gp'`
+  if test "x$coin_majorver" = x ; then coin_majorver=9999 ; fi
+  if test "x$coin_minorver" = x ; then coin_minorver=9999 ; fi
+  if test "x$coin_releasever" = x ; then coin_releasever=9999 ; fi
+
+cat >>confdefs.h <<_ACEOF
+#define BONMIN_VERSION_MAJOR $coin_majorver
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define BONMIN_VERSION_MINOR $coin_minorver
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define BONMIN_VERSION_RELEASE $coin_releasever
+_ACEOF
+
+
+  # We use the following variable to have a string with the upper case
+  # version of the project name
+  COIN_PRJCT=BONMIN
+
+  # Set the project's SVN revision number. The complicated sed expression
+  # (made worse by quadrigraphs) ensures that things like 4123:4168MS end up
+  # as a single number.
+  # Extract the first word of "svnversion", so it can be a program name with args.
+set dummy svnversion; 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_have_svnversion+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$have_svnversion"; then
+  ac_cv_prog_have_svnversion="$have_svnversion" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_have_svnversion="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_have_svnversion" && ac_cv_prog_have_svnversion="no"
+fi
+fi
+have_svnversion=$ac_cv_prog_have_svnversion
+if test -n "$have_svnversion"; then
+  echo "$as_me:$LINENO: result: $have_svnversion" >&5
+echo "${ECHO_T}$have_svnversion" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  if test "x$have_svnversion" = xyes; then
+
+    svn_rev_tmp=`LANG=en_EN svnversion $srcdir 2>/dev/null`
+    if test "x$svn_rev_tmp" != xexported -a "x$svn_rev_tmp" != x -a "x$svn_rev_tmp" != "xUnversioned directory"; then
+      BONMIN_SVN_REV=`echo $svn_rev_tmp | sed -n -e 's/^[0-9]*://' -e 's/\([0-9]\)[^0-9]*$/\1/p'`
+
+cat >>confdefs.h <<_ACEOF
+#define BONMIN_SVN_REV $BONMIN_SVN_REV
+_ACEOF
+
+    fi
+  fi
+
+
+
+# Capture libtool library version, if given.
+ coin_libversion=11:4:7
+
+
+
+
+# Check if user wants to produce debugging code
+
+echo "$as_me:$LINENO: checking whether we want to compile in debug mode" >&5
+echo $ECHO_N "checking whether we want to compile in debug mode... $ECHO_C" >&6
+
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+  case "${enableval}" in
+   yes) coin_debug_compile=true
+        if test "${enable_shared+set}" = set; then :; else
+          enable_shared=no
+        fi
+        ;;
+   no)  coin_debug_compile=false
+        ;;
+   *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;}
+   { (exit 1); exit 1; }; }
+        ;;
+esac
+else
+  coin_debug_compile=false
+fi;
+
+# Check whether --enable-debug-bonmin or --disable-debug-bonmin was given.
+if test "${enable_debug_bonmin+set}" = set; then
+  enableval="$enable_debug_bonmin"
+  case "${enableval}" in
+    yes) coin_debug_compile=true
+         ;;
+    no)  coin_debug_compile=false
+         ;;
+    *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug-bonmin" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-debug-bonmin" >&2;}
+   { (exit 1); exit 1; }; }
+         ;;
+ esac
+else
+  :
+fi;
+
+ # m4_ifvaln([Bonmin],
+
+if test $coin_debug_compile = true; 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
+fi
+
+
+# Check whether --with-bonmin-verbosity or --without-bonmin-verbosity was given.
+if test "${with_bonmin_verbosity+set}" = set; then
+  withval="$with_bonmin_verbosity"
+  if test "$withval" = yes; then
+                withval=1
+              fi
+              coin_bonmin_verbosity=$withval
+else
+  coin_bonmin_verbosity=0
+fi;
+
+cat >>confdefs.h <<_ACEOF
+#define COIN_BONMIN_VERBOSITY $coin_bonmin_verbosity
+_ACEOF
+
+
+
+# Check whether --with-bonmin-checklevel or --without-bonmin-checklevel was given.
+if test "${with_bonmin_checklevel+set}" = set; then
+  withval="$with_bonmin_checklevel"
+  if test "$withval" = yes; then
+                withval=1
+              fi
+              coin_bonmin_checklevel=$withval
+else
+  coin_bonmin_checklevel=0
+fi;
+
+cat >>confdefs.h <<_ACEOF
+#define COIN_BONMIN_CHECKLEVEL $coin_bonmin_checklevel
+_ACEOF
+
+
+ # m4_ifvaln([Bonmin],
+
+
+
+# Get the name of the C++ compiler and appropriate compiler options
+
+
+  # for backward compatibility
+  # Check whether --enable-doscompile or --disable-doscompile was given.
+if test "${enable_doscompile+set}" = set; then
+  enableval="$enable_doscompile"
+  enable_doscompile=$enableval
+else
+  enable_doscompile=no
+fi;
+
+  # Check whether --enable-msvc or --disable-msvc was given.
+if test "${enable_msvc+set}" = set; then
+  enableval="$enable_msvc"
+  enable_msvc=$enableval
+else
+  enable_msvc=no
+     if test "$enable_doscompile" = msvc ; then
+       enable_msvc=yes
+     elif test "$enable_doscompile" != no ; then
+       { { echo "$as_me:$LINENO: error: --enable-doscompile=$enable_doscompile not supported anymore." >&5
+echo "$as_me: error: --enable-doscompile=$enable_doscompile not supported anymore." >&2;}
+   { (exit 1); exit 1; }; }
+     fi
+
+fi;
+
+  if test "$enable_msvc" = MD; then
+    enable_shared=yes
+    enable_msvc=yes
+  fi
+
+  if test "$enable_msvc" = yes; then
+    case $build in
+      *-cygwin* | *-mingw*) ;;
+      *) { { echo "$as_me:$LINENO: error: --enable-msvc option makes sense only under Cygwin or MinGW" >&5
+echo "$as_me: error: --enable-msvc option makes sense only under Cygwin or MinGW" >&2;}
+   { (exit 1); exit 1; }; } ;;
+    esac
+  fi
+
+
+ case $build in
+  *-mingw*)
+    if test "${LD+set}" = set; then :; else
+      LD=link
+    fi
+    ;;
+ esac
+ if test $enable_msvc = yes ; then
+   if test "x${LD+set}" = xset; then :; else
+     LD=link
+   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
+
+
+# For consistency, we set the C compiler to the same value of the C++
+# compiler, if the C++ is set, but the C compiler isn't (only for CXX=cl)
+if test x"$CXX" != x; then
+  case "$CXX" in
+    clang* ) ;;
+    cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+      if test x"$CC" = x; then
+        CC="$CXX"
+        { echo "$as_me:$LINENO: WARNING: C++ compiler name provided as $CXX, but CC is unset. Setting CC to $CXX" >&5
+echo "$as_me: WARNING: C++ compiler name provided as $CXX, but CC is unset. Setting CC to $CXX" >&2;}
+      fi
+      ;;
+  esac
+fi
+
+
+
+
+
+
+coin_has_cc=yes
+
+save_cflags="$CFLAGS"
+
+# For *-*-solaris*, promote Studio/Workshop cc compiler to front of list.
+# Depending on the user's PATH, when Studio/Workshop cc is not present we may
+# find /usr/ucb/cc, which is almost certainly not a good choice for the C
+# compiler. In this case, put cc after gcc.
+
+case $build in
+  *-cygwin* | *-mingw*)
+  	     if test "$enable_msvc" = yes ; then
+	       comps="icl cl gcc"
+	     else
+	       comps="gcc icl cl"
+	     fi ;;
+  *-*-solaris*)
+	     # 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_sol_cc_compiler+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$sol_cc_compiler"; then
+  ac_cv_prog_sol_cc_compiler="$sol_cc_compiler" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_sol_cc_compiler="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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_sol_cc_compiler
+  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 sol_cc_compiler to just the basename; use the full file name.
+    shift
+    ac_cv_prog_sol_cc_compiler="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+sol_cc_compiler=$ac_cv_prog_sol_cc_compiler
+if test -n "$sol_cc_compiler"; then
+  echo "$as_me:$LINENO: result: $sol_cc_compiler" >&5
+echo "${ECHO_T}$sol_cc_compiler" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+	     if test "$sol_cc_compiler" = "cc" ; then
+	       comps="cc xlc gcc pgcc icc"
+	     else
+	       comps="xlc gcc pgcc icc cc"
+	     fi
+	     ;;
+  *-linux-gnu*) comps="gcc cc pgcc icc xlc" ;;
+  *-linux-*) comps="xlc gcc cc pgcc icc" ;;
+  *)         comps="xlc_r xlc cc gcc pgcc icc" ;;
+esac
+
+# We delete the cached value, since the test might not have been
+# performed with our choice of compilers earlier
+$as_unset ac_cv_prog_CC || test "${ac_cv_prog_CC+set}" != set || { ac_cv_prog_CC=; export ac_cv_prog_CC; }
+# AC_MSG_NOTICE([C compiler candidates: $comps])
+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
+  for ac_prog in $comps
+  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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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 $comps
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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
+
+  CC=$ac_ct_CC
+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`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&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[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  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
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check 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'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 { (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); }; 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 | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  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 { (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
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f 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
+CFLAGS="-g"
+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
+  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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+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 ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=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 -std1 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 -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 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
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f 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
+
+if test -z "$CC" ; then
+  { { echo "$as_me:$LINENO: error: Failed to find a C compiler!" >&5
+echo "$as_me: error: Failed to find a C compiler!" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+# Autoconf incorrectly concludes that cl recognises -g. It doesn't.
+case "$CC" in
+  clang* ) ;;
+  cl* | */cl* | CL* | */CL* )
+    if test "$ac_cv_prog_cc_g" = yes ; then
+      ac_cv_prog_cc_g=no
+      { echo "$as_me:$LINENO: Overruling autoconf; cl does not recognise -g." >&5
+echo "$as_me: Overruling autoconf; cl does not recognise -g." >&6;}
+    fi ;;
+  * )
+    if test x"$CYGPATH_W" = x ; then
+      CYGPATH_W=echo
+    fi
+    ;;
+esac
+CFLAGS="$save_cflags"
+
+# add automake conditional so we can recognize cl compiler in makefile
+coin_cc_is_cl=false
+case "$CC" in
+  clang* ) ;;
+  cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+    coin_cc_is_cl=true
+    ;;
+esac
+
+
+if test $coin_cc_is_cl = true; then
+  COIN_CC_IS_CL_TRUE=
+  COIN_CC_IS_CL_FALSE='#'
+else
+  COIN_CC_IS_CL_TRUE='#'
+  COIN_CC_IS_CL_FALSE=
+fi
+
+
+# Check if a project specific CFLAGS variable has been set
+if test x$COIN_PRJCT != x; then
+  eval coin_tmp=\${${COIN_PRJCT}_CFLAGS+set}
+  if test x$coin_tmp = xset; then
+    eval CFLAGS=\${${COIN_PRJCT}_CFLAGS}
+  fi
+fi
+
+if test x"$CFLAGS" = x; then
+
+  coin_add_cflags=
+  coin_opt_cflags=
+  coin_dbg_cflags=
+  coin_warn_cflags=
+
+  if test "$GCC" = "yes"; then
+    case "$CC" in
+      icc* | */icc*)
+        ;;
+      *)
+        coin_opt_cflags="-O3"
+        coin_add_cflags="-pipe"
+        coin_dbg_cflags="-g -O0"
+        coin_warn_cflags="-Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -Wno-long-long"
+        case $build in
+          *-darwin*)
+            ;;
+          *)
+            coin_warn_cflags="-pedantic-errors $coin_warn_cflags"
+            ;;
+        esac
+    esac
+  fi
+  if test -z "$coin_opt_cflags"; then
+    case $build in
+      *-cygwin* | *-mingw*)
+        case "$CC" in
+          clang* ) ;;
+          cl* | */cl* | CL* | */CL*)
+            if test "$coin_disable_shared" = yes || test "$enable_shared" = yes ; then
+              coin_opt_cflags='-MD -O2'
+              coin_dbg_cflags='-MDd'
+            else
+              coin_opt_cflags='-MT -O2'
+              coin_dbg_cflags='-MTd'
+            fi
+            coin_add_cflags='-nologo -wd4996 -D_CRT_SECURE_NO_DEPRECATE'
+            ;;
+          icl* | */icl* | ICL* | */ICL*)
+            if test "$coin_disable_shared" = yes || test "$enable_shared" = yes ; then
+              coin_opt_cflags='-MD -Ox'
+              coin_dbg_cflags='-MDd -debug'
+            else
+              coin_opt_cflags='-MT -Ox'
+              coin_dbg_cflags='-MTd -debug'
+            fi
+            coin_add_cflags='-nologo -D_CRT_SECURE_NO_DEPRECATE'
+            ;;
+        esac
+        ;;
+      *-linux-*)
+        case "$CC" in
+          icc* | */icc*)
+            coin_opt_cflags="-O3 -ip -mp1"
+            coin_add_cflags=""
+            coin_dbg_cflags="-g"
+            # Check if -i_dynamic is necessary (for new glibc library)
+            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 ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+coin_add_cflags="-i_dynamic $coin_add_cflags"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+            ;;
+          pgcc* | */pgcc*)
+            coin_opt_cflags="-fast"
+            coin_add_cflags="-Kieee -pc 64"
+            coin_dbg_cflags="-g"
+            ;;
+        esac
+        ;;
+      *-ibm-*)
+        case "$CC" in
+          xlc* | */xlc* | mpxlc* | */mpxlc*)
+            coin_opt_cflags="-O -qarch=auto -qcache=auto -qtune=auto -qmaxmem=-1"
+            coin_add_cflags="-bmaxdata:0x80000000 -qsuppress=1500-036 -qsuppress=1500-029"
+            coin_dbg_cflags="-g"
+          ;;
+        esac
+        ;;
+      *-hp-*)
+        coin_opt_cflags="-O"
+        coin_add_cflags="-Ae"
+        coin_dbg_cflags="-g"
+        ;;
+      *-*-solaris*)
+        coin_opt_cflags="-xO4"
+        coin_dbg_cflags="-g"
+        ;;
+      *-sgi-*)
+        coin_opt_cflags="-O -OPT:Olimit=0"
+        coin_dbg_cflags="-g"
+        ;;
+    esac
+  fi
+
+  if test "$ac_cv_prog_cc_g" = yes && test -z "$coin_dbg_cflags" ; then
+    coin_dbg_cflags="-g"
+  fi
+
+  if test -z "$coin_opt_cflags"; then
+    # Try if -O option works if nothing else is set
+    CFLAGS="-O"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  coin_opt_cflags="-O"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  fi
+
+  # if PM doesn't want the warning messages, take them out
+  if test x"$coin_skip_warn_cflags" = xyes; then
+    coin_warn_cflags=
+  fi
+
+  if test x${DBG_CFLAGS+set} != xset; then
+    DBG_CFLAGS="$coin_dbg_cflags $coin_add_cflags $coin_warn_cflags"
+  fi
+  if test x${OPT_CFLAGS+set} != xset; then
+    OPT_CFLAGS="$coin_opt_cflags $coin_add_cflags -DNDEBUG $coin_warn_cflags"
+  fi
+
+  DBG_CFLAGS="$DBG_CFLAGS $ADD_CFLAGS $CDEFS"
+  OPT_CFLAGS="$OPT_CFLAGS $ADD_CFLAGS $CDEFS"
+
+  if test "$coin_debug_compile" = "true"; then
+    CFLAGS="$DBG_CFLAGS"
+  else
+    CFLAGS="$OPT_CFLAGS"
+  fi
+else
+  CFLAGS="$CFLAGS $ADD_CFLAGS $CDEFS"
+  if test x${DBG_CFLAGS+set} != xset; then
+    DBG_CFLAGS="$CFLAGS"
+  fi
+  if test x${OPT_CFLAGS+set} != xset; then
+    OPT_CFLAGS="$CFLAGS"
+  fi
+fi
+
+# add -DPROJECT_BUILD to signal compiler preprocessor which config header file to include
+if test x$COIN_PRJCT != x; then
+  CFLAGS="$CFLAGS -D${COIN_PRJCT}_BUILD"
+fi
+
+# Try if CFLAGS works
+save_CFLAGS="$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 ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CFLAGS=
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$CFLAGS"; then
+  { echo "$as_me:$LINENO: WARNING: The value CFLAGS=\"$save_CFLAGS\" do not work.  I will now just try '-O', but you might want to set CFLAGS manually." >&5
+echo "$as_me: WARNING: The value CFLAGS=\"$save_CFLAGS\" do not work.  I will now just try '-O', but you might want to set CFLAGS manually." >&2;}
+  CFLAGS='-O'
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CFLAGS=
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  if test -z "$CFLAGS"; then
+    { echo "$as_me:$LINENO: WARNING: This value for CFLAGS does not work.  I will continue with empty CFLAGS, but you might want to set CFLAGS manually." >&5
+echo "$as_me: WARNING: This value for CFLAGS does not work.  I will continue with empty CFLAGS, but you might want to set CFLAGS manually." >&2;}
+  fi
+fi
+
+{ echo "$as_me:$LINENO: C compiler options are: $CFLAGS" >&5
+echo "$as_me: C compiler options are: $CFLAGS" >&6;}
+
+
+if test x"$MPICC" = x; then :; else
+  { echo "$as_me:$LINENO: Will use MPI C compiler $MPICC" >&5
+echo "$as_me: Will use MPI C compiler $MPICC" >&6;}
+  CC="$MPICC"
+fi
+
+# Correct the LD variable if we are using the MS or Intel-windows compiler
+case "$CC" in
+  clang* ) ;;
+  cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+
+ case $build in
+  *-mingw*)
+    if test "${LD+set}" = set; then :; else
+      LD=link
+    fi
+    ;;
+ esac
+ if test $enable_msvc = yes ; then
+   if test "x${LD+set}" = xset; then :; else
+     LD=link
+   fi
+ fi
+
+    ;;
+esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ #Let's try if that overcomes configuration problem with VC++ 6.0
+
+ac_ext=cc
+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
+
+
+
+
+
+
+
+coin_has_cxx=yes
+
+save_cxxflags="$CXXFLAGS"
+# For *-*-solaris*, promote Studio/Workshop compiler to front of list.
+case $build in
+  *-cygwin* | *-mingw*)
+      if test "$enable_msvc" = yes ; then
+         comps="icl cl g++"
+      else
+         comps="g++ icl cl"
+      fi ;;
+  *-*-solaris*)
+  	     comps="CC xlC_r aCC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
+  *-darwin*) comps="g++ c++ CC" ;;
+  *-linux-gnu*)
+             comps="g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC xlC_r aCC CC" ;;
+          *) comps="xlC_r aCC CC g++ c++ pgCC icpc gpp cxx cc++ cl FCC KCC RCC" ;;
+esac
+
+# We delete the cached value, since the test might not have been
+# performed with our choice of compilers earlier
+$as_unset ac_cv_prog_CXX || test "${ac_cv_prog_CXX+set}" != set || { ac_cv_prog_CXX=; export ac_cv_prog_CXX; }
+# AC_MSG_NOTICE([C++ compiler candidates: $comps])
+ac_ext=cc
+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 -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC $comps
+  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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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 $CCC $comps
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+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`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f 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
+CXXFLAGS="-g"
+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
+  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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+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
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=cc
+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
+
+
+#AC_PROG_CXX sets CXX to g++ if it cannot find a working C++ compiler
+#thus, we test here whether $CXX is actually working
+ac_ext=cc
+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 whether C++ compiler $CXX works" >&5
+echo $ECHO_N "checking whether C++ compiler $CXX works... $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.  */
+
+int
+main ()
+{
+int i=0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 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: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+   { { echo "$as_me:$LINENO: error: failed to find a C++ compiler or C++ compiler $CXX does not work" >&5
+echo "$as_me: error: failed to find a C++ compiler or C++ compiler $CXX does not work" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=cc
+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
+
+
+coin_cxx_is_cl=false
+# It seems that we need to cleanup something here for the Windows
+case "$CXX" in
+  clang* ) ;;
+  cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+    sed -e 's/^void exit (int);//' confdefs.h >> confdefs.hh
+    mv confdefs.hh confdefs.h
+    coin_cxx_is_cl=true
+    ;;
+esac
+
+# add automake conditional so we can recognize cl compiler in makefile
+
+
+if test $coin_cxx_is_cl = true; then
+  COIN_CXX_IS_CL_TRUE=
+  COIN_CXX_IS_CL_FALSE='#'
+else
+  COIN_CXX_IS_CL_TRUE='#'
+  COIN_CXX_IS_CL_FALSE=
+fi
+
+
+# Autoconf incorrectly concludes that cl recognises -g. It doesn't.
+case "$CXX" in
+  clang* ) ;;
+  cl* | */cl* | CL* | */CL* )
+    if test "$ac_cv_prog_cxx_g" = yes ; then
+      ac_cv_prog_cxx_g=no
+      { echo "$as_me:$LINENO: Overruling autoconf; cl does not recognise -g." >&5
+echo "$as_me: Overruling autoconf; cl does not recognise -g." >&6;}
+    fi ;;
+  * )
+    if test x"$CYGPATH_W" = x ; then
+      CYGPATH_W=echo
+    fi
+    ;;
+esac
+CXXFLAGS="$save_cxxflags"
+
+# Check if a project specific CXXFLAGS variable has been set
+if test x$COIN_PRJCT != x; then
+  eval coin_tmp=\${${COIN_PRJCT}_CXXFLAGS+set}
+  if test x$coin_tmp = xset; then
+    eval CXXFLAGS=\${${COIN_PRJCT}_CXXFLAGS}
+  fi
+fi
+
+if test x"$CXXFLAGS" = x; then
+
+# ToDo decide whether we want -DNDEBUG for optimization
+  coin_add_cxxflags=
+  coin_opt_cxxflags=
+  coin_dbg_cxxflags=
+  coin_warn_cxxflags=
+
+  if test "$GXX" = "yes"; then
+    case "$CXX" in
+      icpc* | */icpc*)
+        ;;
+      *)
+# ToDo decide about unroll-loops
+        coin_opt_cxxflags="-O3"
+        coin_add_cxxflags="-pipe"
+        coin_dbg_cxxflags="-g -O0"
+        coin_warn_cxxflags="-Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long"
+        case $build in
+          *-darwin*)
+            ;;
+          *)
+            coin_warn_cxxflags="-pedantic-errors $coin_warn_cxxflags"
+            ;;
+        esac
+    esac
+  fi
+
+# Note that we do not need to cover GCC in the following tests.
+
+  if test -z "$coin_opt_cxxflags"; then
+    case $build in
+      *-cygwin* | *-mingw*)
+        case "$CXX" in
+          clang* ) ;;
+          cl* | */cl* | CL* | */CL*)
+            # The MT and MTd options are mutually exclusive
+            if test "$coin_disable_shared" = yes || test "$enable_shared" = yes ; then
+               coin_opt_cxxflags='-MD -O2'
+               coin_dbg_cxxflags='-MDd'
+            else
+               coin_opt_cxxflags='-MT -O2'
+               coin_dbg_cxxflags='-MTd'
+            fi
+            coin_add_cxxflags='-nologo -EHsc -GR -wd4996 -D_CRT_SECURE_NO_DEPRECATE'
+            ;;
+          icl* | */icl* | ICL* | */ICL*)
+          # The MT and MTd options are mutually exclusive
+            if test "$coin_disable_shared" = yes || test "$enable_shared" = yes ; then
+              coin_opt_cxxflags='-MD -Ox'
+              coin_dbg_cxxflags='-MDd -debug'
+            else
+              coin_opt_cxxflags='-MT -Ox'
+              coin_dbg_cxxflags='-MTd -debug'
+            fi
+            coin_add_cxxflags='-nologo -EHsc -GR -D_CRT_SECURE_NO_DEPRECATE'
+            ;;
+        esac
+        ;;
+      *-linux-*)
+        case "$CXX" in
+          icpc* | */icpc*)
+            coin_opt_cxxflags="-O3 -ip -mp1"
+            coin_add_cxxflags=""
+            coin_dbg_cxxflags="-g"
+            # Check if -i_dynamic is necessary (for new glibc library)
+            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 ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+coin_add_cxxflags="-i_dynamic $coin_add_cxxflags"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+            ;;
+          pgCC* | */pgCC*)
+            coin_opt_cxxflags="-fast"
+            coin_add_cxxflags="-Kieee -pc 64"
+            coin_dbg_cxxflags="-g"
+            ;;
+        esac
+        ;;
+      *-ibm-*)
+        case "$CXX" in
+          xlC* | */xlC* | mpxlC* | */mpxlC*)
+            coin_opt_cxxflags="-O -qarch=auto -qcache=auto -qtune=auto -qmaxmem=-1"
+            coin_add_cxxflags="-bmaxdata:0x80000000 -qrtti=dyna -qsuppress=1500-036 -qsuppress=1500-029 -qsourcetype=c++"
+            coin_dbg_cxxflags="-g"
+            ;;
+        esac
+        ;;
+      *-hp-*)
+        case "$CXX" in
+          aCC* | */aCC* )
+            coin_opt_cxxflags="-O"
+            coin_add_cxxflags="-AA"
+            coin_dbg_cxxflags="-g"
+            ;;
+        esac
+        ;;
+      *-*-solaris*)
+          coin_opt_cxxflags="-O4"
+          coin_dbg_cxxflags="-g"
+        ;;
+    esac
+  fi
+
+# Generic flag settings. If these don't work, add a case above.
+
+  if test "$ac_cv_prog_cxx_g" = yes && test -z "$coin_dbg_cxxflags" ; then
+    coin_dbg_cxxflags="-g"
+  fi
+
+  if test -z "$coin_opt_cxxflags"; then
+    # Try if -O option works if nothing else is set
+    CXXFLAGS=-O
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  coin_opt_cxxflags="-O"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  fi
+
+  # if PM doesn't want the warning messages, take them out
+  if test x"$coin_skip_warn_cxxflags" = xyes; then
+    coin_warn_cxxflags=
+  fi
+
+# Do final setup of flags based on values determined above.
+
+  if test x${DBG_CXXFLAGS+set} != xset; then
+    DBG_CXXFLAGS="$coin_dbg_cxxflags $coin_add_cxxflags $coin_warn_cxxflags"
+  fi
+  if test x${OPT_CXXFLAGS+set} != xset; then
+    OPT_CXXFLAGS="$coin_opt_cxxflags $coin_add_cxxflags -DNDEBUG $coin_warn_cxxflags"
+  fi
+
+  DBG_CXXFLAGS="$DBG_CXXFLAGS $ADD_CXXFLAGS $CXXDEFS"
+  OPT_CXXFLAGS="$OPT_CXXFLAGS $ADD_CXXFLAGS $CXXDEFS"
+
+  if test "$coin_debug_compile" = "true"; then
+    CXXFLAGS="$DBG_CXXFLAGS"
+  else
+    CXXFLAGS="$OPT_CXXFLAGS"
+  fi
+
+# Handle the case where CXXFLAGS was set externally.
+else
+  CXXFLAGS="$CXXFLAGS $ADD_CXXFLAGS $CXXDEFS"
+  if test x${DBG_CXXFLAGS+set} != xset; then
+    DBG_CXXFLAGS="$CXXFLAGS"
+  fi
+  if test x${OPT_CXXFLAGS+set} != xset; then
+    OPT_CXXFLAGS="$CXXFLAGS"
+  fi
+fi
+
+# add -DPROJECT_BUILD to signal compiler preprocessor which config header file to include
+if test x$COIN_PRJCT != x; then
+  CXXFLAGS="$CXXFLAGS -D${COIN_PRJCT}_BUILD"
+fi
+
+# Try if CXXFLAGS works
+save_CXXFLAGS="$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 ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CXXFLAGS=
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$CXXFLAGS"; then
+  { echo "$as_me:$LINENO: WARNING: The flags CXXFLAGS=\"$save_CXXFLAGS\" do not work.  I will now just try '-O', but you might want to set CXXFLAGS manually." >&5
+echo "$as_me: WARNING: The flags CXXFLAGS=\"$save_CXXFLAGS\" do not work.  I will now just try '-O', but you might want to set CXXFLAGS manually." >&2;}
+  CXXFLAGS='-O'
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i=0; i++;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CXXFLAGS=
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  if test -z "$CXXFLAGS"; then
+    { echo "$as_me:$LINENO: WARNING: This value for CXXFLAGS does not work.  I will continue with empty CXXFLAGS, but you might want to set CXXFLAGS manually." >&5
+echo "$as_me: WARNING: This value for CXXFLAGS does not work.  I will continue with empty CXXFLAGS, but you might want to set CXXFLAGS manually." >&2;}
+  fi
+fi
+
+{ echo "$as_me:$LINENO: C++ compiler options are: $CXXFLAGS" >&5
+echo "$as_me: C++ compiler options are: $CXXFLAGS" >&6;}
+
+
+if test x"$MPICXX" = x; then :; else
+  { echo "$as_me:$LINENO: Will use MPI C++ compiler $MPICXX" >&5
+echo "$as_me: Will use MPI C++ compiler $MPICXX" >&6;}
+  CXX="$MPICXX"
+fi
+
+# correct the LD variable in a mingw build with MS or intel compiler
+case "$CXX" in
+  clang* ) ;;
+  cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+
+ case $build in
+  *-mingw*)
+    if test "${LD+set}" = set; then :; else
+      LD=link
+    fi
+    ;;
+ esac
+ if test $enable_msvc = yes ; then
+   if test "x${LD+set}" = xset; then :; else
+     LD=link
+   fi
+ fi
+
+    ;;
+esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+# Initialize automake and libtool
+{
+
+
+
+# START
+
+coin_disable_shared=no
+# Test if force_shared has been set
+if test "x" = xforce_shared; then
+  if test x$enable_shared = xno; then
+    { { echo "$as_me:$LINENO: error: Shared libraries are disabled by user, but this is not feasible with the given options" >&5
+echo "$as_me: error: Shared libraries are disabled by user, but this is not feasible with the given options" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  enable_shared=yes;
+else
+  # On Cygwin and AIX, building DLLs doesn't work
+  case $build in
+    *-cygwin* | *-mingw*)
+      coin_disable_shared=yes
+      if test x"$enable_shared" = xyes; then
+        case "$CC" in
+          clang* )
+            { echo "$as_me:$LINENO: WARNING: DLL building not supported. I'm disabling your choice." >&5
+echo "$as_me: WARNING: DLL building not supported. I'm disabling your choice." >&2;}
+            ;;
+          cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+            { echo "$as_me:$LINENO: DLL building not supported, but will build with -MD(d) instead of -MT(d)." >&5
+echo "$as_me: DLL building not supported, but will build with -MD(d) instead of -MT(d)." >&6;}
+            ;;
+          *gcc*)
+	    if test x"$enable_dependency_linking" = xyes; then
+              coin_disable_shared=no
+            else
+              { echo "$as_me:$LINENO: WARNING: To build shared libraries with gcc on CYGWIN or MSys, use --enable-dependency-linking" >&5
+echo "$as_me: WARNING: To build shared libraries with gcc on CYGWIN or MSys, use --enable-dependency-linking" >&2;}
+            fi
+            ;;
+          *)
+            { echo "$as_me:$LINENO: WARNING: DLL building not supported. I'm disabling your choice." >&5
+echo "$as_me: WARNING: DLL building not supported. I'm disabling your choice." >&2;}
+            ;;
+        esac
+      fi
+    ;;
+    *-aix*)
+      coin_disable_shared=yes
+      platform=AIX
+      if test x"$enable_shared" = xyes; then
+        { echo "$as_me:$LINENO: WARNING: Shared objects are not supported. I'm disabling your choice." >&5
+echo "$as_me: WARNING: Shared objects are not supported. I'm disabling your choice." >&2;}
+      fi
+    ;;
+  esac
+fi
+if test x"$coin_disable_shared" = xyes; then
+  if test x"$enable_shared" = xyes; then
+    :
+  else
+    # we don't disable shared, because it was not selected anyway
+    coin_disable_shared=no
+  fi
+  enable_shared=no
+fi
+# By default, we only want the shared objects to be compiled
+# Check whether --enable-static or --disable-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;
+
+
+
+
+# Initialize automake
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_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_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+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
+
+am__api_version="1.9"
+# 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 $as_executable_p "$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
+
+
+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.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    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 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
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
+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 $as_executable_p "$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
+
+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 dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$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
+
+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 or --disable-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_MSG_NOTICE([Beginning automake initialisation.])
+# Stuff for automake
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   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
+
+# 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='bonmin'
+ VERSION='1.7.4'
+
+
+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-"$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 $as_executable_p "$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
+
+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 $as_executable_p "$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
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+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
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(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 -'
+
+
+
+
+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/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
+
+
+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/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 whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi;
+  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+coin_have_externals=no
+if test "$enable_maintainer_mode" = yes; then
+
+  # If maintainer mode is chosen, we make sure that the correct versions
+  # of the tools are used, and that we know where libtool.m4 is (to
+  # recreate acinclude.m4)
+
+
+  LIBTOOLM4=
+  # Normally, $HOME
+  AUTOTOOLS_DFLT=$HOME
+
+  echo "$as_me:$LINENO: checking whether we are using the correct autotools" >&5
+echo $ECHO_N "checking whether we are using the correct autotools... $ECHO_C" >&6
+if test "${ac_cv_use_correct_autotools+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_use_correct_autotools=check
+fi
+echo "$as_me:$LINENO: result: $ac_cv_use_correct_autotools" >&5
+echo "${ECHO_T}$ac_cv_use_correct_autotools" >&6
+
+  if test $ac_cv_use_correct_autotools = check; then
+    ac_cv_use_correct_autotools=yes
+    # Check if we have autoconf
+    # Extract the first word of "autoconf", so it can be a program name with args.
+set dummy autoconf; 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_have_autoconf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$have_autoconf"; then
+  ac_cv_prog_have_autoconf="$have_autoconf" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_have_autoconf="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_have_autoconf" && ac_cv_prog_have_autoconf="no"
+fi
+fi
+have_autoconf=$ac_cv_prog_have_autoconf
+if test -n "$have_autoconf"; then
+  echo "$as_me:$LINENO: result: $have_autoconf" >&5
+echo "${ECHO_T}$have_autoconf" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    if test $have_autoconf = no; then
+      { { echo "$as_me:$LINENO: error: You specified you want to use maintainer mode, but I cannot find autoconf in your path." >&5
+echo "$as_me: error: You specified you want to use maintainer mode, but I cannot find autoconf in your path." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Check whether autoconf is the correct version
+    correct_version='2.59'
+    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
+    echo "$as_me:$LINENO: checking whether we are using the correct version ($correct_version) of autoconf" >&5
+echo $ECHO_N "checking whether we are using the correct version ($correct_version) of autoconf... $ECHO_C" >&6
+    autoconf --version > confauto.out 2>&1
+    if $EGREP $grep_version confauto.out >/dev/null 2>&1; then
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+    else
+      rm -f confauto.out
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      { { echo "$as_me:$LINENO: error: You don't have the correct version of autoconf as the first one in your path." >&5
+echo "$as_me: error: You don't have the correct version of autoconf as the first one in your path." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    rm -f confauto.out
+
+    # Check if the executable autoconf is picked up from the correct location
+    echo "$as_me:$LINENO: checking whether autoconf is coming from the correct location" >&5
+echo $ECHO_N "checking whether autoconf is coming from the correct location... $ECHO_C" >&6
+    autoconf_dir=`which autoconf | sed -e 's=/autoconf=='`
+    autoconf_dir=`cd $autoconf_dir; pwd`
+    if test x$AUTOTOOLS_DIR = x; then
+      want_dir=$AUTOTOOLS_DFLT/bin
+    else
+      want_dir=$AUTOTOOLS_DIR/bin
+    fi
+    if test $autoconf_dir = `cd $want_dir; pwd`; then
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+    else
+      rm -f confauto.out
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      { { echo "$as_me:$LINENO: error: The autoconf executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin." >&5
+echo "$as_me: error: The autoconf executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Check if we have automake
+    # Extract the first word of "automake", so it can be a program name with args.
+set dummy automake; 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_have_automake+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$have_automake"; then
+  ac_cv_prog_have_automake="$have_automake" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_have_automake="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_have_automake" && ac_cv_prog_have_automake="no"
+fi
+fi
+have_automake=$ac_cv_prog_have_automake
+if test -n "$have_automake"; then
+  echo "$as_me:$LINENO: result: $have_automake" >&5
+echo "${ECHO_T}$have_automake" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    if test $have_automake = no; then
+      { { echo "$as_me:$LINENO: error: You specified you want to use maintainer mode, but I cannot find automake in your path." >&5
+echo "$as_me: error: You specified you want to use maintainer mode, but I cannot find automake in your path." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Check whether automake is the correct version
+    correct_version='1.9.6'
+    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
+    echo "$as_me:$LINENO: checking whether we are using the correct version ($correct_version) of automake" >&5
+echo $ECHO_N "checking whether we are using the correct version ($correct_version) of automake... $ECHO_C" >&6
+    automake --version > confauto.out 2>&1
+    if $EGREP $grep_version confauto.out >/dev/null 2>&1; then
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+    else
+      rm -f confauto.out
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      { { echo "$as_me:$LINENO: error: You don't have the correct version of automake as the first one in your path." >&5
+echo "$as_me: error: You don't have the correct version of automake as the first one in your path." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    rm -f confauto.out
+
+    # Check if the executable automake is picked up from the correct location
+    echo "$as_me:$LINENO: checking whether automake is coming from the correct location" >&5
+echo $ECHO_N "checking whether automake is coming from the correct location... $ECHO_C" >&6
+    automake_dir=`which automake | sed -e 's=/automake=='`
+    automake_dir=`cd $automake_dir; pwd`
+    if test x$AUTOTOOLS_DIR = x; then
+      want_dir=$AUTOTOOLS_DFLT/bin
+    else
+      want_dir=$AUTOTOOLS_DIR/bin
+    fi
+    if test $automake_dir = `cd $want_dir; pwd`; then
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+    else
+      rm -f confauto.out
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      { { echo "$as_me:$LINENO: error: The automake executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin." >&5
+echo "$as_me: error: The automake executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Check if this is the correct version of libtool (with escaped dots)
+    if test x$AUTOTOOLS_DIR = x; then
+      want_dir=$AUTOTOOLS_DFLT/share
+    else
+      want_dir=$AUTOTOOLS_DIR/share
+    fi
+    correct_version='1.5.22'
+    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
+    if test -r $want_dir/libtool/ltmain.sh; then
+  have_ltmain=yes
+  :
+else
+  have_ltmain=no
+  :
+fi
+
+    echo "$as_me:$LINENO: checking whether we are using the correct version ($correct_version) of libtool." >&5
+echo $ECHO_N "checking whether we are using the correct version ($correct_version) of libtool.... $ECHO_C" >&6
+    if test $have_ltmain = yes; then
+    if $EGREP $grep_version $want_dir/libtool/ltmain.sh >/dev/null 2>&1; 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
+        { { echo "$as_me:$LINENO: error: You don't have the correct version of libtool." >&5
+echo "$as_me: error: You don't have the correct version of libtool." >&2;}
+   { (exit 1); exit 1; }; }
+      fi
+    else
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      { { echo "$as_me:$LINENO: error: I cannot find the ltmain.sh file." >&5
+echo "$as_me: error: I cannot find the ltmain.sh file." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+
+  # Check if we can find the libtool file
+  if test x$AUTOTOOLS_DIR = x; then
+    want_dir=$AUTOTOOLS_DFLT/share
+  else
+    want_dir=$AUTOTOOLS_DIR/share
+  fi
+  if test -r $want_dir/aclocal/libtool.m4; then
+  LIBTOOLM4="$want_dir/aclocal/libtool.m4"
+  :
+else
+  { { echo "$as_me:$LINENO: error: I cannot find the libtool.m4 file." >&5
+echo "$as_me: error: I cannot find the libtool.m4 file." >&2;}
+   { (exit 1); exit 1; }; }
+  :
+fi
+
+
+  # Check if we have an Dependencies file
+  if test -r $srcdir/Dependencies; then
+    coin_have_externals=yes
+  fi
+  # Check if subversion is installed and understands https
+  # Extract the first word of "svn", so it can be a program name with args.
+set dummy svn; 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_have_svn+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$have_svn"; then
+  ac_cv_prog_have_svn="$have_svn" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_have_svn="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_have_svn" && ac_cv_prog_have_svn="no"
+fi
+fi
+have_svn=$ac_cv_prog_have_svn
+if test -n "$have_svn"; then
+  echo "$as_me:$LINENO: result: $have_svn" >&5
+echo "${ECHO_T}$have_svn" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  if test x$have_svn = xyes; then
+    echo "$as_me:$LINENO: checking whether svn understands https" >&5
+echo $ECHO_N "checking whether svn understands https... $ECHO_C" >&6
+if test "${ac_cv_svn_understands_https+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  svn --version > confauto.out 2>&1
+                    if $EGREP https confauto.out >/dev/null 2>&1; then
+                      ac_cv_svn_understands_https=yes
+                    else
+                      ac_cv_svn_understands_https=no
+                      have_svn=no
+                      ac_cv_prog_have_svn=no
+                    fi
+                    rm -f confauto.out
+fi
+echo "$as_me:$LINENO: result: $ac_cv_svn_understands_https" >&5
+echo "${ECHO_T}$ac_cv_svn_understands_https" >&6
+  fi
+
+  # Find the location of the BuildTools directory
+  BUILDTOOLSDIR=
+  if test -r $srcdir/BuildTools/coin.m4; then
+    BUILDTOOLSDIR=$srcdir/BuildTools
+  else
+    if test -r $srcdir/../BuildTools/coin.m4; then
+      BUILDTOOLSDIR=$srcdir/../BuildTools
+    else
+      if test -r $srcdir/../../BuildTools/coin.m4; then
+        BUILDTOOLSDIR=$srcdir/../../BuildTools
+      else
+        { { echo "$as_me:$LINENO: error: Cannot find the BuildTools directory" >&5
+echo "$as_me: error: Cannot find the BuildTools directory" >&2;}
+   { (exit better disable maintainer mode.); exit better disable maintainer mode.; }; }
+      fi
+    fi
+  fi
+
+
+  # for running automake by make, we need to have Makemain.inc available at the place where it usually can be found during run_autotools
+  if test "$BUILDTOOLSDIR" != "$srcdir/BuildTools" ; then
+    $LN_S `cd $BUILDTOOLSDIR; pwd` "$srcdir/BuildTools"
+  fi
+
+  # The following variable is set to the name of the directory where
+  # the autotool scripts are located
+
+  AUX_DIR=$ac_aux_dir
+fi
+
+# helpful variable for the base directory of this package
+abs_source_dir=`cd $srcdir; pwd`
+
+
+# Stuff for example Makefiles
+if test x$prefix = xNONE; then
+  full_prefix=$ac_default_prefix
+else
+  full_prefix=$prefix
+fi
+full_prefix=`cd $full_prefix ; pwd`
+
+abs_lib_dir=$full_prefix/lib
+
+abs_include_dir=$full_prefix/include
+
+abs_bin_dir=$full_prefix/bin
+
+
+
+if test $coin_have_externals = yes && test x$have_svn = xyes; then
+  HAVE_EXTERNALS_TRUE=
+  HAVE_EXTERNALS_FALSE='#'
+else
+  HAVE_EXTERNALS_TRUE='#'
+  HAVE_EXTERNALS_FALSE=
+fi
+
+
+# AC_MSG_NOTICE([End automake initialisation.])
+
+
+
+LIBTOOL=
+if test -f ../libtool; then
+  coin_config_dir=..
+  LIBTOOL='$(SHELL) $(top_builddir)/../libtool'
+fi
+if test "x$LIBTOOL" = x; then
+  if test -f ../../libtool; then
+    coin_config_dir=../..
+    LIBTOOL='$(SHELL) $(top_builddir)/../../libtool'
+  fi
+fi
+
+if test "x$LIBTOOL" = x; then
+# AC_MSG_NOTICE([Creating libtool script (calling COIN_PROG_LIBTOOL).])
+  # Stuff for libtool
+  # Check whether --enable-shared or --disable-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 or --disable-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;
+
+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
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+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
+
+
+# Check whether --with-gnu-ld or --without-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 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 or --disable-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 5895 "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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+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 non-existent 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+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 non-existent 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f 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>
+#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))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+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); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 eval "test \"\${$as_ac_Header+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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  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 bonmin at list.coin-or.org ##
+## -------------------------------------- ##
+_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 eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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
+
+
+
+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=cc
+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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+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 non-existent 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+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 non-existent 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  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=cc
+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 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+  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 $as_executable_p "$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
+
+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 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+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 $as_executable_p "$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
+
+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
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:7029:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 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 $as_executable_p "$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
+
+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 $as_executable_p "$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
+
+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
+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
+
+  AR=$ac_ct_AR
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+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
+
+  RANLIB=$ac_ct_RANLIB
+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 $as_executable_p "$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
+
+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 $as_executable_p "$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
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+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
+
+  STRIP=$ac_ct_STRIP
+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 at 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 at 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=no
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock or --disable-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 or --without-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*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+
+lt_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:8096: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:8100: \$? = $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:8364: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:8368: \$? = $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:8468: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:8472: \$? = $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 at 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 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      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
+
+  # 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 /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+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
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+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
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_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 10813 "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 10913 "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 at 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
+
+# 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=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# 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=$lt_compiler_lib_search_path
+
+# 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=$lt_sys_lib_search_path_spec
+
+# 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 or --without-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=cc
+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 or --without-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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	no_undefined_flag_CXX=' ${wl}-bernotok'
+	allow_undefined_flag_CXX=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	whole_archive_flag_spec_CXX='$convenience'
+	archive_cmds_need_lc_CXX=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag_CXX=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _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"
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+
+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:13257: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13261: \$? = $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:13361: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13365: \$? = $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
+
+  # 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 /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+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
+
+# 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=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# 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=$lt_compiler_lib_search_path_CXX
+
+# 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=$lt_sys_lib_search_path_spec
+
+# 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:14931: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14935: \$? = $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:15035: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:15039: \$? = $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 at 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 at 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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_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
+
+  # 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 /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+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
+
+# 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=$lt_predep_objects_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# 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=$lt_compiler_lib_search_path_F77
+
+# 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=$lt_sys_lib_search_path_spec
+
+# 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-%%"`
+
+
+# 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
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+
+lt_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:17242: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:17246: \$? = $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:17510: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:17514: \$? = $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:17614: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:17618: \$? = $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 at 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 at 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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_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
+
+  # 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 /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+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
+
+# 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=$lt_predep_objects_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
+
+# 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=$lt_compiler_lib_search_path_GCJ
+
+# 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=$lt_sys_lib_search_path_spec
+
+# 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
+
+# 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=$lt_predep_objects_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
+
+# 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=$lt_compiler_lib_search_path_RC
+
+# 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=$lt_sys_lib_search_path_spec
+
+# 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
+
+
+
+
+
+
+
+
+
+
+
+# No longer needed now that CPPFLAGS is correctly set -- lh, 061214 --
+ # AC_REQUIRE([AC_COIN_DLFCN_H])
+
+# NEW: If libtool exists in the directory higher up, we use that one
+#      instead of creating a new one
+
+# It turns out that the code for AC_PROG_LIBTOOL is somehow AC_REQUIRED
+# out in front of this macro body. You'll notice that LIBTOOL is already
+# defined here.  We'll have to count on this macro not being called if libtool
+# already exists, or at least move the libtool fixes outside the conditional.
+# AC_MSG_NOTICE([Entering coin_prog_libtool, LIBTOOL = "$LIBTOOL".])
+# This test is therefore removed.  -- lh, 061214 --
+# if test "x$LIBTOOL" = x; then
+
+# AC_MSG_NOTICE([Calling PROG_LIBTOOL.])
+
+
+
+
+
+
+
+
+
+# AC_MSG_NOTICE([Finished PROG_LIBTOOL.])
+
+
+
+  { echo "$as_me:$LINENO: Build is \"$build\"." >&5
+echo "$as_me: Build is \"$build\"." >&6;}
+  mydos2unix='| dos2unix'
+  case $build in
+    *-mingw*)
+      CYGPATH_W=echo
+      mydos2unix=
+      ;;
+  esac
+
+  case $build in
+    # Here we need to check if -m32 is specified.  If so, we need to correct
+    # sys_lib_search_path_spec
+    *-cygwin* | *-mingw*)
+       case "$CXX" in
+    clang* )
+      # we assume that libtool patches for CLANG are the same as for GNU compiler - correct???
+      { echo "$as_me:$LINENO: Applying patches to libtool for CLANG compiler" >&5
+echo "$as_me: Applying patches to libtool for CLANG compiler" >&6;}
+      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
+	  -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
+	  -e 's|libext="lib"|libext="a"|' \
+      libtool > conftest.bla
+      ;;
+    cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+      { echo "$as_me:$LINENO: Applying patches to libtool for cl compiler" >&5
+echo "$as_me: Applying patches to libtool for cl compiler" >&6;}
+      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
+	  -e 's|fix_srcfile_path=\"\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
+	  -e 's%compile_deplibs=\"\$dir/\$old_library \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$old_library | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
+	  -e 's%compile_deplibs=\"\$dir/\$linklib \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$linklib | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
+	  -e 's%lib /OUT:%lib -OUT:%' \
+	  -e "s%cygpath -w%$CYGPATH_W%" \
+	  -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\$(lib -nologo -list \\$('"$CYGPATH_W \$1"') '"$mydos2unix"' | xargs echo); echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$('"$CYGPATH_W \$1"'); done%' \
+	  -e 's%$AR t "$f_ex_an_ar_oldlib"%lib -nologo -list \$('"$CYGPATH_W \$1"') '"$mydos2unix"'%' \
+	  -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
+	  -e 's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
+	  -e 's%old_archive_cmds="lib -OUT:\\$oldlib\\$oldobjs\\$old_deplibs"%old_archive_cmds="if test -r \\$oldlib; then bla=\\"\\$oldlib\\"; else bla=; fi; lib -OUT:\\$oldlib \\\\\\$bla\\$oldobjs\\$old_deplibs"%' \
+      libtool > conftest.bla
+      ;;
+    *)
+      { echo "$as_me:$LINENO: Applying patches to libtool for GNU compiler" >&5
+echo "$as_me: Applying patches to libtool for GNU compiler" >&6;}
+      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
+	  -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
+	  -e 's|libext="lib"|libext="a"|' \
+      libtool > conftest.bla
+      ;;
+  esac
+  mv conftest.bla libtool
+  chmod 755 libtool
+
+      ;;
+    *x86_64-*)
+      if test "$GCC" = yes && (echo $CXXFLAGS $CFLAGS $FFLAGS | $EGREP 'm32' >& /dev/null); then
+        { echo "$as_me:$LINENO: Applying patches to libtool for 32bit compilation" >&5
+echo "$as_me: Applying patches to libtool for 32bit compilation" >&6;}
+        sed -e 's|sys_lib_search_path_spec=".*"|sys_lib_search_path_spec="/lib /usr/lib"|' libtool > conftest.bla
+        mv conftest.bla libtool
+        chmod 755 libtool
+      fi
+      ;;
+
+    *-solaris*)
+       if test "$GCC" = yes && \
+     (echo $CXXFLAGS $CFLAGS $FFLAGS | $EGREP 'm64' >/dev/null 2>&1) ; then
+    hdwisa=`isainfo | sed -e 's/\([^ ]*\) .*$/\1/'`
+    if `$EGREP 'sys_lib_search_path_spec=' libtool | $EGREP -v $hdwisa >/dev/null 2>&1` ; then
+      { echo "$as_me:$LINENO: Applying patches to libtool for 64-bit GCC compilation" >&5
+echo "$as_me: Applying patches to libtool for 64-bit GCC compilation" >&6;}
+      fixlibtmp=`$CC -m64 -print-search-dirs | $EGREP '^libraries:'`
+      fixlibtmp=`echo $fixlibtmp | sed -e 's/libraries: =//' -e 's/:/ /g'`
+      if `echo "$fixlibtmp" | $EGREP -v $hdwisa  >/dev/null 2>&1` ; then
+	# AC_MSG_NOTICE(Compensating for broken gcc)
+	for lib in $fixlibtmp ; do
+	  if test -d "${lib}${hdwisa}" ; then
+	    syslibpath64="$syslibpath64 ${lib}${hdwisa}/"
+	  fi
+	done
+	syslibpath64="${syslibpath64} ${fixlibtmp}"
+      else
+	syslibpath64="$fixlibtmp"
+      fi
+      sed -e 's|sys_lib_search_path_spec=".*"|sys_lib_search_path_spec="'"$syslibpath64"'"|' libtool > conftest.bla
+      mv conftest.bla libtool
+      chmod 755 libtool
+    fi
+    # AC_MSG_NOTICE(Result is )
+    # $EGREP 'sys_lib_search_path_spec=' libtool
+  fi
+      ;;
+    # Cygwin. Ah, cygwin. Too big and ugly to inline; see the macro.
+    *-darwin*)
+      { echo "$as_me:$LINENO: Applying patches to libtool for Darwin" >&5
+echo "$as_me: Applying patches to libtool for Darwin" >&6;}
+      sed -e 's/verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"/verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"/' \
+        -e 's/ -dynamiclib / -dynamiclib -single_module /g' \
+      libtool > conftest.bla
+
+      mv conftest.bla libtool
+      chmod 755 libtool
+      ;;
+  esac
+# This fi matches the commented `if test "x$LIBTOOL" = x;' up at the head of
+# the macro. -- lh, 061214 --
+# fi
+
+# AC_MSG_NOTICE([End libtool initialisation.])
+
+# AC_MSG_NOTICE([Finished COIN_PROG_LIBTOOL.])
+  # set RPATH_FLAGS to the compiler link flags required to hardcode location
+  # of the shared objects
+  RPATH_FLAGS=
+
+if test $enable_shared = yes; then
+  case $build in
+    *-linux-*)
+      if test "$GXX" = "yes"; then
+        RPATH_FLAGS=
+        for dir in $abs_lib_dir; do
+          RPATH_FLAGS="$RPATH_FLAGS -Wl,--rpath -Wl,$dir"
+        done
+      fi ;;
+    *-darwin*)
+        RPATH_FLAGS=nothing ;;
+    *-ibm-*)
+      case "$CXX" in
+      xlC* | */xlC* | mpxlC* | */mpxlC*)
+        RPATH_FLAGS=nothing ;;
+      esac ;;
+    *-hp-*)
+        RPATH_FLAGS=nothing ;;
+    *-mingw32)
+        RPATH_FLAGS=nothing ;;
+    *-*-solaris*)
+        RPATH_FLAGS=
+        for dir in $abs_lib_dir; do
+          RPATH_FLAGS="$RPATH_FLAGS -R$dir"
+        done
+  esac
+
+  if test "$RPATH_FLAGS" = ""; then
+    { echo "$as_me:$LINENO: WARNING: Could not automatically determine how to tell the linker about automatic inclusion of the path for shared libraries.  The test examples might not work if you link against shared objects.  You will need to set the LD_LIBRARY_PATH, DYLP_LIBRARY_PATH, or LIBDIR variable manually." >&5
+echo "$as_me: WARNING: Could not automatically determine how to tell the linker about automatic inclusion of the path for shared libraries.  The test examples might not work if you link against shared objects.  You will need to set the LD_LIBRARY_PATH, DYLP_LIBRARY_PATH, or LIBDIR variable manually." >&2;}
+  fi
+  if test "$RPATH_FLAGS" = "nothing"; then
+    RPATH_FLAGS=
+  fi
+fi
+
+
+
+
+else
+
+  { echo "$as_me:$LINENO: Using libtool script in directory $coin_config_dir" >&5
+echo "$as_me: Using libtool script in directory $coin_config_dir" >&6;}
+  # get all missing information from the config.log file
+
+  # output variables and defines
+  as_save_IFS=$IFS
+  IFS='
+'
+  for oneline in `cat $coin_config_dir/config.status`; do
+    case "$oneline" in
+         # First some automake conditionals
+      s, at am__fastdep* | s, at AR@* | s, at CPP@*  | s, at CPPFLAGS@* | s, at CXXCPP@*  | \
+      s, at RANLIB@* | s, at STRIP@* | s, at ac_ct_AR@* | s, at ac_ct_RANLIB@* | \
+      s, at ac_ct_STRIP@* | s, at host* | s, at LN_S@* | s, at RPATH_FLAGS@* | \
+      s, at ac_c_preproc_warn_flag@* |  s, at ac_cxx_preproc_warn_flag@* )
+        command=`echo $oneline | sed -e 's/^s,@//' -e 's/@,/="/' -e 's/,;t t/"/'`
+#        echo "$command"
+        eval "$command"
+        ;;
+      s, at DEFS@* )
+        command=`echo $oneline | sed -e 's/^s, at DEFS@,/defsline="/' -e 's/,;t t/"/'`
+#        echo "$command"
+        eval "$command"
+        ;;
+    esac
+  done
+  IFS=$as_save_IFS
+
+  # And some defines (assuming here that the packages base dir
+  # doesn't have a config.h file
+  for word in $defsline; do
+#    echo word $word
+    case $word in
+      -DHAVE_[A-Z_]*_H=1 | -DSTDC_HEADERS=1 )
+        i=`echo $word | sed -e 's/-D/#define /' -e 's/=/ /'`
+#        echo dd $i
+        echo $i >>confdefs.h
+        ;;
+    esac
+  done
+fi
+
+# AC_MSG_NOTICE([End of INIT_AUTO_TOOLS.])
+
+# Check whether --enable-dependency-linking or --disable-dependency-linking was given.
+if test "${enable_dependency_linking+set}" = set; then
+  enableval="$enable_dependency_linking"
+  dependency_linking="$enableval"
+else
+  dependency_linking=no
+fi;
+
+# ToDo
+# For now, don't use the -no-undefined flag, since the Makefiles are
+# not yet set up that way.  But we need to fix this, when we want
+# to comile DLLs under Windows.
+if test "$dependency_linking" = yes ;
+then
+  LT_LDFLAGS="-no-undefined"
+else
+  LT_LDFLAGS=
+fi
+
+
+
+if test "$dependency_linking" = yes; then
+  DEPENDENCY_LINKING_TRUE=
+  DEPENDENCY_LINKING_FALSE='#'
+else
+  DEPENDENCY_LINKING_TRUE='#'
+  DEPENDENCY_LINKING_FALSE=
+fi
+
+
+# Check if we want to set the library version
+echo "$as_me:$LINENO: checking if library version is set" >&5
+echo $ECHO_N "checking if library version is set... $ECHO_C" >&6
+if test x"$coin_libversion" != x; then
+  LT_LDFLAGS="$LT_LDFLAGS -version-info $coin_libversion"
+  echo "$as_me:$LINENO: result: $coin_libversion" >&5
+echo "${ECHO_T}$coin_libversion" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+#END
+}
+
+#############################################################################
+#                           COIN-OR components                              #
+#############################################################################
+
+
+
+# Check whether --enable-pkg-config or --disable-pkg-config was given.
+if test "${enable_pkg_config+set}" = set; then
+  enableval="$enable_pkg_config"
+  use_pkgconfig="$enableval"
+else
+  if test x$coin_cc_is_cl = xtrue; then
+     use_pkgconfig=no
+   else
+     use_pkgconfig=yes
+   fi
+fi;
+
+if test $use_pkgconfig = yes ; then
+  if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PKG_CONFIG"; then
+  ac_cv_prog_PKG_CONFIG="$PKG_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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_PKG_CONFIG"; then
+  ac_ct_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-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_ac_ct_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_PKG_CONFIG"; then
+  ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
+if test -n "$ac_ct_PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $ac_ct_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  PKG_CONFIG=$ac_ct_PKG_CONFIG
+else
+  PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
+fi
+
+  fi
+  if test -n "$PKG_CONFIG"; then
+    _pkg_min_version=0.16.0
+    echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
+    if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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
+      PKG_CONFIG=""
+    fi
+  fi
+
+  # check if pkg-config supports the short-errors flag
+  if test -n "$PKG_CONFIG" && \
+    $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+    pkg_short_errors=" --short-errors "
+  else
+    pkg_short_errors=""
+  fi
+fi
+
+
+
+if test -n "$PKG_CONFIG"; then
+  COIN_HAS_PKGCONFIG_TRUE=
+  COIN_HAS_PKGCONFIG_FALSE='#'
+else
+  COIN_HAS_PKGCONFIG_TRUE='#'
+  COIN_HAS_PKGCONFIG_FALSE=
+fi
+
+
+
+# assemble pkg-config search path for installed projects
+COIN_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+
+# let's assume that when installing into $prefix, then the user may have installed some other coin projects there before, so it's worth to have a look into there
+# best would actually to use ${libdir}, since .pc files get installed into ${libdir}/pkgconfig,
+# unfortunately, ${libdir} expands to ${exec_prefix}/lib and ${exec_prefix} to ${prefix}...
+if test "x${prefix}" = xNONE ; then
+  COIN_PKG_CONFIG_PATH="${ac_default_prefix}/lib64/pkgconfig:${ac_default_prefix}/lib/pkgconfig:${ac_default_prefix}/share/pkgconfig:${COIN_PKG_CONFIG_PATH}"
+else
+  COIN_PKG_CONFIG_PATH="${prefix}/lib64/pkgconfig:${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig:${COIN_PKG_CONFIG_PATH}"
+fi
+
+
+# Check whether --with-coin-instdir or --without-coin-instdir was given.
+if test "${with_coin_instdir+set}" = set; then
+  withval="$with_coin_instdir"
+  if test -d "$withval"; then : ; else
+     { { echo "$as_me:$LINENO: error: argument for --with-coin-instdir not a directory" >&5
+echo "$as_me: error: argument for --with-coin-instdir not a directory" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+   COIN_PKG_CONFIG_PATH="$withval/lib/pkgconfig:$withval/share/pkgconfig:${COIN_PKG_CONFIG_PATH}"
+
+fi;
+
+
+
+# assemble additional pkg-config search paths for uninstalled projects
+if test x$coin_projectdir = xyes ; then
+  # if we are in a project setup, then in a classic setup, we want to find uninstalled projects
+  # their (relative) location is written to coin_subdirs.txt by the configure in the project base directory
+  # unfortunately, if the user set prefix, then we do not know where the project base directory is located
+  # but it is likely to be either .. (if we are a usual coin project) or ../.. (if we are a unusual coin project like ThirdParty or Data)
+  COIN_PKG_CONFIG_PATH_UNINSTALLED=
+  if test -f ../coin_subdirs.txt ; then
+    for i in `cat ../coin_subdirs.txt` ; do
+      if test -d ../$i ; then
+        COIN_PKG_CONFIG_PATH_UNINSTALLED="`cd ../$i; pwd`:${COIN_PKG_CONFIG_PATH_UNINSTALLED}"
+      fi
+      if test -d ../$i/pkgconfig ; then
+        COIN_PKG_CONFIG_PATH_UNINSTALLED="`cd ../$i/pkgconfig; pwd`:${COIN_PKG_CONFIG_PATH_UNINSTALLED}"
+      fi
+    done
+  fi
+
+  if test -f ../../coin_subdirs.txt ; then
+    for i in `cat ../../coin_subdirs.txt` ; do
+      if test -d ../../$i ; then
+        COIN_PKG_CONFIG_PATH_UNINSTALLED="`cd ../../$i; pwd`:${COIN_PKG_CONFIG_PATH_UNINSTALLED}"
+      fi
+      if test -d ../../$i/pkgconfig ; then
+        COIN_PKG_CONFIG_PATH_UNINSTALLED="`cd ../../$i/pkgconfig; pwd`:${COIN_PKG_CONFIG_PATH_UNINSTALLED}"
+      fi
+    done
+  fi
+
+
+fi
+
+if test -n "$PKG_CONFIG" && test x$coin_cc_is_cl = xtrue; then
+  { echo "$as_me:$LINENO: WARNING: Using pkg-config together with MS or Intel Compiler on Windows is not support by example Makefiles. Consider using --disable-pkg-config." >&5
+echo "$as_me: WARNING: Using pkg-config together with MS or Intel Compiler on Windows is not support by example Makefiles. Consider using --disable-pkg-config." >&2;}
+fi
+
+
+
+echo "$as_me:$LINENO: checking for COIN-OR package CoinDepend" >&5
+echo $ECHO_N "checking for COIN-OR package CoinDepend... $ECHO_C" >&6
+
+coin_has_coindepend=notGiven
+
+# check if user wants to skip package in any case
+if test x"$COIN_SKIP_PROJECTS" != x; then
+  for dir in $COIN_SKIP_PROJECTS; do
+    if test $dir = "CoinDepend"; then
+      coin_has_coindepend=skipping
+    fi
+  done
+fi
+
+if test "$coin_has_coindepend" != skipping; then
+
+# Check whether --with-m4_tolower(CoinDepend) or --without-m4_tolower(CoinDepend) was given.
+if test "${with_coindepend+set}" = set; then
+  withval="$with_coindepend"
+  if test "$withval" = no ; then
+       coin_has_coindepend=skipping
+     fi
+
+fi;
+fi
+
+COINDEPEND_LIBS=
+COINDEPEND_CFLAGS=
+COINDEPEND_DATA=
+COINDEPEND_DEPENDENCIES=
+COINDEPEND_PCLIBS=
+COINDEPEND_PCREQUIRES=
+COINDEPEND_DATA=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package
+if test $coin_has_coindepend != skipping; then
+
+# Check whether --with-m4_tolower(CoinDepend)-lib or --without-m4_tolower(CoinDepend)-lib was given.
+if test "${with_coindepend_lib+set}" = set; then
+  withval="$with_coindepend_lib"
+  if test "$withval" = no ; then
+       coin_has_coindepend=skipping
+     else
+       coin_has_coindepend=yes
+       COINDEPEND_LIBS="$withval"
+       COINDEPEND_PCLIBS="$withval"
+
+         BONMINLIB_PCLIBS="$withval $BONMINLIB_PCLIBS"
+         BONMINLIB_LIBS="$withval $BONMINLIB_LIBS"
+
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         COINDEPEND_LIBS_INSTALLED="$withval"
+         BONMINLIB_LIBS_INSTALLED="$withval $BONMINLIB_LIBS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_coindepend != skipping; then
+
+# Check whether --with-m4_tolower(CoinDepend)-incdir or --without-m4_tolower(CoinDepend)-incdir was given.
+if test "${with_coindepend_incdir+set}" = set; then
+  withval="$with_coindepend_incdir"
+  if test "$withval" = no ; then
+       coin_has_coindepend=skipping
+     else
+       coin_has_coindepend=yes
+       COINDEPEND_CFLAGS="-I`${CYGPATH_W} $withval`"
+       BONMINLIB_CFLAGS="-I`${CYGPATH_W} $withval` $BONMINLIB_CFLAGS"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         COINDEPEND_CFLAGS_INSTALLED="$COINDEPEND_CFLAGS"
+         BONMINLIB_CFLAGS_INSTALLED="$COINDEPEND_CFLAGS $BONMINLIB_CFLAGS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_coindepend != skipping; then
+
+# Check whether --with-m4_tolower(CoinDepend)-datadir or --without-m4_tolower(CoinDepend)-datadir was given.
+if test "${with_coindepend_datadir+set}" = set; then
+  withval="$with_coindepend_datadir"
+  if test "$withval" = no ; then
+       coin_has_coindepend=skipping
+     else
+       coin_has_coindepend=yes
+       COINDEPEND_DATA="$withval"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         COINDEPEND_DATA_INSTALLED="$withval"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_coindepend = notGiven; then
+  if test -n "$PKG_CONFIG" ; then
+    # set search path for pkg-config
+    # need to export variable to be sure that the following pkg-config gets these values
+    coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+    PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED"
+    export PKG_CONFIG_PATH
+
+    # let pkg-config do it's magic
+
+
+
+if test -n "$PKG_CONFIG" ; then
+  if $PKG_CONFIG --exists "cbc osi-clp ipopt"; then
+    COINDEPEND_VERSIONS=`$PKG_CONFIG --modversion "cbc osi-clp ipopt" 2>/dev/null | tr '\n' ' '`
+     cflags=`$PKG_CONFIG --cflags "cbc osi-clp ipopt" 2>/dev/null`
+    # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files
+	# thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's
+	# but only do this if is not trivial
+    if test "$CYGPATH_W" != "echo" ; then
+      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
+      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    COINDEPEND_CFLAGS="$cflags"
+    COINDEPEND_LIBS=`$PKG_CONFIG --libs "cbc osi-clp ipopt" 2>/dev/null`
+    COINDEPEND_DATA=`$PKG_CONFIG --variable=datadir "cbc osi-clp ipopt" 2>/dev/null`
+     coin_has_coindepend=yes
+        echo "$as_me:$LINENO: result: yes: $COINDEPEND_VERSIONS" >&5
+echo "${ECHO_T}yes: $COINDEPEND_VERSIONS" >&6
+
+        # adjust linker flags for (i)cl compiler
+        # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl)
+        if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+        then
+          COINDEPEND_LIBS=`echo " $COINDEPEND_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+        fi
+        COINDEPEND_PCREQUIRES="cbc osi-clp ipopt"
+
+        # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in BonminLib
+
+          BONMINLIB_PCREQUIRES="cbc osi-clp ipopt $BONMINLIB_PCREQUIRES"
+          BONMINLIB_CFLAGS="$COINDEPEND_CFLAGS $BONMINLIB_CFLAGS"
+          BONMINLIB_LIBS="$COINDEPEND_LIBS $BONMINLIB_LIBS"
+
+
+
+  else
+    COINDEPEND_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "cbc osi-clp ipopt"`
+      coin_has_coindepend=notGiven
+        echo "$as_me:$LINENO: result: not given: $COINDEPEND_PKG_ERRORS" >&5
+echo "${ECHO_T}not given: $COINDEPEND_PKG_ERRORS" >&6
+
+  fi
+else
+  { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module CoinDepend without pkg-config\"" >&5
+echo "$as_me: error: \"Cannot check for existance of module CoinDepend without pkg-config\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+    # reset PKG_CONFIG_PATH variable
+    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
+    export PKG_CONFIG_PATH
+
+  else
+    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
+echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
+
+echo "$as_me:$LINENO: checking for COIN-OR package CoinDepend (fallback)" >&5
+echo $ECHO_N "checking for COIN-OR package CoinDepend (fallback)... $ECHO_C" >&6
+
+coin_has_coindepend=notGiven
+COINDEPEND_LIBS=
+COINDEPEND_LIBS_INSTALLED=
+COINDEPEND_CFLAGS=
+COINDEPEND_CFLAGS_INSTALLED=
+COINDEPEND_DATA=
+COINDEPEND_DATA_INSTALLED=
+COINDEPEND_PCLIBS=
+COINDEPEND_PCREQUIRES=
+
+# initial list of dependencies is "cbc osi-clp ipopt", but we need to filter out version number specifications (= x, <= x, >= x, != x)
+projtoprocess="cbc osi-clp ipopt"
+
+# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it
+# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards
+# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples
+# also, we setup the DATA variable
+allproj=""
+allpcfiles=""
+allpcifiles=""
+while test "x$projtoprocess" != x ; do
+
+  for proj in $projtoprocess ; do
+    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
+    pcfile=""
+    save_IFS="$IFS"
+    IFS=":"
+    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
+      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
+      if test -r "$dir/${proj}-uninstalled.pc" ; then
+        pcfile="$dir/$proj-uninstalled.pc"
+        if test -r "$dir/${proj}.pc" ; then
+          pcifile="$dir/${proj}.pc"
+        else
+          { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5
+echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;}
+          pcifile=
+        fi
+        break
+      fi
+    done
+    IFS="$save_IFS"
+
+    if test "x$pcfile" != x ; then
+      # read dependencies from $pcfile and filter it
+      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ 	]\{0,\}[^ 	]\{1,\}//g'`
+
+      # add projrequires to the front of the list of projects that have to be processed next
+      # at the same time, remove $proj from this list
+      projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"`
+
+      # read DATA from $pcfile, if _DATA is still empty
+      if test "x$COINDEPEND_DATA" = x ; then
+        projdatadir=
+        pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile`
+        eval `sh -c "$pcfilemod"`
+        COINDEPEND_DATA="$projdatadir"
+      fi
+
+      allproj="$allproj $proj"
+      allpcfiles="$pcfile:$allpcfiles"
+
+    else
+      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
+echo "${ECHO_T}no, dependency $proj not available" >&6
+      allproj=fail
+      break 2
+    fi
+
+    if test "x$pcifile" != x ; then
+      allpcifiles="$pcifile:$allpcifiles"
+
+      # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty
+      if test "x$COINDEPEND_DATA_INSTALLED" = x ; then
+        projdatadir=
+        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
+        eval `sh -c "$pcifilemod"`
+        if test "${CYGPATH_W}" != "echo"; then
+          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
+        fi
+        COINDEPEND_DATA_INSTALLED="$projdatadir"
+      fi
+
+    fi
+
+    break
+  done
+
+  # remove spaces on begin of $projtoprocess
+  projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'`
+
+done
+
+if test "$allproj" != fail ; then
+
+  # now go through the list of .pc files and assemble compiler and linker flags
+  # important is here to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcfiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    COINDEPEND_CFLAGS="$projcflags $COINDEPEND_CFLAGS"
+
+    # set LIBS variable
+    COINDEPEND_LIBS="$projlibs $COINDEPEND_LIBS"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # now go through the list of .pc files for installed projects and assemble compiler and linker flags
+  # important is here again to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcifiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    COINDEPEND_CFLAGS_INSTALLED="$projcflags $COINDEPEND_CFLAGS_INSTALLED"
+
+    # set LIBS variable
+    COINDEPEND_LIBS_INSTALLED="$projlibs $COINDEPEND_LIBS_INSTALLED"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # finish up
+  coin_has_coindepend=yes
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_COINDEPEND 1
+_ACEOF
+
+
+  # adjust linker flags for (i)cl compiler
+  # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl),
+  # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`",
+  #    everything of the form "-lname" by "libname.lib", and
+  #    everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path`
+  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+  then
+    COINDEPEND_LIBS=`echo " $COINDEPEND_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+    COINDEPEND_LIBS_INSTALLED=`echo " $COINDEPEND_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'`
+  fi
+
+  COINDEPEND_PCREQUIRES="cbc osi-clp ipopt"
+
+    BONMINLIB_PCREQUIRES="cbc osi-clp ipopt $BONMINLIB_PCREQUIRES"
+    BONMINLIB_CFLAGS="$COINDEPEND_CFLAGS $BONMINLIB_CFLAGS"
+    BONMINLIB_LIBS="$COINDEPEND_LIBS $BONMINLIB_LIBS"
+    BONMINLIB_CFLAGS_INSTALLED="$COINDEPEND_CFLAGS_INSTALLED $BONMINLIB_CFLAGS_INSTALLED"
+    BONMINLIB_LIBS_INSTALLED="$COINDEPEND_LIBS_INSTALLED $BONMINLIB_LIBS_INSTALLED"
+
+
+fi
+
+
+
+if test $coin_has_coindepend != notGiven &&
+                test $coin_has_coindepend != skipping; then
+  COIN_HAS_COINDEPEND_TRUE=
+  COIN_HAS_COINDEPEND_FALSE='#'
+else
+  COIN_HAS_COINDEPEND_TRUE='#'
+  COIN_HAS_COINDEPEND_FALSE=
+fi
+
+
+
+  fi
+
+else
+  echo "$as_me:$LINENO: result: $coin_has_coindepend" >&5
+echo "${ECHO_T}$coin_has_coindepend" >&6
+fi
+
+if test $coin_has_coindepend != skipping &&
+   test $coin_has_coindepend != notGiven ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_COINDEPEND 1
+_ACEOF
+
+
+  # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given.
+if test "${enable_interpackage_dependencies+set}" = set; then
+  enableval="$enable_interpackage_dependencies"
+
+else
+  enable_interpackage_dependencies=yes
+fi;
+
+  if test $enable_interpackage_dependencies = yes ; then
+     # construct dependencies variables from LIBS variables
+     # we add an extra space in LIBS so we can substitute out everything starting with " -"
+     # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows
+     # then remove everything of the form -xxx
+     # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl)
+     COINDEPEND_DEPENDENCIES=`echo " $COINDEPEND_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+       BONMINLIB_DEPENDENCIES=`echo " $BONMINLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+  fi
+
+  if test 1 = 0 ; then  #change this test to enable a bit of debugging output
+    if test -n "$COINDEPEND_CFLAGS" ; then
+      { echo "$as_me:$LINENO: CoinDepend CFLAGS are $COINDEPEND_CFLAGS" >&5
+echo "$as_me: CoinDepend CFLAGS are $COINDEPEND_CFLAGS" >&6;}
+    fi
+    if test -n "$COINDEPEND_LIBS" ; then
+      { echo "$as_me:$LINENO: CoinDepend LIBS   are $COINDEPEND_LIBS" >&5
+echo "$as_me: CoinDepend LIBS   are $COINDEPEND_LIBS" >&6;}
+    fi
+    if test -n "$COINDEPEND_DEPENDENCIES" ; then
+      { echo "$as_me:$LINENO: CoinDepend DEPENDENCIES are $COINDEPEND_DEPENDENCIES" >&5
+echo "$as_me: CoinDepend DEPENDENCIES are $COINDEPEND_DEPENDENCIES" >&6;}
+    fi
+    if test -n "$COINDEPEND_DATA" ; then
+      { echo "$as_me:$LINENO: CoinDepend DATA   is  $COINDEPEND_DATA" >&5
+echo "$as_me: CoinDepend DATA   is  $COINDEPEND_DATA" >&6;}
+    fi
+    if test -n "$COINDEPEND_PCLIBS" ; then
+      { echo "$as_me:$LINENO: CoinDepend PCLIBS are $COINDEPEND_PCLIBS" >&5
+echo "$as_me: CoinDepend PCLIBS are $COINDEPEND_PCLIBS" >&6;}
+    fi
+    if test -n "$COINDEPEND_PCREQUIRES" ; then
+      { echo "$as_me:$LINENO: CoinDepend PCREQUIRES are $COINDEPEND_PCREQUIRES" >&5
+echo "$as_me: CoinDepend PCREQUIRES are $COINDEPEND_PCREQUIRES" >&6;}
+    fi
+
+      { echo "$as_me:$LINENO: BonminLib CFLAGS are $BONMINLIB_CFLAGS" >&5
+echo "$as_me: BonminLib CFLAGS are $BONMINLIB_CFLAGS" >&6;}
+      { echo "$as_me:$LINENO: BonminLib LIBS   are $BONMINLIB_LIBS" >&5
+echo "$as_me: BonminLib LIBS   are $BONMINLIB_LIBS" >&6;}
+      { echo "$as_me:$LINENO: BonminLib DEPENDENCIES are $BONMINLIB_DEPENDENCIES" >&5
+echo "$as_me: BonminLib DEPENDENCIES are $BONMINLIB_DEPENDENCIES" >&6;}
+
+  fi
+fi
+
+# Define the Makefile conditional
+
+
+if test $coin_has_coindepend != notGiven &&
+                test $coin_has_coindepend != skipping; then
+  COIN_HAS_COINDEPEND_TRUE=
+  COIN_HAS_COINDEPEND_FALSE='#'
+else
+  COIN_HAS_COINDEPEND_TRUE='#'
+  COIN_HAS_COINDEPEND_FALSE=
+fi
+
+
+
+if test $coin_has_coindepend != yes ; then
+  { { echo "$as_me:$LINENO: error: Required package Cbc or Ipopt not available." >&5
+echo "$as_me: error: Required package Cbc or Ipopt not available." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+echo "$as_me:$LINENO: checking for COIN-OR package ASL" >&5
+echo $ECHO_N "checking for COIN-OR package ASL... $ECHO_C" >&6
+
+coin_has_asl=notGiven
+
+# check if user wants to skip package in any case
+if test x"$COIN_SKIP_PROJECTS" != x; then
+  for dir in $COIN_SKIP_PROJECTS; do
+    if test $dir = "ASL"; then
+      coin_has_asl=skipping
+    fi
+  done
+fi
+
+if test "$coin_has_asl" != skipping; then
+
+# Check whether --with-m4_tolower(ASL) or --without-m4_tolower(ASL) was given.
+if test "${with_asl+set}" = set; then
+  withval="$with_asl"
+  if test "$withval" = no ; then
+       coin_has_asl=skipping
+     fi
+
+fi;
+fi
+
+ASL_LIBS=
+ASL_CFLAGS=
+ASL_DATA=
+ASL_DEPENDENCIES=
+ASL_PCLIBS=
+ASL_PCREQUIRES=
+ASL_DATA=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package
+if test $coin_has_asl != skipping; then
+
+# Check whether --with-m4_tolower(ASL)-lib or --without-m4_tolower(ASL)-lib was given.
+if test "${with_asl_lib+set}" = set; then
+  withval="$with_asl_lib"
+  if test "$withval" = no ; then
+       coin_has_asl=skipping
+     else
+       coin_has_asl=yes
+       ASL_LIBS="$withval"
+       ASL_PCLIBS="$withval"
+
+         BONMINAMPLINTERFACELIB_PCLIBS="$withval $BONMINAMPLINTERFACELIB_PCLIBS"
+         BONMINAMPLINTERFACELIB_LIBS="$withval $BONMINAMPLINTERFACELIB_LIBS"
+
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         ASL_LIBS_INSTALLED="$withval"
+         BONMINAMPLINTERFACELIB_LIBS_INSTALLED="$withval $BONMINAMPLINTERFACELIB_LIBS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_asl != skipping; then
+
+# Check whether --with-m4_tolower(ASL)-incdir or --without-m4_tolower(ASL)-incdir was given.
+if test "${with_asl_incdir+set}" = set; then
+  withval="$with_asl_incdir"
+  if test "$withval" = no ; then
+       coin_has_asl=skipping
+     else
+       coin_has_asl=yes
+       ASL_CFLAGS="-I`${CYGPATH_W} $withval`"
+       BONMINAMPLINTERFACELIB_CFLAGS="-I`${CYGPATH_W} $withval` $BONMINAMPLINTERFACELIB_CFLAGS"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         ASL_CFLAGS_INSTALLED="$ASL_CFLAGS"
+         BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED="$ASL_CFLAGS $BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_asl != skipping; then
+
+# Check whether --with-m4_tolower(ASL)-datadir or --without-m4_tolower(ASL)-datadir was given.
+if test "${with_asl_datadir+set}" = set; then
+  withval="$with_asl_datadir"
+  if test "$withval" = no ; then
+       coin_has_asl=skipping
+     else
+       coin_has_asl=yes
+       ASL_DATA="$withval"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         ASL_DATA_INSTALLED="$withval"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_asl = notGiven; then
+  if test -n "$PKG_CONFIG" ; then
+    # set search path for pkg-config
+    # need to export variable to be sure that the following pkg-config gets these values
+    coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+    PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED"
+    export PKG_CONFIG_PATH
+
+    # let pkg-config do it's magic
+
+
+
+if test -n "$PKG_CONFIG" ; then
+  if $PKG_CONFIG --exists "ipoptamplinterface"; then
+    ASL_VERSIONS=`$PKG_CONFIG --modversion "ipoptamplinterface" 2>/dev/null | tr '\n' ' '`
+     cflags=`$PKG_CONFIG --cflags "ipoptamplinterface" 2>/dev/null`
+    # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files
+	# thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's
+	# but only do this if is not trivial
+    if test "$CYGPATH_W" != "echo" ; then
+      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
+      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    ASL_CFLAGS="$cflags"
+    ASL_LIBS=`$PKG_CONFIG --libs "ipoptamplinterface" 2>/dev/null`
+    ASL_DATA=`$PKG_CONFIG --variable=datadir "ipoptamplinterface" 2>/dev/null`
+     coin_has_asl=yes
+        echo "$as_me:$LINENO: result: yes: $ASL_VERSIONS" >&5
+echo "${ECHO_T}yes: $ASL_VERSIONS" >&6
+
+        # adjust linker flags for (i)cl compiler
+        # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl)
+        if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+        then
+          ASL_LIBS=`echo " $ASL_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+        fi
+        ASL_PCREQUIRES="ipoptamplinterface"
+
+        # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in BonminAmplInterfaceLib
+
+          BONMINAMPLINTERFACELIB_PCREQUIRES="ipoptamplinterface $BONMINAMPLINTERFACELIB_PCREQUIRES"
+          BONMINAMPLINTERFACELIB_CFLAGS="$ASL_CFLAGS $BONMINAMPLINTERFACELIB_CFLAGS"
+          BONMINAMPLINTERFACELIB_LIBS="$ASL_LIBS $BONMINAMPLINTERFACELIB_LIBS"
+
+
+
+  else
+    ASL_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "ipoptamplinterface"`
+      coin_has_asl=notGiven
+        echo "$as_me:$LINENO: result: not given: $ASL_PKG_ERRORS" >&5
+echo "${ECHO_T}not given: $ASL_PKG_ERRORS" >&6
+
+  fi
+else
+  { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module ASL without pkg-config\"" >&5
+echo "$as_me: error: \"Cannot check for existance of module ASL without pkg-config\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+    # reset PKG_CONFIG_PATH variable
+    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
+    export PKG_CONFIG_PATH
+
+  else
+    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
+echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
+
+echo "$as_me:$LINENO: checking for COIN-OR package ASL (fallback)" >&5
+echo $ECHO_N "checking for COIN-OR package ASL (fallback)... $ECHO_C" >&6
+
+coin_has_asl=notGiven
+ASL_LIBS=
+ASL_LIBS_INSTALLED=
+ASL_CFLAGS=
+ASL_CFLAGS_INSTALLED=
+ASL_DATA=
+ASL_DATA_INSTALLED=
+ASL_PCLIBS=
+ASL_PCREQUIRES=
+
+# initial list of dependencies is "ipoptamplinterface", but we need to filter out version number specifications (= x, <= x, >= x, != x)
+projtoprocess="ipoptamplinterface"
+
+# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it
+# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards
+# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples
+# also, we setup the DATA variable
+allproj=""
+allpcfiles=""
+allpcifiles=""
+while test "x$projtoprocess" != x ; do
+
+  for proj in $projtoprocess ; do
+    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
+    pcfile=""
+    save_IFS="$IFS"
+    IFS=":"
+    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
+      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
+      if test -r "$dir/${proj}-uninstalled.pc" ; then
+        pcfile="$dir/$proj-uninstalled.pc"
+        if test -r "$dir/${proj}.pc" ; then
+          pcifile="$dir/${proj}.pc"
+        else
+          { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5
+echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;}
+          pcifile=
+        fi
+        break
+      fi
+    done
+    IFS="$save_IFS"
+
+    if test "x$pcfile" != x ; then
+      # read dependencies from $pcfile and filter it
+      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ 	]\{0,\}[^ 	]\{1,\}//g'`
+
+      # add projrequires to the front of the list of projects that have to be processed next
+      # at the same time, remove $proj from this list
+      projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"`
+
+      # read DATA from $pcfile, if _DATA is still empty
+      if test "x$ASL_DATA" = x ; then
+        projdatadir=
+        pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile`
+        eval `sh -c "$pcfilemod"`
+        ASL_DATA="$projdatadir"
+      fi
+
+      allproj="$allproj $proj"
+      allpcfiles="$pcfile:$allpcfiles"
+
+    else
+      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
+echo "${ECHO_T}no, dependency $proj not available" >&6
+      allproj=fail
+      break 2
+    fi
+
+    if test "x$pcifile" != x ; then
+      allpcifiles="$pcifile:$allpcifiles"
+
+      # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty
+      if test "x$ASL_DATA_INSTALLED" = x ; then
+        projdatadir=
+        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
+        eval `sh -c "$pcifilemod"`
+        if test "${CYGPATH_W}" != "echo"; then
+          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
+        fi
+        ASL_DATA_INSTALLED="$projdatadir"
+      fi
+
+    fi
+
+    break
+  done
+
+  # remove spaces on begin of $projtoprocess
+  projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'`
+
+done
+
+if test "$allproj" != fail ; then
+
+  # now go through the list of .pc files and assemble compiler and linker flags
+  # important is here to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcfiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    ASL_CFLAGS="$projcflags $ASL_CFLAGS"
+
+    # set LIBS variable
+    ASL_LIBS="$projlibs $ASL_LIBS"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # now go through the list of .pc files for installed projects and assemble compiler and linker flags
+  # important is here again to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcifiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    ASL_CFLAGS_INSTALLED="$projcflags $ASL_CFLAGS_INSTALLED"
+
+    # set LIBS variable
+    ASL_LIBS_INSTALLED="$projlibs $ASL_LIBS_INSTALLED"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # finish up
+  coin_has_asl=yes
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_ASL 1
+_ACEOF
+
+
+  # adjust linker flags for (i)cl compiler
+  # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl),
+  # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`",
+  #    everything of the form "-lname" by "libname.lib", and
+  #    everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path`
+  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+  then
+    ASL_LIBS=`echo " $ASL_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+    ASL_LIBS_INSTALLED=`echo " $ASL_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'`
+  fi
+
+  ASL_PCREQUIRES="ipoptamplinterface"
+
+    BONMINAMPLINTERFACELIB_PCREQUIRES="ipoptamplinterface $BONMINAMPLINTERFACELIB_PCREQUIRES"
+    BONMINAMPLINTERFACELIB_CFLAGS="$ASL_CFLAGS $BONMINAMPLINTERFACELIB_CFLAGS"
+    BONMINAMPLINTERFACELIB_LIBS="$ASL_LIBS $BONMINAMPLINTERFACELIB_LIBS"
+    BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED="$ASL_CFLAGS_INSTALLED $BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED"
+    BONMINAMPLINTERFACELIB_LIBS_INSTALLED="$ASL_LIBS_INSTALLED $BONMINAMPLINTERFACELIB_LIBS_INSTALLED"
+
+
+fi
+
+
+
+if test $coin_has_asl != notGiven &&
+                test $coin_has_asl != skipping; then
+  COIN_HAS_ASL_TRUE=
+  COIN_HAS_ASL_FALSE='#'
+else
+  COIN_HAS_ASL_TRUE='#'
+  COIN_HAS_ASL_FALSE=
+fi
+
+
+
+  fi
+
+else
+  echo "$as_me:$LINENO: result: $coin_has_asl" >&5
+echo "${ECHO_T}$coin_has_asl" >&6
+fi
+
+if test $coin_has_asl != skipping &&
+   test $coin_has_asl != notGiven ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_ASL 1
+_ACEOF
+
+
+  # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given.
+if test "${enable_interpackage_dependencies+set}" = set; then
+  enableval="$enable_interpackage_dependencies"
+
+else
+  enable_interpackage_dependencies=yes
+fi;
+
+  if test $enable_interpackage_dependencies = yes ; then
+     # construct dependencies variables from LIBS variables
+     # we add an extra space in LIBS so we can substitute out everything starting with " -"
+     # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows
+     # then remove everything of the form -xxx
+     # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl)
+     ASL_DEPENDENCIES=`echo " $ASL_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+       BONMINAMPLINTERFACELIB_DEPENDENCIES=`echo " $BONMINAMPLINTERFACELIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+  fi
+
+  if test 1 = 0 ; then  #change this test to enable a bit of debugging output
+    if test -n "$ASL_CFLAGS" ; then
+      { echo "$as_me:$LINENO: ASL CFLAGS are $ASL_CFLAGS" >&5
+echo "$as_me: ASL CFLAGS are $ASL_CFLAGS" >&6;}
+    fi
+    if test -n "$ASL_LIBS" ; then
+      { echo "$as_me:$LINENO: ASL LIBS   are $ASL_LIBS" >&5
+echo "$as_me: ASL LIBS   are $ASL_LIBS" >&6;}
+    fi
+    if test -n "$ASL_DEPENDENCIES" ; then
+      { echo "$as_me:$LINENO: ASL DEPENDENCIES are $ASL_DEPENDENCIES" >&5
+echo "$as_me: ASL DEPENDENCIES are $ASL_DEPENDENCIES" >&6;}
+    fi
+    if test -n "$ASL_DATA" ; then
+      { echo "$as_me:$LINENO: ASL DATA   is  $ASL_DATA" >&5
+echo "$as_me: ASL DATA   is  $ASL_DATA" >&6;}
+    fi
+    if test -n "$ASL_PCLIBS" ; then
+      { echo "$as_me:$LINENO: ASL PCLIBS are $ASL_PCLIBS" >&5
+echo "$as_me: ASL PCLIBS are $ASL_PCLIBS" >&6;}
+    fi
+    if test -n "$ASL_PCREQUIRES" ; then
+      { echo "$as_me:$LINENO: ASL PCREQUIRES are $ASL_PCREQUIRES" >&5
+echo "$as_me: ASL PCREQUIRES are $ASL_PCREQUIRES" >&6;}
+    fi
+
+      { echo "$as_me:$LINENO: BonminAmplInterfaceLib CFLAGS are $BONMINAMPLINTERFACELIB_CFLAGS" >&5
+echo "$as_me: BonminAmplInterfaceLib CFLAGS are $BONMINAMPLINTERFACELIB_CFLAGS" >&6;}
+      { echo "$as_me:$LINENO: BonminAmplInterfaceLib LIBS   are $BONMINAMPLINTERFACELIB_LIBS" >&5
+echo "$as_me: BonminAmplInterfaceLib LIBS   are $BONMINAMPLINTERFACELIB_LIBS" >&6;}
+      { echo "$as_me:$LINENO: BonminAmplInterfaceLib DEPENDENCIES are $BONMINAMPLINTERFACELIB_DEPENDENCIES" >&5
+echo "$as_me: BonminAmplInterfaceLib DEPENDENCIES are $BONMINAMPLINTERFACELIB_DEPENDENCIES" >&6;}
+
+  fi
+fi
+
+# Define the Makefile conditional
+
+
+if test $coin_has_asl != notGiven &&
+                test $coin_has_asl != skipping; then
+  COIN_HAS_ASL_TRUE=
+  COIN_HAS_ASL_FALSE='#'
+else
+  COIN_HAS_ASL_TRUE='#'
+  COIN_HAS_ASL_FALSE=
+fi
+
+
+
+
+#AC_COIN_CHECK_PACKAGE(Bcp, [bcp])
+#
+#AC_ARG_WITH([bonminbcp],
+#            AC_HELP_STRING([--with-bonminbcp],
+#                           [Compile Bonmin with Bcp-based parallel version]),
+#            [use_bcp="$withval"], [use_bcp=no])
+#if test "$use_bcp" = yes; then
+#  if test $coin_has_bcp != yes ; then
+#     AC_MSG_ERROR([You specified --with-bonminbcp, but Bcp is not available])
+#  fi
+#fi
+#AM_CONDITIONAL(COMPILE_BONMINBCP, test "$use_bcp" = yes)
+
+#############################################################################
+#                                     CPLEX                                 #
+#############################################################################
+
+# Check whether OsiCplex is available
+
+echo "$as_me:$LINENO: checking for COIN-OR package OsiCpx" >&5
+echo $ECHO_N "checking for COIN-OR package OsiCpx... $ECHO_C" >&6
+
+coin_has_osicpx=notGiven
+
+# check if user wants to skip package in any case
+if test x"$COIN_SKIP_PROJECTS" != x; then
+  for dir in $COIN_SKIP_PROJECTS; do
+    if test $dir = "OsiCpx"; then
+      coin_has_osicpx=skipping
+    fi
+  done
+fi
+
+if test "$coin_has_osicpx" != skipping; then
+
+# Check whether --with-m4_tolower(OsiCpx) or --without-m4_tolower(OsiCpx) was given.
+if test "${with_osicpx+set}" = set; then
+  withval="$with_osicpx"
+  if test "$withval" = no ; then
+       coin_has_osicpx=skipping
+     fi
+
+fi;
+fi
+
+OSICPX_LIBS=
+OSICPX_CFLAGS=
+OSICPX_DATA=
+OSICPX_DEPENDENCIES=
+OSICPX_PCLIBS=
+OSICPX_PCREQUIRES=
+OSICPX_DATA=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package
+if test $coin_has_osicpx != skipping; then
+
+# Check whether --with-m4_tolower(OsiCpx)-lib or --without-m4_tolower(OsiCpx)-lib was given.
+if test "${with_osicpx_lib+set}" = set; then
+  withval="$with_osicpx_lib"
+  if test "$withval" = no ; then
+       coin_has_osicpx=skipping
+     else
+       coin_has_osicpx=yes
+       OSICPX_LIBS="$withval"
+       OSICPX_PCLIBS="$withval"
+
+         BONMINLIB_PCLIBS="$withval $BONMINLIB_PCLIBS"
+         BONMINLIB_LIBS="$withval $BONMINLIB_LIBS"
+
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         OSICPX_LIBS_INSTALLED="$withval"
+         BONMINLIB_LIBS_INSTALLED="$withval $BONMINLIB_LIBS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_osicpx != skipping; then
+
+# Check whether --with-m4_tolower(OsiCpx)-incdir or --without-m4_tolower(OsiCpx)-incdir was given.
+if test "${with_osicpx_incdir+set}" = set; then
+  withval="$with_osicpx_incdir"
+  if test "$withval" = no ; then
+       coin_has_osicpx=skipping
+     else
+       coin_has_osicpx=yes
+       OSICPX_CFLAGS="-I`${CYGPATH_W} $withval`"
+       BONMINLIB_CFLAGS="-I`${CYGPATH_W} $withval` $BONMINLIB_CFLAGS"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         OSICPX_CFLAGS_INSTALLED="$OSICPX_CFLAGS"
+         BONMINLIB_CFLAGS_INSTALLED="$OSICPX_CFLAGS $BONMINLIB_CFLAGS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_osicpx != skipping; then
+
+# Check whether --with-m4_tolower(OsiCpx)-datadir or --without-m4_tolower(OsiCpx)-datadir was given.
+if test "${with_osicpx_datadir+set}" = set; then
+  withval="$with_osicpx_datadir"
+  if test "$withval" = no ; then
+       coin_has_osicpx=skipping
+     else
+       coin_has_osicpx=yes
+       OSICPX_DATA="$withval"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         OSICPX_DATA_INSTALLED="$withval"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_osicpx = notGiven; then
+  if test -n "$PKG_CONFIG" ; then
+    # set search path for pkg-config
+    # need to export variable to be sure that the following pkg-config gets these values
+    coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+    PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED"
+    export PKG_CONFIG_PATH
+
+    # let pkg-config do it's magic
+
+
+
+if test -n "$PKG_CONFIG" ; then
+  if $PKG_CONFIG --exists "osi-cplex"; then
+    OSICPX_VERSIONS=`$PKG_CONFIG --modversion "osi-cplex" 2>/dev/null | tr '\n' ' '`
+     cflags=`$PKG_CONFIG --cflags "osi-cplex" 2>/dev/null`
+    # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files
+	# thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's
+	# but only do this if is not trivial
+    if test "$CYGPATH_W" != "echo" ; then
+      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
+      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    OSICPX_CFLAGS="$cflags"
+    OSICPX_LIBS=`$PKG_CONFIG --libs "osi-cplex" 2>/dev/null`
+    OSICPX_DATA=`$PKG_CONFIG --variable=datadir "osi-cplex" 2>/dev/null`
+     coin_has_osicpx=yes
+        echo "$as_me:$LINENO: result: yes: $OSICPX_VERSIONS" >&5
+echo "${ECHO_T}yes: $OSICPX_VERSIONS" >&6
+
+        # adjust linker flags for (i)cl compiler
+        # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl)
+        if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+        then
+          OSICPX_LIBS=`echo " $OSICPX_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+        fi
+        OSICPX_PCREQUIRES="osi-cplex"
+
+        # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in BonminLib
+
+          BONMINLIB_PCREQUIRES="osi-cplex $BONMINLIB_PCREQUIRES"
+          BONMINLIB_CFLAGS="$OSICPX_CFLAGS $BONMINLIB_CFLAGS"
+          BONMINLIB_LIBS="$OSICPX_LIBS $BONMINLIB_LIBS"
+
+
+
+  else
+    OSICPX_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "osi-cplex"`
+      coin_has_osicpx=notGiven
+        echo "$as_me:$LINENO: result: not given: $OSICPX_PKG_ERRORS" >&5
+echo "${ECHO_T}not given: $OSICPX_PKG_ERRORS" >&6
+
+  fi
+else
+  { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module OsiCpx without pkg-config\"" >&5
+echo "$as_me: error: \"Cannot check for existance of module OsiCpx without pkg-config\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+    # reset PKG_CONFIG_PATH variable
+    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
+    export PKG_CONFIG_PATH
+
+  else
+    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
+echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
+
+echo "$as_me:$LINENO: checking for COIN-OR package OsiCpx (fallback)" >&5
+echo $ECHO_N "checking for COIN-OR package OsiCpx (fallback)... $ECHO_C" >&6
+
+coin_has_osicpx=notGiven
+OSICPX_LIBS=
+OSICPX_LIBS_INSTALLED=
+OSICPX_CFLAGS=
+OSICPX_CFLAGS_INSTALLED=
+OSICPX_DATA=
+OSICPX_DATA_INSTALLED=
+OSICPX_PCLIBS=
+OSICPX_PCREQUIRES=
+
+# initial list of dependencies is "osi-cplex", but we need to filter out version number specifications (= x, <= x, >= x, != x)
+projtoprocess="osi-cplex"
+
+# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it
+# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards
+# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples
+# also, we setup the DATA variable
+allproj=""
+allpcfiles=""
+allpcifiles=""
+while test "x$projtoprocess" != x ; do
+
+  for proj in $projtoprocess ; do
+    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
+    pcfile=""
+    save_IFS="$IFS"
+    IFS=":"
+    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
+      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
+      if test -r "$dir/${proj}-uninstalled.pc" ; then
+        pcfile="$dir/$proj-uninstalled.pc"
+        if test -r "$dir/${proj}.pc" ; then
+          pcifile="$dir/${proj}.pc"
+        else
+          { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5
+echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;}
+          pcifile=
+        fi
+        break
+      fi
+    done
+    IFS="$save_IFS"
+
+    if test "x$pcfile" != x ; then
+      # read dependencies from $pcfile and filter it
+      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ 	]\{0,\}[^ 	]\{1,\}//g'`
+
+      # add projrequires to the front of the list of projects that have to be processed next
+      # at the same time, remove $proj from this list
+      projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"`
+
+      # read DATA from $pcfile, if _DATA is still empty
+      if test "x$OSICPX_DATA" = x ; then
+        projdatadir=
+        pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile`
+        eval `sh -c "$pcfilemod"`
+        OSICPX_DATA="$projdatadir"
+      fi
+
+      allproj="$allproj $proj"
+      allpcfiles="$pcfile:$allpcfiles"
+
+    else
+      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
+echo "${ECHO_T}no, dependency $proj not available" >&6
+      allproj=fail
+      break 2
+    fi
+
+    if test "x$pcifile" != x ; then
+      allpcifiles="$pcifile:$allpcifiles"
+
+      # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty
+      if test "x$OSICPX_DATA_INSTALLED" = x ; then
+        projdatadir=
+        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
+        eval `sh -c "$pcifilemod"`
+        if test "${CYGPATH_W}" != "echo"; then
+          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
+        fi
+        OSICPX_DATA_INSTALLED="$projdatadir"
+      fi
+
+    fi
+
+    break
+  done
+
+  # remove spaces on begin of $projtoprocess
+  projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'`
+
+done
+
+if test "$allproj" != fail ; then
+
+  # now go through the list of .pc files and assemble compiler and linker flags
+  # important is here to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcfiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    OSICPX_CFLAGS="$projcflags $OSICPX_CFLAGS"
+
+    # set LIBS variable
+    OSICPX_LIBS="$projlibs $OSICPX_LIBS"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # now go through the list of .pc files for installed projects and assemble compiler and linker flags
+  # important is here again to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcifiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    OSICPX_CFLAGS_INSTALLED="$projcflags $OSICPX_CFLAGS_INSTALLED"
+
+    # set LIBS variable
+    OSICPX_LIBS_INSTALLED="$projlibs $OSICPX_LIBS_INSTALLED"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # finish up
+  coin_has_osicpx=yes
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_OSICPX 1
+_ACEOF
+
+
+  # adjust linker flags for (i)cl compiler
+  # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl),
+  # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`",
+  #    everything of the form "-lname" by "libname.lib", and
+  #    everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path`
+  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+  then
+    OSICPX_LIBS=`echo " $OSICPX_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+    OSICPX_LIBS_INSTALLED=`echo " $OSICPX_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'`
+  fi
+
+  OSICPX_PCREQUIRES="osi-cplex"
+
+    BONMINLIB_PCREQUIRES="osi-cplex $BONMINLIB_PCREQUIRES"
+    BONMINLIB_CFLAGS="$OSICPX_CFLAGS $BONMINLIB_CFLAGS"
+    BONMINLIB_LIBS="$OSICPX_LIBS $BONMINLIB_LIBS"
+    BONMINLIB_CFLAGS_INSTALLED="$OSICPX_CFLAGS_INSTALLED $BONMINLIB_CFLAGS_INSTALLED"
+    BONMINLIB_LIBS_INSTALLED="$OSICPX_LIBS_INSTALLED $BONMINLIB_LIBS_INSTALLED"
+
+
+fi
+
+
+
+if test $coin_has_osicpx != notGiven &&
+                test $coin_has_osicpx != skipping; then
+  COIN_HAS_OSICPX_TRUE=
+  COIN_HAS_OSICPX_FALSE='#'
+else
+  COIN_HAS_OSICPX_TRUE='#'
+  COIN_HAS_OSICPX_FALSE=
+fi
+
+
+
+  fi
+
+else
+  echo "$as_me:$LINENO: result: $coin_has_osicpx" >&5
+echo "${ECHO_T}$coin_has_osicpx" >&6
+fi
+
+if test $coin_has_osicpx != skipping &&
+   test $coin_has_osicpx != notGiven ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_OSICPX 1
+_ACEOF
+
+
+  # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given.
+if test "${enable_interpackage_dependencies+set}" = set; then
+  enableval="$enable_interpackage_dependencies"
+
+else
+  enable_interpackage_dependencies=yes
+fi;
+
+  if test $enable_interpackage_dependencies = yes ; then
+     # construct dependencies variables from LIBS variables
+     # we add an extra space in LIBS so we can substitute out everything starting with " -"
+     # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows
+     # then remove everything of the form -xxx
+     # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl)
+     OSICPX_DEPENDENCIES=`echo " $OSICPX_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+       BONMINLIB_DEPENDENCIES=`echo " $BONMINLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+  fi
+
+  if test 1 = 0 ; then  #change this test to enable a bit of debugging output
+    if test -n "$OSICPX_CFLAGS" ; then
+      { echo "$as_me:$LINENO: OsiCpx CFLAGS are $OSICPX_CFLAGS" >&5
+echo "$as_me: OsiCpx CFLAGS are $OSICPX_CFLAGS" >&6;}
+    fi
+    if test -n "$OSICPX_LIBS" ; then
+      { echo "$as_me:$LINENO: OsiCpx LIBS   are $OSICPX_LIBS" >&5
+echo "$as_me: OsiCpx LIBS   are $OSICPX_LIBS" >&6;}
+    fi
+    if test -n "$OSICPX_DEPENDENCIES" ; then
+      { echo "$as_me:$LINENO: OsiCpx DEPENDENCIES are $OSICPX_DEPENDENCIES" >&5
+echo "$as_me: OsiCpx DEPENDENCIES are $OSICPX_DEPENDENCIES" >&6;}
+    fi
+    if test -n "$OSICPX_DATA" ; then
+      { echo "$as_me:$LINENO: OsiCpx DATA   is  $OSICPX_DATA" >&5
+echo "$as_me: OsiCpx DATA   is  $OSICPX_DATA" >&6;}
+    fi
+    if test -n "$OSICPX_PCLIBS" ; then
+      { echo "$as_me:$LINENO: OsiCpx PCLIBS are $OSICPX_PCLIBS" >&5
+echo "$as_me: OsiCpx PCLIBS are $OSICPX_PCLIBS" >&6;}
+    fi
+    if test -n "$OSICPX_PCREQUIRES" ; then
+      { echo "$as_me:$LINENO: OsiCpx PCREQUIRES are $OSICPX_PCREQUIRES" >&5
+echo "$as_me: OsiCpx PCREQUIRES are $OSICPX_PCREQUIRES" >&6;}
+    fi
+
+      { echo "$as_me:$LINENO: BonminLib CFLAGS are $BONMINLIB_CFLAGS" >&5
+echo "$as_me: BonminLib CFLAGS are $BONMINLIB_CFLAGS" >&6;}
+      { echo "$as_me:$LINENO: BonminLib LIBS   are $BONMINLIB_LIBS" >&5
+echo "$as_me: BonminLib LIBS   are $BONMINLIB_LIBS" >&6;}
+      { echo "$as_me:$LINENO: BonminLib DEPENDENCIES are $BONMINLIB_DEPENDENCIES" >&5
+echo "$as_me: BonminLib DEPENDENCIES are $BONMINLIB_DEPENDENCIES" >&6;}
+
+  fi
+fi
+
+# Define the Makefile conditional
+
+
+if test $coin_has_osicpx != notGiven &&
+                test $coin_has_osicpx != skipping; then
+  COIN_HAS_OSICPX_TRUE=
+  COIN_HAS_OSICPX_FALSE='#'
+else
+  COIN_HAS_OSICPX_TRUE='#'
+  COIN_HAS_OSICPX_FALSE=
+fi
+
+
+
+
+# To get also the directory where cplex.h can be found, we also check for cplex directly.
+
+  echo "$as_me:$LINENO: checking if user provides library for Cplex" >&5
+echo $ECHO_N "checking if user provides library for Cplex... $ECHO_C" >&6
+
+# Check for header file directory
+
+
+# Check whether --with-cplex-incdir or --without-cplex-incdir was given.
+if test "${with_cplex_incdir+set}" = set; then
+  withval="$with_cplex_incdir"
+  CPXINCDIR=`cd $withval; pwd`
+fi;
+
+# Check for library directory
+
+
+# Check whether --with-cplex-lib or --without-cplex-lib was given.
+if test "${with_cplex_lib+set}" = set; then
+  withval="$with_cplex_lib"
+  CPXLIB=$withval
+fi;
+
+# Switch to disable library check if requested
+
+  # Check whether --enable-cplex-libcheck or --disable-cplex-libcheck was given.
+if test "${enable_cplex_libcheck+set}" = set; then
+  enableval="$enable_cplex_libcheck"
+  cplex_libcheck=$enableval
+else
+  cplex_libcheck=yes
+fi;
+
+# At this point, if we're going to use the library, both LBRYINCDIR and
+# LBRYLIB must be defined and not empty.
+
+  if test x"$CPXINCDIR" != x || test x"$CPXLIB" != x; then
+    if test x"$CPXINCDIR" = x || test x"$CPXLIB" = x; then
+      { { echo "$as_me:$LINENO: error: You need to specify both an include directory and link flags to use library Cplex. Use --with-cplex-incdir of environment variable $CPXINCDIR to specify the include directory. Use --with-cplex-lib or environment variable $CPXLIB to specify link flags." >&5
+echo "$as_me: error: You need to specify both an include directory and link flags to use library Cplex. Use --with-cplex-incdir of environment variable $CPXINCDIR to specify the include directory. Use --with-cplex-lib or environment variable $CPXLIB to specify link flags." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    coin_has_cpx=true
+    echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  else
+    coin_has_cpx=false
+    echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  fi
+
+# If we have instructions for use, consider header and link checks.
+
+  if test $coin_has_cpx = true; then
+
+# If argument 3 (file) is given, check for the file. Typically this will be a
+# header file, but that's not assumed.
+
+    if test -r $CPXINCDIR/cplex.h; then
+
+  :
+else
+  { { echo "$as_me:$LINENO: error: Cannot find file cplex.h in $CPXINCDIR" >&5
+echo "$as_me: error: Cannot find file cplex.h in $CPXINCDIR" >&2;}
+   { (exit 1); exit 1; }; }
+  :
+fi
+
+
+# Now see if we can link the function. There are arguments for and against
+# assuming argument 3 is a header file declaring the function. A correct
+# function declaration is the main argument in favour. Having to cope with
+# possible dependencies or other oddities are the main arguments against.
+# Force the use of C as the best single choice amongst C++, C, and Fortran.
+# Obviously, this has limits.
+
+    if test x"$cplex_libcheck" != xno; then
+	   coin_save_LIBS="$LIBS"
+	   LIBS="$CPXLIB "
+	   coin_CPX_link=no
+	   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
+
+	   for fnm in CPXgetstat ; do
+	     echo "$as_me:$LINENO: checking whether symbol $fnm is available with CPX" >&5
+echo $ECHO_N "checking whether symbol $fnm is available with CPX... $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.  */
+
+int
+main ()
+{
+$fnm()
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 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
+		  coin_CPX_link=yes
+		  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+	   done
+	   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
+
+           LIBS="$coin_save_LIBS"
+	   if test x"$coin_CPX_link" != xyes ; then
+	     { { echo "$as_me:$LINENO: error: Cannot find symbol(s) CPXgetstat with CPX" >&5
+echo "$as_me: error: Cannot find symbol(s) CPXgetstat with CPX" >&2;}
+   { (exit 1); exit 1; }; }
+	   fi
+	 fi
+
+
+# If we make it this far, we've verified the file and linked the function. Add
+# the necessary link flags to _{PC}LIBS and define the preprocessor symbol
+# COIN_HAS_LBRY.
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_CPX 1
+_ACEOF
+
+  fi
+
+# Arrange for configure to substitute LBRYINCDIR and LBRYLIB and create the
+# automake conditional. These actions must occur unconditionally.
+
+
+
+
+
+if test $coin_has_cpx = true; then
+  COIN_HAS_CPX_TRUE=
+  COIN_HAS_CPX_FALSE='#'
+else
+  COIN_HAS_CPX_TRUE='#'
+  COIN_HAS_CPX_FALSE=
+fi
+
+
+
+#############################################################################
+#                                FilterSQP                                  #
+#############################################################################
+
+# for backward compatibility, map --with-filtersqp to --with-filtersqp-libs
+
+# Check whether --with-filtersqp or --without-filtersqp was given.
+if test "${with_filtersqp+set}" = set; then
+  withval="$with_filtersqp"
+  filtersqp_libs="$withval"
+fi;
+
+
+echo "$as_me:$LINENO: checking for COIN-OR package FilterSQP" >&5
+echo $ECHO_N "checking for COIN-OR package FilterSQP... $ECHO_C" >&6
+
+coin_has_filtersqp=notGiven
+
+# check if user wants to skip package in any case
+if test x"$COIN_SKIP_PROJECTS" != x; then
+  for dir in $COIN_SKIP_PROJECTS; do
+    if test $dir = "FilterSQP"; then
+      coin_has_filtersqp=skipping
+    fi
+  done
+fi
+
+if test "$coin_has_filtersqp" != skipping; then
+
+# Check whether --with-m4_tolower(FilterSQP) or --without-m4_tolower(FilterSQP) was given.
+if test "${with_filtersqp+set}" = set; then
+  withval="$with_filtersqp"
+  if test "$withval" = no ; then
+       coin_has_filtersqp=skipping
+     fi
+
+fi;
+fi
+
+FILTERSQP_LIBS=
+FILTERSQP_CFLAGS=
+FILTERSQP_DATA=
+FILTERSQP_DEPENDENCIES=
+FILTERSQP_PCLIBS=
+FILTERSQP_PCREQUIRES=
+FILTERSQP_DATA=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#check if user provided LIBS, CFLAGS, or DATA for package or disables use of package
+if test $coin_has_filtersqp != skipping; then
+
+# Check whether --with-m4_tolower(FilterSQP)-lib or --without-m4_tolower(FilterSQP)-lib was given.
+if test "${with_filtersqp_lib+set}" = set; then
+  withval="$with_filtersqp_lib"
+  if test "$withval" = no ; then
+       coin_has_filtersqp=skipping
+     else
+       coin_has_filtersqp=yes
+       FILTERSQP_LIBS="$withval"
+       FILTERSQP_PCLIBS="$withval"
+
+         BONMINLIB_PCLIBS="$withval $BONMINLIB_PCLIBS"
+         BONMINLIB_LIBS="$withval $BONMINLIB_LIBS"
+
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         FILTERSQP_LIBS_INSTALLED="$withval"
+         BONMINLIB_LIBS_INSTALLED="$withval $BONMINLIB_LIBS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_filtersqp != skipping; then
+
+# Check whether --with-m4_tolower(FilterSQP)-incdir or --without-m4_tolower(FilterSQP)-incdir was given.
+if test "${with_filtersqp_incdir+set}" = set; then
+  withval="$with_filtersqp_incdir"
+  if test "$withval" = no ; then
+       coin_has_filtersqp=skipping
+     else
+       coin_has_filtersqp=yes
+       FILTERSQP_CFLAGS="-I`${CYGPATH_W} $withval`"
+       BONMINLIB_CFLAGS="-I`${CYGPATH_W} $withval` $BONMINLIB_CFLAGS"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         FILTERSQP_CFLAGS_INSTALLED="$FILTERSQP_CFLAGS"
+         BONMINLIB_CFLAGS_INSTALLED="$FILTERSQP_CFLAGS $BONMINLIB_CFLAGS_INSTALLED"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_filtersqp != skipping; then
+
+# Check whether --with-m4_tolower(FilterSQP)-datadir or --without-m4_tolower(FilterSQP)-datadir was given.
+if test "${with_filtersqp_datadir+set}" = set; then
+  withval="$with_filtersqp_datadir"
+  if test "$withval" = no ; then
+       coin_has_filtersqp=skipping
+     else
+       coin_has_filtersqp=yes
+       FILTERSQP_DATA="$withval"
+       # if project flags are given by user and we build without pkg-config, then we need to setup the _INSTALLED variables
+       if test -z "$PKG_CONFIG" ; then
+         FILTERSQP_DATA_INSTALLED="$withval"
+       fi
+     fi
+
+fi;
+fi
+
+if test $coin_has_filtersqp = notGiven; then
+  if test -n "$PKG_CONFIG" ; then
+    # set search path for pkg-config
+    # need to export variable to be sure that the following pkg-config gets these values
+    coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+    PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH:$COIN_PKG_CONFIG_PATH_UNINSTALLED"
+    export PKG_CONFIG_PATH
+
+    # let pkg-config do it's magic
+
+
+
+if test -n "$PKG_CONFIG" ; then
+  if $PKG_CONFIG --exists "coinfiltersqp"; then
+    FILTERSQP_VERSIONS=`$PKG_CONFIG --modversion "coinfiltersqp" 2>/dev/null | tr '\n' ' '`
+     cflags=`$PKG_CONFIG --cflags "coinfiltersqp" 2>/dev/null`
+    # pkg-config cannot handle spaces, so CYGPATH_W cannot be put into .pc files
+	# thus, we modify the cflags extracted from pkg-config by putting CYGPATH_W behind -I's
+	# but only do this if is not trivial
+    if test "$CYGPATH_W" != "echo" ; then
+      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
+      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    FILTERSQP_CFLAGS="$cflags"
+    FILTERSQP_LIBS=`$PKG_CONFIG --libs "coinfiltersqp" 2>/dev/null`
+    FILTERSQP_DATA=`$PKG_CONFIG --variable=datadir "coinfiltersqp" 2>/dev/null`
+     coin_has_filtersqp=yes
+        echo "$as_me:$LINENO: result: yes: $FILTERSQP_VERSIONS" >&5
+echo "${ECHO_T}yes: $FILTERSQP_VERSIONS" >&6
+
+        # adjust linker flags for (i)cl compiler
+        # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl)
+        if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+        then
+          FILTERSQP_LIBS=`echo " $FILTERSQP_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+        fi
+        FILTERSQP_PCREQUIRES="coinfiltersqp"
+
+        # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in BonminLib
+
+          BONMINLIB_PCREQUIRES="coinfiltersqp $BONMINLIB_PCREQUIRES"
+          BONMINLIB_CFLAGS="$FILTERSQP_CFLAGS $BONMINLIB_CFLAGS"
+          BONMINLIB_LIBS="$FILTERSQP_LIBS $BONMINLIB_LIBS"
+
+
+
+  else
+    FILTERSQP_PKG_ERRORS=`$PKG_CONFIG $pkg_short_errors --errors-to-stdout --print-errors "coinfiltersqp"`
+      coin_has_filtersqp=notGiven
+        echo "$as_me:$LINENO: result: not given: $FILTERSQP_PKG_ERRORS" >&5
+echo "${ECHO_T}not given: $FILTERSQP_PKG_ERRORS" >&6
+
+  fi
+else
+  { { echo "$as_me:$LINENO: error: \"Cannot check for existance of module FilterSQP without pkg-config\"" >&5
+echo "$as_me: error: \"Cannot check for existance of module FilterSQP without pkg-config\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+    # reset PKG_CONFIG_PATH variable
+    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
+    export PKG_CONFIG_PATH
+
+  else
+    echo "$as_me:$LINENO: result: skipped check via pkg-config, redirect to fallback" >&5
+echo "${ECHO_T}skipped check via pkg-config, redirect to fallback" >&6
+
+echo "$as_me:$LINENO: checking for COIN-OR package FilterSQP (fallback)" >&5
+echo $ECHO_N "checking for COIN-OR package FilterSQP (fallback)... $ECHO_C" >&6
+
+coin_has_filtersqp=notGiven
+FILTERSQP_LIBS=
+FILTERSQP_LIBS_INSTALLED=
+FILTERSQP_CFLAGS=
+FILTERSQP_CFLAGS_INSTALLED=
+FILTERSQP_DATA=
+FILTERSQP_DATA_INSTALLED=
+FILTERSQP_PCLIBS=
+FILTERSQP_PCREQUIRES=
+
+# initial list of dependencies is "coinfiltersqp", but we need to filter out version number specifications (= x, <= x, >= x, != x)
+projtoprocess="coinfiltersqp"
+
+# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it
+# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards
+# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples
+# also, we setup the DATA variable
+allproj=""
+allpcfiles=""
+allpcifiles=""
+while test "x$projtoprocess" != x ; do
+
+  for proj in $projtoprocess ; do
+    # if $proj is available and configured, then a project-uninstalled.pc file should have been created, so search for it
+    pcfile=""
+    save_IFS="$IFS"
+    IFS=":"
+    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
+      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
+      if test -r "$dir/${proj}-uninstalled.pc" ; then
+        pcfile="$dir/$proj-uninstalled.pc"
+        if test -r "$dir/${proj}.pc" ; then
+          pcifile="$dir/${proj}.pc"
+        else
+          { echo "$as_me:$LINENO: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&5
+echo "$as_me: WARNING: Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples." >&2;}
+          pcifile=
+        fi
+        break
+      fi
+    done
+    IFS="$save_IFS"
+
+    if test "x$pcfile" != x ; then
+      # read dependencies from $pcfile and filter it
+      projrequires=`sed -n -e 's/Requires://gp' "$pcfile" | sed -e 's/<\{0,1\}>\{0,1\}=[ 	]\{0,\}[^ 	]\{1,\}//g'`
+
+      # add projrequires to the front of the list of projects that have to be processed next
+      # at the same time, remove $proj from this list
+      projtoprocess=`echo $projtoprocess | sed -e "s/$proj/$projrequires/"`
+
+      # read DATA from $pcfile, if _DATA is still empty
+      if test "x$FILTERSQP_DATA" = x ; then
+        projdatadir=
+        pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile`
+        eval `sh -c "$pcfilemod"`
+        FILTERSQP_DATA="$projdatadir"
+      fi
+
+      allproj="$allproj $proj"
+      allpcfiles="$pcfile:$allpcfiles"
+
+    else
+      echo "$as_me:$LINENO: result: no, dependency $proj not available" >&5
+echo "${ECHO_T}no, dependency $proj not available" >&6
+      allproj=fail
+      break 2
+    fi
+
+    if test "x$pcifile" != x ; then
+      allpcifiles="$pcifile:$allpcifiles"
+
+      # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty
+      if test "x$FILTERSQP_DATA_INSTALLED" = x ; then
+        projdatadir=
+        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
+        eval `sh -c "$pcifilemod"`
+        if test "${CYGPATH_W}" != "echo"; then
+          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
+        fi
+        FILTERSQP_DATA_INSTALLED="$projdatadir"
+      fi
+
+    fi
+
+    break
+  done
+
+  # remove spaces on begin of $projtoprocess
+  projtoprocess=`echo $projtoprocess | sed -e 's/^ *//'`
+
+done
+
+if test "$allproj" != fail ; then
+
+  # now go through the list of .pc files and assemble compiler and linker flags
+  # important is here to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcfiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    FILTERSQP_CFLAGS="$projcflags $FILTERSQP_CFLAGS"
+
+    # set LIBS variable
+    FILTERSQP_LIBS="$projlibs $FILTERSQP_LIBS"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # now go through the list of .pc files for installed projects and assemble compiler and linker flags
+  # important is here again to obey the reverse order that has been setup before,
+  # since then libraries that are required by several others should be after these other libraries
+  pcfilesprocessed=""
+
+  save_IFS="$IFS"
+  IFS=":"
+  for pcfile in $allpcifiles ; do
+
+    # if $pcfile has been processed already, skip this round
+    if test "x$pcfilesprocessed" != x ; then
+      for pcfiledone in $pcfilesprocessed ; do
+        if test "$pcfiledone" = "$pcfile" ; then
+          continue 2
+        fi
+      done
+    fi
+
+    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
+    #   replace "Libs:" by "echo projlibs="
+    #   replace "Cflags:" by "echo projcflags="
+    #   remove every line starting with <some word>:
+    pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/^[a-zA-Z]*:/d' $pcfile`
+
+    # set projcflags and projlibs variables by running $pcfilemod
+    # under mingw, the current IFS seem to make the : in the paths of the gfortran libs go away, so we temporarily set IFS back to its default
+    projcflags=
+    projlibs=
+    IFS="$save_IFS"
+    eval `sh -c "$pcfilemod"`
+    IFS=":"
+
+    # add CYGPATH_W cludge into include flags and set CFLAGS variable
+    if test "${CYGPATH_W}" != "echo"; then
+      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
+    fi
+    FILTERSQP_CFLAGS_INSTALLED="$projcflags $FILTERSQP_CFLAGS_INSTALLED"
+
+    # set LIBS variable
+    FILTERSQP_LIBS_INSTALLED="$projlibs $FILTERSQP_LIBS_INSTALLED"
+
+    # remember that we have processed $pcfile
+    pcfilesprocessed="$pcfilesprocessed:$pcfile"
+
+  done
+  IFS="$save_IFS"
+
+
+  # finish up
+  coin_has_filtersqp=yes
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_FILTERSQP 1
+_ACEOF
+
+
+  # adjust linker flags for (i)cl compiler
+  # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl),
+  # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`",
+  #    everything of the form "-lname" by "libname.lib", and
+  #    everything of the form "-Lpath" by "-libpath:`$(CYGPATH_W) path`
+  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
+  then
+    FILTERSQP_LIBS=`echo " $FILTERSQP_LIBS " | sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g'`
+    FILTERSQP_LIBS_INSTALLED=`echo " $FILTERSQP_LIBS_INSTALLED" | sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g' -e 's/ -L\([^ ]*\)/ -libpath:\`$(CYGPATH_W) \1\`/g'`
+  fi
+
+  FILTERSQP_PCREQUIRES="coinfiltersqp"
+
+    BONMINLIB_PCREQUIRES="coinfiltersqp $BONMINLIB_PCREQUIRES"
+    BONMINLIB_CFLAGS="$FILTERSQP_CFLAGS $BONMINLIB_CFLAGS"
+    BONMINLIB_LIBS="$FILTERSQP_LIBS $BONMINLIB_LIBS"
+    BONMINLIB_CFLAGS_INSTALLED="$FILTERSQP_CFLAGS_INSTALLED $BONMINLIB_CFLAGS_INSTALLED"
+    BONMINLIB_LIBS_INSTALLED="$FILTERSQP_LIBS_INSTALLED $BONMINLIB_LIBS_INSTALLED"
+
+
+fi
+
+
+
+if test $coin_has_filtersqp != notGiven &&
+                test $coin_has_filtersqp != skipping; then
+  COIN_HAS_FILTERSQP_TRUE=
+  COIN_HAS_FILTERSQP_FALSE='#'
+else
+  COIN_HAS_FILTERSQP_TRUE='#'
+  COIN_HAS_FILTERSQP_FALSE=
+fi
+
+
+
+  fi
+
+else
+  echo "$as_me:$LINENO: result: $coin_has_filtersqp" >&5
+echo "${ECHO_T}$coin_has_filtersqp" >&6
+fi
+
+if test $coin_has_filtersqp != skipping &&
+   test $coin_has_filtersqp != notGiven ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define COIN_HAS_FILTERSQP 1
+_ACEOF
+
+
+  # Check whether --enable-interpackage-dependencies or --disable-interpackage-dependencies was given.
+if test "${enable_interpackage_dependencies+set}" = set; then
+  enableval="$enable_interpackage_dependencies"
+
+else
+  enable_interpackage_dependencies=yes
+fi;
+
+  if test $enable_interpackage_dependencies = yes ; then
+     # construct dependencies variables from LIBS variables
+     # we add an extra space in LIBS so we can substitute out everything starting with " -"
+     # remove everything of the form -framework xxx as used on Mac and mkl* and libiomp5* and wsock32.lib as used on Windows
+     # then remove everything of the form -xxx
+     # also remove everything of the form `xxx`yyy (may have been added for cygwin/cl)
+     FILTERSQP_DEPENDENCIES=`echo " $FILTERSQP_LIBS" | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+       BONMINLIB_DEPENDENCIES=`echo " $BONMINLIB_LIBS " | sed -e 's/ mkl[^ ]*//g' -e 's/ libiomp5[^ ]*//g' -e 's/ wsock32[^ ]*//g' -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g'`
+
+  fi
+
+  if test 1 = 0 ; then  #change this test to enable a bit of debugging output
+    if test -n "$FILTERSQP_CFLAGS" ; then
+      { echo "$as_me:$LINENO: FilterSQP CFLAGS are $FILTERSQP_CFLAGS" >&5
+echo "$as_me: FilterSQP CFLAGS are $FILTERSQP_CFLAGS" >&6;}
+    fi
+    if test -n "$FILTERSQP_LIBS" ; then
+      { echo "$as_me:$LINENO: FilterSQP LIBS   are $FILTERSQP_LIBS" >&5
+echo "$as_me: FilterSQP LIBS   are $FILTERSQP_LIBS" >&6;}
+    fi
+    if test -n "$FILTERSQP_DEPENDENCIES" ; then
+      { echo "$as_me:$LINENO: FilterSQP DEPENDENCIES are $FILTERSQP_DEPENDENCIES" >&5
+echo "$as_me: FilterSQP DEPENDENCIES are $FILTERSQP_DEPENDENCIES" >&6;}
+    fi
+    if test -n "$FILTERSQP_DATA" ; then
+      { echo "$as_me:$LINENO: FilterSQP DATA   is  $FILTERSQP_DATA" >&5
+echo "$as_me: FilterSQP DATA   is  $FILTERSQP_DATA" >&6;}
+    fi
+    if test -n "$FILTERSQP_PCLIBS" ; then
+      { echo "$as_me:$LINENO: FilterSQP PCLIBS are $FILTERSQP_PCLIBS" >&5
+echo "$as_me: FilterSQP PCLIBS are $FILTERSQP_PCLIBS" >&6;}
+    fi
+    if test -n "$FILTERSQP_PCREQUIRES" ; then
+      { echo "$as_me:$LINENO: FilterSQP PCREQUIRES are $FILTERSQP_PCREQUIRES" >&5
+echo "$as_me: FilterSQP PCREQUIRES are $FILTERSQP_PCREQUIRES" >&6;}
+    fi
+
+      { echo "$as_me:$LINENO: BonminLib CFLAGS are $BONMINLIB_CFLAGS" >&5
+echo "$as_me: BonminLib CFLAGS are $BONMINLIB_CFLAGS" >&6;}
+      { echo "$as_me:$LINENO: BonminLib LIBS   are $BONMINLIB_LIBS" >&5
+echo "$as_me: BonminLib LIBS   are $BONMINLIB_LIBS" >&6;}
+      { echo "$as_me:$LINENO: BonminLib DEPENDENCIES are $BONMINLIB_DEPENDENCIES" >&5
+echo "$as_me: BonminLib DEPENDENCIES are $BONMINLIB_DEPENDENCIES" >&6;}
+
+  fi
+fi
+
+# Define the Makefile conditional
+
+
+if test $coin_has_filtersqp != notGiven &&
+                test $coin_has_filtersqp != skipping; then
+  COIN_HAS_FILTERSQP_TRUE=
+  COIN_HAS_FILTERSQP_FALSE='#'
+else
+  COIN_HAS_FILTERSQP_TRUE='#'
+  COIN_HAS_FILTERSQP_FALSE=
+fi
+
+
+
+
+if test $coin_has_filtersqp = yes
+then
+  # Get the name of the Fortran compiler and appropriate compiler options
+  case $build in
+  *-cygwin* | *-mingw*)
+     if test "$enable_msvc" = yes ; then
+       coin_f77_comps="ifort fl32 compile_f2c gfortran g95 g77"
+     else
+       coin_f77_comps="gfortran ifort g95 g77 fl32 compile_f2c"
+     fi ;;
+  *-*-solaris*)
+     coin_f77_comps="f95 f90 g95 f77 xlf_r fort77 gfortran g77 pgf90 pgf77 ifort ifc frt af77" ;;
+  *-linux-gnu*)
+     coin_f77_comps="gfortran ifort g95 fort77 f77 g77 pgf90 pgf77 ifc frt af77 xlf_r" ;;
+  *) coin_f77_comps="xlf_r fort77 gfortran ifort g95 f77 g77 pgf90 pgf77 ifc frt af77" ;;
+ esac
+
+
+
+
+
+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
+
+
+
+
+
+
+coin_has_f77=yes
+
+save_fflags="$FFLAGS"
+
+# We delete the cached value, since the test might not have been
+# performed with our choice of compilers earlier
+$as_unset ac_cv_prog_F77 || test "${ac_cv_prog_F77+set}" != set || { ac_cv_prog_F77=; export ac_cv_prog_F77; }
+
+# This is a real belt-and-suspenders approach. AC_COIN_FIND_F77 will use
+# coin_f77_comps to see if there's a program that matches one of the names.
+# If there's no such program, F77 = unavailable. If we match the name,
+# feed AC_PROG_F77 the same search list, just to be sure it's a functioning
+# compiler.
+# AC_MSG_NOTICE([Fortran compiler candidates: $coin_f77_comps])
+
+
+{ echo "$as_me:$LINENO: Trying to determine Fortran compiler name" >&5
+echo "$as_me: Trying to determine Fortran compiler name" >&6;}
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $coin_f77_comps
+  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 $as_executable_p "$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
+
+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 $coin_f77_comps
+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 $as_executable_p "$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
+
+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
+test -n "$ac_ct_F77" || ac_ct_F77="unavailable"
+
+  F77=$ac_ct_F77
+fi
+
+
+if test "$F77" != "unavailable" ; 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
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $coin_f77_comps
+  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 $as_executable_p "$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
+
+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 $coin_f77_comps
+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 $as_executable_p "$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
+
+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
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:23244:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 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=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
+
+else
+  { echo "$as_me:$LINENO: WARNING: Failed to find a Fortran compiler!" >&5
+echo "$as_me: WARNING: Failed to find a Fortran compiler!" >&2;}
+fi
+
+FFLAGS="$save_fflags"
+
+# Check if a project specific FFLAGS variable has been set
+if test x$COIN_PRJCT != x; then
+  eval coin_tmp=\${${COIN_PRJCT}_FFLAGS+set}
+  if test x$coin_tmp = xset; then
+    eval FFLAGS=\${${COIN_PRJCT}_FFLAGS}
+  fi
+fi
+
+if test "$F77" != "unavailable" && test x"$FFLAGS" = x ; then
+
+  coin_add_fflags=
+  coin_opt_fflags=
+  coin_dbg_fflags=
+  coin_warn_fflags=
+
+  if test "$G77" = "yes"; then
+    coin_opt_fflags="-O3"
+    coin_add_fflags="-pipe"
+    coin_dbg_fflags="-g -O0"
+  else
+    case $build in
+      *-cygwin* | *-mingw*)
+        case $F77 in
+          ifort* | */ifort* | IFORT* | */IFORT* )
+            if test "$coin_disable_shared" = yes || test "$enable_shared" = yes ; then
+              coin_opt_fflags='-MD -O3'
+              coin_dbg_fflags='-MDd -debug'
+            else
+              coin_opt_fflags='-MT -O3'
+              coin_dbg_fflags='-MTd -debug'
+            fi
+            coin_add_fflags='-fpp -nologo'
+          ;;
+          compile_f2c*)
+            if test "$coin_disable_shared" = yes || test "$enable_shared" = yes ; then
+              coin_opt_fflags='-MD -O2'
+              coin_dbg_fflags='-MDd'
+            else
+              coin_opt_fflags='-MT -O2'
+              coin_dbg_fflags='-MTd'
+            fi
+            coin_add_fflags='-nologo -wd4996'
+          ;;
+        esac
+        ;;
+      *-linux-*)
+        case $F77 in
+          ifc* | */ifc* | ifort* | */ifort*)
+            coin_opt_fflags="-O3 -ip"
+            coin_add_fflags="-cm -w90 -w95"
+            coin_dbg_fflags="-g -CA -CB -CS"
+            # Check if -i_dynamic is necessary (for new glibc library)
+            FFLAGS=
+            cat >conftest.$ac_ext <<_ACEOF
+      program main
+      write(*,*) 'Hello world'
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+coin_add_fflags="-i_dynamic $coin_add_fflags"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+            ;;
+          pgf77* | */pgf77* | pgf90* | */pgf90*)
+            coin_opt_fflags="-fast"
+            coin_add_fflags="-Kieee -pc 64"
+            coin_dbg_fflags="-g"
+          ;;
+        esac
+        ;;
+      *-ibm-*)
+        case "$F77" in
+          xlf* | */xlf* | mpxlf* | */mpxlf* )
+            coin_opt_fflags="-O -qarch=auto -qcache=auto -qtune=auto -qmaxmem=-1"
+            coin_add_fflags="-bmaxdata:0x80000000 -qsuppress=1500-036 -qsuppress=1500-029"
+            coin_dbg_fflags="-g -C"
+            ;;
+        esac
+        ;;
+      *-hp-*)
+        coin_opt_fflags="+O3"
+        coin_add_fflags="+U77"
+        coin_dbg_fflags="-C -g"
+        ;;
+      *-*-solaris*)
+        coin_opt_fflags="-O4"
+        coin_dbg_fflags="-g"
+        ;;
+      *-sgi-*)
+        coin_opt_fflags="-O5 -OPT:Olimit=0"
+        coin_dbg_fflags="-g"
+        ;;
+    esac
+  fi
+
+  if test "$ac_cv_prog_f77_g" = yes && test -z "$coin_dbg_fflags" ; then
+    coin_dbg_fflags="-g"
+  fi
+
+  if test -z "$coin_opt_fflags"; then
+    # Try if -O option works if nothing else is set
+    FFLAGS=-O
+    cat >conftest.$ac_ext <<_ACEOF
+      program main
+      integer i
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  coin_opt_fflags="-O"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  fi
+
+  # if PM doesn't want the warning messages, take them out
+  if test x"$coin_skip_warn_fflags" = xyes; then
+    coin_warn_fflags=
+  fi
+
+  if test x${DBG_FFLAGS+set} != xset; then
+    DBG_FFLAGS="$coin_dbg_fflags $coin_add_fflags $coin_warn_fflags"
+  fi
+  if test x${OPT_FFLAGS+set} != xset; then
+    OPT_FFLAGS="$coin_opt_fflags $coin_add_fflags $coin_warn_fflags"
+  fi
+
+  DBG_FFLAGS="$DBG_FFLAGS $ADD_FFLAGS"
+  OPT_FFLAGS="$OPT_FFLAGS $ADD_FFLAGS"
+
+  if test "$coin_debug_compile" = "true"; then
+    FFLAGS="$DBG_FFLAGS"
+  else
+    FFLAGS="$OPT_FFLAGS"
+  fi
+else
+  FFLAGS="$FFLAGS $ADD_FFLAGS"
+  if test x${DBG_FFLAGS+set} != xset; then
+    DBG_FFLAGS="$FFLAGS"
+  fi
+  if test x${OPT_FFLAGS+set} != xset; then
+    OPT_FFLAGS="$FFLAGS"
+  fi
+fi
+
+# Try if FFLAGS works
+if test "$F77" != "unavailable" ; then
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+      integer i
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+FFLAGS=
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  if test -z "$FFLAGS"; then
+    { echo "$as_me:$LINENO: WARNING: The flags FFLAGS=\"$FFLAGS\" do not work.  I will now just try '-O', but you might want to set FFLAGS manually." >&5
+echo "$as_me: WARNING: The flags FFLAGS=\"$FFLAGS\" do not work.  I will now just try '-O', but you might want to set FFLAGS manually." >&2;}
+    FFLAGS='-O'
+    cat >conftest.$ac_ext <<_ACEOF
+      program main
+      integer i
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+FFLAGS=
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+    if test -z "$FFLAGS"; then
+      { echo "$as_me:$LINENO: WARNING: This value for FFLAGS does not work.  I will continue with empty FFLAGS, but you might want to set FFLAGS manually." >&5
+echo "$as_me: WARNING: This value for FFLAGS does not work.  I will continue with empty FFLAGS, but you might want to set FFLAGS manually." >&2;}
+    fi
+  fi
+fi
+
+{ echo "$as_me:$LINENO: Fortran compiler options are: $FFLAGS" >&5
+echo "$as_me: Fortran compiler options are: $FFLAGS" >&6;}
+
+
+if test x"$MPIF77" = x; then :; else
+  { echo "$as_me:$LINENO: Will use MPI Fortran compiler $MPIF77" >&5
+echo "$as_me: Will use MPI Fortran compiler $MPIF77" >&6;}
+  F77="$MPIF77"
+fi
+
+# correct the LD variable if we use the intel fortran compiler in windows
+case "$F77" in
+  ifort* | */ifort* | IFORT* | */IFORT*)
+
+ case $build in
+  *-mingw*)
+    if test "${LD+set}" = set; then :; else
+      LD=link
+    fi
+    ;;
+ esac
+ if test $enable_msvc = yes ; then
+   if test "x${LD+set}" = xset; then :; else
+     LD=link
+   fi
+ fi
+
+    ;;
+esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+  # Find out how to call Fortran from C and determine Fortran runtime libraries
+
+# get FLIBS
+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
+echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5
+echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_v+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_v=
+# Try some options frequently used verbose output
+for ac_verb in -v -verbose --verbose -V -\#\#\#; do
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FFLAGS
+FFLAGS="$FFLAGS $ac_verb"
+(eval echo $as_me:23767: \"$ac_link\") >&5
+ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
+echo "$ac_f77_v_output" >&5
+FFLAGS=$ac_save_FFLAGS
+
+rm -f conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_f77_v_output="`echo $ac_f77_v_output |
+	grep 'LPATH is:' |
+	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"
+
+case $ac_f77_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  # Use "\"" instead of '"' for font-lock-mode.
+  # FIXME: a more general fix for quoted arguments with spaces?
+  *cft90*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;;
+esac
+
+
+  # look for -l* and *.a constructs in the output
+  for ac_arg in $ac_f77_v_output; do
+     case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
+          ac_cv_prog_f77_v=$ac_verb
+          break 2 ;;
+     esac
+  done
+done
+if test -z "$ac_cv_prog_f77_v"; then
+   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5
+echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5
+echo "$as_me: WARNING: compilation failed" >&2;}
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_v" >&6
+echo "$as_me:$LINENO: checking for Fortran libraries of $F77" >&5
+echo $ECHO_N "checking for Fortran libraries of $F77... $ECHO_C" >&6
+if test "${ac_cv_f77_libs+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$FLIBS" != "x"; then
+  ac_cv_f77_libs="$FLIBS" # Let the user override the test.
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FFLAGS
+FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
+(eval echo $as_me:23845: \"$ac_link\") >&5
+ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
+echo "$ac_f77_v_output" >&5
+FFLAGS=$ac_save_FFLAGS
+
+rm -f conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_f77_v_output="`echo $ac_f77_v_output |
+	grep 'LPATH is:' |
+	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"
+
+case $ac_f77_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  # Use "\"" instead of '"' for font-lock-mode.
+  # FIXME: a more general fix for quoted arguments with spaces?
+  *cft90*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;;
+esac
+
+
+
+ac_cv_f77_libs=
+
+# Save positional arguments (if any)
+ac_save_positional="$@"
+
+set X $ac_f77_v_output
+while test $# != 1; do
+  shift
+  ac_arg=$1
+  case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+
+          ;;
+        -bI:*)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_arg; do
+    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+fi
+
+          ;;
+          # Ignore these flags.
+        -lang* | -lcrt[01].o | -lcrtbegin.o | -lc | -lgcc | -libmil | -LANG:=*)
+          ;;
+        -lkernel32)
+          test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+          ;;
+        -[LRuY])
+          # These flags, when seen by themselves, take an argument.
+          # We remove the space between option and argument and re-iterate
+          # unless we find an empty arg or a new option (starting with -)
+	  case $2 in
+	     "" | -*);;
+	     *)
+		ac_arg="$ac_arg$2"
+		shift; shift
+		set X $ac_arg "$@"
+		;;
+	  esac
+          ;;
+        -YP,*)
+          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
+              ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_j" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_arg="$ac_arg $ac_j"
+                               ac_cv_f77_libs="$ac_cv_f77_libs $ac_j"
+fi
+
+          done
+          ;;
+        -[lLR]*)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+
+          ;;
+          # Ignore everything else.
+  esac
+done
+# restore positional arguments
+set X $ac_save_positional; shift
+
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`echo $ac_f77_v_output |
+                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
+      test "x$ac_ld_run_path" != x &&
+        if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_ld_run_path; do
+    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path"
+fi
+      ;;
+esac
+fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5
+echo "${ECHO_T}$ac_cv_f77_libs" >&6
+FLIBS="$ac_cv_f77_libs"
+
+
+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
+
+orig_FLIBS="$FLIBS"
+
+# If FLIBS has been set by the user, we just restore its value here
+if test x"$save_FLIBS" != x; then
+  FLIBS="$save_FLIBS"
+else
+  # This is to correct a missing exclusion in autoconf 2.59
+  if test x"$FLIBS" != x; then
+    my_flibs=
+    for flag in $FLIBS; do
+      case $flag in
+        -lcrt*.o) ;;
+        -lcygwin) ;;
+        -lgcc*)   ;;
+               *) my_flibs="$my_flibs $flag" ;;
+      esac
+    done
+    FLIBS="$my_flibs"
+  fi
+
+  case $build in
+  # The following is a fix to define FLIBS for ifort on Windows
+  # In its original version, it linked in libifcorert.lib or libifcorertd.lib on Windows/ifort explicitly.
+  # However, this seem to create a dependency on libifcorert.dll (or libifcorertd.dll) in the executables.
+  # This is seem to be unnecessary, libifcorert(d).lib has been removed from the link line.
+  # Further, excluding libc.lib from the default libs seemed to be necessary only for VS < 8.
+  # Since the corresponding flag seems to make more trouble than it avoids, it has been removed now.
+     *-cygwin* | *-mingw*)
+       case "$F77" in
+#         ifort* | */ifort* | IFORT* | */IFORT*)
+#           FLIBS="-link $LIBS /NODEFAULTLIB:libc.lib"
+#           if "$coin_debug_compile" = true ; then
+#             FLIBS="-link $LIBS /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib"
+#           else
+#             FLIBS="-link $LIBS /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmtd.lib"
+#           fi
+#           ;;
+         compile_f2c*)
+           FLIBS=`$F77 -FLIBS` ;;
+       esac;;
+     *-hp-*)
+         FLIBS="$FLIBS -lm";;
+     *-ibm-*)
+         FLIBS=`echo $FLIBS | sed 's/-lc)/-lc/g'` ;;
+     *-linux-*)
+       case "$F77" in
+         pgf77* | */pgf77* | pgf90* | */pgf90*)
+# ask linker to go through the archives multiple times
+# (the Fortran compiler seems to do that automatically...)
+           FLIBS="-Wl,--start-group $FLIBS -Wl,--end-group" ;;
+       esac
+  esac
+  ac_cv_f77_libs="$FLIBS"
+fi
+
+if test "x$orig_FLIBS" != "x$FLIBS" ; then
+  { echo "$as_me:$LINENO: Corrected Fortran libraries: $FLIBS" >&5
+echo "$as_me: Corrected Fortran libraries: $FLIBS" >&6;}
+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
+
+echo "$as_me:$LINENO: checking for dummy main to link with Fortran libraries" >&5
+echo $ECHO_N "checking for dummy main to link with Fortran libraries... $ECHO_C" >&6
+if test "${ac_cv_f77_dummy_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_f77_dm_save_LIBS=$LIBS
+ LIBS="$LIBS $FLIBS"
+ ac_fortran_dm_var=F77_DUMMY_MAIN
+ 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
+
+ # First, try linking without a dummy main:
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_fortran_dummy_main=none
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_fortran_dummy_main=unknown
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+ if test $ac_cv_fortran_dummy_main = unknown; then
+   for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#define $ac_fortran_dm_var $ac_func
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_fortran_dummy_main=$ac_func; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+   done
+ 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
+ ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main
+ rm -f conftest*
+ LIBS=$ac_f77_dm_save_LIBS
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5
+echo "${ECHO_T}$ac_cv_f77_dummy_main" >&6
+F77_DUMMY_MAIN=$ac_cv_f77_dummy_main
+if test "$F77_DUMMY_MAIN" != unknown; then
+  if test $F77_DUMMY_MAIN != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define F77_DUMMY_MAIN $F77_DUMMY_MAIN
+_ACEOF
+
+  if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FC_DUMMY_MAIN_EQ_F77 1
+_ACEOF
+
+  fi
+fi
+else
+  { { echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails
+See \`config.log' for more details." >&5
+echo "$as_me: error: linking to Fortran libraries from C fails
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+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
+
+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
+echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5
+echo $ECHO_N "checking for Fortran name-mangling scheme... $ECHO_C" >&6
+if test "${ac_cv_f77_mangling+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      subroutine foobar()
+      return
+      end
+      subroutine foo_bar()
+      return
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  mv conftest.$ac_objext cfortran_test.$ac_objext
+
+  ac_save_LIBS=$LIBS
+  LIBS="cfortran_test.$ac_objext $LIBS $FLIBS"
+
+  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_success=no
+  for ac_foobar in foobar FOOBAR; do
+    for ac_underscore in "" "_"; do
+      ac_func="$ac_foobar$ac_underscore"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+$ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_success=yes; break 2
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+    done
+  done
+  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 "$ac_success" = "yes"; then
+     case $ac_foobar in
+	foobar)
+	   ac_case=lower
+	   ac_foo_bar=foo_bar
+	   ;;
+	FOOBAR)
+	   ac_case=upper
+	   ac_foo_bar=FOO_BAR
+	   ;;
+     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
+     ac_success_extra=no
+     for ac_extra in "" "_"; do
+	ac_func="$ac_foo_bar$ac_underscore$ac_extra"
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+$ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_success_extra=yes; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     done
+     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 "$ac_success_extra" = "yes"; then
+	ac_cv_f77_mangling="$ac_case case"
+        if test -z "$ac_underscore"; then
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore"
+	else
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore"
+        fi
+        if test -z "$ac_extra"; then
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore"
+	else
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore"
+        fi
+      else
+	ac_cv_f77_mangling="unknown"
+      fi
+  else
+     ac_cv_f77_mangling="unknown"
+  fi
+
+  LIBS=$ac_save_LIBS
+  rm -f cfortran_test* conftest*
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compile a simple Fortran program
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5
+echo "${ECHO_T}$ac_cv_f77_mangling" >&6
+
+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
+
+
+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
+
+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
+
+
+case $ac_cv_f77_mangling in
+  "lower case, no underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name
+_ACEOF
+ ;;
+  "lower case, no underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name ## _
+_ACEOF
+ ;;
+  "lower case, underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name ## _
+_ACEOF
+ ;;
+  "lower case, underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name ## __
+_ACEOF
+ ;;
+  "upper case, no underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME
+_ACEOF
+ ;;
+  "upper case, no underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME ## _
+_ACEOF
+ ;;
+  "upper case, underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME ## _
+_ACEOF
+ ;;
+  "upper case, underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME ## __
+_ACEOF
+ ;;
+  *)
+          { echo "$as_me:$LINENO: WARNING: unknown Fortran name-mangling scheme" >&5
+echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
+          ;;
+esac
+
+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
+
+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
+
+# we want to keep the linking check for FilterSQP, but cannot do this if FilterSQP will be build later (in ThirdParty)
+#if test $coin_has_filtersqp = yes ; then
+#  AC_MSG_CHECKING([whether FilterSQP library $FILTERSQP_LIBS works])
+#  SAVE_LIBS="$LIBS"
+#  LIBS="$FILTERSQP_LIBS $FLIBS $LIBS"
+#  AC_LANG_PUSH([Fortran 77])
+#  AC_TRY_LINK([],
+#[      call filterSQP
+#      end
+#      subroutine confun
+#      end
+#      subroutine objfun
+#      end
+#      subroutine gradient
+#      end
+#      subroutine hessian],
+#              [AC_MSG_RESULT([yes])
+#               FILTERSQP_LIBS="$FILTERSQP_LIBS $FLIBS"],
+#              [AC_MSG_RESULT([no])
+#               AC_MSG_ERROR([user supplied FilterSQP library $FILTERSQP_LIBS does not work])])
+#  AC_LANG_POP([Fortran 77])
+#  LIBS="$SAVE_LIBS"
+#fi
+
+#############################################################################
+#                           Feasibility Pump                                #
+#############################################################################
+
+#if test x"$BUILD_FP" != x; then
+#  build_fp=yes
+#fi
+#AM_CONDITIONAL(BUILD_FP, test x$build_fp = xyes)
+
+#############################################################################
+#                                 ASTYLE                                    #
+#############################################################################
+
+ASTYLE=astyle
+
+
+ASTYLEFLAGS="--mode=c --indent=spaces=2 --indent-cases --indent-namespaces --min-conditional-indent=1 --brackets=linux --brackets=break-closing-headers --max-instatement-indent=2"
+
+
+#############################################################################
+#                            Stuff for Examples                             #
+#############################################################################
+
+
+echo "$as_me:$LINENO: checking whether this is a VPATH configuration" >&5
+echo $ECHO_N "checking whether this is a VPATH configuration... $ECHO_C" >&6
+if test `cd $srcdir; pwd` != `pwd`; then
+  coin_vpath_config=yes;
+else
+  coin_vpath_config=no;
+fi
+echo "$as_me:$LINENO: result: $coin_vpath_config" >&5
+echo "${ECHO_T}$coin_vpath_config" >&6
+
+
+
+# Allow for newlines in the parameter
+if test $coin_vpath_config = yes; then
+  cvl_tmp="test/bonmin.opt"
+  for file in $cvl_tmp ; do
+    coin_vpath_link_files="$coin_vpath_link_files $file"
+  done
+fi
+
+
+
+# Allow for newlines in the parameter
+if test $coin_vpath_config = yes; then
+  cvl_tmp="test/mytoy.nl"
+  for file in $cvl_tmp ; do
+    coin_vpath_link_files="$coin_vpath_link_files $file"
+  done
+fi
+
+                              ac_config_links="$ac_config_links test/MyBonmin.cpp:examples/CppExample/MyBonmin.cpp test/MyTMINLP.cpp:examples/CppExample/MyTMINLP.cpp test/MyTMINLP.hpp:examples/CppExample/MyTMINLP.hpp"
+
+
+##############################################################################
+#                   Finishing up by writing all the output                   #
+##############################################################################
+
+                                                                                                                                                                                                        ac_config_files="$ac_config_files Makefile src/Apps/Makefile src/CbcBonmin/Makefile src/Interfaces/Makefile src/Interfaces/Ipopt/Makefile src/Interfaces/Filter/Makefile src/Interfaces/Ampl/Makefile src/Algorithms/Makefile src/Algorithms/Ampl/Makefile src/Algorithms/Branching/Makefile src/Alg [...]
+
+
+if test $coin_has_asl = yes ; then
+                      ac_config_files="$ac_config_files bonminamplinterface.pc:src/CbcBonmin/bonminamplinterface.pc.in bonminamplinterface-uninstalled.pc:src/CbcBonmin/bonminamplinterface-uninstalled.pc.in"
+
+fi
+
+                    ac_config_headers="$ac_config_headers src/Interfaces/config.h src/Interfaces/config_bonmin.h"
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking which command should be used to link input files" >&5
+echo $ECHO_N "checking which command should be used to link input files... $ECHO_C" >&6
+coin_link_input_cmd="$LN_S"
+case "$CC" in
+  clang* ) ;;
+  cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+    coin_link_input_cmd=cp ;;
+esac
+echo "$as_me:$LINENO: result: $coin_link_input_cmd" >&5
+echo "${ECHO_T}$coin_link_input_cmd" >&6
+
+
+
+if test x$coin_skip_ac_output != xyes; then
+
+  # library extension
+
+  case "$CC" in
+    clang* )
+         LIBEXT=a ;;
+    cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
+         LIBEXT=lib ;;
+      *) LIBEXT=a ;;
+  esac
+
+  # Define VPATH_DISTCLEANFILES to be everything that needs to be
+  # cleaned for distclean in a vpath configuration
+
+  VPATH_DISTCLEANFILES="$coin_vpath_link_files"
+
+  # Take out subdirectories if their configuration concluded that they
+  # don't need to be compiled
+  if test x"$coin_ac_skip_subdirs" != x; then
+    new_subdirs=
+    for i in $subdirs; do
+      skipme=no
+      for j in $coin_ac_skip_subdirs; do
+        if test $i = $j; then
+          skipme=yes;
+        fi
+      done
+      if test $skipme = no; then
+        new_subdirs="$new_subdirs $i"
+      fi
+    done
+    subdirs="$new_subdirs"
+  fi
+
+  # need to come before AC_OUTPUT
+  if test x$coin_projectdir != xyes; then
+    # write coin_subdirs to a file so that project configuration knows where to find uninstalled projects
+    echo $coin_subdirs > coin_subdirs.txt
+  else
+    # substitute for OBJDIR, needed to setup .pc file for uninstalled project
+    ABSBUILDDIR="`pwd`"
+
+  fi
+
+  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, don't put newlines in cache variables' values.
+# 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.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *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 \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!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 "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  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}'
+
+# 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
+
+DEFS=-DHAVE_CONFIG_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_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${ALWAYS_FALSE_TRUE}" && test -z "${ALWAYS_FALSE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ALWAYS_FALSE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ALWAYS_FALSE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_CC_IS_CL_TRUE}" && test -z "${COIN_CC_IS_CL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_CC_IS_CL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_CC_IS_CL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_CXX_IS_CL_TRUE}" && test -z "${COIN_CXX_IS_CL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_CXX_IS_CL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_CXX_IS_CL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+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 "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_EXTERNALS_TRUE}" && test -z "${HAVE_EXTERNALS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_EXTERNALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_EXTERNALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${DEPENDENCY_LINKING_TRUE}" && test -z "${DEPENDENCY_LINKING_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"DEPENDENCY_LINKING\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"DEPENDENCY_LINKING\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_PKGCONFIG_TRUE}" && test -z "${COIN_HAS_PKGCONFIG_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_PKGCONFIG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_PKGCONFIG\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_COINDEPEND_TRUE}" && test -z "${COIN_HAS_COINDEPEND_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_COINDEPEND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_COINDEPEND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_COINDEPEND_TRUE}" && test -z "${COIN_HAS_COINDEPEND_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_COINDEPEND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_COINDEPEND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_ASL_TRUE}" && test -z "${COIN_HAS_ASL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_ASL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_ASL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_ASL_TRUE}" && test -z "${COIN_HAS_ASL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_ASL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_ASL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_OSICPX_TRUE}" && test -z "${COIN_HAS_OSICPX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_OSICPX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_OSICPX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_OSICPX_TRUE}" && test -z "${COIN_HAS_OSICPX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_OSICPX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_OSICPX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_CPX_TRUE}" && test -z "${COIN_HAS_CPX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_CPX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_CPX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_FILTERSQP_TRUE}" && test -z "${COIN_HAS_FILTERSQP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_FILTERSQP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_FILTERSQP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COIN_HAS_FILTERSQP_TRUE}" && test -z "${COIN_HAS_FILTERSQP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_FILTERSQP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COIN_HAS_FILTERSQP\" 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 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+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+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
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; 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'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# 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
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  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
+
+       ;;
+  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_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    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=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # 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 before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, 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
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+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 sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+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$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# 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'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Bonmin $as_me 1.7.4, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+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, 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
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Bonmin config.status 1.7.4
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_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
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+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" ;;
+
+  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 $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "src/Apps/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Apps/Makefile" ;;
+  "src/CbcBonmin/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/CbcBonmin/Makefile" ;;
+  "src/Interfaces/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Interfaces/Makefile" ;;
+  "src/Interfaces/Ipopt/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Interfaces/Ipopt/Makefile" ;;
+  "src/Interfaces/Filter/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Interfaces/Filter/Makefile" ;;
+  "src/Interfaces/Ampl/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Interfaces/Ampl/Makefile" ;;
+  "src/Algorithms/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Algorithms/Makefile" ;;
+  "src/Algorithms/Ampl/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Algorithms/Ampl/Makefile" ;;
+  "src/Algorithms/Branching/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Algorithms/Branching/Makefile" ;;
+  "src/Algorithms/QuadCuts/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Algorithms/QuadCuts/Makefile" ;;
+  "src/Algorithms/OaGenerators/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Algorithms/OaGenerators/Makefile" ;;
+  "src/CbcBonmin/Heuristics/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/CbcBonmin/Heuristics/Makefile" ;;
+  "examples/OptionDocGen/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/OptionDocGen/Makefile" ;;
+  "experimental/Separable/Makefile" ) CONFIG_FILES="$CONFIG_FILES experimental/Separable/Makefile" ;;
+  "experimental/RobotBonmin/Makefile" ) CONFIG_FILES="$CONFIG_FILES experimental/RobotBonmin/Makefile" ;;
+  "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+  "examples/CppExample/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/CppExample/Makefile" ;;
+  "bonmin.pc" ) CONFIG_FILES="$CONFIG_FILES bonmin.pc" ;;
+  "bonmin-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES bonmin-uninstalled.pc" ;;
+  "bonminamplinterface.pc" ) CONFIG_FILES="$CONFIG_FILES bonminamplinterface.pc:src/CbcBonmin/bonminamplinterface.pc.in" ;;
+  "bonminamplinterface-uninstalled.pc" ) CONFIG_FILES="$CONFIG_FILES bonminamplinterface-uninstalled.pc:src/CbcBonmin/bonminamplinterface-uninstalled.pc.in" ;;
+  "test/MyBonmin.cpp" ) CONFIG_LINKS="$CONFIG_LINKS test/MyBonmin.cpp:examples/CppExample/MyBonmin.cpp" ;;
+  "test/MyTMINLP.cpp" ) CONFIG_LINKS="$CONFIG_LINKS test/MyTMINLP.cpp:examples/CppExample/MyTMINLP.cpp" ;;
+  "test/MyTMINLP.hpp" ) CONFIG_LINKS="$CONFIG_LINKS test/MyTMINLP.hpp:examples/CppExample/MyTMINLP.hpp" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "src/Interfaces/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/Interfaces/config.h" ;;
+  "src/Interfaces/config_bonmin.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/Interfaces/config_bonmin.h" ;;
+  *) { { 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_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+  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 to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $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 -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# 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
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at ALWAYS_FALSE_TRUE@,$ALWAYS_FALSE_TRUE,;t t
+s, at ALWAYS_FALSE_FALSE@,$ALWAYS_FALSE_FALSE,;t t
+s, at have_svnversion@,$have_svnversion,;t t
+s, at BONMIN_SVN_REV@,$BONMIN_SVN_REV,;t t
+s, at CDEFS@,$CDEFS,;t t
+s, at ADD_CFLAGS@,$ADD_CFLAGS,;t t
+s, at DBG_CFLAGS@,$DBG_CFLAGS,;t t
+s, at OPT_CFLAGS@,$OPT_CFLAGS,;t t
+s, at sol_cc_compiler@,$sol_cc_compiler,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at COIN_CC_IS_CL_TRUE@,$COIN_CC_IS_CL_TRUE,;t t
+s, at COIN_CC_IS_CL_FALSE@,$COIN_CC_IS_CL_FALSE,;t t
+s, at MPICC@,$MPICC,;t t
+s, at CXXDEFS@,$CXXDEFS,;t t
+s, at ADD_CXXFLAGS@,$ADD_CXXFLAGS,;t t
+s, at DBG_CXXFLAGS@,$DBG_CXXFLAGS,;t t
+s, at OPT_CXXFLAGS@,$OPT_CXXFLAGS,;t t
+s, at CXX@,$CXX,;t t
+s, at CXXFLAGS@,$CXXFLAGS,;t t
+s, at ac_ct_CXX@,$ac_ct_CXX,;t t
+s, at COIN_CXX_IS_CL_TRUE@,$COIN_CXX_IS_CL_TRUE,;t t
+s, at COIN_CXX_IS_CL_FALSE@,$COIN_CXX_IS_CL_FALSE,;t t
+s, at MPICXX@,$MPICXX,;t t
+s, at EGREP@,$EGREP,;t t
+s, at LN_S@,$LN_S,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CYGPATH_W@,$CYGPATH_W,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at install_sh@,$install_sh,;t t
+s, at STRIP@,$STRIP,;t t
+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at mkdir_p@,$mkdir_p,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at am__leading_dot@,$am__leading_dot,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at am__tar@,$am__tar,;t t
+s, at am__untar@,$am__untar,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s, at CXXDEPMODE@,$CXXDEPMODE,;t t
+s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s, at MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s, at MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s, at MAINT@,$MAINT,;t t
+s, at LIBTOOLM4@,$LIBTOOLM4,;t t
+s, at have_autoconf@,$have_autoconf,;t t
+s, at have_automake@,$have_automake,;t t
+s, at have_svn@,$have_svn,;t t
+s, at BUILDTOOLSDIR@,$BUILDTOOLSDIR,;t t
+s, at AUX_DIR@,$AUX_DIR,;t t
+s, at abs_source_dir@,$abs_source_dir,;t t
+s, at abs_lib_dir@,$abs_lib_dir,;t t
+s, at abs_include_dir@,$abs_include_dir,;t t
+s, at abs_bin_dir@,$abs_bin_dir,;t t
+s, at HAVE_EXTERNALS_TRUE@,$HAVE_EXTERNALS_TRUE,;t t
+s, at HAVE_EXTERNALS_FALSE@,$HAVE_EXTERNALS_FALSE,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at ECHO@,$ECHO,;t t
+s, at AR@,$AR,;t t
+s, at ac_ct_AR@,$ac_ct_AR,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at CPP@,$CPP,;t t
+s, at CXXCPP@,$CXXCPP,;t t
+s, at F77@,$F77,;t t
+s, at FFLAGS@,$FFLAGS,;t t
+s, at ac_ct_F77@,$ac_ct_F77,;t t
+s, at LIBTOOL@,$LIBTOOL,;t t
+s, at ac_c_preproc_warn_flag@,$ac_c_preproc_warn_flag,;t t
+s, at ac_cxx_preproc_warn_flag@,$ac_cxx_preproc_warn_flag,;t t
+s, at RPATH_FLAGS@,$RPATH_FLAGS,;t t
+s, at DEPENDENCY_LINKING_TRUE@,$DEPENDENCY_LINKING_TRUE,;t t
+s, at DEPENDENCY_LINKING_FALSE@,$DEPENDENCY_LINKING_FALSE,;t t
+s, at LT_LDFLAGS@,$LT_LDFLAGS,;t t
+s, at PKG_CONFIG@,$PKG_CONFIG,;t t
+s, at ac_ct_PKG_CONFIG@,$ac_ct_PKG_CONFIG,;t t
+s, at COIN_HAS_PKGCONFIG_TRUE@,$COIN_HAS_PKGCONFIG_TRUE,;t t
+s, at COIN_HAS_PKGCONFIG_FALSE@,$COIN_HAS_PKGCONFIG_FALSE,;t t
+s, at COIN_PKG_CONFIG_PATH@,$COIN_PKG_CONFIG_PATH,;t t
+s, at COIN_PKG_CONFIG_PATH_UNINSTALLED@,$COIN_PKG_CONFIG_PATH_UNINSTALLED,;t t
+s, at COINDEPEND_LIBS@,$COINDEPEND_LIBS,;t t
+s, at COINDEPEND_CFLAGS@,$COINDEPEND_CFLAGS,;t t
+s, at COINDEPEND_DATA@,$COINDEPEND_DATA,;t t
+s, at COINDEPEND_DEPENDENCIES@,$COINDEPEND_DEPENDENCIES,;t t
+s, at COINDEPEND_LIBS_INSTALLED@,$COINDEPEND_LIBS_INSTALLED,;t t
+s, at COINDEPEND_CFLAGS_INSTALLED@,$COINDEPEND_CFLAGS_INSTALLED,;t t
+s, at COINDEPEND_DATA_INSTALLED@,$COINDEPEND_DATA_INSTALLED,;t t
+s, at BONMINLIB_CFLAGS@,$BONMINLIB_CFLAGS,;t t
+s, at BONMINLIB_LIBS@,$BONMINLIB_LIBS,;t t
+s, at BONMINLIB_PCLIBS@,$BONMINLIB_PCLIBS,;t t
+s, at BONMINLIB_PCREQUIRES@,$BONMINLIB_PCREQUIRES,;t t
+s, at BONMINLIB_DEPENDENCIES@,$BONMINLIB_DEPENDENCIES,;t t
+s, at BONMINLIB_CFLAGS_INSTALLED@,$BONMINLIB_CFLAGS_INSTALLED,;t t
+s, at BONMINLIB_LIBS_INSTALLED@,$BONMINLIB_LIBS_INSTALLED,;t t
+s, at COIN_HAS_COINDEPEND_TRUE@,$COIN_HAS_COINDEPEND_TRUE,;t t
+s, at COIN_HAS_COINDEPEND_FALSE@,$COIN_HAS_COINDEPEND_FALSE,;t t
+s, at ASL_LIBS@,$ASL_LIBS,;t t
+s, at ASL_CFLAGS@,$ASL_CFLAGS,;t t
+s, at ASL_DATA@,$ASL_DATA,;t t
+s, at ASL_DEPENDENCIES@,$ASL_DEPENDENCIES,;t t
+s, at ASL_LIBS_INSTALLED@,$ASL_LIBS_INSTALLED,;t t
+s, at ASL_CFLAGS_INSTALLED@,$ASL_CFLAGS_INSTALLED,;t t
+s, at ASL_DATA_INSTALLED@,$ASL_DATA_INSTALLED,;t t
+s, at BONMINAMPLINTERFACELIB_CFLAGS@,$BONMINAMPLINTERFACELIB_CFLAGS,;t t
+s, at BONMINAMPLINTERFACELIB_LIBS@,$BONMINAMPLINTERFACELIB_LIBS,;t t
+s, at BONMINAMPLINTERFACELIB_PCLIBS@,$BONMINAMPLINTERFACELIB_PCLIBS,;t t
+s, at BONMINAMPLINTERFACELIB_PCREQUIRES@,$BONMINAMPLINTERFACELIB_PCREQUIRES,;t t
+s, at BONMINAMPLINTERFACELIB_DEPENDENCIES@,$BONMINAMPLINTERFACELIB_DEPENDENCIES,;t t
+s, at BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@,$BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED,;t t
+s, at BONMINAMPLINTERFACELIB_LIBS_INSTALLED@,$BONMINAMPLINTERFACELIB_LIBS_INSTALLED,;t t
+s, at COIN_HAS_ASL_TRUE@,$COIN_HAS_ASL_TRUE,;t t
+s, at COIN_HAS_ASL_FALSE@,$COIN_HAS_ASL_FALSE,;t t
+s, at OSICPX_LIBS@,$OSICPX_LIBS,;t t
+s, at OSICPX_CFLAGS@,$OSICPX_CFLAGS,;t t
+s, at OSICPX_DATA@,$OSICPX_DATA,;t t
+s, at OSICPX_DEPENDENCIES@,$OSICPX_DEPENDENCIES,;t t
+s, at OSICPX_LIBS_INSTALLED@,$OSICPX_LIBS_INSTALLED,;t t
+s, at OSICPX_CFLAGS_INSTALLED@,$OSICPX_CFLAGS_INSTALLED,;t t
+s, at OSICPX_DATA_INSTALLED@,$OSICPX_DATA_INSTALLED,;t t
+s, at COIN_HAS_OSICPX_TRUE@,$COIN_HAS_OSICPX_TRUE,;t t
+s, at COIN_HAS_OSICPX_FALSE@,$COIN_HAS_OSICPX_FALSE,;t t
+s, at CPXINCDIR@,$CPXINCDIR,;t t
+s, at CPXLIB@,$CPXLIB,;t t
+s, at COIN_HAS_CPX_TRUE@,$COIN_HAS_CPX_TRUE,;t t
+s, at COIN_HAS_CPX_FALSE@,$COIN_HAS_CPX_FALSE,;t t
+s, at FILTERSQP_LIBS@,$FILTERSQP_LIBS,;t t
+s, at FILTERSQP_CFLAGS@,$FILTERSQP_CFLAGS,;t t
+s, at FILTERSQP_DATA@,$FILTERSQP_DATA,;t t
+s, at FILTERSQP_DEPENDENCIES@,$FILTERSQP_DEPENDENCIES,;t t
+s, at FILTERSQP_LIBS_INSTALLED@,$FILTERSQP_LIBS_INSTALLED,;t t
+s, at FILTERSQP_CFLAGS_INSTALLED@,$FILTERSQP_CFLAGS_INSTALLED,;t t
+s, at FILTERSQP_DATA_INSTALLED@,$FILTERSQP_DATA_INSTALLED,;t t
+s, at COIN_HAS_FILTERSQP_TRUE@,$COIN_HAS_FILTERSQP_TRUE,;t t
+s, at COIN_HAS_FILTERSQP_FALSE@,$COIN_HAS_FILTERSQP_FALSE,;t t
+s, at ADD_FFLAGS@,$ADD_FFLAGS,;t t
+s, at DBG_FFLAGS@,$DBG_FFLAGS,;t t
+s, at OPT_FFLAGS@,$OPT_FFLAGS,;t t
+s, at MPIF77@,$MPIF77,;t t
+s, at FLIBS@,$FLIBS,;t t
+s, at ASTYLE@,$ASTYLE,;t t
+s, at ASTYLEFLAGS@,$ASTYLEFLAGS,;t t
+s, at LIBEXT@,$LIBEXT,;t t
+s, at VPATH_DISTCLEANFILES@,$VPATH_DISTCLEANFILES,;t t
+s, at ABSBUILDDIR@,$ABSBUILDDIR,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$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'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # 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.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # 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.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$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'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$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'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_LINKS section.
+#
+
+for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+
+  { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
+echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
+
+  if test ! -r $srcdir/$ac_source; then
+    { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
+echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  rm -f $ac_dest
+
+  # Make relative symlinks.
+  ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dest_dir"
+  else
+    as_dir="$ac_dest_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dest_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dest_dir";;
+*)
+  case "$ac_dest_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $srcdir in
+  [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
+      *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
+  esac
+
+  # Try a symlink, then a hard link, then a copy.
+  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+    ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
+    cp -p $srcdir/$ac_source $ac_dest ||
+    { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
+echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
+   { (exit 1); exit 1; }; }
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) 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.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$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=`(dirname "$file") 2>/dev/null ||
+$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'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (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
+
+
+  if test x"$coin_vpath_link_files" = x; then : ; else
+    lnkcmd="$coin_link_input_cmd"
+    if test "$lnkcmd" = cp; then
+      { echo "$as_me:$LINENO: Copying data files for VPATH configuration" >&5
+echo "$as_me: Copying data files for VPATH configuration" >&6;}
+    else
+      { echo "$as_me:$LINENO: Creating VPATH links for data files" >&5
+echo "$as_me: Creating VPATH links for data files" >&6;}
+    fi
+    for file in $coin_vpath_link_files; do
+      dir=`(dirname "./$file") 2>/dev/null ||
+$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'`
+      if test -d $dir; then : ; else
+        { if $as_mkdir_p; then
+    mkdir -p $dir
+  else
+    as_dir=$dir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dir" >&5
+echo "$as_me: error: cannot create directory $dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      fi
+      rm -f $file
+      $lnkcmd $abs_source_dir/$file $file
+    done
+  fi
+
+  { echo "$as_me:$LINENO: In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting" >&5
+echo "$as_me: In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting" >&6;}
+  if test x$coin_projectdir = xyes; then
+    { echo "$as_me:$LINENO: Configuration of $PACKAGE_NAME successful" >&5
+echo "$as_me: Configuration of $PACKAGE_NAME successful" >&6;}
+  else
+    { echo "$as_me:$LINENO: Main configuration of $PACKAGE_NAME successful" >&5
+echo "$as_me: Main configuration of $PACKAGE_NAME successful" >&6;}
+  fi
+else
+  { echo "$as_me:$LINENO: No configuration of $PACKAGE_NAME necessary" >&5
+echo "$as_me: No configuration of $PACKAGE_NAME necessary" >&6;}
+fi
+
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..2cb80bb
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,196 @@
+# Copyright (C) 2006, 2008 International Business Machines.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: configure.ac 2094 2013-12-18 15:34:08Z stefan $
+
+# Author:  Andreas Waechter            IBM    2006-04-13
+
+#############################################################################
+#                       Names and other basic things                        #
+#############################################################################
+
+AC_PREREQ(2.59)
+
+AC_INIT([Bonmin],[1.7.4],[bonmin at list.coin-or.org])
+
+AC_COPYRIGHT([
+Copyright 2006, 2008 International Business Machines and others.
+All Rights Reserved.
+This file is part of the open source package BONMIN which is distributed
+under the Common Public License.])
+
+# List one file in the package so that the configure script can test
+# whether the package is actually there
+AC_CONFIG_SRCDIR(src/CbcBonmin/BonCbc.hpp)
+
+# Where should everything be installed by default?  Here, we want it
+# to be installed directly in 'bin', 'lib', 'include' subdirectories
+# of the directory where configure is run.  The default would be
+# /usr/local.
+AC_PREFIX_DEFAULT([`pwd`])
+
+#############################################################################
+#                         Standard build tool stuff                         #
+#############################################################################
+
+# Get the system type
+AC_CANONICAL_BUILD
+
+# If this project depends on external projects, the Externals file in
+# the source root directory contains definition of where to find those
+# externals.  The following macro ensures that those externals are
+# retrieved by svn if they are not there yet.
+AC_COIN_PROJECTDIR_INIT(Bonmin,11:4:7)
+
+# Check if user wants to produce debugging code
+AC_COIN_DEBUG_COMPILE(Bonmin)
+
+# Get the name of the C++ compiler and appropriate compiler options
+AC_COIN_PROG_CXX
+
+
+# Initialize automake and libtool
+AC_COIN_INIT_AUTO_TOOLS
+
+#############################################################################
+#                           COIN-OR components                              #
+#############################################################################
+
+AC_COIN_CHECK_PACKAGE(CoinDepend, [cbc osi-clp ipopt], [BonminLib])
+if test $coin_has_coindepend != yes ; then
+  AC_MSG_ERROR([Required package Cbc or Ipopt not available.])
+fi
+
+AC_COIN_CHECK_PACKAGE(ASL, [ipoptamplinterface], [BonminAmplInterfaceLib])
+
+#AC_COIN_CHECK_PACKAGE(Bcp, [bcp])
+#
+#AC_ARG_WITH([bonminbcp],
+#            AC_HELP_STRING([--with-bonminbcp],
+#                           [Compile Bonmin with Bcp-based parallel version]),
+#            [use_bcp="$withval"], [use_bcp=no])
+#if test "$use_bcp" = yes; then
+#  if test $coin_has_bcp != yes ; then
+#     AC_MSG_ERROR([You specified --with-bonminbcp, but Bcp is not available])
+#  fi
+#fi
+#AM_CONDITIONAL(COMPILE_BONMINBCP, test "$use_bcp" = yes)
+
+#############################################################################
+#                                     CPLEX                                 #
+#############################################################################
+
+# Check whether OsiCplex is available
+AC_COIN_CHECK_PACKAGE(OsiCpx, [osi-cplex], [BonminLib])
+
+# To get also the directory where cplex.h can be found, we also check for cplex directly.
+AC_COIN_CHECK_USER_LIBRARY([Cplex], [CPX],[cplex.h],[CPXgetstat])
+
+#############################################################################
+#                                FilterSQP                                  #
+#############################################################################
+
+# for backward compatibility, map --with-filtersqp to --with-filtersqp-libs
+AC_ARG_WITH([filtersqp],
+            AC_HELP_STRING([--with-filtersqp],
+                           [specify library for FilterSQP (or BUILD for compilation)]),
+            [filtersqp_libs="$withval"])
+
+AC_COIN_CHECK_PACKAGE(FilterSQP, [coinfiltersqp], [BonminLib])
+
+if test $coin_has_filtersqp = yes
+then
+  # Get the name of the Fortran compiler and appropriate compiler options
+  AC_COIN_PROG_F77
+
+  # Find out how to call Fortran from C and determine Fortran runtime libraries
+  AC_COIN_F77_WRAPPERS
+fi
+
+# we want to keep the linking check for FilterSQP, but cannot do this if FilterSQP will be build later (in ThirdParty)
+#if test $coin_has_filtersqp = yes ; then
+#  AC_MSG_CHECKING([whether FilterSQP library $FILTERSQP_LIBS works])
+#  SAVE_LIBS="$LIBS"
+#  LIBS="$FILTERSQP_LIBS $FLIBS $LIBS"
+#  AC_LANG_PUSH([Fortran 77])
+#  AC_TRY_LINK([],
+#[      call filterSQP
+#      end
+#      subroutine confun
+#      end
+#      subroutine objfun
+#      end
+#      subroutine gradient
+#      end
+#      subroutine hessian],
+#              [AC_MSG_RESULT([yes])
+#               FILTERSQP_LIBS="$FILTERSQP_LIBS $FLIBS"],
+#              [AC_MSG_RESULT([no])
+#               AC_MSG_ERROR([user supplied FilterSQP library $FILTERSQP_LIBS does not work])])
+#  AC_LANG_POP([Fortran 77])
+#  LIBS="$SAVE_LIBS"
+#fi
+
+#############################################################################
+#                           Feasibility Pump                                #
+#############################################################################
+
+#if test x"$BUILD_FP" != x; then
+#  build_fp=yes
+#fi
+#AM_CONDITIONAL(BUILD_FP, test x$build_fp = xyes)
+
+#############################################################################
+#                                 ASTYLE                                    #
+#############################################################################
+
+ASTYLE=astyle
+AC_SUBST(ASTYLE)
+
+ASTYLEFLAGS="--mode=c --indent=spaces=2 --indent-cases --indent-namespaces --min-conditional-indent=1 --brackets=linux --brackets=break-closing-headers --max-instatement-indent=2"
+AC_SUBST(ASTYLEFLAGS)
+
+#############################################################################
+#                            Stuff for Examples                             #
+#############################################################################
+
+AC_COIN_VPATH_LINK(test/bonmin.opt)
+AC_COIN_VPATH_LINK(test/mytoy.nl)
+AC_CONFIG_LINKS([test/MyBonmin.cpp:examples/CppExample/MyBonmin.cpp
+                 test/MyTMINLP.cpp:examples/CppExample/MyTMINLP.cpp
+                 test/MyTMINLP.hpp:examples/CppExample/MyTMINLP.hpp])
+
+##############################################################################
+#                   Finishing up by writing all the output                   #
+##############################################################################
+
+AC_CONFIG_FILES([Makefile
+                 src/Apps/Makefile
+                 src/CbcBonmin/Makefile
+                 src/Interfaces/Makefile
+                 src/Interfaces/Ipopt/Makefile
+                 src/Interfaces/Filter/Makefile
+                 src/Interfaces/Ampl/Makefile
+                 src/Algorithms/Makefile
+                 src/Algorithms/Ampl/Makefile
+                 src/Algorithms/Branching/Makefile
+                 src/Algorithms/QuadCuts/Makefile
+                 src/Algorithms/OaGenerators/Makefile
+                 src/CbcBonmin/Heuristics/Makefile
+                 examples/OptionDocGen/Makefile
+                 experimental/Separable/Makefile
+                 experimental/RobotBonmin/Makefile
+                 test/Makefile
+                 examples/CppExample/Makefile
+                 bonmin.pc bonmin-uninstalled.pc])
+
+if test $coin_has_asl = yes ; then
+  AC_CONFIG_FILES([bonminamplinterface.pc:src/CbcBonmin/bonminamplinterface.pc.in
+                   bonminamplinterface-uninstalled.pc:src/CbcBonmin/bonminamplinterface-uninstalled.pc.in
+                  ])
+fi
+
+AC_CONFIG_HEADER([src/Interfaces/config.h src/Interfaces/config_bonmin.h])
+
+AC_COIN_FINALIZE
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..04701da
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,530 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 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.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  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"
+  ;;
+
+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 mecanism 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 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/doc/BONMIN_ReferenceManual.hpp b/doc/BONMIN_ReferenceManual.hpp
new file mode 100644
index 0000000..4c450a5
--- /dev/null
+++ b/doc/BONMIN_ReferenceManual.hpp
@@ -0,0 +1,89 @@
+
+// Main bonmin page
+
+/*! \mainpage bonmin reference manual
+<p>
+bonmin is an open source code for solving general MINLP (Mixed Integer
+Non-Linear Programming) problems.
+It is distributed on <A HREF='http://www.coin-or.org'> COIN-OR </A> under the
+<A HREF='http://www.opensource.org/licenses/cpl.php'> CPL (Common Public
+License) </A>. bonmin is a C++ code</p>
+
+<p>
+You can use the link at the top of this page to access the documentation
+of the different elements of the code.
+*/
+
+ In addition you will find here:
+<ul>
+<li> <A HREF='../Bonmin_UserManual/'> A link </A> to the html version of
+bonmin Users manual,
+ <li> \subpage Code_structure "Code Structure" briefly presents the code and how it is interfaced to
+ <A HREF='http://www.coin-or.org/Cbc'> Cbc </A> and 
+ <A HREF='http://projects.coin-or.org/Ipopt'> Ipopt </A> 
+ <li> \subpage Example "Example" presents the C++ example provided and explains
+ how to interface bonmin directly with a C++ code,
+ <li> \subpage Extra "Debugging" presents some functionality of bonmin which
+ may be usefull for debugging.
+ <li> \subpage Authors, a list of the person who have contributed to this code
+ <li> <A HREF='
+</ul>
+</p>
+ */
+
+/*! \page Authors
+  Pierre Bonami (Carnegie Mellon University, supported by IBM)<br>
+  Carl D. Laird (Carnegie Mellon University)<br>
+  Andreas Waechter, project leader (IBM)<br>
+  <br>
+  have contributed to this code.<br>
+  <br>
+  We would also like to acknoweldge  <br>
+  L.T. Biegler (Carnegie Mellon University)  <br>
+  A.R. Conn (IBM)  <br>
+  G. Cornuejols (LIF Marseille, Carnegie Mellon University)  <br>
+  I.E. Grossmann (Carnegie Mellon University)  <br>
+  J. Lee (IBM)  <br>
+  A. Lodi (IBM, Universita di Bologna)  <br>
+  F. Margot (Carnegie Mellon University)  <br>
+  N. Sawaya (Carnegie Mellon University)  <br>
+  for their advices, help and other contributions.
+*/
+
+// Code structure
+/*! \page Code_structure Brief description of code structure
+ */
+
+
+//Debuging stuff
+/*!  * \page Extra stuff usefull for debugging */
+
+
+//Example
+/*! \page Example The C++ example
+ * \section Coding the NLP for Ipopt
+ * \section Transforming the NLP into a MINLP
+ */
+
+
+
+
+//Directory layout.
+
+/*! \dir Apps
+ * contains the sources to build the bonmin executable program. */
+/*! \dir CbcModelForHybrid
+* contains version of some of the Cbc files which have been modified to be able to handle MINLP's.*/
+/*! \dir Doc
+* contains this documentation and the user's manual.*/
+/*! \dir IpoptInterface
+* contains the source for an 
+* <A HREF='http://www.coin-or.org/projects.html#OSI'>  OsiSolverInterface</A> 
+* to <A HREF='http://projects.coin-or.org/Ipopt'> Ipopt </A> 
+*(OsiInterface's are made for linear problems so it is not truly an OsiInterface but it implements the sufficient for doing a branch-and-bound) */
+
+
+/*! \dir OaInterface
+ * Contains the necessary elements for interfacing outer-approximation inside 
+ * <A HREF='http://www.coin-or.org/Cbc'> Cbc </A> using an IpoptInterface-type 
+ * interface.*/
diff --git a/doc/BONMIN_UsersManual.pdf b/doc/BONMIN_UsersManual.pdf
new file mode 100644
index 0000000..6e1b8e6
Binary files /dev/null and b/doc/BONMIN_UsersManual.pdf differ
diff --git a/doc/BONMIN_UsersManual.tex b/doc/BONMIN_UsersManual.tex
new file mode 100644
index 0000000..1e98b55
--- /dev/null
+++ b/doc/BONMIN_UsersManual.tex
@@ -0,0 +1,27 @@
+\documentclass{article}
+\usepackage[colorlinks=true]{hyperref}
+\usepackage{lscape}
+\usepackage{amsmath,amssymb}
+\usepackage{threeparttable}
+\usepackage{xtab}
+\usepackage{ltrick}
+\usepackage{bonmin}
+
+
+\title{\Bonmin\ Users' Manual}
+\author{Pierre Bonami and Jon Lee}
+\date{Version \stableVersion \\Updated May 2013}
+
+\begin{document}
+\maketitle
+
+\input{Intro}
+\input{Obtain}
+\input{Install}
+\input{use}
+\input{options_set}
+\input{bib}
+\input{options_list}
+
+
+\end{document}
diff --git a/doc/Head.tex b/doc/Head.tex
new file mode 100644
index 0000000..752d0f8
--- /dev/null
+++ b/doc/Head.tex
@@ -0,0 +1,19 @@
+\documentclass{article}
+\usepackage{tex4ht}
+\usepackage{hyperref}
+\usepackage{lscape}
+\usepackage{amsmath,amssymb}
+\usepackage{threeparttable}
+\usepackage{xtab}
+
+
+\usepackage{htrick}
+\usepackage{bonmin}
+
+
+
+\begin{document}
+
+\input{FILENAME}
+
+\end{document}
diff --git a/doc/Install.tex b/doc/Install.tex
new file mode 100644
index 0000000..09806d8
--- /dev/null
+++ b/doc/Install.tex
@@ -0,0 +1,125 @@
+\begin{PageSummary}
+\PageName{Installation}
+\PageSection{Installing \Bonmin}{sec:install}
+\PageSection{Configuring {\tt Cplex}}{sec:cplex_install}
+\PageSection{Compiling \Bonmin\ in a external directory}{sec:vpath}
+\PageSection{Building documentation}{sec:ref_man}
+\PageSection{Running test program}{sec:test}
+\end{PageSummary}
+
+\begin{quickref}
+\quickcitation{Generic Coin Installation on Coin BuildTools web page}{\linkCoin BuildTools}
+\quickcitation{Known issues for building Coin packages}{\linkCoin BuildTools}
+\quickcitation{\Bonmin\ build Wiki page.}{\linkCoin Bonmin/wiki/GettingStarted}
+\quickcitation{Specific Instructions for building \Bonmin\ on Cygwin}{\linkCoin Bonmin/Wiki/CygwinInstall}
+\quickcitation{Specific instructions for building \Bonmin\ on Mac OSX}{\linkCoin Bonmin/Wiki/OsXInstall}
+\end{quickref}
+\PageTitle{Installing \Bonmin}{sec:install}
+The build process for \Bonmin\ should be fairly automatic as it uses
+\href{http://sources.redhat.com/autobook/autobook/}{GNU autotools}.
+  It has been successfully compiled and run on the following platforms:
+\begin{itemize}
+\item Linux using g++ version 4.5
+\item Windows using version Cygwin 1.5.18
+\item Mac OS X using gcc 4.5
+\end{itemize}
+
+For Cygwin and OS X some specific setup has to be done prior to installation. These step are described on the wiki pages of {\tt Bonmin}  \footlink{https://projects.coin-or.org/Bonmin/wiki/CygwinInstall}{CygwinInstall} and \footlink{https://projects.coin-or.org/Bonmin/wiki/OsxInstall}{OsxInstall}.
+
+
+\Bonmin\ is compiled and installed using the commands:
+\begin{colorverb}
+\begin{verbatim}
+./configure -C
+make
+make install
+\end{verbatim}
+\end{colorverb}
+
+This installs the executable {\tt bonmin} in {\tt Bonmin-\stableVersion/bin}. In what follows, we assume
+that you have put the executable {\tt bonmin} on your path.
+
+The {\tt configure} script attempts to find all of the machine specific settings (compiler, libraries,...)
+necessary to compile and run the code. Although {\tt configure} should find most of the standard
+ones, you may have to manually specify a few of the settings.
+The options for the configure script can be found by issuing the command
+
+\begin{colorverb}
+\begin{verbatim}
+./configure --help
+\end{verbatim}
+\end{colorverb}
+
+For a more in depth description of these options,
+the reader is invited to refer to the COIN-OR {\tt BuildTools} \footlink{\linkCoin BuildTools}{trac page}.
+
+\subsectionH{Specifying the location of {\tt Cplex} libraries}{sec:cplex_install}
+If you have {\tt Cplex} installed on your machine, you may want to use it
+as the Mixed Integer Linear Programming subsolver in {\tt B-OA}, {\tt B-Hyb}
+and {\tt B-iFP}.
+To do so you have to specify the location of the header files and libraries.
+You can either specify the location of the header files directory by passing it as an
+argument to the configure script or by writing it into a {\tt config.site}.
+
+In the former case, specify the location of the {\tt Cplex} header files by using the
+argument {\tt --with-cplexincdir} and the location of the
+{\tt Cplex } library with {\tt --with-cplexlib} (note that on the Linux platform you will also
+need to add {\tt -lpthread -lm} as an argument to {\tt --with-cplexlib}).
+
+For example, on a Linux machine if {\tt Cplex} is installed in {\tt /usr/ilog}~, you would
+invoke configure with the arguments as follows:
+
+\begin{colorverb}
+\begin{verbatim}
+./configure --with-cplex-incdir=/usr/ilog/cplex/include/ilcplex \
+  --with-cplex-lib="/usr/ilog/cplex/lib/libcplex.a -lpthread -lm"
+ \end{verbatim}
+ \end{colorverb}
+ 
+In the latter case, put a file called {\tt config.site} in a subdirectory named
+{\tt share} of the installation directory (if you do not specify an alternate
+installation directory to the {\tt configure} script with the {\tt --prefix}
+argument, the installation directory is the directory where you execute the
+{\tt configure} script). To specify the location of {\tt Cplex}~, insert the
+following lines in the {\tt config.site} file:
+
+\begin{colorverb}
+ \begin{verbatim}
+ with_cplex_lib="/usr/ilog/cplex/lib/libcplex.a -lpthread"
+ with_cplex_incdir="/usr/ilog/cplex/include/ilcplex -lm" 
+ \end{verbatim}
+\end{colorverb}
+
+ (You will find a {\tt config.site} example in the subdirectory {\tt BuildTools} of {\tt Bonmin-\stableVersion}.)
+
+\subsectionH{Compiling \Bonmin\ in a external directory}{sec:vpath}
+It is recommended to compile \Bonmin\ in a directory different from the source directory ({\tt Bonmin-\stableVersion} in our case).
+This is convenient if you want to have several executables compiled for different architectures or have several executables compiled with different options
+(debugging and production, shared and static libraries) but also because
+you don't modify the directory where the sources are.
+
+To do this just create a new directory, for example {\tt Bonmin-build} in the parent directory of
+{\tt Bonmin-\stableVersion} and run configure from {\tt Bonmin-build}:
+\medskip
+
+{\tt  ../Bonmin-\stableVersion/configure -C }
+\medskip
+
+This will create the makefiles in {\tt Bonmin-build}, and
+you can then compile with the usual {\tt make} and {\tt make install}
+(in {\tt Bonmin-build}).
+
+\subsectionH{Building the documentation}{sec:ref_man}
+The documentation for \Bonmin\ consists of a users' manual (this document) and a reference manual.
+You can build a local copy of the reference manual provided that you have Latex
+and Doxygen installed on your machine. Issue the command {\tt make
+doxydoc} in {\tt Bonmin-\stableVersion}. It calls Doxygen to build a copy of the
+reference manual. An html version of the reference manual can then
+be accessed in {\tt doc/html/index.html}.
+
+%You can also build a pdf
+%version of the reference manual by issuing the command {\tt make
+%refman.pdf} ({\tt refman.pdf} is placed in the {\tt doc} subdirectory).
+
+\subsectionH{Running the test programs}{sec:test}
+By issuing the command {\tt make test}~, you build and run the automatic test program for \Bonmin.
diff --git a/doc/Intro.tex b/doc/Intro.tex
new file mode 100644
index 0000000..f7ce87b
--- /dev/null
+++ b/doc/Intro.tex
@@ -0,0 +1,181 @@
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "Bonmin_UsersManual"
+%%% End:
+
+\html{
+
+\begin{PageSummary}
+\PageName{Introduction}
+\PageSection{Types of problems solved}{MathBack}
+\PageSection{Algorithms}{Algos}
+\PageSection{Required third party code}{ThirdP}
+\PageSection{Supported platforms}{Support}
+\end{PageSummary}
+
+
+\begin{quickref}
+\quickcitation{An algorithmic framework for convex MINLP. Bonami et.al.}{\BetalLink}
+\quickcitation{Algorithms and Software for Convex Mixed Integer Nonlinear Programs. Bonami, Kilinc, Linderoth}{\HotMINLPLink}
+\quickcitation{An outer-approximation algorithm for a class of MINLP. M. Duran and I.E. Grossmann. Mathematical Programming}{\DGLink}
+\quickcitation{Branch and bound experiments in convex nonlinear integer programming. O.K. Gupta and V. Ravindran.}{\GuptaLink}
+\quickcitation{Solving MINLP by outer approximation.
+  R. Fletcher and S. Leyffer. Mathematical Programming.}{\FLLink}
+\quickcitation{An LP/NLP based branched and bound algorithm for convex MINLP optimization problems. I. Quesada and I.E. Grossmann.
+   Computers and Chemical Engineering.}{\QGLink}\end{quickref}
+}
+
+\PageTitle{\latexhtml{Introduction}{\Bonmin}}{sec:Intro}
+\Bonmin\ (Basic Open-source Nonlinear Mixed INteger programming)
+is an open-source code for solving general MINLP (Mixed
+Integer NonLinear Programming) problems.
+ It is distributed on
+\COINOR\ 
+\latexhtml{{(\tt www.coin-or.org)}}{}
+under the CPL (Common Public
+License). The CPL is a license approved by the
+\footlink{http://www.opensource.org}{OSI},
+(Open Source Initiative),
+ thus \Bonmin\ is OSI
+Certified Open Source Software.
+
+There are several algorithmic choices that can be selected with \Bonmin.
+{\tt B-BB} is a NLP-based branch-and-bound algorithm,
+{\tt B-OA} is an
+outer-ap\-prox\-i\-ma\-tion decomposition algorithm, {\tt B-iFP} is an iterated
+feasibility pump algorithm, {\tt B-QG} is an
+implementation of  Quesada and Grossmann's branch-and-cut algorithm,
+{\tt B-Hyb} is a hybrid outer-ap\-prox\-i\-ma\-tion based
+branch-and-cut algorithm and {\tt B-Ecp} is a variant of {\tt B-QG} based
+on adding additional ECP cuts.
+
+
+Some of the algorithmic choices require the ability to solve MILP
+(Mixed Integer Linear Programming) problems and NLP (NonLinear
+Programming) problems. The default solvers for these are,
+respectively, the COIN-OR codes \Cbc\ and \Ipopt. In turn,
+{\tt Cbc} uses further COIN-OR modules: \Clp\ (for LP (Linear
+Programming) problems), \Cgl\ (for generating MILP cutting
+planes), as well as various other utilities. It is also possible to
+step outside the open-source realm and use
+\Cplex\ as the MILP solver and FilterSQP as the NLP solver. 
+
+Additional documentation can be found on the {\tt Bonmin}
+\latex{homepage at 
+$$
+         \hbox{\url{http://www.coin-or.org/Bonmin}}
+$$
+ and wiki at 
+$$
+         \hbox{\url{https://projects.coin-or.org/Bonmin}}
+$$
+}
+
+\html{
+\href{http://www.coin-or.org/Bonmin}{homepage} 
+and \href{https://projects.coin-or.org/Bonmin}{wiki}.}
+
+\subsectionHs{Types of problems solved}{MathBack}
+\Bonmin\ solves MINLPs of the form
+
+%\left\{
+\begin{align*}
+%\begin{array}{l}
+&\min f(x) \\
+& {\rm s.t.} \\
+&g^L \leq g(x) \leq g^U,\\
+& x^L \leq x \leq x^U, \\
+&x \in \mathbb{R}^n, \;  x_i \in \mathbb{Z} \; \forall i \in I,
+%\end{array}
+\end{align*}
+%\right.
+where the functions $f :~\{x\in \mathbb{R}^n : x^L \leq x \leq x^U
+\}~ \rightarrow~\mathbb{R}$ and $g:~\{x\in \mathbb{R}^n : x^L \leq x
+\leq x^U \}~\rightarrow~\mathbb{R}^m$ are assumed to be twice
+continuously differentiable, and $I \subseteq \{1, \ldots,n \}$. We
+emphasize that \Bonmin\ treats problems that are cast
+in {\em minimization} form.
+
+The different methods that \Bonmin\ implements are exact algorithms when the functions $f$ and $g$ are
+convex but are only heuristics when this is not the case (i.e., \Bonmin\ is not a \emph{global} optimizer).
+
+\subsectionHs{Algorithms}{Algos}
+\Bonmin\ implements six different algorithms for solving
+MINLPs:
+
+\begin{itemize}
+\item {\tt B-BB}: a simple branch-and-bound algorithm based on solving
+a continuous nonlinear program at each node of the search tree and
+branching on variables \mycite{Gupta80Nonlinear}{Gupta 1980};
+we also allow the possibility of SOS (Type 1) branching
+\item {\tt B-OA}: an outer-approximation based decomposition algorithm
+\latexhtml{\cite{DG,FL}}
+{[\href{\DGLink}{Duran Grossmann 1986},\href{\FLLink}{Fletcher Leyffer 1994}]}
+\item {\tt B-QG}: an outer-approximation based branch-and-cut
+algorithm
+\citeH{QG}{\QGLink}{Quesada Grossmann 1994}
+\item {\tt B-Hyb}: a hybrid outer-approximation / nonlinear programming
+based branch-and-cut algorithm \citeH{Betal}
+{\BetalLink}{Bonami et al. 2008}
+\item {\tt B-Ecp}: another outer-approximation based branch-and-cut inspired
+by the settings described in \citeH{abhishek.leyffer.linderoth:06}{\AbhishekLink}{Abhishek Leyffer Linderoth 2006}
+\item {\tt B-iFP}: an iterated feasibility pump algorithm \citeH{bonami.etal:06}{\FPLink}{Bonami Cornu\eacute jols Lodi Margot 2009}.
+\end{itemize}
+
+In this manual,  we will not go into a further description of these algorithms.
+Mathematical details of these algorithms 
+and some details of their implementations can be found in \citeH{Betal}{\BetalLink}{Bonami et al. 2008} and \citeH{hot:2009}{\HotMINLPLink}{Bonami K\i ln\i c Linderoth 2009}.
+
+Whether or not you are interested in the details of the algorithms, you certainly
+want to know which one of these six algorithms you should choose to solve
+your particular problem.
+For convex MINLPs, experiments we have made on a reasonably large test set of problems point in favor of using {\tt B-Hyb}
+(it solved the most of the problems in our test set in 3 hours of computing time).
+Nevertheless, there are cases where {\tt B-OA} is much faster than {\tt B-Hyb} and others where {\tt B-BB} is interesting.
+{\tt B-QG} and {\tt B-ECP} correspond mainly to a specific parameter setting of {\tt B-Hyb} but they can be faster in some case. {\tt B-iFP} is more tailored at finding quickly good solutions to very hard convex MINLP.
+For nonconvex MINLPs, we strongly recommend using {\tt B-BB} (the outer-approximation algorithms
+have not been tailored to treat nonconvex problems at this point). Although even {\tt B-BB} is only a
+heuristic for such problems, we have added several
+options to try and improve the quality of the solutions it provides (see \latexhtml{Section \ref{sec:non_convex}}{\href{\OptSetPage \#sec:non_convex}{non convex options}}).
+Because it is applicable to more classes problem {\tt B-BB} is the default algorithm in \Bonmin.
+
+\subsectionHs{Required third party code}{ThirdP}
+In order to run {\Bonmin}, you have to download other external
+libraries (and pay attention to their licenses!):
+\begin{itemize}
+\item \href{\LapackAddr}{Lapack} (Linear Algebra
+PACKage)
+\item \href{\BlasAddr}{Blas} (Basic Linear Algebra
+Subroutines)
+\item a sparse linear solver that is supported by Ipopt, e.g., MA27 from the
+\href{\AslAddr}{HSL}
+(Harwell Subroutine Library), MUMPS, or Pardiso.
+\end{itemize}
+
+Note that Lapack and the Blas are free for commercial use from the
+\footlink{http://www.netlib.org}{Netlib Repository}, but they are
+not OSI Certified Open Source Software. The linear solver MA27 is
+freely available for noncommercial use.
+
+The above software is sufficient to run \Bonmin\ as a
+stand-alone C++ code, but it does not provide a modeling language.
+For functionality from a modeling language, \Bonmin\ can be
+invoked from \footlink{http://www.ampl.com}{\tt AMPL} (no extra installation is required provided
+that you have a licensed copy of {\tt AMPL} installed), though you
+need the {\tt ASL} (AMPL Solver Library) which is obtainable from the Netlib.
+
+\Bonmin\ can use FilterSQP \citeH{FiLter}{\FilterLink}{FletcherLeyffer1998} as an alternative to \Ipopt\ for solving NLPs.
+
+Also, in the outer approximation methods {\tt B-OA} and {\tt B-iFP}, some MILP problems are
+solved. By default \Bonmin\ uses  \Cbc\ to solve them, but it can also be set up to use
+the commercial solver \footlink{http://www.cplex.com}{\Cplex}.
+
+%\subsectionHs{Tested platforms}{Support}
+%\Bonmin\ has been installed on the following systems:
+%\begin{itemize}
+%\item Linux using g++ version 3.* and 4.* until 4.6 and Intel 9.* and 10.*
+%\item Windows using version Cygwin 1.5.18
+%\item Mac OS X using gcc 3.* and 4.* until 4.3 and Intel 9.* and 10.*
+%\item SunOS 5 using gcc 4.3
+%\end{itemize}
+
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..d79d682
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,19 @@
+OUTPUTS = html/Install.html
+OUTPUTS += html/Intro.html
+OUTPUTS += html/Obtain.html
+OUTPUTS += html/bib.html
+OUTPUTS += html/options_list.html
+OUTPUTS += html/options_set.html
+OUTPUTS += html/use.html
+OUTPUTS += html/bonmin.css
+
+all: $(OUTPUTS) Head.tex
+
+html/%.html : %.tex Head.tex bonmin.sty
+	./genHtml.sh $<
+	
+html/bonmin.css : bonmin.css
+	cp bonmin.css html/
+
+install_www:
+	cp -rv html/*.html ../../../../html/
diff --git a/doc/Obtain.tex b/doc/Obtain.tex
new file mode 100644
index 0000000..9d521b3
--- /dev/null
+++ b/doc/Obtain.tex
@@ -0,0 +1,87 @@
+\begin{PageSummary}
+\PageName{Downloading \Bonmin}
+\PageSection{Obtaining \Bonmin}{sec:obtain}
+\PageSection{Obtaining required third party code}{sec:obtain_3rd}
+\end{PageSummary}
+
+\begin{quickref}
+\quickcitation{Bonmin Wiki Pages}{\linkCoin Bonmin}
+\quickcitation{subversion web page}{http://subversion.tigris.org/}
+\quickcitation{Using subversion on windows}{http://www.coin-or.org/faqs.html\#q4}
+\quickcitation{Linear Algebra PACKage}{http://www.netlib.org/lapack/}
+\quickcitation{Basic Linear Algebra Subroutines}{http://www.netlib.org/blas/}
+\quickcitation{Harwell Subroutine Library}{http://www.cse.clrc.ac.uk/nag/hsl/contents.shtml}
+\quickcitation{Mumps}{http://mumps.enseeiht.fr/}
+\quickcitation{AMPL Solver Library}{http://www.ampl.com}
+\end{quickref}
+
+\PageTitle{Obtaining \Bonmin}{sec:obtain}
+
+
+
+The \Bonmin\ package consists of the source code for the \Bonmin\
+project but also source code from other \COINOR\ projects:
+\begin{itemize}
+\item \BuildTools
+\item \Cbc
+\item \Cgl
+\item \Clp
+\item \CoinUtils
+\item \Ipopt
+\item \Osi
+\end{itemize}
+
+When downloading the \Bonmin\ package you will download the source code for all these and
+libraries of problems to test the codes.
+
+Before downloading \Bonmin\ you need to know which branch of Bonmin you want to download. 
+In particular you need to know if you want to download the latest version from:
+\begin{itemize}
+    \item the Stable branch, or from
+    \item the Released branch. 
+\end{itemize}
+These different version are made according to the guidelines of COIN-OR. The interpretation of these guidelines for the Bonmin project is explained on the wiki pages of Bonmin.
+
+The main distinction between the Stable and Release branch is that a stable version that we propose to download may evolve over time to include bug fixes while a released version will never change. The released versions present an advantage in particular if you want to make experiments which you want to be able to reproduce the stable version presents the advantage that it is less work for you to update in the event where we fix a bug.
+
+The easiest way to obtain the released version is by downloading a compressed archive from \href{http://www.coin-or.org/Tarballs/Bonmin/}{Bonmin archive directory}.
+
+The only way to obtain one of the stable versions is through \href{http://subversion.tigris.org/}{subversion}.
+
+In Unix\footnote{UNIX is a registered trademark of The Open
+Group.}-like environments, to download the latest stable version of Bonmin (\stableVersion) in a sub-directory, say {\tt Bonmin-\stableVersion} 
+issue the following command
+\begin{center}
+\tt \small svn co
+https://projects.coin-or.org/svn/Bonmin/stable/\stableVersion\ Bonmin-\stableVersion
+\end{center}
+
+\noindent This copies all the necessary COIN-OR files to compile \Bonmin\ to
+{\tt Bonmin-\stableVersion}. To download \Bonmin\ using svn on Windows,
+follow the instructions provided at
+\href{http://www.coin-or.org/faqs.html\#q4}{COIN-OR}.
+
+\subsectionH{Obtaining required third party code}{sec:obtain_3rd}
+\Bonmin\ needs a few external packages which are not included in the \Bonmin\ package.
+\begin{itemize}
+\item Lapack (Linear Algebra PACKage)
+\item Blas (Basic Linear Algebra Subroutines)
+\item A sparse linear solver.
+\item Optionally ASL (the AMPL Solver Library), to be able to use \Bonmin\ from AMPL.
+\end{itemize}
+
+
+Since these third-party software modules are released under licenses
+that are incompatible with the CPL, they cannot be included for
+distribution with \Bonmin\ from COIN-OR, but you will find scripts
+to help you download them in the subdirectory {\tt ThirdParty} of
+the \Bonmin\ distribution. In most Linux distributions and
+CYGWIN, Lapack and Blas are available as prebuild binary packages in
+the distribution (and are probably already installed on your
+machine). 
+
+Linear solvers are used by Ipopt. The most up-to-date information regarding the supported linear solvers and how to install them is found in \href{http://www.coin-or.org/Ipopt/documentation/node13.html}{Section 2.2} of the Ipopt manual.
+
+Several options are available for linear solvers: MA27 from the Harwell Subroutine Library (and optionally, but strongly recommended, MC19 to enable automatic scaling in \Ipopt), MA57 or Mumps.
+In our experiment MA27 and MA57 usually perform significantly better but they are freely 
+available only for non-commercial, academic use. Note that linear solvers can also take advantage of Metis.
diff --git a/doc/bib.tex b/doc/bib.tex
new file mode 100644
index 0000000..43e5114
--- /dev/null
+++ b/doc/bib.tex
@@ -0,0 +1,90 @@
+\begin{PageSummary}
+\end{PageSummary}
+\begin{thebibliography}{10}
+
+\bibitem{abhishek.leyffer.linderoth:06}
+ K.~Abhishek, S.~Leyffer, and J.~T. Linderoth. FilMINT: An
+  outer-ap\-pro\-xi\-mat\-ion-based solver for nonlinear mixed integer programs.
+  {\em INFORMS Journal On Computing}, 22 (2010), pp.~555--567.
+  \doilink{10.1287/ijoc.1090.0373}
+
+\bibitem{Betal}
+P.~Bonami, A.~W\auml chter, L.T.~Biegler, A.R.~Conn, G.~Cornu\eacute jols,
+I.E.~Grossmann, C.D.~Laird, J.~Lee, A.~Lodi, F.~Margot and
+N.~Sawaya.
+\newblock An algorithmic framework for convex mixed integer nonlinear programs. {\em Discrete Optimization}, 5 (2008), pp.~186--204.
+\newblock \doilink{10.1016/j.disopt.2006.10.011}
+
+\bibitem{bonami.etal:06}
+{P.~Bonami, G.~Cornu\eacute jols, A.~Lodi, and F.~Margot}. {A feasibility
+  pump for mixed integer nonlinear programs}. {\em Mathematical Programming}, 119
+  (2009), pp.~331--352.
+  \doilink{10.1007/s10107-008-0212-2}
+
+\bibitem{bonami.goncalves:08}
+{P.~Bonami and J.~Gon{\c{c}}alves}. {Primal heuristics for mixed
+  integer nonlinear programs}. 
+  {\em Computational Optimization and Applications}, 51 (2012), pp.~729--747.
+  \doilink{10.1007/s10589-010-9350-6}
+
+\bibitem{hot:2009}
+P. Bonami, M.~{K{\i}l{\i}n\c{c}} and J.~Linderoth.
+Algorithms and Software for Convex Mixed Integer Nonlinear Programs.
+In \emph{Mixed Integer Nonlinear Programming} (J.~Lee and S.~Leyffer, editors),
+volume 154 of \emph{The IMA Volumes in Mathematics and its Applications} (2012),
+pp.~1--40.
+\doilink{10.1007/978-1-4614-1927-3}
+
+\bibitem{DG}
+M.~Duran and I.E.~Grossmann.
+\newblock An outer-approximation algorithm for a class of mixed-integer nonlinear programs.
+\newblock {\em Mathematical Programming}, 36 (1986), pp.~307--339.
+\newblock \doilink{10.1007/BF02592064}
+
+\bibitem{Gupta80Nonlinear}
+O.K.~Gupta and V.~Ravindran.
+\newblock Branch and bound experiments in convex nonlinear integer programming.
+\newblock {\em Management Science}, 31 (1985), pp.~1533--1546.
+\newblock \doilink{10.1287/mnsc.31.12.1533}
+
+\bibitem{FL}
+R.~Fletcher and S.~Leyffer.
+\newblock Solving mixed integer nonlinear programs by outer approximation.
+\newblock {\em Mathematical Programming}, 66 (1994), pp.~327--349
+\newblock \doilink{10.1007/BF01581153}
+
+\bibitem{FiLter}
+R.~Fletcher and S.~Leyffer.
+\newblock User manual for filter{SQP}.
+\newblock {\em University of Dundee Numerical Analysis Report NA-181}, 1998.
+
+\bibitem{Gay}
+D.M.~Gay.
+\newblock Writing \texttt{.nl} files.
+\newblock Sandia National Laboratories, Technical Report No. 2005-7907P, 2005.
+
+\bibitem{QG}
+I.~Quesada and I.E.~Grossmann.
+\newblock An {LP/NLP} based branched and bound algorithm for convex {MINLP} optimization problems.
+\newblock {\em Computers and Chemical Engineering}, 16 (1992), pp.~937--947.
+\newblock \doilink{10.1016/0098-1354(92)80028-8}
+
+\bibitem{AMPL}
+R.~Fourer and D.M.~Gay and B.W.~Kernighan.
+\newblock AMPL: A Modeling Language for Mathematical
+Programming, Second Edition,
+\newblock Duxbury Press Brooks Cole Publishing Co., 2003.
+
+
+\bibitem{NocedalAdaptive}
+J.~Nocedal, A.~W\"achter, and R.~A. Waltz.
+\newblock Adaptive Barrier Strategies for Nonlinear Interior Methods.
+\newblock {\em SIAM Journal on Optimization}, 19 (2008), pp.~1674--1693.
+\newblock \doilink{10.1137/060649513}
+
+\bibitem{AndreasIpopt}
+A.~W\"achter and L.~T.~Biegler.
+\newblock On the Implementation of a Primal-Dual Interior Point Filter Line Search Algorithm for Large-Scale Nonlinear Programming.
+\newblock Mathematical Programming 106 (2006), pp.~25--57.
+\newblock \doilink{10.1007/s10107-004-0559-y}
+\end{thebibliography}
diff --git a/doc/bonmin.css b/doc/bonmin.css
new file mode 100644
index 0000000..5a8905d
--- /dev/null
+++ b/doc/bonmin.css
@@ -0,0 +1 @@
+/***********************************************/
/* Bonmin.css                                  */
/* coin.css modified.                          */
/* want a top navigation panel                 */
/* And links on the left-hand-side             */
/***********************************************/

/***********************************************/
/* HTML tag styles                             */
/***********************************************/ 

body{
      background-color: white;
      font-family: Arial, Helvetica, Univers, Zurich BT, sans-serif; 
}




h4 {
	margin-left: 5%;
}

ul.indented {
	margin-left: 5%;
}

/* For corporate logo display */
img.logo {
	border-style: none;
	vertical-align: middle;
	text-align: center;
}

li.logo {
	font-size: x-large;
}

table.logo {
	vertical-align: middle;
	text-align: center;
	border-spacing: 20px;
}


/* ##### Header ##### */
/* This part adapted from Tierra Verde Dos by haran from OSWD.org */

#header {
/*  color: rgb(0,0,153);*/
  color: black;
  background-image: url(blue_gradient.jpg);
  background-repeat: repeat-y;
  vertical-align: center; 
  text-align: right;
/*  padding: 0 2.5mm 1ex 4mm; */
  padding: 0 0 0 0;
  border-bottom: 2px solid white;
}

#header h1 {
  margin-right: 30px;
}

#leftPanel
{
	float:left;
width:3cm;
padding-left:10px;
padding-right:10px;
}

#rightPanel
{
	float:right;
width:30%;
padding-right: 10px;
padding-left: 10px;
padding-bottom: 50px;
margin-right:10px;
position: relative;
top:4em;
left:10px;
bottom:50px;
}


#headlines{
position:relative;
    border-top: 1px solid #cccccc;
	border-left: 1px solid #cccccc;
	border-bottom: 1px solid #cccccc;
	border-right: 1px solid #cccccc;
	padding-right: 10px;
	padding-top:100px;
	padding-bottom:500px;
}

#refer{
width:97%;
position:relative;
float:justify;
border:2px soldid #999999;
background-color:#cccccc;
  text-align:justify;
}


#content{
	float: justify;
	margin-left:10%;
  width: 85%;
   text-align:justify;
}

#verbatim{
	width: 65%;
	border:2px solid #cccccc;
	background-color:#ccccff;
}

/***********************************************/
/* Components                                  */
/***********************************************/

#siteName{
	margin: 0;
	padding: 0 0 0 10px;
}


/************* #globalNav styles **************/

#globalNav{
padding: 0px 0px 5px 10px;
border-bottom: 1px solid #CCC;
color: black;
}

#globalNav img{
 display: block;
}

#globalNav a {
	font-size: 120%;
	padding: 0 4px 0 0;
}

/*************** #pageName styles **************/

#pageName{
	margin: 0px;
	padding: 0px 0px 0px 10px;
}


/************** .feature styles ***************/

.feature{
	padding: 0px 0px 10px 10px;
	font-size: 100%;
}

.feature h3{
	padding: 30px 0px 5px 0px;
	text-align: center;
}

.feature img{
	float: left;
	padding: 10px 10px 0px 0px;
}


/************** .story styles *****************/

.story{
	padding: 10px 0px 0px 10px;
	font-size: 100%;
}

.story p{
	padding: 0px 0px 10px 0px;
}


/************* #siteInfo styles ***************/

#siteInfo{
	clear: both;
	border: 1px solid #cccccc;
	font-size: 100%;
	color: #cccccc;
	padding: 10px 10px 10px 10px;
}

#siteInfo img{
	padding: 4px 4px 4px 10px;
	vertical-align: middle;
}



/* ##### Side Bar ##### */
/* This part adapted from Tierra Verde Dos by haran from OSWD.org */

#side-bar {
  font-size: 95%;
  text-align: left;
/*  width: 11em; */
/*  float: left; */
  clear: left;
}

#side-bar ul {
  list-style-type: none;
  list-style-position: outside;
  margin: 0;
  padding: 0;
}

#side-bar li {
  margin-left: 1em;
  padding: 1ex 1em 1ex 0.5ex;
  border-bottom: 1px solid black;
}

#side-bar li.main {
  margin-left: 0;
}

#side-bar a {
  color: rgb(0,0,153);
  background-color: transparent;
  text-decoration: none;
}

#side-bar a:hover {
  background-color: transparent;
  text-decoration: underline;
}



/*********** #sectionLinks styles ***********/

#sectionLinks{
	position: relative;
	margin: 0px;
	padding: 0px;
	border-bottom: 1px solid #cccccc;
	font-size: 100%;
}

#sectionLinks h4{
	padding: 10px 0px 2px 10px;
}

#sectionLinks a {
	display: block;
	border-top: 1px solid #cccccc;
	padding: 2px 0px 2px 10px;
}

#sectionLinks a:hover{
	background-color: #dddddd;
}


/************** #headlines styles **************/

#headlines{
	margin: 0px;
	padding: 10px 0px 20px 10px;
	font-size: 80%;
}

#headlines p{
	padding: 5px 0px 5px 0px;
}


\ No newline at end of file
diff --git a/doc/bonmin.sty b/doc/bonmin.sty
new file mode 100644
index 0000000..36e00bf
--- /dev/null
+++ b/doc/bonmin.sty
@@ -0,0 +1,203 @@
+\newcommand{\stableVersion}{1.7}
+%Some frequently used html addresses
+
+%Documentation Pages
+\newcommand{\BonPrefix}{}
+\newcommand{\BibPage}{\BonPrefix bib.html}
+\newcommand{\OptSetPage}{\BonPrefix options_set.html}
+\newcommand{\OptListPage}{\BonPrefix options_list.html}
+% references
+\newcommand{\BetalLink}{http://domino.research.ibm.com/library/cyberdig.nsf/1e4115aea78b6e7c85256b360066f0d4/fdb4630e33bd2876852570b20062af37?OpenDocument}
+\newcommand{\FilterLink}{http://www.mcs.anl.gov/~leyffer/solvers.html}
+\newcommand{\DGLink}{\BibPage \#DG}
+\newcommand{\GuptaLink}{\BibPage \#Gupta80Nonlinear}
+\newcommand{\FLLink}{http://dx.doi.org/10.1007/BF01581153}
+\newcommand{\QGLink}{http://dx.doi.org/10.1016/0098-1354(92)80028-8}
+\newcommand{\AMPL}{\BibPage \#Fourrer2003}
+\newcommand{\FPLink}{http://dx.doi.org/10.1007/s10107-008-0212-2}
+\newcommand{\AbhishekLink}{http://wiki.mcs.anl.gov/leyffer/index.php/Sven\_Leyffer's\_Publications}
+\newcommand{\HotMINLPLink}{http://hal.archives-ouvertes.fr/hal-00423416/en/}
+
+
+
+%Some third party softwares
+\newcommand{\Cplex}{\href{http://www.ilog.com/products/cplex/product/mip.cfm}{\tt Cplex}}
+\newcommand{\LapackAddr}{http://www.netlib.org/lapack/}
+\newcommand{\BlasAddr}{http://www.netlib.org/blas/}
+\newcommand{\AslAddr}{http://www.cse.clrc.ac.uk/nag/hsl/contents.shtml}
+
+%for coin projects
+\newcommand{\linkCoin}{https://projects.coin-or.org/}
+
+%Some frequently used name with strange typesetting
+\newcommand{\Bonmin}{{\tt BONMIN}}
+\newcommand{\Ipopt}{\href{\linkCoin Ipopt}{\tt Ipopt}}
+\newcommand{\CoinUtils}{\href{\linkCoin CoinUtils}{\tt CoinUtils}}
+\newcommand{\BuildTools}{\href{\linkCoin BuildTools}{\tt BuildTools}}
+\newcommand{\Cbc}{\href{\linkCoin Cbc}{\tt Cbc}} 
+\newcommand{\Cgl}{\href{\linkCoin Cgl}{\tt Cgl}}
+\newcommand{\Clp}{\href{\linkCoin Clp}{\tt Clp}}
+\newcommand{\Osi}{\href{\linkCoin Osi}{\tt Osi}}
+\newcommand{\COINOR}{\href{http://www.coin-or.org}{COIN-OR}}
+
+\newcommand{\IpoptDoc}[1]{http://www.coin-or.org/Ipopt/documentation/node#1.html}
+
+
+\newcommand{\eacute}{\latexhtml{\'e}{\HCode{é}}}
+\newcommand{\auml}{\latexhtml{\"a}{\HCode{ä}}}
+
+\newcommand{\mycite}[2]{\latexhtml{
+\cite{#1}}
+{
+\href{bib.html\##1}{[#2]}
+}
+}
+\newcommand{\footlink}[2]{\href{#1}{#2}\latex{\footnote{\url{#1}}}}
+\def\htmlanchor#1{\latexhtml{}{\HCode{<a id="}#1\HCode{"></a>}}}
+\newcommand{\doilink}[1]{\href{http://dx.doi.org/#1}{doi:\detokenize{#1}}}
+
+
+%Put into a colored background for verbatim
+\newenvironment{colorverb}{\HCode{<div id="verbatim">}}{\HCode{</div> }}
+
+\newcommand{\PageTitle}[2]{
+\latexhtml{
+		\section{#1}
+		\label{#2}
+	}
+	{
+		\HCode{
+		</div>
+		<div id="content">
+			<div class="feature">
+			<h3> <a id="}#2\HCode{">}#1\HCode{</a>
+		</h3>}
+	}
+}
+
+\newcommand{\myHTMLsections}[3]{
+\latexhtml{
+#3{#1}
+\label{#2}
+}
+{
+\HCode{
+ </div> <div class="story"><h3><a id="}#2\HCode{">}#1\HCode{</a></h3>}
+}
+}
+
+\newcommand{\subsectionH}[2]{
+\myHTMLsections{#1}{#2}{\subsection}}
+
+\newcommand{\subsubsectionH}[2]{
+\myHTMLsections{#1}{#2}{\subsubsection}}
+
+\newcommand{\subsectionHs}[2]{
+\myHTMLsections{#1}{#2}{\subsection*}}
+
+\newcommand{\citeH}[3]{\latexhtml{ \cite{#1} }{
+\href{#2}{[#3]}
+}
+}
+
+%Header of the page
+  
+  \newcommand{\PageName}[1]{\latexhtml{}{
+ \HCode{<h2 id="pageName">} #1 \HCode{ </h2>}
+}}
+
+  \newcommand{\PageSection}[2]{\latexhtml{}{\HCode{<a href="}\##2 \HCode{" >} #1 \HCode{ </a>  /}}}
+ 
+ \newcommand{\EndPageSummary}{
+ \latexhtml{}{\HCode{
+</div>
+}
+}
+}
+
+%Panels of links
+\newcommand{\NavigationPanels}{
+\HCode{<div id="header"> }
+\HCode{  <h1 id="siteName"><TT> <big> BONMIN </big> </tt> Users' Manual</h1> }
+\HCode{  <div id="globalNav"> }
+\HCode{	<a href="Intro.html">Introduction</a> | }
+\HCode{	<a href="Obtain.html">Download</a> |}
+\HCode{	<a href="Install.html">Install</a> | }
+\HCode{	<a href="use.html">Use</a> | }
+\HCode{	<a href="options_set.html">Setting Options</a> | }
+\HCode{	<a href="options_list.html">Options List</a> | }
+\HCode{	<a href="bib.html">Bibliography</a> |}
+\HCode{  </div> }
+\HCode{  </div> }
+\HCode{<div id="leftPanel">}
+\HCode{<div id="side-bar"> }
+\HCode{<ul>}
+\HCode{<li class="main"><a href="/Bonmin/index.html">Bonmin</a></li>}
+\HCode{	  <li><a href="https://projects.coin-or.org/Bonmin">Wiki</a></li> }
+\HCode{	  <li><a href="http://neos.mcs.anl.gov/neos/solvers/minco:Bonmin/AMPL.html"> NEOS </a> </li>}
+\HCode{		<li><a href="http://egon.cheme.cmu.edu/ibm/page.htm">IBM-CMU OCR </a></li>}
+\HCode{		<li><a href="http://domino.research.ibm.com/comm/research_projects.nsf/pages/minlp.index.html">}
+\HCode{		IBM MINLP </a></li>}
+\HCode{		<br>}
+\HCode{		<br>}
+\HCode{             <li class="main"><a href="/index.html">COIN-OR Home</a></li>}
+\HCode{              <li><a href="/projects.html">Projects</a></li>}
+\HCode{              <li><a href="/faqs.html">FAQs</a></li>}
+\HCode{}
+\HCode{              <li><a href="/download.html">Download</a></li>}
+\HCode{              <li><a href="/mail.html">Mailing Lists</a></li>}
+\HCode{              <li><a href="/how-to-help.html">Get Involved</a></li>}
+\HCode{              <li><a href="/resources.html">Related Resources</a></li>}
+\HCode{              <li class="main"><a href="/foundation.html">}
+\HCode{     <br>}
+\HCode{     <br>}
+\HCode{                COIN-OR Foundation}
+\HCode{              </a></li>}
+\HCode{}
+\HCode{              <li><a href="/events.html">Events</a></li>}
+\HCode{              <li><a href="/members.html">Members</a></li>}
+\HCode{	</ul> }
+\HCode{</div>}
+\HCode{</div>}
+\HCode{<!--end navBar div --> }
+\HCode{<br>}
+}
+
+
+\newenvironment{PageSummary}{\NavigationPanels}{\EndPageSummary }
+%\newenvironment{PageSummary}{}{}
+
+\newcounter{refnum}
+
+\newenvironment{quickref}
+{
+\html{ 
+\setcounter{refnum}{0}
+\HCode{
+<div id="rightPanel">
+<div id="headlines">
+  <h4>References </h4>
+}}}
+{
+\html{\HCode{
+</div>
+</div>
+}}}
+
+\newcommand{\quickcitation}[2]{
+\html{
+\addtocounter{refnum}{1}
+\HCode{
+  <div id="refer">
+  <p> 
+}
+\arabic{refnum} \href{#2}{#1}
+\HCode{
+</p>
+</div>
+}}
+}
+
+
+
+
diff --git a/doc/genHtml.sh b/doc/genHtml.sh
new file mode 100755
index 0000000..be62bc0
--- /dev/null
+++ b/doc/genHtml.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+mkdir -p html
+for f in $@ ; 
+do
+NAME=`basename $f .tex`;
+rm -rf $NAME;
+awk -v NAME=$NAME '{sub(/FILENAME/,NAME);print}' Head.tex > tmp.tex;
+latex tmp.tex;
+latex tmp.tex;
+latex tmp.tex;
+tex4ht tmp.tex;
+awk '{sub(/tmp.css/,"bonmin.css") ; sub(/>tmp</,">BONMIN Users Manual<") ; print}' tmp.html | sed -e's/##/#/g' > toto.html;
+mv toto.html html/$NAME.html
+#rm tmp.*
+done
diff --git a/doc/htrick.sty b/doc/htrick.sty
new file mode 100644
index 0000000..2f5121f
--- /dev/null
+++ b/doc/htrick.sty
@@ -0,0 +1,5 @@
+
+\newcommand{\latexhtml}[2]{#2}
+\newcommand{\html}[1]{#1}
+\newcommand{\htmlonly}[1]{#1}
+\newcommand{\latex}[1]{}
diff --git a/doc/ltrick.sty b/doc/ltrick.sty
new file mode 100644
index 0000000..48f5f39
--- /dev/null
+++ b/doc/ltrick.sty
@@ -0,0 +1,6 @@
+\newcommand{\HCode}[1]{}
+\newcommand{\latexhtml}[2]{#1}
+\newcommand{\html}[1]{}
+\newcommand{\htmlonly}[1]{}
+\newcommand{\latex}[1]{#1}
+
diff --git a/doc/option_pages/Head.tex b/doc/option_pages/Head.tex
new file mode 100644
index 0000000..752d0f8
--- /dev/null
+++ b/doc/option_pages/Head.tex
@@ -0,0 +1,19 @@
+\documentclass{article}
+\usepackage{tex4ht}
+\usepackage{hyperref}
+\usepackage{lscape}
+\usepackage{amsmath,amssymb}
+\usepackage{threeparttable}
+\usepackage{xtab}
+
+
+\usepackage{htrick}
+\usepackage{bonmin}
+
+
+
+\begin{document}
+
+\input{FILENAME}
+
+\end{document}
diff --git a/doc/option_pages/bonmin.sty b/doc/option_pages/bonmin.sty
new file mode 100644
index 0000000..36e00bf
--- /dev/null
+++ b/doc/option_pages/bonmin.sty
@@ -0,0 +1,203 @@
+\newcommand{\stableVersion}{1.7}
+%Some frequently used html addresses
+
+%Documentation Pages
+\newcommand{\BonPrefix}{}
+\newcommand{\BibPage}{\BonPrefix bib.html}
+\newcommand{\OptSetPage}{\BonPrefix options_set.html}
+\newcommand{\OptListPage}{\BonPrefix options_list.html}
+% references
+\newcommand{\BetalLink}{http://domino.research.ibm.com/library/cyberdig.nsf/1e4115aea78b6e7c85256b360066f0d4/fdb4630e33bd2876852570b20062af37?OpenDocument}
+\newcommand{\FilterLink}{http://www.mcs.anl.gov/~leyffer/solvers.html}
+\newcommand{\DGLink}{\BibPage \#DG}
+\newcommand{\GuptaLink}{\BibPage \#Gupta80Nonlinear}
+\newcommand{\FLLink}{http://dx.doi.org/10.1007/BF01581153}
+\newcommand{\QGLink}{http://dx.doi.org/10.1016/0098-1354(92)80028-8}
+\newcommand{\AMPL}{\BibPage \#Fourrer2003}
+\newcommand{\FPLink}{http://dx.doi.org/10.1007/s10107-008-0212-2}
+\newcommand{\AbhishekLink}{http://wiki.mcs.anl.gov/leyffer/index.php/Sven\_Leyffer's\_Publications}
+\newcommand{\HotMINLPLink}{http://hal.archives-ouvertes.fr/hal-00423416/en/}
+
+
+
+%Some third party softwares
+\newcommand{\Cplex}{\href{http://www.ilog.com/products/cplex/product/mip.cfm}{\tt Cplex}}
+\newcommand{\LapackAddr}{http://www.netlib.org/lapack/}
+\newcommand{\BlasAddr}{http://www.netlib.org/blas/}
+\newcommand{\AslAddr}{http://www.cse.clrc.ac.uk/nag/hsl/contents.shtml}
+
+%for coin projects
+\newcommand{\linkCoin}{https://projects.coin-or.org/}
+
+%Some frequently used name with strange typesetting
+\newcommand{\Bonmin}{{\tt BONMIN}}
+\newcommand{\Ipopt}{\href{\linkCoin Ipopt}{\tt Ipopt}}
+\newcommand{\CoinUtils}{\href{\linkCoin CoinUtils}{\tt CoinUtils}}
+\newcommand{\BuildTools}{\href{\linkCoin BuildTools}{\tt BuildTools}}
+\newcommand{\Cbc}{\href{\linkCoin Cbc}{\tt Cbc}} 
+\newcommand{\Cgl}{\href{\linkCoin Cgl}{\tt Cgl}}
+\newcommand{\Clp}{\href{\linkCoin Clp}{\tt Clp}}
+\newcommand{\Osi}{\href{\linkCoin Osi}{\tt Osi}}
+\newcommand{\COINOR}{\href{http://www.coin-or.org}{COIN-OR}}
+
+\newcommand{\IpoptDoc}[1]{http://www.coin-or.org/Ipopt/documentation/node#1.html}
+
+
+\newcommand{\eacute}{\latexhtml{\'e}{\HCode{é}}}
+\newcommand{\auml}{\latexhtml{\"a}{\HCode{ä}}}
+
+\newcommand{\mycite}[2]{\latexhtml{
+\cite{#1}}
+{
+\href{bib.html\##1}{[#2]}
+}
+}
+\newcommand{\footlink}[2]{\href{#1}{#2}\latex{\footnote{\url{#1}}}}
+\def\htmlanchor#1{\latexhtml{}{\HCode{<a id="}#1\HCode{"></a>}}}
+\newcommand{\doilink}[1]{\href{http://dx.doi.org/#1}{doi:\detokenize{#1}}}
+
+
+%Put into a colored background for verbatim
+\newenvironment{colorverb}{\HCode{<div id="verbatim">}}{\HCode{</div> }}
+
+\newcommand{\PageTitle}[2]{
+\latexhtml{
+		\section{#1}
+		\label{#2}
+	}
+	{
+		\HCode{
+		</div>
+		<div id="content">
+			<div class="feature">
+			<h3> <a id="}#2\HCode{">}#1\HCode{</a>
+		</h3>}
+	}
+}
+
+\newcommand{\myHTMLsections}[3]{
+\latexhtml{
+#3{#1}
+\label{#2}
+}
+{
+\HCode{
+ </div> <div class="story"><h3><a id="}#2\HCode{">}#1\HCode{</a></h3>}
+}
+}
+
+\newcommand{\subsectionH}[2]{
+\myHTMLsections{#1}{#2}{\subsection}}
+
+\newcommand{\subsubsectionH}[2]{
+\myHTMLsections{#1}{#2}{\subsubsection}}
+
+\newcommand{\subsectionHs}[2]{
+\myHTMLsections{#1}{#2}{\subsection*}}
+
+\newcommand{\citeH}[3]{\latexhtml{ \cite{#1} }{
+\href{#2}{[#3]}
+}
+}
+
+%Header of the page
+  
+  \newcommand{\PageName}[1]{\latexhtml{}{
+ \HCode{<h2 id="pageName">} #1 \HCode{ </h2>}
+}}
+
+  \newcommand{\PageSection}[2]{\latexhtml{}{\HCode{<a href="}\##2 \HCode{" >} #1 \HCode{ </a>  /}}}
+ 
+ \newcommand{\EndPageSummary}{
+ \latexhtml{}{\HCode{
+</div>
+}
+}
+}
+
+%Panels of links
+\newcommand{\NavigationPanels}{
+\HCode{<div id="header"> }
+\HCode{  <h1 id="siteName"><TT> <big> BONMIN </big> </tt> Users' Manual</h1> }
+\HCode{  <div id="globalNav"> }
+\HCode{	<a href="Intro.html">Introduction</a> | }
+\HCode{	<a href="Obtain.html">Download</a> |}
+\HCode{	<a href="Install.html">Install</a> | }
+\HCode{	<a href="use.html">Use</a> | }
+\HCode{	<a href="options_set.html">Setting Options</a> | }
+\HCode{	<a href="options_list.html">Options List</a> | }
+\HCode{	<a href="bib.html">Bibliography</a> |}
+\HCode{  </div> }
+\HCode{  </div> }
+\HCode{<div id="leftPanel">}
+\HCode{<div id="side-bar"> }
+\HCode{<ul>}
+\HCode{<li class="main"><a href="/Bonmin/index.html">Bonmin</a></li>}
+\HCode{	  <li><a href="https://projects.coin-or.org/Bonmin">Wiki</a></li> }
+\HCode{	  <li><a href="http://neos.mcs.anl.gov/neos/solvers/minco:Bonmin/AMPL.html"> NEOS </a> </li>}
+\HCode{		<li><a href="http://egon.cheme.cmu.edu/ibm/page.htm">IBM-CMU OCR </a></li>}
+\HCode{		<li><a href="http://domino.research.ibm.com/comm/research_projects.nsf/pages/minlp.index.html">}
+\HCode{		IBM MINLP </a></li>}
+\HCode{		<br>}
+\HCode{		<br>}
+\HCode{             <li class="main"><a href="/index.html">COIN-OR Home</a></li>}
+\HCode{              <li><a href="/projects.html">Projects</a></li>}
+\HCode{              <li><a href="/faqs.html">FAQs</a></li>}
+\HCode{}
+\HCode{              <li><a href="/download.html">Download</a></li>}
+\HCode{              <li><a href="/mail.html">Mailing Lists</a></li>}
+\HCode{              <li><a href="/how-to-help.html">Get Involved</a></li>}
+\HCode{              <li><a href="/resources.html">Related Resources</a></li>}
+\HCode{              <li class="main"><a href="/foundation.html">}
+\HCode{     <br>}
+\HCode{     <br>}
+\HCode{                COIN-OR Foundation}
+\HCode{              </a></li>}
+\HCode{}
+\HCode{              <li><a href="/events.html">Events</a></li>}
+\HCode{              <li><a href="/members.html">Members</a></li>}
+\HCode{	</ul> }
+\HCode{</div>}
+\HCode{</div>}
+\HCode{<!--end navBar div --> }
+\HCode{<br>}
+}
+
+
+\newenvironment{PageSummary}{\NavigationPanels}{\EndPageSummary }
+%\newenvironment{PageSummary}{}{}
+
+\newcounter{refnum}
+
+\newenvironment{quickref}
+{
+\html{ 
+\setcounter{refnum}{0}
+\HCode{
+<div id="rightPanel">
+<div id="headlines">
+  <h4>References </h4>
+}}}
+{
+\html{\HCode{
+</div>
+</div>
+}}}
+
+\newcommand{\quickcitation}[2]{
+\html{
+\addtocounter{refnum}{1}
+\HCode{
+  <div id="refer">
+  <p> 
+}
+\arabic{refnum} \href{#2}{#1}
+\HCode{
+</p>
+</div>
+}}
+}
+
+
+
+
diff --git a/doc/option_pages/genHtml.sh b/doc/option_pages/genHtml.sh
new file mode 100755
index 0000000..c14a4ce
--- /dev/null
+++ b/doc/option_pages/genHtml.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+for f in $@ ; 
+do
+NAME=`basename $f .tex`;
+rm -rf $NAME;
+awk -v NAME=$NAME '{sub(/FILENAME/,NAME);print}' Head.tex > tmp.tex;
+latex tmp.tex;
+latex tmp.tex;
+latex tmp.tex;
+tex4ht tmp.tex;
+awk '{sub(/tmp.css/,"bonmin.css") ; sub(/>tmp</,">BONMIN Options pages<") ; print}' tmp.html | sed -e's/##/#/g' > toto.html;
+mv toto.html html/$NAME.html
+#rm tmp.*
+done
diff --git a/doc/option_pages/genOptionsDocs.sh b/doc/option_pages/genOptionsDocs.sh
new file mode 100755
index 0000000..a103403
--- /dev/null
+++ b/doc/option_pages/genOptionsDocs.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+categories="bonmin filter ipopt"
+
+mkdir -p html
+
+for f in $categories ; do
+  awk -v NAME=$f '{sub(/TEMPLATE/,NAME) ; print}' options_list_TEMPLATE.tex > options_list_$f.tex
+  ./genHtml.sh options_list_$f.tex
+  mv tmp.html options_list_$f.html
+done
+
+cp ../bonmin.css html/
diff --git a/doc/option_pages/htrick.sty b/doc/option_pages/htrick.sty
new file mode 100644
index 0000000..2f5121f
--- /dev/null
+++ b/doc/option_pages/htrick.sty
@@ -0,0 +1,5 @@
+
+\newcommand{\latexhtml}[2]{#2}
+\newcommand{\html}[1]{#1}
+\newcommand{\htmlonly}[1]{#1}
+\newcommand{\latex}[1]{}
diff --git a/doc/option_pages/ltrick.sty b/doc/option_pages/ltrick.sty
new file mode 100644
index 0000000..0550706
--- /dev/null
+++ b/doc/option_pages/ltrick.sty
@@ -0,0 +1,7 @@
+\newcommand{\HCode}[1]{}
+\newcommand{\latexhtml}[2]{#1}
+\newcommand{\html}[1]{}
+\newcommand{\htmlonly}[1]{}
+\newcommand{\htmlanchor}[1]{}
+\newcommand{\latex}[1]{#1}
+
diff --git a/doc/option_pages/options_list_TEMPLATE.tex b/doc/option_pages/options_list_TEMPLATE.tex
new file mode 100644
index 0000000..3ae3d8f
--- /dev/null
+++ b/doc/option_pages/options_list_TEMPLATE.tex
@@ -0,0 +1,11 @@
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "BONMIN_UsersManual"
+%%% End:
+
+\begin{PageSummary}
+\PageName{List of TEMPLATE options}
+\end{PageSummary}
+
+\input{options_list_TEMPLATE_content}
diff --git a/doc/option_pages/options_list_bonmin_content.tex b/doc/option_pages/options_list_bonmin_content.tex
new file mode 120000
index 0000000..0fc272e
--- /dev/null
+++ b/doc/option_pages/options_list_bonmin_content.tex
@@ -0,0 +1 @@
+../options_list_bonmin_content.tex
\ No newline at end of file
diff --git a/doc/option_pages/options_list_filter_content.tex b/doc/option_pages/options_list_filter_content.tex
new file mode 120000
index 0000000..fffbd97
--- /dev/null
+++ b/doc/option_pages/options_list_filter_content.tex
@@ -0,0 +1 @@
+../options_list_filter_content.tex
\ No newline at end of file
diff --git a/doc/option_pages/options_list_ipopt_content.tex b/doc/option_pages/options_list_ipopt_content.tex
new file mode 120000
index 0000000..523d070
--- /dev/null
+++ b/doc/option_pages/options_list_ipopt_content.tex
@@ -0,0 +1 @@
+../options_list_ipopt_content.tex
\ No newline at end of file
diff --git a/doc/options.tex b/doc/options.tex
new file mode 100644
index 0000000..aa7c62b
--- /dev/null
+++ b/doc/options.tex
@@ -0,0 +1,417 @@
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "BONMIN_UsersManual"
+%%% End:
+
+\subsection{\Bonmin\  output options}
+\label{app:opt_loglevel}
+\paragraph{bb\_log\_level} specify branch-and-bound's log level.
+
+ Set the level of output of the branch-and-bound:
+ \begin{itemize}
+  \item {\tt 0} - none,
+  \item {\tt 1} - minimal,
+  \item {\tt 2} - normal low,
+  \item {\tt 3} - normal high,
+  \end{itemize}
+ The valid range for this integer option is
+ $${\tt 0} \le \hbox{\tt bb\_log\_level } \le {\tt 3}$$
+and its default value is {\tt 1}.
+
+
+\paragraph{bb\_log\_interval} Interval at which node level output is printed.
+
+ Set the interval (in terms of number of nodes) at
+which a log on node resolutions (consisting of
+lower and upper bounds) is given. The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt bb\_log\_interval } <  \infty$$
+and its default value is {\tt 100}.
+
+
+\paragraph{lp\_log\_level} specify LP log level.
+
+ Set the level of output of the linear programming
+subsolver in {\tt B-Hyb }or {\tt B-QG}:
+ \begin{itemize}
+  \item {\tt 0} - none,
+  \item {\tt 1} - minimal,
+  \item {\tt 2} - normal low,
+  \item {\tt 3} - normal high,
+  \item {\tt 4} - verbose.
+  \end{itemize}
+The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt lp\_log\_level } \le {\tt 4}$$
+and its default value is {\tt 0}.
+
+
+\paragraph{milp\_log\_level} specify MILP subsolver log level.
+
+ Set the level of output of the MILP subsolver in
+OA :
+ \begin{itemize}
+  \item {\tt 0} - none,
+  \item {\tt 1} - minimal,
+  \item {\tt 2} - normal low,
+  \item {\tt 3} - normal high,
+  \end{itemize}
+The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt milp\_log\_level } \le {\tt 3}$$
+and its default value is {\tt 0}.
+
+
+\paragraph{oa\_log\_level} specify OA iterations log level.
+
+ Set the level of output of OA decomposition solver :
+ \begin{itemize}
+  \item {\tt 0} - none,
+  \item {\tt 1} - normal low,
+  \item {\tt 2} - normal high.
+  \end{itemize}
+  The valid range for this integer option is
+  $${\tt 0} \le \hbox{\tt oa\_log\_level } \le {\tt 2}$$
+  and its default value is {\tt 1}.
+
+\paragraph{oa\_log\_frequency} specify OA log frequency.
+  The valid range for this real option is
+  $$ 0 \le \hbox{\tt oa\_log\_frequency } \le \infty $$
+  and its default value is $100$.
+
+
+
+  \paragraph{nlp\_log\_level} specify NLP solver interface log level (independent from ipopt print\_level).
+
+  Set the level of output of the IpoptInterface :
+  \begin{itemize}
+  \item {\tt 0} - none,
+  \item {\tt 1} - low and readable with warnings,
+  \item {\tt 2} - verbose
+  \end{itemize}
+ The valid range for this integer option is
+$${\tt 0} \le {\tt nlp\_log\_level } \le {\tt 2}$$
+and its default value is {\tt 1}.
+
+\paragraph{print\_user\_options} Prints the list of options set by the user.
+The default value for this option is ``no".\\
+Possible values are:
+\begin{itemize}
+\item yes: print the list,
+\item no: don't.
+\end{itemize}
+
+\subsection{\Bonmin\ branch-and-bound options}
+
+\paragraph{algorithm} Choice of the algorithm.
+
+       This will preset default values for most options
+    of \Bonmin\ but depending on which algorithm some
+of these can be changed (refer to Table \ref{tab:options} to see which options
+           are valid with which algorithm).
+    The default value for this string option is ``{\tt B-Hyb}''.
+\\
+Possible values:
+\begin{itemize}
+   \item {\tt B-BB}: simple branch-and-bound algorithm,
+   \item {\tt B-OA}: OA Decomposition algorithm,
+   \item {\tt B-QG}: Quesada and Grossmann branch-and-cut algorithm,
+   \item {\tt B-Hyb}: hybrid outer approximation based branch-and-cut.
+\end{itemize}
+
+
+\paragraph{allowable\_gap}
+Specify the value of absolute gap under which the algorithm stops.
+
+ Stop the tree search when the gap between the
+objective value of the best known solution and
+the best lower bound on the objective of any solution
+is less than this. The valid range for this real option is
+$$-10^{20} \le \hbox{\tt allowable\_gap } \le 10^{20}$$
+and its default value is $0$.
+
+
+\paragraph{allowable\_fraction\_gap}
+Specify the value of relative gap under which the algorithm stops.
+
+ Stop the tree search when the gap between the
+objective value of the best known solution and
+the best bound on the objective of any solution
+is less than this fraction of the absolute value
+of the best known solution value. The valid range for this real option is
+$$-10^{20} \le \hbox{\tt allowable\_fraction\_gap } \le 10^{20}$$
+and its default value is $0$.
+
+\paragraph{cutoff}Specify a cutoff value
+
+cutoff should be the value of a feasible solution known by the user
+(if any). The algorithm will only look for solutions better (meaning with a lower objective value)
+than cutoff. The valid range for this real option is
+$$-10^{100} \le \hbox{\tt cutoff } \le 10^{100}$$
+and its default value is $10^{100}$.
+
+
+\paragraph{cutoff\_decr} Specify cutoff decrement.
+
+ Specify the amount by which cutoff is decremented
+below a new best upper-bound (usually a small
+positive value but in non-convex problems it may
+be a negative value). The valid range for this real option is
+$${\tt -10^{10}} \le \hbox{\tt cutoff\_decr } \le {\tt 10^{10}}$$
+and its default value is ${\tt 10^{-05}}$.
+
+
+\paragraph{nodeselect\_stra} Choose the node selection strategy.
+
+ Choose the strategy for selecting the next node
+to be processed.
+The default value for this string option is ``{\tt best-bound}''.
+\\
+Possible values:
+\begin{itemize}
+   \item {\tt best-bound}: choose node with the least bound,
+   \item {\tt depth-first}: Perform depth-first search,
+   \item {\tt breadth-first}: Perform breadth-first search,
+   \item {\tt dynamic}: {\tt Cbc} dynamic strategy (start with depth-first
+search and turn to best bound after 3 integer
+feasible solutions have been found).
+\end{itemize}
+
+
+\paragraph{number\_strong\_branch}
+Choose the maximum number of variables considered for strong branching.
+
+ Set the number of variables on which to do strong
+branching. The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt number\_strong\_branch } <  \infty$$
+and its default value is ${\tt 20}$.
+
+
+\paragraph{number\_before\_trust}
+Set the number of branches on a variable before its pseudo costs are to
+be believed in dynamic strong branching.
+
+ A value of 0 disables dynamic strong branching. The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt number\_before\_trust } <  \infty$$
+and its default value is ${\tt 8}$.
+
+
+\paragraph{time\_limit}
+Set the global maximum computation time (in seconds) for the algorithm.
+
+ The valid range for this real option is
+$${\tt 0} <  \hbox{\tt time\_limit } <  \infty$$
+and its default value is ${\tt 10^{+10}}$.
+
+
+\paragraph{node\_limit}
+Set the maximum number of nodes explored in the branch-and-bound search.
+
+The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt node\_limit } <  \infty$$
+and its default value is {\tt INT\_MAX} (as defined in system {\tt limits.h}).
+
+
+\paragraph{integer\_tolerance}
+Set integer tolerance.
+
+ Any number within that value of an integer is
+considered integer.
+The valid range for this real option is
+$${\tt 0} <  \hbox{\tt integer\_tolerance } <  {\tt 0.5}$$
+and its default value is ${\tt 10^{-6}}$.
+
+
+\paragraph{warm\_start}
+Select the warm start method. Possible values:
+\begin{itemize}
+ \item {\tt none}: no warm start,
+\item {\tt optimum}: warm start with direct parent optimum",
+\item {\tt interior\_point}: Warm start with an interior point of direct parent".
+\end{itemize}
+The default value is {\tt optimum}.
+
+\paragraph{sos\_constraints}
+Wether or not to activate SOS constraints branching. Possible values are
+\begin{itemize}
+ \item {\tt enable},
+\item {\tt disable}.
+\end{itemize}
+The default value is {\tt enable}.
+
+\subsection{\Bonmin\ options for robustness}
+
+\paragraph{max\_random\_point\_radius}
+Set max value r for coordinate of a random point.
+
+ When picking a random point, each coordinate is selected uniformly
+in the interval $[\min(\max(l,-r),u-r),
+\max(\min(u,r),l+r)]$ where l is the lower bound
+for the variable and u is its upper bound.
+Beware that this is a very naive procedure. In particular,
+it may not be possible to evaluate some functions (such as log, 1/x)
+at such a randomly generated point (if \Bonmin\  finds that this is the case,
+it will give up random point generation).
+The valid range for this real option is
+$${\tt 0} <  \hbox{\tt max\_random\_point\_radius } <  \infty$$
+and its default value is ${\tt 10^{5}}$.
+
+
+\paragraph{max\_consecutive\_failures}
+Number $n$ of consecutive unsolved problems before aborting
+a branch of the tree.
+
+ When $n > 0$, continue exploring a branch of the
+tree until $n$ consecutive problems in the branch
+are unsolved (i.e., for
+which {\tt Ipopt} can not guarantee optimality within
+the specified tolerances). The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt max\_consecutive\_failures } <  \infty$$
+and its default value is ${\tt 10}$.
+
+
+\paragraph{num\_iterations\_suspect}
+(for debugging purposes only) number of iterations to consider a problem
+suspect.
+
+When the number of iterations taken by the continuous nonlinear solver
+(for the moment this is Ipopt) to solve a node is above this number,
+the subproblem is
+considered to be suspect and is outputed
+to a file. If set to {\tt -1} no subproblem is ever considered suspect.
+The valid range for this integer option is
+$${\tt -1} \le \hbox{\tt num\_iterations\_suspect } <  \infty$$
+and its default value is $-1$.
+
+
+\paragraph{nlp\_failure\_behavior}
+Set the behavior when an NLP or a series of NLP are unsolved by {\tt Ipopt}
+(an NLP is unsolved if {\tt Ipopt} is not able to guarantee optimality within the specified tolerances).
+
+ If set to ``{\tt fathom}'', the algorithm will fathom the
+node when an NLP is unsolved. The algorithm then becomes a
+heuristic. A warning that the solution might not
+be optimal is printed.
+The default value for this string option is ``{\tt stop}".
+\\
+Possible values:
+\begin{itemize}
+   \item {\tt stop}: Stop when failure happens.
+   \item {\tt fathom}: Continue when failure happens.
+\end{itemize}
+
+\paragraph{num\_retry\_unsolved\_random\_point}
+Number $k$ of times that the algorithm tries to resolve an unsolved NLP with a
+random starting point (unsolved NLP as defined above).
+ When an NLP is unsolved, if $k > 0$, the algorithm tries
+again to solve the failed NLP with $k$ new
+randomly chosen starting points  or until the
+problem is solved with success. The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt num\_retry\_unsolved\_random\_point } <  \infty$$
+and its default value is {\tt 0}.
+
+
+
+\subsection{\Bonmin\ options for non-convex problems}
+
+\paragraph{max\_consecutive\_infeasible}
+Number $k$ of consecutive infeasible subproblems before aborting a branch.
+
+ Explores a branch of the tree
+      until $k$ consecutive
+problems are infeasible by the NLP subsolver. The valid range for
+this integer option is
+$${\tt 0} \le \hbox{\tt max\_consecutive\_infeasible } <  \infty$$
+and its default value is {\tt 0}.
+
+
+\paragraph{num\_resolve\_at\_root}
+Number $k$ of trials to solve the root node with different starting points.
+
+ The algorithm solves the root node with $k$
+random starting points and keeps the best
+local optimum found. The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt num\_resolve\_at\_root } <  \infty $$
+and its default value is {\tt 0}.
+
+
+\paragraph{num\_resolve\_at\_node}
+Number $k$ of tries to solve a node (other than the root) of the tree with different starting point.
+
+ The algorithm solves all the nodes with $k$
+different random starting points and keeps
+the best local optimum found. The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt num\_resolve\_at\_node } <  \infty$$
+and its default value is {\tt 0}.
+
+
+
+\subsection{\Bonmin\ options : {\tt B-Hyb} specific options}
+
+\paragraph{nlp\_solve\_frequency}
+Specify the frequency (in terms of nodes) at which NLP relaxations
+are solved in {\tt B-Hyb}.
+
+ A frequency of 0 amounts to never solve the
+NLP relaxation. The valid range for this integer option is
+$${\tt 0} \le \hbox{\tt nlp\_solve\_frequency } <  \infty$$
+and its default value is {\tt 10}.
+
+
+\paragraph{oa\_dec\_time\_limit}
+Specify the maximum number of seconds spent overall in OA decomposition iterations.
+
+ The valid range for this real option is
+$${\tt 0} \le \hbox{\tt oa\_dec\_time\_limit } <  \infty$$
+and its default value is {\tt 120}.
+
+\paragraph{tiny\_element}
+Value for tiny element in OA cut.
+We will remove cleanly (by relaxing cut) an element lower
+than this.
+
+The  valid range for this real option is
+$$0 \le \hbox{\tt tiny\_element } <  \infty$$
+and its default value is $10^{-8}$.
+
+\paragraph{very\_tiny\_element}
+Value for very tiny element in OA cut.
+Algorithm will take the risk of neglecting an element lower
+than this.
+
+The  valid range for this real option is
+$$0 \le \hbox{\tt very\_tiny\_element } <  \infty$$
+and its default value is $10^{-17}$.
+
+\paragraph{milp\_subsolver}
+Choose the subsolver to solve MILPs sub-problems in OA decompositions.
+
+  To use Cplex, a valid license is required and
+you should have compiled OsiCpx in COIN-OR  (see Osi documentation).
+The default value for this string option is ``{\tt Cbc\_D}''.
+\\
+Possible values:
+\begin{itemize}
+   \item {\tt Cbc\_D}: COIN-OR Branch and Cut with default options,
+   \item {\tt Cbc\_Par}: COIN-OR Branch and Cut with options passed by user,
+   \item {\tt Cplex}: Ilog Cplex.
+\end{itemize}
+
+
+\subsubsection{Cut generators frequency}
+For each one of the cut generators
+\paragraph{Gomory\_cuts}
+\paragraph{probing\_cuts}(by default probing cuts are currently disabled for numerical stability reason)
+\paragraph{cover\_cuts}
+\paragraph{mir\_cuts}
+Sets the frequency (in terms of nodes) for generating cuts of
+the given type in the branch-and-cut.
+\begin{itemize}
+\item $k > 0$, cuts are generated every k nodes,
+\item $-99 < k < 0$,  cuts are generated every -k nodes but
+{\tt Cbc} may decide to stop generating cuts, if not
+enough are generated at the root node,
+\item$k = -99$ cuts are generated only at the root node,
+\item $k = 0$ or $k = -100$ cuts are not generated.
+\end{itemize}
+ The valid range for this integer option is
+$${\tt -100} \le k <  \infty$$
+and its default value is ${\tt -5}$.
diff --git a/doc/options_list.tex b/doc/options_list.tex
new file mode 100644
index 0000000..76b6be0
--- /dev/null
+++ b/doc/options_list.tex
@@ -0,0 +1,16 @@
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "BONMIN_UsersManual"
+%%% End:
+
+\appendix
+\html{\setcounter{section}{1}}
+\latex{\section{List of \Bonmin\ options}}
+\label{sec:optList}
+
+\begin{PageSummary}
+\PageName{List of \Bonmin\ options}
+\end{PageSummary}
+
+\input{options_list_bonmin_content}
diff --git a/doc/options_list_bonmin_content.tex b/doc/options_list_bonmin_content.tex
new file mode 100644
index 0000000..8f7ccbe
--- /dev/null
+++ b/doc/options_list_bonmin_content.tex
@@ -0,0 +1,1580 @@
+\latexhtml{}{
+\HCode{
+<table border="1">
+<tr>
+<td>Option </td>
+<td> type </td>
+<td> B-BB</td>
+<td> B-OA</td>
+<td> B-QG</td>
+<td> B-Hyb</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Algorithmchoice">Algorithm choice</a> </th>
+</tr>
+<tr>
+<td>algorithm</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Branch-and-boundoptions">Branch-and-bound options</a> </th>
+</tr>
+<tr>
+<td>allowable_fraction_gap</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>allowable_gap</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>cutoff</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>cutoff_decr</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>enable_dynamic_nlp</td>
+<td>S</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>integer_tolerance</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>iteration_limit</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_failure_behavior</td>
+<td>S</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>node_comparison</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>node_limit</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>num_cut_passes</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>num_cut_passes_at_root</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>number_before_trust</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>number_strong_branch</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>random_generator_seed</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>read_solution_file</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>solution_limit</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>sos_constraints</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>time_limit</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>tree_search_strategy</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>variable_selection</td>
+<td>S</td>
+<td> +</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:ECPcutsgeneration">ECP cuts generation</a> </th>
+</tr>
+<tr>
+<td>ecp_abs_tol</td>
+<td>F</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ecp_max_rounds</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ecp_probability_factor</td>
+<td>F</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ecp_rel_tol</td>
+<td>F</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>filmint_ecp_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:FeasibilitycheckerusingOAcuts">Feasibility checker using OA cuts</a> </th>
+</tr>
+<tr>
+<td>feas_check_cut_types</td>
+<td>S</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>feas_check_discard_policy</td>
+<td>S</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>generate_benders_after_so_many_oa</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MILPSolver">MILP Solver</a> </th>
+</tr>
+<tr>
+<td>cpx_parallel_strategy</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>milp_solver</td>
+<td>S</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>milp_strategy</td>
+<td>S</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>number_cpx_threads</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MILPcuttingplanesinhybridalgorithm">MILP cutting planes in hybrid algorithm</a> </th>
+</tr>
+<tr>
+<td>2mir_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>Gomory_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>clique_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>cover_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>flow_cover_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>lift_and_project_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mir_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>reduce_and_split_cuts</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:NLPinterface">NLP interface</a> </th>
+</tr>
+<tr>
+<td>nlp_solver</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start</td>
+<td>S</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:NLPsolutionrobustness">NLP solution robustness</a> </th>
+</tr>
+<tr>
+<td>max_consecutive_failures</td>
+<td>I</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>max_random_point_radius</td>
+<td>F</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>num_iterations_suspect</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>num_retry_unsolved_random_point</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>random_point_perturbation_interval</td>
+<td>F</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>random_point_type</td>
+<td>S</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>resolve_on_small_infeasibility</td>
+<td>F</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:NLPsolvesinhybridalgorithm(B-Hyb)">NLP solves in hybrid algorithm (B-Hyb)</a> </th>
+</tr>
+<tr>
+<td>nlp_solve_frequency</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_solve_max_depth</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_solves_per_depth</td>
+<td>F</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Nonconvexproblems">Nonconvex problems</a> </th>
+</tr>
+<tr>
+<td>coeff_var_threshold</td>
+<td>F</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>dynamic_def_cutoff_decr</td>
+<td>S</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>first_perc_for_cutoff_decr</td>
+<td>F</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>max_consecutive_infeasible</td>
+<td>I</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>num_resolve_at_infeasibles</td>
+<td>I</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>num_resolve_at_node</td>
+<td>I</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>num_resolve_at_root</td>
+<td>I</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>second_perc_for_cutoff_decr</td>
+<td>F</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:OuterApproximationDecomposition(B-OA)">Outer Approximation Decomposition (B-OA)</a> </th>
+</tr>
+<tr>
+<td>oa_decomposition</td>
+<td>S</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:OuterApproximationcutsgeneration">Outer Approximation cuts generation</a> </th>
+</tr>
+<tr>
+<td>add_only_violated_oa</td>
+<td>S</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>oa_cuts_scope</td>
+<td>S</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>oa_rhs_relax</td>
+<td>F</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>tiny_element</td>
+<td>F</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>very_tiny_element</td>
+<td>F</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:OutputandLoglevel">Output and Loglevel</a> </th>
+</tr>
+<tr>
+<td>bb_log_interval</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>bb_log_level</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>file_solution</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>fp_log_frequency</td>
+<td>F</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>fp_log_level</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>lp_log_level</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>milp_log_level</td>
+<td>I</td>
+<td> -</td>
+<td>-</td>
+<td>-</td>
+<td>-</td>
+</tr>
+<tr>
+<td>nlp_log_at_root</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_log_level</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>oa_cuts_log_level</td>
+<td>I</td>
+<td> -</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>oa_log_frequency</td>
+<td>F</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>+</td>
+</tr>
+<tr>
+<td>oa_log_level</td>
+<td>I</td>
+<td> +</td>
+<td>-</td>
+<td>-</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:PrimalHeuristics">Primal Heuristics</a> </th>
+</tr>
+<tr>
+<td>feasibility_pump_objective_norm</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>fp_pass_infeasible</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>heuristic_RINS</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>heuristic_dive_MIP_fractional</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>heuristic_dive_MIP_vectorLength</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>heuristic_dive_fractional</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>heuristic_dive_vectorLength</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>heuristic_feasibility_pump</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pump_for_minlp</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Strongbranchingsetup">Strong branching setup</a> </th>
+</tr>
+<tr>
+<td>candidate_sort_criterion</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>maxmin_crit_have_sol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>maxmin_crit_no_sol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>min_number_strong_branch</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>number_before_trust_list</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>number_look_ahead</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>number_strong_branch_root</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>setup_pseudo_frac</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>trust_strong_branching_for_pseudo_cost</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+</tr>
+</table>
+}
+}
+\subsection{Algorithm choice}
+\label{sec:Algorithmchoice}
+\htmlanchor{sec:Algorithmchoice}
+\paragraph{algorithm:}\label{opt:algorithm} Choice of the algorithm. \\
+ This will preset some of the options of bonmin depending on the algorithm choice. The default value for this string option is "B-BB".
+\\ 
+Possible values:
+\begin{itemize}
+   \item B-BB: simple branch-and-bound algorithm,
+   \item B-OA: OA Decomposition algorithm,
+   \item B-QG: Quesada and Grossmann branch-and-cut algorithm,
+   \item B-Hyb: hybrid outer approximation based branch-and-cut,
+   \item B-Ecp: ECP cuts based branch-and-cut a la FilMINT.
+   \item B-iFP: Iterated Feasibility Pump for MINLP.
+\end{itemize}
+
+\subsection{Branch-and-bound options}
+\label{sec:Branch-and-boundoptions}
+\htmlanchor{sec:Branch-and-boundoptions}
+\paragraph{allowable\_fraction\_gap:}\label{opt:allowable_fraction_gap} Specify the value of relative gap under which the algorithm stops. \\
+ Stop the tree search when the gap between the objective value of the best known solution and the best bound on the objective of any solution is less than this fraction of the absolute value of the best known solution value. The valid range for this real option is 
+$-1 \cdot 10^{+20} \le {\tt allowable\_fraction\_gap } \le 1 \cdot 10^{+20}$
+and its default value is $0$.
+
+
+\paragraph{allowable\_gap:}\label{opt:allowable_gap} Specify the value of absolute gap under which the algorithm stops. \\
+ Stop the tree search when the gap between the objective value of the best known solution and the best bound on the objective of any solution is less than this. The valid range for this real option is 
+$-1 \cdot 10^{+20} \le {\tt allowable\_gap } \le 1 \cdot 10^{+20}$
+and its default value is $0$.
+
+
+\paragraph{cutoff:}\label{opt:cutoff} Specify cutoff value. \\
+ cutoff should be the value of a feasible solution known by the user (if any). The algorithm will only look for solutions better than cutoff. The valid range for this real option is 
+$-1 \cdot 10^{+100} \le {\tt cutoff } \le 1 \cdot 10^{+100}$
+and its default value is $1 \cdot 10^{+100}$.
+
+
+\paragraph{cutoff\_decr:}\label{opt:cutoff_decr} Specify cutoff decrement. \\
+ Specify the amount by which cutoff is decremented below a new best upper-bound (usually a small positive value but in non-convex problems it may be a negative value). The valid range for this real option is 
+$-1 \cdot 10^{+10} \le {\tt cutoff\_decr } \le 1 \cdot 10^{+10}$
+and its default value is $1 \cdot 10^{-05}$.
+
+
+\paragraph{enable\_dynamic\_nlp:}\label{opt:enable_dynamic_nlp} Enable dynamic linear and quadratic rows addition in nlp \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{integer\_tolerance:}\label{opt:integer_tolerance} Set integer tolerance. \\
+ Any number within that value of an integer is considered integer. The valid range for this real option is 
+$0 <  {\tt integer\_tolerance } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{iteration\_limit:}\label{opt:iteration_limit} Set the cumulative maximum number of iteration in the algorithm used to process nodes continuous relaxations in the branch-and-bound. \\
+ value 0 deactivates option. The valid range for this integer option is
+$0 \le {\tt iteration\_limit } <  {\tt +inf}$
+and its default value is $2147483647$.
+
+
+\paragraph{nlp\_failure\_behavior:}\label{opt:nlp_failure_behavior} Set the behavior when an NLP or a series of NLP are unsolved by Ipopt (we call unsolved an NLP for which Ipopt is not able to guarantee optimality within the specified tolerances). \\
+ If set to "fathom", the algorithm will fathom the node when Ipopt fails to find a solution to the nlp at that node within the specified tolerances. The algorithm then becomes a heuristic, and the user will be warned that the solution might not be optimal. The default value for this string option is "stop".
+\\ 
+Possible values:
+\begin{itemize}
+   \item stop: Stop when failure happens.
+   \item fathom: Continue when failure happens.
+\end{itemize}
+
+\paragraph{node\_comparison:}\label{opt:node_comparison} Choose the node selection strategy. \\
+ Choose the strategy for selecting the next node to be processed. The default value for this string option is "best-bound".
+\\ 
+Possible values:
+\begin{itemize}
+   \item best-bound: choose node with the smallest bound,
+   \item depth-first: Perform depth first search,
+   \item breadth-first: Perform breadth first search,
+   \item dynamic: Cbc dynamic strategy (starts with a depth first search and turn to best bound after 3 integer feasible solutions have been found).
+   \item best-guess: choose node with smallest guessed integer solution
+\end{itemize}
+
+\paragraph{node\_limit:}\label{opt:node_limit} Set the maximum number of nodes explored in the branch-and-bound search. \\
+ The valid range for this integer option is
+$0 \le {\tt node\_limit } <  {\tt +inf}$
+and its default value is $2147483647$.
+
+
+\paragraph{num\_cut\_passes:}\label{opt:num_cut_passes} Set the maximum number of cut passes at regular nodes of the branch-and-cut. \\
+ The valid range for this integer option is
+$0 \le {\tt num\_cut\_passes } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{num\_cut\_passes\_at\_root:}\label{opt:num_cut_passes_at_root} Set the maximum number of cut passes at regular nodes of the branch-and-cut. \\
+ The valid range for this integer option is
+$0 \le {\tt num\_cut\_passes\_at\_root } <  {\tt +inf}$
+and its default value is $20$.
+
+
+\paragraph{number\_before\_trust:}\label{opt:number_before_trust} Set the number of branches on a variable before its pseudo costs are to be believed in dynamic strong branching. \\
+ A value of 0 disables pseudo costs. The valid range for this integer option is
+$0 \le {\tt number\_before\_trust } <  {\tt +inf}$
+and its default value is $8$.
+
+
+\paragraph{number\_strong\_branch:}\label{opt:number_strong_branch} Choose the maximum number of variables considered for strong branching. \\
+ Set the number of variables on which to do strong branching. The valid range for this integer option is
+$0 \le {\tt number\_strong\_branch } <  {\tt +inf}$
+and its default value is $20$.
+
+
+\paragraph{random\_generator\_seed:}\label{opt:random_generator_seed} Set seed for random number generator (a value of -1 sets seeds to time since Epoch). \\
+ The valid range for this integer option is
+$-1 \le {\tt random\_generator\_seed } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{read\_solution\_file:}\label{opt:read_solution_file} Read a file with the optimal solution to test if algorithms cuts it. \\
+ For Debugging purposes only. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{solution\_limit:}\label{opt:solution_limit} Abort after that much integer feasible solution have been found by algorithm \\
+ value 0 deactivates option The valid range for this integer option is
+$0 \le {\tt solution\_limit } <  {\tt +inf}$
+and its default value is $2147483647$.
+
+
+\paragraph{sos\_constraints:}\label{opt:sos_constraints} Whether or not to activate SOS constraints. \\
+ (only type 1 SOS are supported at the moment) The default value for this string option is "enable".
+\\ 
+Possible values:
+\begin{itemize}
+   \item enable
+   \item disable
+\end{itemize}
+
+\paragraph{time\_limit:}\label{opt:time_limit} Set the global maximum computation time (in secs) for the algorithm. \\
+ The valid range for this real option is 
+$0 \le {\tt time\_limit } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+10}$.
+
+
+\paragraph{tree\_search\_strategy:}\label{opt:tree_search_strategy} Pick a strategy for traversing the tree \\
+ All strategies can be used in conjunction with any of the node comparison functions. Options which affect dfs-dive are max-backtracks-in-dive and max-dive-depth. The dfs-dive won't work in a non-convex problem where objective does not decrease down branches. The default value for this string option is "probed-dive".
+\\ 
+Possible values:
+\begin{itemize}
+   \item top-node:  Always pick the top node as sorted by the node comparison function
+   \item dive: Dive in the tree if possible, otherwise pick top node as sorted by the tree comparison function.
+   \item probed-dive: Dive in the tree exploring two children before continuing the dive at each level.
+   \item dfs-dive: Dive in the tree if possible doing a depth first search. Backtrack on leaves or when a prescribed depth is attained or when estimate of best possible integer feasible solution in subtree is worst than cutoff. Once a prescribed limit of backtracks is attained pick top node as sorted by the tree comparison function
+   \item dfs-dive-dynamic: Same as dfs-dive but once enough solution are found switch to best-bound and if too many nodes switch to depth-first.
+\end{itemize}
+
+\paragraph{variable\_selection:}\label{opt:variable_selection} Chooses variable selection strategy \\
+ The default value for this string option is "strong-branching".
+\\ 
+Possible values:
+\begin{itemize}
+   \item most-fractional: Choose most fractional variable
+   \item strong-branching: Perform strong branching
+   \item reliability-branching: Use reliability branching
+   \item qp-strong-branching: Perform strong branching with QP approximation
+   \item lp-strong-branching: Perform strong branching with LP approximation
+   \item nlp-strong-branching: Perform strong branching with NLP approximation
+   \item osi-simple: Osi method to do simple branching
+   \item osi-strong: Osi method to do strong branching
+   \item random: Method to choose branching variable randomly
+\end{itemize}
+
+\subsection{ECP cuts generation}
+\label{sec:ECPcutsgeneration}
+\htmlanchor{sec:ECPcutsgeneration}
+\paragraph{ecp\_abs\_tol:}\label{opt:ecp_abs_tol} Set the absolute termination tolerance for ECP rounds. \\
+ The valid range for this real option is 
+$0 \le {\tt ecp\_abs\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{ecp\_max\_rounds:}\label{opt:ecp_max_rounds} Set the maximal number of rounds of ECP cuts. \\
+ The valid range for this integer option is
+$0 \le {\tt ecp\_max\_rounds } <  {\tt +inf}$
+and its default value is $5$.
+
+
+\paragraph{ecp\_probability\_factor:}\label{opt:ecp_probability_factor} Factor appearing in formula for skipping ECP cuts. \\
+ Choosing -1 disables the skipping. The valid range for this real option is 
+${\tt -inf} <  {\tt ecp\_probability\_factor } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{ecp\_rel\_tol:}\label{opt:ecp_rel_tol} Set the relative termination tolerance for ECP rounds. \\
+ The valid range for this real option is 
+$0 \le {\tt ecp\_rel\_tol } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{filmint\_ecp\_cuts:}\label{opt:filmint_ecp_cuts} Specify the frequency (in terms of nodes) at which some a la filmint ecp cuts are generated. \\
+ A frequency of 0 amounts to to never solve the NLP relaxation. The valid range for this integer option is
+$0 \le {\tt filmint\_ecp\_cuts } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\subsection{Feasibility checker using OA cuts}
+\label{sec:FeasibilitycheckerusingOAcuts}
+\htmlanchor{sec:FeasibilitycheckerusingOAcuts}
+\paragraph{feas\_check\_cut\_types:}\label{opt:feas_check_cut_types} Choose the type of cuts generated when an integer feasible solution is found \\
+ If it seems too much memory is used should try Benders to use less The default value for this string option is "outer-approx".
+\\ 
+Possible values:
+\begin{itemize}
+   \item outer-approx: Generate a set of Outer Approximations cuts.
+   \item Benders: Generate a single Benders cut.
+\end{itemize}
+
+\paragraph{feas\_check\_discard\_policy:}\label{opt:feas_check_discard_policy} How cuts from feasibility checker are discarded \\
+ Normally to avoid cycle cuts from feasibility checker should not be discarded in the node where they are generated. However Cbc sometimes does it if no care is taken which can lead to an infinite loop in Bonmin (usually on simple problems). To avoid this one can instruct Cbc to never discard a cut but if we do that for all cuts it can lead to memory problems. The default policy here is to detect cycles and only then impose to Cbc to keep the cut. The two other alternative are to instruc [...]
+\\ 
+Possible values:
+\begin{itemize}
+   \item detect-cycles: Detect if a cycle occurs and only in this case force not to discard.
+   \item keep-all: Force cuts from feasibility checker not to be discarded (memory hungry but sometimes better).
+   \item treated-as-normal: Cuts from memory checker can be discarded as any other cuts (code may cycle then)
+\end{itemize}
+
+\paragraph{generate\_benders\_after\_so\_many\_oa:}\label{opt:generate_benders_after_so_many_oa} Specify that after so many oa cuts have been generated Benders cuts should be generated instead. \\
+ It seems that sometimes generating too many oa cuts slows down the optimization compared to Benders due to the size of the LP. With this option we specify that after so many OA cuts have been generated we should switch to Benders cuts. The valid range for this integer option is
+$0 \le {\tt generate\_benders\_after\_so\_many\_oa } <  {\tt +inf}$
+and its default value is $5000$.
+
+
+\subsection{MILP Solver}
+\label{sec:MILPSolver}
+\htmlanchor{sec:MILPSolver}
+\paragraph{cpx\_parallel\_strategy:}\label{opt:cpx_parallel_strategy} Strategy of parallel search mode in CPLEX. \\
+ -1 = opportunistic, 0 = automatic, 1 = deterministic (refer to CPLEX documentation) The valid range for this integer option is
+$-1 \le {\tt cpx\_parallel\_strategy } \le 1$
+and its default value is $0$.
+
+
+\paragraph{milp\_solver:}\label{opt:milp_solver} Choose the subsolver to solve MILP sub-problems in OA decompositions. \\
+  To use Cplex, a valid license is required and you should have compiled OsiCpx in COIN-OR  (see Osi documentation). The default value for this string option is "Cbc\_D".
+\\ 
+Possible values:
+\begin{itemize}
+   \item Cbc\_D: Coin Branch and Cut with its default
+   \item Cbc\_Par: Coin Branch and Cut with passed parameters
+   \item Cplex: IBM Cplex
+\end{itemize}
+
+\paragraph{milp\_strategy:}\label{opt:milp_strategy} Choose a strategy for MILPs. \\
+ The default value for this string option is "solve\_to\_optimality".
+\\ 
+Possible values:
+\begin{itemize}
+   \item find\_good\_sol: Stop sub milps when a solution improving the incumbent is found
+   \item solve\_to\_optimality: Solve MILPs to optimality
+\end{itemize}
+
+\paragraph{number\_cpx\_threads:}\label{opt:number_cpx_threads} Set number of threads to use with cplex. \\
+ (refer to CPLEX documentation) The valid range for this integer option is
+$0 \le {\tt number\_cpx\_threads } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\subsection{MILP cutting planes in hybrid algorithm}
+\label{sec:MILPcuttingplanesinhybridalgorithm}
+\htmlanchor{sec:MILPcuttingplanesinhybridalgorithm}
+\paragraph{2mir\_cuts:}\label{opt:2mir_cuts} Frequency (in terms of nodes) for generating 2-MIR cuts in branch-and-cut \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt 2mir\_cuts } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{Gomory\_cuts:}\label{opt:Gomory_cuts} Frequency (in terms of nodes) for generating Gomory cuts in branch-and-cut. \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt Gomory\_cuts } <  {\tt +inf}$
+and its default value is $-5$.
+
+
+\paragraph{clique\_cuts:}\label{opt:clique_cuts} Frequency (in terms of nodes) for generating clique cuts in branch-and-cut \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt clique\_cuts } <  {\tt +inf}$
+and its default value is $-5$.
+
+
+\paragraph{cover\_cuts:}\label{opt:cover_cuts} Frequency (in terms of nodes) for generating cover cuts in branch-and-cut \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt cover\_cuts } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{flow\_cover\_cuts:}\label{opt:flow_cover_cuts} Frequency (in terms of nodes) for generating flow cover cuts in branch-and-cut \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt flow\_cover\_cuts } <  {\tt +inf}$
+and its default value is $-5$.
+
+
+\paragraph{lift\_and\_project\_cuts:}\label{opt:lift_and_project_cuts} Frequency (in terms of nodes) for generating lift-and-project cuts in branch-and-cut \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt lift\_and\_project\_cuts } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{mir\_cuts:}\label{opt:mir_cuts} Frequency (in terms of nodes) for generating MIR cuts in branch-and-cut \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt mir\_cuts } <  {\tt +inf}$
+and its default value is $-5$.
+
+
+\paragraph{reduce\_and\_split\_cuts:}\label{opt:reduce_and_split_cuts} Frequency (in terms of nodes) for generating reduce-and-split cuts in branch-and-cut \\
+ If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but Cbc may decide to stop generating cuts, if not enough are generated at the root node, if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts. The valid range for this integer option is
+$-100 \le {\tt reduce\_and\_split\_cuts } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\subsection{NLP interface}
+\label{sec:NLPinterface}
+\htmlanchor{sec:NLPinterface}
+\paragraph{nlp\_solver:}\label{opt:nlp_solver} Choice of the solver for local optima of continuous NLP's \\
+ Note that option will work only if the specified solver has been installed. Ipopt will usually be installed with Bonmin by default. For FilterSQP please see http://www-unix.mcs.anl.gov/~leyffer/solvers.html on how to obtain it and https://projects.coin-or.org/Bonmin/wiki/HintTricks on how to configure Bonmin to use it. The default value for this string option is "Ipopt".
+\\ 
+Possible values:
+\begin{itemize}
+   \item Ipopt: Interior Point OPTimizer (https://projects.coin-or.org/Ipopt)
+   \item filterSQP: Sequential quadratic programming trust region algorithm (http://www-unix.mcs.anl.gov/~leyffer/solvers.html)
+   \item all: run all available solvers at each node
+\end{itemize}
+
+\paragraph{warm\_start:}\label{opt:warm_start} Select the warm start method \\
+ This will affect the function getWarmStart(), and as a consequence the warm starting in the various algorithms. The default value for this string option is "none".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: No warm start, just start NLPs from optimal solution of the root relaxation
+   \item fake\_basis: builds fake basis, useful for cut management in Cbc (warm start is the same as in none)
+   \item optimum: Warm start with direct parent optimum
+   \item interior\_point: Warm start with an interior point of direct parent
+\end{itemize}
+
+\subsection{NLP solution robustness}
+\label{sec:NLPsolutionrobustness}
+\htmlanchor{sec:NLPsolutionrobustness}
+\paragraph{max\_consecutive\_failures:}\label{opt:max_consecutive_failures} (temporarily removed) Number $n$ of consecutive unsolved problems before aborting a branch of the tree. \\
+ When $n > 0$, continue exploring a branch of the tree until $n$ consecutive problems in the branch are unsolved (we call unsolved a problem for which Ipopt can not guarantee optimality within the specified tolerances). The valid range for this integer option is
+$0 \le {\tt max\_consecutive\_failures } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{max\_random\_point\_radius:}\label{opt:max_random_point_radius} Set max value r for coordinate of a random point. \\
+ When picking a random point, coordinate i will be in the interval [min(max(l,-r),u-r), max(min(u,r),l+r)] (where l is the lower bound for the variable and u is its upper bound) The valid range for this real option is 
+$0 <  {\tt max\_random\_point\_radius } <  {\tt +inf}$
+and its default value is $100000$.
+
+
+\paragraph{num\_iterations\_suspect:}\label{opt:num_iterations_suspect} Number of iterations over which a node is considered "suspect" (for debugging purposes only, see detailed documentation). \\
+ When the number of iterations to solve a node is above this number, the subproblem at this node is considered to be suspect and it will be written into a file (set to -1 to deactivate this). The valid range for this integer option is
+$-1 \le {\tt num\_iterations\_suspect } <  {\tt +inf}$
+and its default value is $-1$.
+
+
+\paragraph{num\_retry\_unsolved\_random\_point:}\label{opt:num_retry_unsolved_random_point} Number $k$ of times that the algorithm will try to resolve an unsolved NLP with a random starting point (we call unsolved an NLP for which Ipopt is not able to guarantee optimality within the specified tolerances). \\
+ When Ipopt fails to solve a continuous NLP sub-problem, if $k > 0$, the algorithm will try again to solve the failed NLP with $k$ new randomly chosen starting points  or until the problem is solved with success. The valid range for this integer option is
+$0 \le {\tt num\_retry\_unsolved\_random\_point } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{random\_point\_perturbation\_interval:}\label{opt:random_point_perturbation_interval} Amount by which starting point is perturbed when choosing to pick random point by perturbing starting point \\
+ The valid range for this real option is 
+$0 <  {\tt random\_point\_perturbation\_interval } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{random\_point\_type:}\label{opt:random_point_type} method to choose a random starting point \\
+ The default value for this string option is "Jon".
+\\ 
+Possible values:
+\begin{itemize}
+   \item Jon: Choose random point uniformly between the bounds
+   \item Andreas: perturb the starting point of the problem within a prescribed interval
+   \item Claudia: perturb the starting point using the perturbation radius suffix information
+\end{itemize}
+
+\paragraph{resolve\_on\_small\_infeasibility:}\label{opt:resolve_on_small_infeasibility} If a locally infeasible problem is infeasible by less than this, resolve it with initial starting point. \\
+ It is set to 0 by default with Ipopt. When using FilterSQP, Bonmin sets it to a small value. The valid range for this real option is 
+$0 \le {\tt resolve\_on\_small\_infeasibility } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\subsection{NLP solves in hybrid algorithm (B-Hyb)}
+\label{sec:NLPsolvesinhybridalgorithm(B-Hyb)}
+\htmlanchor{sec:NLPsolvesinhybridalgorithm(B-Hyb)}
+\paragraph{nlp\_solve\_frequency:}\label{opt:nlp_solve_frequency} Specify the frequency (in terms of nodes) at which NLP relaxations are solved in B-Hyb. \\
+ A frequency of 0 amounts to to never solve the NLP relaxation. The valid range for this integer option is
+$0 \le {\tt nlp\_solve\_frequency } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{nlp\_solve\_max\_depth:}\label{opt:nlp_solve_max_depth} Set maximum depth in the tree at which NLP relaxations are solved in B-Hyb. \\
+ A depth of 0 amounts to to never solve the NLP relaxation. The valid range for this integer option is
+$0 \le {\tt nlp\_solve\_max\_depth } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{nlp\_solves\_per\_depth:}\label{opt:nlp_solves_per_depth} Set average number of nodes in the tree at which NLP relaxations are solved in B-Hyb for each depth. \\
+ The valid range for this real option is 
+$0 \le {\tt nlp\_solves\_per\_depth } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+100}$.
+
+
+\subsection{Nonconvex problems}
+\label{sec:Nonconvexproblems}
+\htmlanchor{sec:Nonconvexproblems}
+\paragraph{coeff\_var\_threshold:}\label{opt:coeff_var_threshold} Coefficient of variation threshold (for dynamic definition of cutoff\_decr). \\
+ The valid range for this real option is 
+$0 \le {\tt coeff\_var\_threshold } <  {\tt +inf}$
+and its default value is $0.1$.
+
+
+\paragraph{dynamic\_def\_cutoff\_decr:}\label{opt:dynamic_def_cutoff_decr} Do you want to define the parameter cutoff\_decr dynamically? \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{first\_perc\_for\_cutoff\_decr:}\label{opt:first_perc_for_cutoff_decr} The percentage used when, the coeff of variance is smaller than the threshold, to compute the cutoff\_decr dynamically. \\
+ The valid range for this real option is 
+${\tt -inf} <  {\tt first\_perc\_for\_cutoff\_decr } <  {\tt +inf}$
+and its default value is $-0.02$.
+
+
+\paragraph{max\_consecutive\_infeasible:}\label{opt:max_consecutive_infeasible} Number of consecutive infeasible subproblems before aborting a branch. \\
+ Will continue exploring a branch of the tree until "max\_consecutive\_infeasible"consecutive problems are locally infeasible by the NLP sub-solver. The valid range for this integer option is
+$0 \le {\tt max\_consecutive\_infeasible } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{num\_resolve\_at\_infeasibles:}\label{opt:num_resolve_at_infeasibles} Number $k$ of tries to resolve an infeasible node (other than the root) of the tree with different starting point. \\
+ The algorithm will solve all the infeasible nodes with $k$ different random starting points and will keep the best local optimum found. The valid range for this integer option is
+$0 \le {\tt num\_resolve\_at\_infeasibles } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{num\_resolve\_at\_node:}\label{opt:num_resolve_at_node} Number $k$ of tries to resolve a node (other than the root) of the tree with different starting point. \\
+ The algorithm will solve all the nodes with $k$ different random starting points and will keep the best local optimum found. The valid range for this integer option is
+$0 \le {\tt num\_resolve\_at\_node } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{num\_resolve\_at\_root:}\label{opt:num_resolve_at_root} Number $k$ of tries to resolve the root node with different starting points. \\
+ The algorithm will solve the root node with $k$ random starting points and will keep the best local optimum found. The valid range for this integer option is
+$0 \le {\tt num\_resolve\_at\_root } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{second\_perc\_for\_cutoff\_decr:}\label{opt:second_perc_for_cutoff_decr} The percentage used when, the coeff of variance is greater than the threshold, to compute the cutoff\_decr dynamically. \\
+ The valid range for this real option is 
+${\tt -inf} <  {\tt second\_perc\_for\_cutoff\_decr } <  {\tt +inf}$
+and its default value is $-0.05$.
+
+
+\subsection{Outer Approximation Decomposition (B-OA)}
+\label{sec:OuterApproximationDecomposition(B-OA)}
+\htmlanchor{sec:OuterApproximationDecomposition(B-OA)}
+\paragraph{oa\_decomposition:}\label{opt:oa_decomposition} If yes do initial OA decomposition \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\subsection{Outer Approximation cuts generation}
+\label{sec:OuterApproximationcutsgeneration}
+\htmlanchor{sec:OuterApproximationcutsgeneration}
+\paragraph{add\_only\_violated\_oa:}\label{opt:add_only_violated_oa} Do we add all OA cuts or only the ones violated by current point? \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Add all cuts
+   \item yes: Add only violated cuts
+\end{itemize}
+
+\paragraph{oa\_cuts\_scope:}\label{opt:oa_cuts_scope} Specify if OA cuts added are to be set globally or locally valid \\
+ The default value for this string option is "global".
+\\ 
+Possible values:
+\begin{itemize}
+   \item local: Cuts are treated as locally valid
+   \item global: Cuts are treated as globally valid
+\end{itemize}
+
+\paragraph{oa\_rhs\_relax:}\label{opt:oa_rhs_relax} Value by which to relax OA cut \\
+ RHS of OA constraints will be relaxed by this amount times the absolute value of the initial rhs if it is >= 1 (otherwise by this amount). The valid range for this real option is 
+$-0 \le {\tt oa\_rhs\_relax } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{tiny\_element:}\label{opt:tiny_element} Value for tiny element in OA cut \\
+ We will remove "cleanly" (by relaxing cut) an element lower than this. The valid range for this real option is 
+$-0 \le {\tt tiny\_element } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{very\_tiny\_element:}\label{opt:very_tiny_element} Value for very tiny element in OA cut \\
+ Algorithm will take the risk of neglecting an element lower than this. The valid range for this real option is 
+$-0 \le {\tt very\_tiny\_element } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-17}$.
+
+
+\subsection{Output and Loglevel}
+\label{sec:OutputandLoglevel}
+\htmlanchor{sec:OutputandLoglevel}
+\paragraph{bb\_log\_interval:}\label{opt:bb_log_interval} Interval at which node level output is printed. \\
+ Set the interval (in terms of number of nodes) at which a log on node resolutions (consisting of lower and upper bounds) is given. The valid range for this integer option is
+$0 \le {\tt bb\_log\_interval } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{bb\_log\_level:}\label{opt:bb_log_level} specify main branch-and-bound log level. \\
+ Set the level of output of the branch-and-bound : 0 - none, 1 - minimal, 2 - normal low, 3 - normal high The valid range for this integer option is
+$0 \le {\tt bb\_log\_level } \le 5$
+and its default value is $1$.
+
+
+\paragraph{file\_solution:}\label{opt:file_solution} Write a file bonmin.sol with the solution \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item yes
+   \item no
+\end{itemize}
+
+\paragraph{fp\_log\_frequency:}\label{opt:fp_log_frequency} display an update on lower and upper bounds in FP every n seconds \\
+ The valid range for this real option is 
+$0 <  {\tt fp\_log\_frequency } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{fp\_log\_level:}\label{opt:fp_log_level} specify FP iterations log level. \\
+ Set the level of output of OA decomposition solver : 0 - none, 1 - normal, 2 - verbose The valid range for this integer option is
+$0 \le {\tt fp\_log\_level } \le 2$
+and its default value is $1$.
+
+
+\paragraph{lp\_log\_level:}\label{opt:lp_log_level} specify LP log level. \\
+ Set the level of output of the linear programming sub-solver in B-Hyb or B-QG : 0 - none, 1 - minimal, 2 - normal low, 3 - normal high, 4 - verbose The valid range for this integer option is
+$0 \le {\tt lp\_log\_level } \le 4$
+and its default value is $0$.
+
+
+\paragraph{milp\_log\_level:}\label{opt:milp_log_level} specify MILP solver log level. \\
+ Set the level of output of the MILP subsolver in OA : 0 - none, 1 - minimal, 2 - normal low, 3 - normal high The valid range for this integer option is
+$0 \le {\tt milp\_log\_level } \le 4$
+and its default value is $0$.
+
+
+\paragraph{nlp\_log\_at\_root:}\label{opt:nlp_log_at_root} specify a different log level for root relaxation. \\
+ The valid range for this integer option is
+$0 \le {\tt nlp\_log\_at\_root } \le 12$
+and its default value is $0$.
+
+
+\paragraph{nlp\_log\_level:}\label{opt:nlp_log_level} specify NLP solver interface log level (independent from ipopt print\_level). \\
+ Set the level of output of the OsiTMINLPInterface : 0 - none, 1 - normal, 2 - verbose The valid range for this integer option is
+$0 \le {\tt nlp\_log\_level } \le 2$
+and its default value is $1$.
+
+
+\paragraph{oa\_cuts\_log\_level:}\label{opt:oa_cuts_log_level} level of log when generating OA cuts. \\
+ 0: outputs nothing,
+1: when a cut is generated, its violation and index of row from which it originates,
+2: always output violation of the cut.
+3: output generated cuts incidence vectors. The valid range for this integer option is
+$0 \le {\tt oa\_cuts\_log\_level } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{oa\_log\_frequency:}\label{opt:oa_log_frequency} display an update on lower and upper bounds in OA every n seconds \\
+ The valid range for this real option is 
+$0 <  {\tt oa\_log\_frequency } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{oa\_log\_level:}\label{opt:oa_log_level} specify OA iterations log level. \\
+ Set the level of output of OA decomposition solver : 0 - none, 1 - normal, 2 - verbose The valid range for this integer option is
+$0 \le {\tt oa\_log\_level } \le 2$
+and its default value is $1$.
+
+
+\subsection{Primal Heuristics}
+\label{sec:PrimalHeuristics}
+\htmlanchor{sec:PrimalHeuristics}
+\paragraph{feasibility\_pump\_objective\_norm:}\label{opt:feasibility_pump_objective_norm} Norm of feasibility pump objective function \\
+ The valid range for this integer option is
+$1 \le {\tt feasibility\_pump\_objective\_norm } \le 2$
+and its default value is $1$.
+
+
+\paragraph{fp\_pass\_infeasible:}\label{opt:fp_pass_infeasible} Say whether feasibility pump should claim to converge or not \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: When master MILP is infeasible just bail out (don't stop all algorithm). This is the option for using in B-Hyb.
+   \item yes: Claim convergence, numerically dangerous.
+\end{itemize}
+
+\paragraph{heuristic\_RINS:}\label{opt:heuristic_RINS} if yes runs the RINS heuristic \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{heuristic\_dive\_MIP\_fractional:}\label{opt:heuristic_dive_MIP_fractional} if yes runs the Dive MIP Fractional heuristic \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{heuristic\_dive\_MIP\_vectorLength:}\label{opt:heuristic_dive_MIP_vectorLength} if yes runs the Dive MIP VectorLength heuristic \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{heuristic\_dive\_fractional:}\label{opt:heuristic_dive_fractional} if yes runs the Dive Fractional heuristic \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{heuristic\_dive\_vectorLength:}\label{opt:heuristic_dive_vectorLength} if yes runs the Dive VectorLength heuristic \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{heuristic\_feasibility\_pump:}\label{opt:heuristic_feasibility_pump} whether the heuristic feasibility pump should be used \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{pump\_for\_minlp:}\label{opt:pump_for_minlp} whether to run the feasibility pump heuristic for MINLP \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\subsection{Strong branching setup}
+\label{sec:Strongbranchingsetup}
+\htmlanchor{sec:Strongbranchingsetup}
+\paragraph{candidate\_sort\_criterion:}\label{opt:candidate_sort_criterion} Choice of the criterion to choose candidates in strong-branching \\
+ The default value for this string option is "best-ps-cost".
+\\ 
+Possible values:
+\begin{itemize}
+   \item best-ps-cost: Sort by decreasing pseudo-cost
+   \item worst-ps-cost: Sort by increasing pseudo-cost
+   \item most-fractional: Sort by decreasing integer infeasibility
+   \item least-fractional: Sort by increasing integer infeasibility
+\end{itemize}
+
+\paragraph{maxmin\_crit\_have\_sol:}\label{opt:maxmin_crit_have_sol} Weight towards minimum in of lower and upper branching estimates when a solution has been found. \\
+ The valid range for this real option is 
+$0 \le {\tt maxmin\_crit\_have\_sol } \le 1$
+and its default value is $0.1$.
+
+
+\paragraph{maxmin\_crit\_no\_sol:}\label{opt:maxmin_crit_no_sol} Weight towards minimum in of lower and upper branching estimates when no solution has been found yet. \\
+ The valid range for this real option is 
+$0 \le {\tt maxmin\_crit\_no\_sol } \le 1$
+and its default value is $0.7$.
+
+
+\paragraph{min\_number\_strong\_branch:}\label{opt:min_number_strong_branch} Sets minimum number of variables for strong branching (overriding trust) \\
+ The valid range for this integer option is
+$0 \le {\tt min\_number\_strong\_branch } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{number\_before\_trust\_list:}\label{opt:number_before_trust_list} Set the number of branches on a variable before its pseudo costs are to be believed during setup of strong branching candidate list. \\
+ The default value is that of "number\_before\_trust" The valid range for this integer option is
+$-1 \le {\tt number\_before\_trust\_list } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{number\_look\_ahead:}\label{opt:number_look_ahead} Sets limit of look-ahead strong-branching trials \\
+ The valid range for this integer option is
+$0 \le {\tt number\_look\_ahead } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{number\_strong\_branch\_root:}\label{opt:number_strong_branch_root} Maximum number of variables considered for strong branching in root node. \\
+ The valid range for this integer option is
+$0 \le {\tt number\_strong\_branch\_root } <  {\tt +inf}$
+and its default value is $2147483647$.
+
+
+\paragraph{setup\_pseudo\_frac:}\label{opt:setup_pseudo_frac} Proportion of strong branching list that has to be taken from most-integer-infeasible list. \\
+ The valid range for this real option is 
+$0 \le {\tt setup\_pseudo\_frac } \le 1$
+and its default value is $0.5$.
+
+
+\paragraph{trust\_strong\_branching\_for\_pseudo\_cost:}\label{opt:trust_strong_branching_for_pseudo_cost} Whether or not to trust strong branching results for updating pseudo costs. \\
+ The default value for this string option is "yes".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
diff --git a/doc/options_list_filter_content.tex b/doc/options_list_filter_content.tex
new file mode 100644
index 0000000..10c4186
--- /dev/null
+++ b/doc/options_list_filter_content.tex
@@ -0,0 +1,188 @@
+\latexhtml{}{
+\HCode{
+<table border="1">
+<tr>
+<td>Option </td>
+<td> type </td>
+<td> B-BB</td>
+<td> B-OA</td>
+<td> B-QG</td>
+<td> B-Hyb</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:FilterSQPoptions">FilterSQP options</a> </th>
+</tr>
+<tr>
+<td> <a href="#opt:eps">eps</a> </td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:infty">infty</a> </td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:iprint">iprint</a> </td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:kmax">kmax</a> </td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:maxf">maxf</a> </td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:maxiter">maxiter</a> </td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:mlp">mlp</a> </td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:mxlws">mxlws</a> </td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:mxws">mxws</a> </td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:rho_init">rho_init</a> </td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:tt">tt</a> </td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td> <a href="#opt:ubd">ubd</a> </td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+</tr>
+</table>
+}
+}
+\subsection{FilterSQP options}
+\label{sec:FilterSQPoptions}
+\htmlanchor{sec:FilterSQPoptions}
+\paragraph{eps:}\label{opt:eps} Tolerance for SQP solver \\
+ The valid range for this real option is 
+$0 <  {\tt eps } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{infty:}\label{opt:infty} A large number \\
+ The valid range for this real option is 
+$0 <  {\tt infty } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+20}$.
+
+
+\paragraph{iprint:}\label{opt:iprint} Print level (0=silent, 3=verbose) \\
+ The valid range for this integer option is
+$0 \le {\tt iprint } \le 6$
+and its default value is $0$.
+
+
+\paragraph{kmax:}\label{opt:kmax} Dimension of null-space \\
+ The valid range for this integer option is
+$-1 \le {\tt kmax } <  {\tt +inf}$
+and its default value is $-1$.
+
+
+\paragraph{maxf:}\label{opt:maxf} Maximum filter length \\
+ The valid range for this integer option is
+$0 \le {\tt maxf } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{maxiter:}\label{opt:maxiter} Maximum number of iterations \\
+ The valid range for this integer option is
+$0 \le {\tt maxiter } <  {\tt +inf}$
+and its default value is $1000$.
+
+
+\paragraph{mlp:}\label{opt:mlp} Maximum level for degeneracy (bqpd) \\
+ The valid range for this integer option is
+$0 \le {\tt mlp } <  {\tt +inf}$
+and its default value is $1000$.
+
+
+\paragraph{mxlws:}\label{opt:mxlws} FINTEGER workspace increment \\
+ The valid range for this integer option is
+$0 \le {\tt mxlws } <  {\tt +inf}$
+and its default value is $500000$.
+
+
+\paragraph{mxws:}\label{opt:mxws} REAL workspace increment \\
+ The valid range for this integer option is
+$0 \le {\tt mxws } <  {\tt +inf}$
+and its default value is $2000000$.
+
+
+\paragraph{rho\_init:}\label{opt:rho_init} Initial trust region size \\
+ The valid range for this real option is 
+$0 <  {\tt rho\_init } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{tt:}\label{opt:tt} Parameter for upper bound on filter \\
+ The valid range for this real option is 
+$0 <  {\tt tt } <  {\tt +inf}$
+and its default value is $1.25$.
+
+
+\paragraph{ubd:}\label{opt:ubd} Parameter for upper bound on filter \\
+ The valid range for this real option is 
+$0 <  {\tt ubd } <  {\tt +inf}$
+and its default value is $100$.
+
+
diff --git a/doc/options_list_ipopt_content.tex b/doc/options_list_ipopt_content.tex
new file mode 100644
index 0000000..75126c0
--- /dev/null
+++ b/doc/options_list_ipopt_content.tex
@@ -0,0 +1,4526 @@
+\latexhtml{}{
+\HCode{
+<table border="1">
+<tr>
+<td>Option </td>
+<td> type </td>
+<td> B-BB</td>
+<td> B-OA</td>
+<td> B-QG</td>
+<td> B-Hyb</td>
+</tr>
+<tr>
+<td>sb</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:BarrierParameterUpdate">Barrier Parameter Update</a> </th>
+</tr>
+<tr>
+<td>adaptive_mu_globalization</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>adaptive_mu_kkt_norm_type</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>adaptive_mu_kkterror_red_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>adaptive_mu_kkterror_red_iters</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>adaptive_mu_monotone_init_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>adaptive_mu_restore_previous_iterate</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>barrier_tol_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>filter_margin_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>filter_max_margin</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>fixed_mu_oracle</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_allow_fast_monotone_decrease</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_init</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_linear_decrease_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_max_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_min</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_oracle</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_strategy</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_superlinear_decrease_power</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>quality_function_balancing_term</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>quality_function_centrality</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>quality_function_max_section_steps</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>quality_function_norm_type</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>quality_function_section_qf_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>quality_function_section_sigma_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>sigma_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>sigma_min</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>tau_min</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Convergence">Convergence</a> </th>
+</tr>
+<tr>
+<td>acceptable_compl_inf_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>acceptable_constr_viol_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>acceptable_dual_inf_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>acceptable_iter</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>acceptable_obj_change_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>acceptable_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>compl_inf_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>constr_viol_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>diverging_iterates_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>dual_inf_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_cpu_time</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_iter</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mu_target</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>s_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:DerivativeChecker">Derivative Checker</a> </th>
+</tr>
+<tr>
+<td>derivative_test</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>derivative_test_first_index</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>derivative_test_perturbation</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>derivative_test_print_all</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>derivative_test_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>findiff_perturbation</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>jacobian_approximation</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>point_perturbation_radius</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:HessianApproximation">Hessian Approximation</a> </th>
+</tr>
+<tr>
+<td>hessian_approximation</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>hessian_approximation_space</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_aug_solver</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_init_val</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_init_val_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_init_val_min</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_initialization</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_max_history</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_max_skipping</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_special_for_resto</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>limited_memory_update_type</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Initialization">Initialization</a> </th>
+</tr>
+<tr>
+<td>bound_frac</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>bound_mult_init_method</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>bound_mult_init_val</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>bound_push</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>constr_mult_init_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>least_square_init_duals</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>least_square_init_primal</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>slack_bound_frac</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>slack_bound_push</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:LineSearch">Line Search</a> </th>
+</tr>
+<tr>
+<td>accept_after_max_steps</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>accept_every_trial_step</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>alpha_for_y</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>alpha_for_y_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>alpha_min_frac</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>alpha_red_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>constraint_violation_norm_type</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>corrector_compl_avrg_red_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>corrector_type</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>delta</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>eta_phi</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>filter_reset_trigger</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>gamma_phi</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>gamma_theta</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>kappa_sigma</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>kappa_soc</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>line_search_method</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_filter_resets</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_soc</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nu_inc</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nu_init</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>obj_max_inc</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>recalc_y</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>recalc_y_feas_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>rho</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>s_phi</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>s_theta</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>skip_corr_if_neg_curv</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>skip_corr_in_monotone_mode</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>slack_move</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>theta_max_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>theta_min_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>tiny_step_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>tiny_step_y_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>watchdog_shortened_iter_trigger</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>watchdog_trial_iter_max</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:LinearSolver">Linear Solver</a> </th>
+</tr>
+<tr>
+<td>linear_scaling_on_demand</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>linear_solver</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>linear_system_scaling</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MA27LinearSolver">MA27 Linear Solver</a> </th>
+</tr>
+<tr>
+<td>ma27_ignore_singularity</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma27_la_init_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma27_liw_init_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma27_meminc_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma27_pivtol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma27_pivtolmax</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma27_skip_inertia_check</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MA28LinearSolver">MA28 Linear Solver</a> </th>
+</tr>
+<tr>
+<td>ma28_pivtol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MA57LinearSolver">MA57 Linear Solver</a> </th>
+</tr>
+<tr>
+<td>ma57_automatic_scaling</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma57_block_size</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma57_node_amalgamation</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma57_pivot_order</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma57_pivtol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma57_pivtolmax</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma57_pre_alloc</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma57_small_pivot_flag</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MA77LinearSolver">MA77 Linear Solver</a> </th>
+</tr>
+<tr>
+<td>ma77_buffer_lpage</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_buffer_npage</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_file_size</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_maxstore</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_nemin</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_order</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_print_level</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_small</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_static</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_u</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma77_umax</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MA86LinearSolver">MA86 Linear Solver</a> </th>
+</tr>
+<tr>
+<td>ma86_nemin</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma86_order</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma86_print_level</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma86_scaling</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma86_small</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma86_static</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma86_u</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma86_umax</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MA97LinearSolver">MA97 Linear Solver</a> </th>
+</tr>
+<tr>
+<td>ma97_nemin</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_order</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_print_level</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_scaling</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_scaling1</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_scaling2</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_scaling3</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_small</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_solve_blas3</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_switch1</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_switch2</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_switch3</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_u</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>ma97_umax</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:MumpsLinearSolver">Mumps Linear Solver</a> </th>
+</tr>
+<tr>
+<td>mumps_dep_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mumps_mem_percent</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mumps_permuting_scaling</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mumps_pivot_order</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mumps_pivtol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mumps_pivtolmax</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mumps_scaling</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:NLP">NLP</a> </th>
+</tr>
+<tr>
+<td>bound_relax_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>check_derivatives_for_naninf</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>dependency_detection_with_rhs</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>dependency_detector</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>fixed_variable_treatment</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>hessian_constant</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>honor_original_bounds</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>jac_c_constant</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>jac_d_constant</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>kappa_d</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_lower_bound_inf</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_upper_bound_inf</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>num_linear_variables</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:NLPScaling">NLP Scaling</a> </th>
+</tr>
+<tr>
+<td>nlp_scaling_constr_target_gradient</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_scaling_max_gradient</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_scaling_method</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_scaling_min_value</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>nlp_scaling_obj_target_gradient</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>obj_scaling_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Output">Output</a> </th>
+</tr>
+<tr>
+<td>file_print_level</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>inf_pr_output</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>option_file_name</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>output_file</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_frequency_iter</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_frequency_time</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_info_string</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_level</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_options_documentation</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_timing_statistics</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_user_options</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>replace_bounds</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>skip_finalize_solution_call</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:PardisoLinearSolver">Pardiso Linear Solver</a> </th>
+</tr>
+<tr>
+<td>pardiso_iter_coarse_size</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_iter_dropping_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_iter_dropping_schur</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_iter_inverse_norm_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_iter_max_levels</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_iter_max_row_fill</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_iter_relative_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_iterative</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_matching_strategy</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_max_droptol_corrections</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_max_iter</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_msglvl</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_out_of_core_power</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_redo_symbolic_fact_only_if_inertia_wrong</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_repeated_perturbation_means_singular</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pardiso_skip_inertia_check</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:RestorationPhase">Restoration Phase</a> </th>
+</tr>
+<tr>
+<td>bound_mult_reset_threshold</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>constr_mult_reset_threshold</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>evaluate_orig_obj_at_resto_trial</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>expect_infeasible_problem</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>expect_infeasible_problem_ctol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>expect_infeasible_problem_ytol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_resto_iter</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_soft_resto_iters</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>required_infeasibility_reduction</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>resto_failure_feasibility_threshold</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>resto_penalty_parameter</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>resto_proximity_weight</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>soft_resto_pderror_reduction_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>start_with_resto</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:StepCalculation">Step Calculation</a> </th>
+</tr>
+<tr>
+<td>fast_step_computation</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>first_hessian_perturbation</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>jacobian_regularization_exponent</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>jacobian_regularization_value</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_hessian_perturbation</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>max_refinement_steps</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mehrotra_algorithm</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>min_hessian_perturbation</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>min_refinement_steps</td>
+<td>I</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>neg_curv_test_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>perturb_always_cd</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>perturb_dec_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>perturb_inc_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>perturb_inc_fact_first</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>residual_improvement_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>residual_ratio_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>residual_ratio_singular</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Uncategorized">Uncategorized</a> </th>
+</tr>
+<tr>
+<td>warm_start_target_mu</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:Undocumented">Undocumented</a> </th>
+</tr>
+<tr>
+<td>adaptive_mu_safeguard_factor</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>chi_cup</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>chi_hat</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>chi_tilde</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>delta_y_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>epsilon_c</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>eta_min</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>eta_penalty</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>fast_des_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>gamma_hat</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>gamma_tilde</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>kappa_x_dis</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>kappa_y_dis</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>magic_steps</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>min_alpha_primal</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mult_diverg_feasibility_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>mult_diverg_y_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>never_use_fact_cgpen_direction</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>never_use_piecewise_penalty_ls</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pen_des_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pen_init_fac</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>pen_theta_max_fact</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>penalty_init_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>penalty_init_min</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>penalty_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>penalty_update_compl_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>penalty_update_infeasibility_tol</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>piecewisepenalty_gamma_infeasi</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>piecewisepenalty_gamma_obj</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>print_options_latex_mode</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>suppress_all_output</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>theta_min</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>vartheta</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>wsmp_iterative</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>   <th colspan=9> <a href="#sec:WarmStart">Warm Start</a> </th>
+</tr>
+<tr>
+<td>warm_start_bound_frac</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_bound_push</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_entire_iterate</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_init_point</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_mult_bound_push</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_mult_init_max</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_same_structure</td>
+<td>S</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_slack_bound_frac</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+<tr>
+<td>warm_start_slack_bound_push</td>
+<td>F</td>
+<td> +</td>
+<td>+</td>
+<td>+</td>
+<td>+</td>
+</tr>
+</tr>
+</table>
+}
+}
+\paragraph{sb:}\label{opt:sb} ~ \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\subsection{Barrier Parameter Update}
+\label{sec:BarrierParameterUpdate}
+\htmlanchor{sec:BarrierParameterUpdate}
+\paragraph{adaptive\_mu\_globalization:}\label{opt:adaptive_mu_globalization} Globalization strategy for the adaptive mu selection mode. \\
+ To achieve global convergence of the adaptive version, the algorithm has to switch to the monotone mode (Fiacco-McCormick approach) when convergence does not seem to appear.  This option sets the criterion used to decide when to do this switch. (Only used if option "mu\_strategy" is chosen as "adaptive".) The default value for this string option is "obj-constr-filter".
+\\ 
+Possible values:
+\begin{itemize}
+   \item kkt-error: nonmonotone decrease of kkt-error
+   \item obj-constr-filter: 2-dim filter for objective and constraint violation
+   \item never-monotone-mode: disables globalization
+\end{itemize}
+
+\paragraph{adaptive\_mu\_kkt\_norm\_type:}\label{opt:adaptive_mu_kkt_norm_type} Norm used for the KKT error in the adaptive mu globalization strategies. \\
+ When computing the KKT error for the globalization strategies, the norm to be used is specified with this option. Note, this options is also used in the QualityFunctionMuOracle. The default value for this string option is "2-norm-squared".
+\\ 
+Possible values:
+\begin{itemize}
+   \item 1-norm: use the 1-norm (abs sum)
+   \item 2-norm-squared: use the 2-norm squared (sum of squares)
+   \item max-norm: use the infinity norm (max)
+   \item 2-norm: use 2-norm
+\end{itemize}
+
+\paragraph{adaptive\_mu\_kkterror\_red\_fact:}\label{opt:adaptive_mu_kkterror_red_fact} Sufficient decrease factor for "kkt-error" globalization strategy. \\
+ For the "kkt-error" based globalization strategy, the error must decrease by this factor to be deemed sufficient decrease. The valid range for this real option is 
+$0 <  {\tt adaptive\_mu\_kkterror\_red\_fact } <  1$
+and its default value is $0.9999$.
+
+
+\paragraph{adaptive\_mu\_kkterror\_red\_iters:}\label{opt:adaptive_mu_kkterror_red_iters} Maximum number of iterations requiring sufficient progress. \\
+ For the "kkt-error" based globalization strategy, sufficient progress must be made for "adaptive\_mu\_kkterror\_red\_iters" iterations. If this number of iterations is exceeded, the globalization strategy switches to the monotone mode. The valid range for this integer option is
+$0 \le {\tt adaptive\_mu\_kkterror\_red\_iters } <  {\tt +inf}$
+and its default value is $4$.
+
+
+\paragraph{adaptive\_mu\_monotone\_init\_factor:}\label{opt:adaptive_mu_monotone_init_factor} Determines the initial value of the barrier parameter when switching to the monotone mode. \\
+ When the globalization strategy for the adaptive barrier algorithm switches to the monotone mode and fixed\_mu\_oracle is chosen as "average\_compl", the barrier parameter is set to the current average complementarity times the value of "adaptive\_mu\_monotone\_init\_factor". The valid range for this real option is 
+$0 <  {\tt adaptive\_mu\_monotone\_init\_factor } <  {\tt +inf}$
+and its default value is $0.8$.
+
+
+\paragraph{adaptive\_mu\_restore\_previous\_iterate:}\label{opt:adaptive_mu_restore_previous_iterate} Indicates if the previous iterate should be restored if the monotone mode is entered. \\
+ When the globalization strategy for the adaptive barrier algorithm switches to the monotone mode, it can either start from the most recent iterate (no), or from the last iterate that was accepted (yes). The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't restore accepted iterate
+   \item yes: restore accepted iterate
+\end{itemize}
+
+\paragraph{barrier\_tol\_factor:}\label{opt:barrier_tol_factor} Factor for mu in barrier stop test. \\
+ The convergence tolerance for each barrier problem in the monotone mode is the value of the barrier parameter times "barrier\_tol\_factor". This option is also used in the adaptive mu strategy during the monotone mode. (This is kappa\_epsilon in implementation paper). The valid range for this real option is 
+$0 <  {\tt barrier\_tol\_factor } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{filter\_margin\_fact:}\label{opt:filter_margin_fact} Factor determining width of margin for obj-constr-filter adaptive globalization strategy. \\
+ When using the adaptive globalization strategy, "obj-constr-filter", sufficient progress for a filter entry is defined as follows: (new obj) < (filter obj) - filter\_margin\_fact*(new constr-viol) OR (new constr-viol) < (filter constr-viol) - filter\_margin\_fact*(new constr-viol).  For the description of the "kkt-error-filter" option see "filter\_max\_margin". The valid range for this real option is 
+$0 <  {\tt filter\_margin\_fact } <  1$
+and its default value is $1 \cdot 10^{-05}$.
+
+
+\paragraph{filter\_max\_margin:}\label{opt:filter_max_margin} Maximum width of margin in obj-constr-filter adaptive globalization strategy. \\
+ The valid range for this real option is 
+$0 <  {\tt filter\_max\_margin } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{fixed\_mu\_oracle:}\label{opt:fixed_mu_oracle} Oracle for the barrier parameter when switching to fixed mode. \\
+ Determines how the first value of the barrier parameter should be computed when switching to the "monotone mode" in the adaptive strategy. (Only considered if "adaptive" is selected for option "mu\_strategy".) The default value for this string option is "average\_compl".
+\\ 
+Possible values:
+\begin{itemize}
+   \item probing: Mehrotra's probing heuristic
+   \item loqo: LOQO's centrality rule
+   \item quality-function: minimize a quality function
+   \item average\_compl: base on current average complementarity
+\end{itemize}
+
+\paragraph{mu\_allow\_fast\_monotone\_decrease:}\label{opt:mu_allow_fast_monotone_decrease} Allow skipping of barrier problem if barrier test is already met. \\
+ If set to "no", the algorithm enforces at least one iteration per barrier problem, even if the barrier test is already met for the updated barrier parameter. The default value for this string option is "yes".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Take at least one iteration per barrier problem
+   \item yes: Allow fast decrease of mu if barrier test it met
+\end{itemize}
+
+\paragraph{mu\_init:}\label{opt:mu_init} Initial value for the barrier parameter. \\
+ This option determines the initial value for the barrier parameter (mu).  It is only relevant in the monotone, Fiacco-McCormick version of the algorithm. (i.e., if "mu\_strategy" is chosen as "monotone") The valid range for this real option is 
+$0 <  {\tt mu\_init } <  {\tt +inf}$
+and its default value is $0.1$.
+
+
+\paragraph{mu\_linear\_decrease\_factor:}\label{opt:mu_linear_decrease_factor} Determines linear decrease rate of barrier parameter. \\
+ For the Fiacco-McCormick update procedure the new barrier parameter mu is obtained by taking the minimum of mu*"mu\_linear\_decrease\_factor" and mu\^"superlinear\_decrease\_power".  (This is kappa\_mu in implementation paper.) This option is also used in the adaptive mu strategy during the monotone mode. The valid range for this real option is 
+$0 <  {\tt mu\_linear\_decrease\_factor } <  1$
+and its default value is $0.2$.
+
+
+\paragraph{mu\_max:}\label{opt:mu_max} Maximum value for barrier parameter. \\
+ This option specifies an upper bound on the barrier parameter in the adaptive mu selection mode.  If this option is set, it overwrites the effect of mu\_max\_fact. (Only used if option "mu\_strategy" is chosen as "adaptive".) The valid range for this real option is 
+$0 <  {\tt mu\_max } <  {\tt +inf}$
+and its default value is $100000$.
+
+
+\paragraph{mu\_max\_fact:}\label{opt:mu_max_fact} Factor for initialization of maximum value for barrier parameter. \\
+ This option determines the upper bound on the barrier parameter.  This upper bound is computed as the average complementarity at the initial point times the value of this option. (Only used if option "mu\_strategy" is chosen as "adaptive".) The valid range for this real option is 
+$0 <  {\tt mu\_max\_fact } <  {\tt +inf}$
+and its default value is $1000$.
+
+
+\paragraph{mu\_min:}\label{opt:mu_min} Minimum value for barrier parameter. \\
+ This option specifies the lower bound on the barrier parameter in the adaptive mu selection mode. By default, it is set to the minimum of 1e-11 and min("tol","compl\_inf\_tol")/("barrier\_tol\_factor"+1), which should be a reasonable value. (Only used if option "mu\_strategy" is chosen as "adaptive".) The valid range for this real option is 
+$0 <  {\tt mu\_min } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-11}$.
+
+
+\paragraph{mu\_oracle:}\label{opt:mu_oracle} Oracle for a new barrier parameter in the adaptive strategy. \\
+ Determines how a new barrier parameter is computed in each "free-mode" iteration of the adaptive barrier parameter strategy. (Only considered if "adaptive" is selected for option "mu\_strategy"). The default value for this string option is "quality-function".
+\\ 
+Possible values:
+\begin{itemize}
+   \item probing: Mehrotra's probing heuristic
+   \item loqo: LOQO's centrality rule
+   \item quality-function: minimize a quality function
+\end{itemize}
+
+\paragraph{mu\_strategy:}\label{opt:mu_strategy} Update strategy for barrier parameter. \\
+ Determines which barrier parameter update strategy is to be used. The default value for this string option is "monotone".
+\\ 
+Possible values:
+\begin{itemize}
+   \item monotone: use the monotone (Fiacco-McCormick) strategy
+   \item adaptive: use the adaptive update strategy
+\end{itemize}
+
+\paragraph{mu\_superlinear\_decrease\_power:}\label{opt:mu_superlinear_decrease_power} Determines superlinear decrease rate of barrier parameter. \\
+ For the Fiacco-McCormick update procedure the new barrier parameter mu is obtained by taking the minimum of mu*"mu\_linear\_decrease\_factor" and mu\^"superlinear\_decrease\_power".  (This is theta\_mu in implementation paper.) This option is also used in the adaptive mu strategy during the monotone mode. The valid range for this real option is 
+$1 <  {\tt mu\_superlinear\_decrease\_power } <  2$
+and its default value is $1.5$.
+
+
+\paragraph{quality\_function\_balancing\_term:}\label{opt:quality_function_balancing_term} The balancing term included in the quality function for centrality. \\
+ This determines whether a term is added to the quality function that penalizes situations where the complementarity is much smaller than dual and primal infeasibilities. (Only used if option "mu\_oracle" is set to "quality-function".) The default value for this string option is "none".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: no balancing term is added
+   \item cubic: Max(0,Max(dual\_inf,primal\_inf)-compl)\^3
+\end{itemize}
+
+\paragraph{quality\_function\_centrality:}\label{opt:quality_function_centrality} The penalty term for centrality that is included in quality function. \\
+ This determines whether a term is added to the quality function to penalize deviation from centrality with respect to complementarity.  The complementarity measure here is the xi in the Loqo update rule. (Only used if option "mu\_oracle" is set to "quality-function".) The default value for this string option is "none".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: no penalty term is added
+   \item log: complementarity * the log of the centrality measure
+   \item reciprocal: complementarity * the reciprocal of the centrality measure
+   \item cubed-reciprocal: complementarity * the reciprocal of the centrality measure cubed
+\end{itemize}
+
+\paragraph{quality\_function\_max\_section\_steps:}\label{opt:quality_function_max_section_steps} Maximum number of search steps during direct search procedure determining the optimal centering parameter. \\
+ The golden section search is performed for the quality function based mu oracle. (Only used if option "mu\_oracle" is set to "quality-function".) The valid range for this integer option is
+$0 \le {\tt quality\_function\_max\_section\_steps } <  {\tt +inf}$
+and its default value is $8$.
+
+
+\paragraph{quality\_function\_norm\_type:}\label{opt:quality_function_norm_type} Norm used for components of the quality function. \\
+ (Only used if option "mu\_oracle" is set to "quality-function".) The default value for this string option is "2-norm-squared".
+\\ 
+Possible values:
+\begin{itemize}
+   \item 1-norm: use the 1-norm (abs sum)
+   \item 2-norm-squared: use the 2-norm squared (sum of squares)
+   \item max-norm: use the infinity norm (max)
+   \item 2-norm: use 2-norm
+\end{itemize}
+
+\paragraph{quality\_function\_section\_qf\_tol:}\label{opt:quality_function_section_qf_tol} Tolerance for the golden section search procedure determining the optimal centering parameter (in the function value space). \\
+ The golden section search is performed for the quality function based mu oracle. (Only used if option "mu\_oracle" is set to "quality-function".) The valid range for this real option is 
+$0 \le {\tt quality\_function\_section\_qf\_tol } <  1$
+and its default value is $0$.
+
+
+\paragraph{quality\_function\_section\_sigma\_tol:}\label{opt:quality_function_section_sigma_tol} Tolerance for the section search procedure determining the optimal centering parameter (in sigma space). \\
+ The golden section search is performed for the quality function based mu oracle. (Only used if option "mu\_oracle" is set to "quality-function".) The valid range for this real option is 
+$0 \le {\tt quality\_function\_section\_sigma\_tol } <  1$
+and its default value is $0.01$.
+
+
+\paragraph{sigma\_max:}\label{opt:sigma_max} Maximum value of the centering parameter. \\
+ This is the upper bound for the centering parameter chosen by the quality function based barrier parameter update. (Only used if option "mu\_oracle" is set to "quality-function".) The valid range for this real option is 
+$0 <  {\tt sigma\_max } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{sigma\_min:}\label{opt:sigma_min} Minimum value of the centering parameter. \\
+ This is the lower bound for the centering parameter chosen by the quality function based barrier parameter update. (Only used if option "mu\_oracle" is set to "quality-function".) The valid range for this real option is 
+$0 \le {\tt sigma\_min } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{tau\_min:}\label{opt:tau_min} Lower bound on fraction-to-the-boundary parameter tau. \\
+ (This is tau\_min in the implementation paper.)  This option is also used in the adaptive mu strategy during the monotone mode. The valid range for this real option is 
+$0 <  {\tt tau\_min } <  1$
+and its default value is $0.99$.
+
+
+\subsection{Convergence}
+\label{sec:Convergence}
+\htmlanchor{sec:Convergence}
+\paragraph{acceptable\_compl\_inf\_tol:}\label{opt:acceptable_compl_inf_tol} "Acceptance" threshold for the complementarity conditions. \\
+ Absolute tolerance on the complementarity. "Acceptable" termination requires that the max-norm of the (unscaled) complementarity is less than this threshold; see also acceptable\_tol. The valid range for this real option is 
+$0 <  {\tt acceptable\_compl\_inf\_tol } <  {\tt +inf}$
+and its default value is $0.01$.
+
+
+\paragraph{acceptable\_constr\_viol\_tol:}\label{opt:acceptable_constr_viol_tol} "Acceptance" threshold for the constraint violation. \\
+ Absolute tolerance on the constraint violation. "Acceptable" termination requires that the max-norm of the (unscaled) constraint violation is less than this threshold; see also acceptable\_tol. The valid range for this real option is 
+$0 <  {\tt acceptable\_constr\_viol\_tol } <  {\tt +inf}$
+and its default value is $0.01$.
+
+
+\paragraph{acceptable\_dual\_inf\_tol:}\label{opt:acceptable_dual_inf_tol} "Acceptance" threshold for the dual infeasibility. \\
+ Absolute tolerance on the dual infeasibility. "Acceptable" termination requires that the (max-norm of the unscaled) dual infeasibility is less than this threshold; see also acceptable\_tol. The valid range for this real option is 
+$0 <  {\tt acceptable\_dual\_inf\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+10}$.
+
+
+\paragraph{acceptable\_iter:}\label{opt:acceptable_iter} Number of "acceptable" iterates before triggering termination. \\
+ If the algorithm encounters this many successive "acceptable" iterates (see "acceptable\_tol"), it terminates, assuming that the problem has been solved to best possible accuracy given round-off.  If it is set to zero, this heuristic is disabled. The valid range for this integer option is
+$0 \le {\tt acceptable\_iter } <  {\tt +inf}$
+and its default value is $15$.
+
+
+\paragraph{acceptable\_obj\_change\_tol:}\label{opt:acceptable_obj_change_tol} "Acceptance" stopping criterion based on objective function change. \\
+ If the relative change of the objective function (scaled by Max(1,|f(x)|)) is less than this value, this part of the acceptable tolerance termination is satisfied; see also acceptable\_tol.  This is useful for the quasi-Newton option, which has trouble to bring down the dual infeasibility. The valid range for this real option is 
+$0 \le {\tt acceptable\_obj\_change\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+20}$.
+
+
+\paragraph{acceptable\_tol:}\label{opt:acceptable_tol} "Acceptable" convergence tolerance (relative). \\
+ Determines which (scaled) overall optimality error is considered to be "acceptable." There are two levels of termination criteria.  If the usual "desired" tolerances (see tol, dual\_inf\_tol etc) are satisfied at an iteration, the algorithm immediately terminates with a success message.  On the other hand, if the algorithm encounters "acceptable\_iter" many iterations in a row that are considered "acceptable", it will terminate before the desired convergence tolerance is met. This is us [...]
+$0 <  {\tt acceptable\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{compl\_inf\_tol:}\label{opt:compl_inf_tol} Desired threshold for the complementarity conditions. \\
+ Absolute tolerance on the complementarity. Successful termination requires that the max-norm of the (unscaled) complementarity is less than this threshold. The valid range for this real option is 
+$0 <  {\tt compl\_inf\_tol } <  {\tt +inf}$
+and its default value is $0.0001$.
+
+
+\paragraph{constr\_viol\_tol:}\label{opt:constr_viol_tol} Desired threshold for the constraint violation. \\
+ Absolute tolerance on the constraint violation. Successful termination requires that the max-norm of the (unscaled) constraint violation is less than this threshold. The valid range for this real option is 
+$0 <  {\tt constr\_viol\_tol } <  {\tt +inf}$
+and its default value is $0.0001$.
+
+
+\paragraph{diverging\_iterates\_tol:}\label{opt:diverging_iterates_tol} Threshold for maximal value of primal iterates. \\
+ If any component of the primal iterates exceeded this value (in absolute terms), the optimization is aborted with the exit message that the iterates seem to be diverging. The valid range for this real option is 
+$0 <  {\tt diverging\_iterates\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+20}$.
+
+
+\paragraph{dual\_inf\_tol:}\label{opt:dual_inf_tol} Desired threshold for the dual infeasibility. \\
+ Absolute tolerance on the dual infeasibility. Successful termination requires that the max-norm of the (unscaled) dual infeasibility is less than this threshold. The valid range for this real option is 
+$0 <  {\tt dual\_inf\_tol } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{max\_cpu\_time:}\label{opt:max_cpu_time} Maximum number of CPU seconds. \\
+ A limit on CPU seconds that Ipopt can use to solve one problem.  If during the convergence check this limit is exceeded, Ipopt will terminate with a corresponding error message. The valid range for this real option is 
+$0 <  {\tt max\_cpu\_time } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+06}$.
+
+
+\paragraph{max\_iter:}\label{opt:max_iter} Maximum number of iterations. \\
+ The algorithm terminates with an error message if the number of iterations exceeded this number. The valid range for this integer option is
+$0 \le {\tt max\_iter } <  {\tt +inf}$
+and its default value is $3000$.
+
+
+\paragraph{mu\_target:}\label{opt:mu_target} Desired value of complementarity. \\
+ Usually, the barrier parameter is driven to zero and the termination test for complementarity is measured with respect to zero complementarity.  However, in some cases it might be desired to have Ipopt solve barrier problem for strictly positive value of the barrier parameter.  In this case, the value of "mu\_target" specifies the final value of the barrier parameter, and the termination tests are then defined with respect to the barrier problem for this value of the barrier parameter.  [...]
+$0 \le {\tt mu\_target } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{s\_max:}\label{opt:s_max} Scaling threshold for the NLP error. \\
+ (See paragraph after Eqn. (6) in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt s\_max } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{tol:}\label{opt:tol} Desired convergence tolerance (relative). \\
+ Determines the convergence tolerance for the algorithm.  The algorithm terminates successfully, if the (scaled) NLP error becomes smaller than this value, and if the (absolute) criteria according to "dual\_inf\_tol", "primal\_inf\_tol", and "compl\_inf\_tol" are met.  (This is epsilon\_tol in Eqn. (6) in implementation paper).  See also "acceptable\_tol" as a second termination criterion.  Note, some other algorithmic features also use this quantity to determine thresholds etc. The vali [...]
+$0 <  {\tt tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\subsection{Derivative Checker}
+\label{sec:DerivativeChecker}
+\htmlanchor{sec:DerivativeChecker}
+\paragraph{derivative\_test:}\label{opt:derivative_test} Enable derivative checker \\
+ If this option is enabled, a (slow!) derivative test will be performed before the optimization.  The test is performed at the user provided starting point and marks derivative values that seem suspicious The default value for this string option is "none".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: do not perform derivative test
+   \item first-order: perform test of first derivatives at starting point
+   \item second-order: perform test of first and second derivatives at starting point
+   \item only-second-order: perform test of second derivatives at starting point
+\end{itemize}
+
+\paragraph{derivative\_test\_first\_index:}\label{opt:derivative_test_first_index} Index of first quantity to be checked by derivative checker \\
+ If this is set to -2, then all derivatives are checked.  Otherwise, for the first derivative test it specifies the first variable for which the test is done (counting starts at 0).  For second derivatives, it specifies the first constraint for which the test is done; counting of constraint indices starts at 0, and -1 refers to the objective function Hessian. The valid range for this integer option is
+$-2 \le {\tt derivative\_test\_first\_index } <  {\tt +inf}$
+and its default value is $-2$.
+
+
+\paragraph{derivative\_test\_perturbation:}\label{opt:derivative_test_perturbation} Size of the finite difference perturbation in derivative test. \\
+ This determines the relative perturbation of the variable entries. The valid range for this real option is 
+$0 <  {\tt derivative\_test\_perturbation } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{derivative\_test\_print\_all:}\label{opt:derivative_test_print_all} Indicates whether information for all estimated derivatives should be printed. \\
+ Determines verbosity of derivative checker. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Print only suspect derivatives
+   \item yes: Print all derivatives
+\end{itemize}
+
+\paragraph{derivative\_test\_tol:}\label{opt:derivative_test_tol} Threshold for indicating wrong derivative. \\
+ If the relative deviation of the estimated derivative from the given one is larger than this value, the corresponding derivative is marked as wrong. The valid range for this real option is 
+$0 <  {\tt derivative\_test\_tol } <  {\tt +inf}$
+and its default value is $0.0001$.
+
+
+\paragraph{findiff\_perturbation:}\label{opt:findiff_perturbation} Size of the finite difference perturbation for derivative approximation. \\
+ This determines the relative perturbation of the variable entries. The valid range for this real option is 
+$0 <  {\tt findiff\_perturbation } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-07}$.
+
+
+\paragraph{jacobian\_approximation:}\label{opt:jacobian_approximation} Specifies technique to compute constraint Jacobian \\
+ The default value for this string option is "exact".
+\\ 
+Possible values:
+\begin{itemize}
+   \item exact: user-provided derivatives
+   \item finite-difference-values: user-provided structure, values by finite differences
+\end{itemize}
+
+\paragraph{point\_perturbation\_radius:}\label{opt:point_perturbation_radius} Maximal perturbation of an evaluation point. \\
+ If a random perturbation of a points is required, this number indicates the maximal perturbation.  This is for example used when determining the center point at which the finite difference derivative test is executed. The valid range for this real option is 
+$0 \le {\tt point\_perturbation\_radius } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\subsection{Hessian Approximation}
+\label{sec:HessianApproximation}
+\htmlanchor{sec:HessianApproximation}
+\paragraph{hessian\_approximation:}\label{opt:hessian_approximation} Indicates what Hessian information is to be used. \\
+ This determines which kind of information for the Hessian of the Lagrangian function is used by the algorithm. The default value for this string option is "exact".
+\\ 
+Possible values:
+\begin{itemize}
+   \item exact: Use second derivatives provided by the NLP.
+   \item limited-memory: Perform a limited-memory quasi-Newton approximation
+\end{itemize}
+
+\paragraph{hessian\_approximation\_space:}\label{opt:hessian_approximation_space} Indicates in which subspace the Hessian information is to be approximated. \\
+ The default value for this string option is "nonlinear-variables".
+\\ 
+Possible values:
+\begin{itemize}
+   \item nonlinear-variables: only in space of nonlinear variables.
+   \item all-variables: in space of all variables (without slacks)
+\end{itemize}
+
+\paragraph{limited\_memory\_aug\_solver:}\label{opt:limited_memory_aug_solver} Strategy for solving the augmented system for low-rank Hessian. \\
+ The default value for this string option is "sherman-morrison".
+\\ 
+Possible values:
+\begin{itemize}
+   \item sherman-morrison: use Sherman-Morrison formula
+   \item extended: use an extended augmented system
+\end{itemize}
+
+\paragraph{limited\_memory\_init\_val:}\label{opt:limited_memory_init_val} Value for B0 in low-rank update. \\
+ The starting matrix in the low rank update, B0, is chosen to be this multiple of the identity in the first iteration (when no updates have been performed yet), and is constantly chosen as this value, if "limited\_memory\_initialization" is "constant". The valid range for this real option is 
+$0 <  {\tt limited\_memory\_init\_val } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{limited\_memory\_init\_val\_max:}\label{opt:limited_memory_init_val_max} Upper bound on value for B0 in low-rank update. \\
+ The starting matrix in the low rank update, B0, is chosen to be this multiple of the identity in the first iteration (when no updates have been performed yet), and is constantly chosen as this value, if "limited\_memory\_initialization" is "constant". The valid range for this real option is 
+$0 <  {\tt limited\_memory\_init\_val\_max } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+08}$.
+
+
+\paragraph{limited\_memory\_init\_val\_min:}\label{opt:limited_memory_init_val_min} Lower bound on value for B0 in low-rank update. \\
+ The starting matrix in the low rank update, B0, is chosen to be this multiple of the identity in the first iteration (when no updates have been performed yet), and is constantly chosen as this value, if "limited\_memory\_initialization" is "constant". The valid range for this real option is 
+$0 <  {\tt limited\_memory\_init\_val\_min } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{limited\_memory\_initialization:}\label{opt:limited_memory_initialization} Initialization strategy for the limited memory quasi-Newton approximation. \\
+ Determines how the diagonal Matrix B\_0 as the first term in the limited memory approximation should be computed. The default value for this string option is "scalar1".
+\\ 
+Possible values:
+\begin{itemize}
+   \item scalar1: sigma = s\^Ty/s\^Ts
+   \item scalar2: sigma = y\^Ty/s\^Ty
+   \item scalar3: arithmetic average of scalar1 and scalar2
+   \item scalar4: geometric average of scalar1 and scalar2
+   \item constant: sigma = limited\_memory\_init\_val
+\end{itemize}
+
+\paragraph{limited\_memory\_max\_history:}\label{opt:limited_memory_max_history} Maximum size of the history for the limited quasi-Newton Hessian approximation. \\
+ This option determines the number of most recent iterations that are taken into account for the limited-memory quasi-Newton approximation. The valid range for this integer option is
+$0 \le {\tt limited\_memory\_max\_history } <  {\tt +inf}$
+and its default value is $6$.
+
+
+\paragraph{limited\_memory\_max\_skipping:}\label{opt:limited_memory_max_skipping} Threshold for successive iterations where update is skipped. \\
+ If the update is skipped more than this number of successive iterations, we quasi-Newton approximation is reset. The valid range for this integer option is
+$1 \le {\tt limited\_memory\_max\_skipping } <  {\tt +inf}$
+and its default value is $2$.
+
+
+\paragraph{limited\_memory\_special\_for\_resto:}\label{opt:limited_memory_special_for_resto} Determines if the quasi-Newton updates should be special during the restoration phase. \\
+ Until Nov 2010, Ipopt used a special update during the restoration phase, but it turned out that this does not work well.  The new default uses the regular update procedure and it improves results.  If for some reason you want to get back to the original update, set this option to "yes". The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: use the same update as in regular iterations
+   \item yes: use the a special update during restoration phase
+\end{itemize}
+
+\paragraph{limited\_memory\_update\_type:}\label{opt:limited_memory_update_type} Quasi-Newton update formula for the limited memory approximation. \\
+ Determines which update formula is to be used for the limited-memory quasi-Newton approximation. The default value for this string option is "bfgs".
+\\ 
+Possible values:
+\begin{itemize}
+   \item bfgs: BFGS update (with skipping)
+   \item sr1: SR1 (not working well)
+\end{itemize}
+
+\subsection{Initialization}
+\label{sec:Initialization}
+\htmlanchor{sec:Initialization}
+\paragraph{bound\_frac:}\label{opt:bound_frac} Desired minimum relative distance from the initial point to bound. \\
+ Determines how much the initial point might have to be modified in order to be sufficiently inside the bounds (together with "bound\_push").  (This is kappa\_2 in Section 3.6 of implementation paper.) The valid range for this real option is 
+$0 <  {\tt bound\_frac } \le 0.5$
+and its default value is $0.01$.
+
+
+\paragraph{bound\_mult\_init\_method:}\label{opt:bound_mult_init_method} Initialization method for bound multipliers \\
+ This option defines how the iterates for the bound multipliers are initialized.  If "constant" is chosen, then all bound multipliers are initialized to the value of "bound\_mult\_init\_val".  If "mu-based" is chosen, the each value is initialized to the the value of "mu\_init" divided by the corresponding slack variable.  This latter option might be useful if the starting point is close to the optimal solution. The default value for this string option is "constant".
+\\ 
+Possible values:
+\begin{itemize}
+   \item constant: set all bound multipliers to the value of bound\_mult\_init\_val
+   \item mu-based: initialize to mu\_init/x\_slack
+\end{itemize}
+
+\paragraph{bound\_mult\_init\_val:}\label{opt:bound_mult_init_val} Initial value for the bound multipliers. \\
+ All dual variables corresponding to bound constraints are initialized to this value. The valid range for this real option is 
+$0 <  {\tt bound\_mult\_init\_val } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{bound\_push:}\label{opt:bound_push} Desired minimum absolute distance from the initial point to bound. \\
+ Determines how much the initial point might have to be modified in order to be sufficiently inside the bounds (together with "bound\_frac").  (This is kappa\_1 in Section 3.6 of implementation paper.) The valid range for this real option is 
+$0 <  {\tt bound\_push } <  {\tt +inf}$
+and its default value is $0.01$.
+
+
+\paragraph{constr\_mult\_init\_max:}\label{opt:constr_mult_init_max} Maximum allowed least-square guess of constraint multipliers. \\
+ Determines how large the initial least-square guesses of the constraint multipliers are allowed to be (in max-norm). If the guess is larger than this value, it is discarded and all constraint multipliers are set to zero.  This options is also used when initializing the restoration phase. By default, "resto.constr\_mult\_init\_max" (the one used in RestoIterateInitializer) is set to zero. The valid range for this real option is 
+$0 \le {\tt constr\_mult\_init\_max } <  {\tt +inf}$
+and its default value is $1000$.
+
+
+\paragraph{least\_square\_init\_duals:}\label{opt:least_square_init_duals} Least square initialization of all dual variables \\
+ If set to yes, Ipopt tries to compute least-square multipliers (considering ALL dual variables).  If successful, the bound multipliers are possibly corrected to be at least bound\_mult\_init\_val. This might be useful if the user doesn't know anything about the starting point, or for solving an LP or QP.  This overwrites option "bound\_mult\_init\_method". The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: use bound\_mult\_init\_val and least-square equality constraint multipliers
+   \item yes: overwrite user-provided point with least-square estimates
+\end{itemize}
+
+\paragraph{least\_square\_init\_primal:}\label{opt:least_square_init_primal} Least square initialization of the primal variables \\
+ If set to yes, Ipopt ignores the user provided point and solves a least square problem for the primal variables (x and s), to fit the linearized equality and inequality constraints.  This might be useful if the user doesn't know anything about the starting point, or for solving an LP or QP. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: take user-provided point
+   \item yes: overwrite user-provided point with least-square estimates
+\end{itemize}
+
+\paragraph{slack\_bound\_frac:}\label{opt:slack_bound_frac} Desired minimum relative distance from the initial slack to bound. \\
+ Determines how much the initial slack variables might have to be modified in order to be sufficiently inside the inequality bounds (together with "slack\_bound\_push").  (This is kappa\_2 in Section 3.6 of implementation paper.) The valid range for this real option is 
+$0 <  {\tt slack\_bound\_frac } \le 0.5$
+and its default value is $0.01$.
+
+
+\paragraph{slack\_bound\_push:}\label{opt:slack_bound_push} Desired minimum absolute distance from the initial slack to bound. \\
+ Determines how much the initial slack variables might have to be modified in order to be sufficiently inside the inequality bounds (together with "slack\_bound\_frac").  (This is kappa\_1 in Section 3.6 of implementation paper.) The valid range for this real option is 
+$0 <  {\tt slack\_bound\_push } <  {\tt +inf}$
+and its default value is $0.01$.
+
+
+\subsection{Line Search}
+\label{sec:LineSearch}
+\htmlanchor{sec:LineSearch}
+\paragraph{accept\_after\_max\_steps:}\label{opt:accept_after_max_steps} Accept a trial point after maximal this number of steps. \\
+ Even if it does not satisfy line search conditions. The valid range for this integer option is
+$-1 \le {\tt accept\_after\_max\_steps } <  {\tt +inf}$
+and its default value is $-1$.
+
+
+\paragraph{accept\_every\_trial\_step:}\label{opt:accept_every_trial_step} Always accept the first trial step. \\
+ Setting this option to "yes" essentially disables the line search and makes the algorithm take aggressive steps, without global convergence guarantees. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't arbitrarily accept the full step
+   \item yes: always accept the full step
+\end{itemize}
+
+\paragraph{alpha\_for\_y:}\label{opt:alpha_for_y} Method to determine the step size for constraint multipliers. \\
+ This option determines how the step size (alpha\_y) will be calculated when updating the constraint multipliers. The default value for this string option is "primal".
+\\ 
+Possible values:
+\begin{itemize}
+   \item primal: use primal step size
+   \item bound-mult: use step size for the bound multipliers (good for LPs)
+   \item min: use the min of primal and bound multipliers
+   \item max: use the max of primal and bound multipliers
+   \item full: take a full step of size one
+   \item min-dual-infeas: choose step size minimizing new dual infeasibility
+   \item safer-min-dual-infeas: like "min\_dual\_infeas", but safeguarded by "min" and "max"
+   \item primal-and-full: use the primal step size, and full step if delta\_x <= alpha\_for\_y\_tol
+   \item dual-and-full: use the dual step size, and full step if delta\_x <= alpha\_for\_y\_tol
+   \item acceptor: Call LSAcceptor to get step size for y
+\end{itemize}
+
+\paragraph{alpha\_for\_y\_tol:}\label{opt:alpha_for_y_tol} Tolerance for switching to full equality multiplier steps. \\
+ This is only relevant if "alpha\_for\_y" is chosen "primal-and-full" or "dual-and-full".  The step size for the equality constraint multipliers is taken to be one if the max-norm of the primal step is less than this tolerance. The valid range for this real option is 
+$0 \le {\tt alpha\_for\_y\_tol } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{alpha\_min\_frac:}\label{opt:alpha_min_frac} Safety factor for the minimal step size (before switching to restoration phase). \\
+ (This is gamma\_alpha in Eqn. (20) in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt alpha\_min\_frac } <  1$
+and its default value is $0.05$.
+
+
+\paragraph{alpha\_red\_factor:}\label{opt:alpha_red_factor} Fractional reduction of the trial step size in the backtracking line search. \\
+ At every step of the backtracking line search, the trial step size is reduced by this factor. The valid range for this real option is 
+$0 <  {\tt alpha\_red\_factor } <  1$
+and its default value is $0.5$.
+
+
+\paragraph{constraint\_violation\_norm\_type:}\label{opt:constraint_violation_norm_type} Norm to be used for the constraint violation in the line search. \\
+ Determines which norm should be used when the algorithm computes the constraint violation in the line search. The default value for this string option is "1-norm".
+\\ 
+Possible values:
+\begin{itemize}
+   \item 1-norm: use the 1-norm
+   \item 2-norm: use the 2-norm
+   \item max-norm: use the infinity norm
+\end{itemize}
+
+\paragraph{corrector\_compl\_avrg\_red\_fact:}\label{opt:corrector_compl_avrg_red_fact} Complementarity tolerance factor for accepting corrector step (unsupported!). \\
+ This option determines the factor by which complementarity is allowed to increase for a corrector step to be accepted. The valid range for this real option is 
+$0 <  {\tt corrector\_compl\_avrg\_red\_fact } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{corrector\_type:}\label{opt:corrector_type} The type of corrector steps that should be taken (unsupported!). \\
+ If "mu\_strategy" is "adaptive", this option determines what kind of corrector steps should be tried. The default value for this string option is "none".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: no corrector
+   \item affine: corrector step towards mu=0
+   \item primal-dual: corrector step towards current mu
+\end{itemize}
+
+\paragraph{delta:}\label{opt:delta} Multiplier for constraint violation in the switching rule. \\
+ (See Eqn. (19) in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt delta } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{eta\_phi:}\label{opt:eta_phi} Relaxation factor in the Armijo condition. \\
+ (See Eqn. (20) in the implementation paper) The valid range for this real option is 
+$0 <  {\tt eta\_phi } <  0.5$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{filter\_reset\_trigger:}\label{opt:filter_reset_trigger} Number of iterations that trigger the filter reset. \\
+ If the filter reset heuristic is active and the number of successive iterations in which the last rejected trial step size was rejected because of the filter, the filter is reset. The valid range for this integer option is
+$1 \le {\tt filter\_reset\_trigger } <  {\tt +inf}$
+and its default value is $5$.
+
+
+\paragraph{gamma\_phi:}\label{opt:gamma_phi} Relaxation factor in the filter margin for the barrier function. \\
+ (See Eqn. (18a) in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt gamma\_phi } <  1$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{gamma\_theta:}\label{opt:gamma_theta} Relaxation factor in the filter margin for the constraint violation. \\
+ (See Eqn. (18b) in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt gamma\_theta } <  1$
+and its default value is $1 \cdot 10^{-05}$.
+
+
+\paragraph{kappa\_sigma:}\label{opt:kappa_sigma} Factor limiting the deviation of dual variables from primal estimates. \\
+ If the dual variables deviate from their primal estimates, a correction is performed. (See Eqn. (16) in the implementation paper.) Setting the value to less than 1 disables the correction. The valid range for this real option is 
+$0 <  {\tt kappa\_sigma } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+10}$.
+
+
+\paragraph{kappa\_soc:}\label{opt:kappa_soc} Factor in the sufficient reduction rule for second order correction. \\
+ This option determines how much a second order correction step must reduce the constraint violation so that further correction steps are attempted.  (See Step A-5.9 of Algorithm A in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt kappa\_soc } <  {\tt +inf}$
+and its default value is $0.99$.
+
+
+\paragraph{line\_search\_method:}\label{opt:line_search_method} Globalization method used in backtracking line search \\
+ Only the "filter" choice is officially supported.  But sometimes, good results might be obtained with the other choices. The default value for this string option is "filter".
+\\ 
+Possible values:
+\begin{itemize}
+   \item filter: Filter method
+   \item cg-penalty: Chen-Goldfarb penalty function
+   \item penalty: Standard penalty function
+\end{itemize}
+
+\paragraph{max\_filter\_resets:}\label{opt:max_filter_resets} Maximal allowed number of filter resets \\
+ A positive number enables a heuristic that resets the filter, whenever in more than "filter\_reset\_trigger" successive iterations the last rejected trial steps size was rejected because of the filter.  This option determine the maximal number of resets that are allowed to take place. The valid range for this integer option is
+$0 \le {\tt max\_filter\_resets } <  {\tt +inf}$
+and its default value is $5$.
+
+
+\paragraph{max\_soc:}\label{opt:max_soc} Maximum number of second order correction trial steps at each iteration. \\
+ Choosing 0 disables the second order corrections. (This is p\^{max} of Step A-5.9 of Algorithm A in the implementation paper.) The valid range for this integer option is
+$0 \le {\tt max\_soc } <  {\tt +inf}$
+and its default value is $4$.
+
+
+\paragraph{nu\_inc:}\label{opt:nu_inc} Increment of the penalty parameter. \\
+ The valid range for this real option is 
+$0 <  {\tt nu\_inc } <  {\tt +inf}$
+and its default value is $0.0001$.
+
+
+\paragraph{nu\_init:}\label{opt:nu_init} Initial value of the penalty parameter. \\
+ The valid range for this real option is 
+$0 <  {\tt nu\_init } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{obj\_max\_inc:}\label{opt:obj_max_inc} Determines the upper bound on the acceptable increase of barrier objective function. \\
+ Trial points are rejected if they lead to an increase in the barrier objective function by more than obj\_max\_inc orders of magnitude. The valid range for this real option is 
+$1 <  {\tt obj\_max\_inc } <  {\tt +inf}$
+and its default value is $5$.
+
+
+\paragraph{recalc\_y:}\label{opt:recalc_y} Tells the algorithm to recalculate the equality and inequality multipliers as least square estimates. \\
+ This asks the algorithm to recompute the multipliers, whenever the current infeasibility is less than recalc\_y\_feas\_tol. Choosing yes might be helpful in the quasi-Newton option.  However, each recalculation requires an extra factorization of the linear system.  If a limited memory quasi-Newton option is chosen, this is used by default. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: use the Newton step to update the multipliers
+   \item yes: use least-square multiplier estimates
+\end{itemize}
+
+\paragraph{recalc\_y\_feas\_tol:}\label{opt:recalc_y_feas_tol} Feasibility threshold for recomputation of multipliers. \\
+ If recalc\_y is chosen and the current infeasibility is less than this value, then the multipliers are recomputed. The valid range for this real option is 
+$0 <  {\tt recalc\_y\_feas\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{rho:}\label{opt:rho} Value in penalty parameter update formula. \\
+ The valid range for this real option is 
+$0 <  {\tt rho } <  1$
+and its default value is $0.1$.
+
+
+\paragraph{s\_phi:}\label{opt:s_phi} Exponent for linear barrier function model in the switching rule. \\
+ (See Eqn. (19) in the implementation paper.) The valid range for this real option is 
+$1 <  {\tt s\_phi } <  {\tt +inf}$
+and its default value is $2.3$.
+
+
+\paragraph{s\_theta:}\label{opt:s_theta} Exponent for current constraint violation in the switching rule. \\
+ (See Eqn. (19) in the implementation paper.) The valid range for this real option is 
+$1 <  {\tt s\_theta } <  {\tt +inf}$
+and its default value is $1.1$.
+
+
+\paragraph{skip\_corr\_if\_neg\_curv:}\label{opt:skip_corr_if_neg_curv} Skip the corrector step in negative curvature iteration (unsupported!). \\
+ The corrector step is not tried if negative curvature has been encountered during the computation of the search direction in the current iteration. This option is only used if "mu\_strategy" is "adaptive". The default value for this string option is "yes".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't skip
+   \item yes: skip
+\end{itemize}
+
+\paragraph{skip\_corr\_in\_monotone\_mode:}\label{opt:skip_corr_in_monotone_mode} Skip the corrector step during monotone barrier parameter mode (unsupported!). \\
+ The corrector step is not tried if the algorithm is currently in the monotone mode (see also option "barrier\_strategy").This option is only used if "mu\_strategy" is "adaptive". The default value for this string option is "yes".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't skip
+   \item yes: skip
+\end{itemize}
+
+\paragraph{slack\_move:}\label{opt:slack_move} Correction size for very small slacks. \\
+ Due to numerical issues or the lack of an interior, the slack variables might become very small.  If a slack becomes very small compared to machine precision, the corresponding bound is moved slightly.  This parameter determines how large the move should be.  Its default value is mach\_eps\^{3/4}.  (See also end of Section 3.5 in implementation paper - but actual implementation might be somewhat different.) The valid range for this real option is 
+$0 \le {\tt slack\_move } <  {\tt +inf}$
+and its default value is $1.81899 \cdot 10^{-12}$.
+
+
+\paragraph{theta\_max\_fact:}\label{opt:theta_max_fact} Determines upper bound for constraint violation in the filter. \\
+ The algorithmic parameter theta\_max is determined as theta\_max\_fact times the maximum of 1 and the constraint violation at initial point.  Any point with a constraint violation larger than theta\_max is unacceptable to the filter (see Eqn. (21) in the implementation paper). The valid range for this real option is 
+$0 <  {\tt theta\_max\_fact } <  {\tt +inf}$
+and its default value is $10000$.
+
+
+\paragraph{theta\_min\_fact:}\label{opt:theta_min_fact} Determines constraint violation threshold in the switching rule. \\
+ The algorithmic parameter theta\_min is determined as theta\_min\_fact times the maximum of 1 and the constraint violation at initial point.  The switching rules treats an iteration as an h-type iteration whenever the current constraint violation is larger than theta\_min (see paragraph before Eqn. (19) in the implementation paper). The valid range for this real option is 
+$0 <  {\tt theta\_min\_fact } <  {\tt +inf}$
+and its default value is $0.0001$.
+
+
+\paragraph{tiny\_step\_tol:}\label{opt:tiny_step_tol} Tolerance for detecting numerically insignificant steps. \\
+ If the search direction in the primal variables (x and s) is, in relative terms for each component, less than this value, the algorithm accepts the full step without line search.  If this happens repeatedly, the algorithm will terminate with a corresponding exit message. The default value is 10 times machine precision. The valid range for this real option is 
+$0 \le {\tt tiny\_step\_tol } <  {\tt +inf}$
+and its default value is $2.22045 \cdot 10^{-15}$.
+
+
+\paragraph{tiny\_step\_y\_tol:}\label{opt:tiny_step_y_tol} Tolerance for quitting because of numerically insignificant steps. \\
+ If the search direction in the primal variables (x and s) is, in relative terms for each component, repeatedly less than tiny\_step\_tol, and the step in the y variables is smaller than this threshold, the algorithm will terminate. The valid range for this real option is 
+$0 \le {\tt tiny\_step\_y\_tol } <  {\tt +inf}$
+and its default value is $0.01$.
+
+
+\paragraph{watchdog\_shortened\_iter\_trigger:}\label{opt:watchdog_shortened_iter_trigger} Number of shortened iterations that trigger the watchdog. \\
+ If the number of successive iterations in which the backtracking line search did not accept the first trial point exceeds this number, the watchdog procedure is activated.  Choosing "0" here disables the watchdog procedure. The valid range for this integer option is
+$0 \le {\tt watchdog\_shortened\_iter\_trigger } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{watchdog\_trial\_iter\_max:}\label{opt:watchdog_trial_iter_max} Maximum number of watchdog iterations. \\
+ This option determines the number of trial iterations allowed before the watchdog procedure is aborted and the algorithm returns to the stored point. The valid range for this integer option is
+$1 \le {\tt watchdog\_trial\_iter\_max } <  {\tt +inf}$
+and its default value is $3$.
+
+
+\subsection{Linear Solver}
+\label{sec:LinearSolver}
+\htmlanchor{sec:LinearSolver}
+\paragraph{linear\_scaling\_on\_demand:}\label{opt:linear_scaling_on_demand} Flag indicating that linear scaling is only done if it seems required. \\
+ This option is only important if a linear scaling method (e.g., mc19) is used.  If you choose "no", then the scaling factors are computed for every linear system from the start.  This can be quite expensive. Choosing "yes" means that the algorithm will start the scaling method only when the solutions to the linear system seem not good, and then use it until the end. The default value for this string option is "yes".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Always scale the linear system.
+   \item yes: Start using linear system scaling if solutions seem not good.
+\end{itemize}
+
+\paragraph{linear\_solver:}\label{opt:linear_solver} Linear solver used for step computations. \\
+ Determines which linear algebra package is to be used for the solution of the augmented linear system (for obtaining the search directions). Note, the code must have been compiled with the linear solver you want to choose. Depending on your Ipopt installation, not all options are available. The default value for this string option is "ma27".
+\\ 
+Possible values:
+\begin{itemize}
+   \item ma27: use the Harwell routine MA27
+   \item ma57: use the Harwell routine MA57
+   \item ma77: use the Harwell routine HSL\_MA77
+   \item ma86: use the Harwell routine HSL\_MA86
+   \item ma97: use the Harwell routine HSL\_MA97
+   \item pardiso: use the Pardiso package
+   \item wsmp: use WSMP package
+   \item mumps: use MUMPS package
+   \item custom: use custom linear solver
+\end{itemize}
+
+\paragraph{linear\_system\_scaling:}\label{opt:linear_system_scaling} Method for scaling the linear system. \\
+ Determines the method used to compute symmetric scaling factors for the augmented system (see also the "linear\_scaling\_on\_demand" option).  This scaling is independent of the NLP problem scaling.  By default, MC19 is only used if MA27 or MA57 are selected as linear solvers. This value is only available if Ipopt has been compiled with MC19. The default value for this string option is "mc19".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: no scaling will be performed
+   \item mc19: use the Harwell routine MC19
+   \item slack-based: use the slack values
+\end{itemize}
+
+\subsection{MA27 Linear Solver}
+\label{sec:MA27LinearSolver}
+\htmlanchor{sec:MA27LinearSolver}
+\paragraph{ma27\_ignore\_singularity:}\label{opt:ma27_ignore_singularity} Enables MA27's ability to solve a linear system even if the matrix is singular. \\
+ Setting this option to "yes" means that Ipopt will call MA27 to compute solutions for right hand sides, even if MA27 has detected that the matrix is singular (but is still able to solve the linear system). In some cases this might be better than using Ipopt's heuristic of small perturbation of the lower diagonal of the KKT matrix. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Don't have MA27 solve singular systems
+   \item yes: Have MA27 solve singular systems
+\end{itemize}
+
+\paragraph{ma27\_la\_init\_factor:}\label{opt:ma27_la_init_factor} Real workspace memory for MA27. \\
+ The initial real workspace memory = la\_init\_factor * memory required by unfactored system. Ipopt will increase the workspace size by meminc\_factor if required.  This option is only available if  Ipopt has been compiled with MA27. The valid range for this real option is 
+$1 \le {\tt ma27\_la\_init\_factor } <  {\tt +inf}$
+and its default value is $5$.
+
+
+\paragraph{ma27\_liw\_init\_factor:}\label{opt:ma27_liw_init_factor} Integer workspace memory for MA27. \\
+ The initial integer workspace memory = liw\_init\_factor * memory required by unfactored system. Ipopt will increase the workspace size by meminc\_factor if required.  This option is only available if Ipopt has been compiled with MA27. The valid range for this real option is 
+$1 \le {\tt ma27\_liw\_init\_factor } <  {\tt +inf}$
+and its default value is $5$.
+
+
+\paragraph{ma27\_meminc\_factor:}\label{opt:ma27_meminc_factor} Increment factor for workspace size for MA27. \\
+ If the integer or real workspace is not large enough, Ipopt will increase its size by this factor.  This option is only available if Ipopt has been compiled with MA27. The valid range for this real option is 
+$1 \le {\tt ma27\_meminc\_factor } <  {\tt +inf}$
+and its default value is $2$.
+
+
+\paragraph{ma27\_pivtol:}\label{opt:ma27_pivtol} Pivot tolerance for the linear solver MA27. \\
+ A smaller number pivots for sparsity, a larger number pivots for stability.  This option is only available if Ipopt has been compiled with MA27. The valid range for this real option is 
+$0 <  {\tt ma27\_pivtol } <  1$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{ma27\_pivtolmax:}\label{opt:ma27_pivtolmax} Maximum pivot tolerance for the linear solver MA27. \\
+ Ipopt may increase pivtol as high as pivtolmax to get a more accurate solution to the linear system.  This option is only available if Ipopt has been compiled with MA27. The valid range for this real option is 
+$0 <  {\tt ma27\_pivtolmax } <  1$
+and its default value is $0.0001$.
+
+
+\paragraph{ma27\_skip\_inertia\_check:}\label{opt:ma27_skip_inertia_check} Always pretend inertia is correct. \\
+ Setting this option to "yes" essentially disables inertia check. This option makes the algorithm non-robust and easily fail, but it might give some insight into the necessity of inertia control. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: check inertia
+   \item yes: skip inertia check
+\end{itemize}
+
+\subsection{MA28 Linear Solver}
+\label{sec:MA28LinearSolver}
+\htmlanchor{sec:MA28LinearSolver}
+\paragraph{ma28\_pivtol:}\label{opt:ma28_pivtol} Pivot tolerance for linear solver MA28. \\
+ This is used when MA28 tries to find the dependent constraints. The valid range for this real option is 
+$0 <  {\tt ma28\_pivtol } \le 1$
+and its default value is $0.01$.
+
+
+\subsection{MA57 Linear Solver}
+\label{sec:MA57LinearSolver}
+\htmlanchor{sec:MA57LinearSolver}
+\paragraph{ma57\_automatic\_scaling:}\label{opt:ma57_automatic_scaling} Controls MA57 automatic scaling \\
+ This option controls the internal scaling option of MA57. For higher reliability of the MA57 solver, you may want to set this option to yes. This is ICNTL(15) in MA57. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Do not scale the linear system matrix
+   \item yes: Scale the linear system matrix
+\end{itemize}
+
+\paragraph{ma57\_block\_size:}\label{opt:ma57_block_size} Controls block size used by Level 3 BLAS in MA57BD \\
+ This is ICNTL(11) in MA57. The valid range for this integer option is
+$1 \le {\tt ma57\_block\_size } <  {\tt +inf}$
+and its default value is $16$.
+
+
+\paragraph{ma57\_node\_amalgamation:}\label{opt:ma57_node_amalgamation} Node amalgamation parameter \\
+ This is ICNTL(12) in MA57. The valid range for this integer option is
+$1 \le {\tt ma57\_node\_amalgamation } <  {\tt +inf}$
+and its default value is $16$.
+
+
+\paragraph{ma57\_pivot\_order:}\label{opt:ma57_pivot_order} Controls pivot order in MA57 \\
+ This is ICNTL(6) in MA57. The valid range for this integer option is
+$0 \le {\tt ma57\_pivot\_order } \le 5$
+and its default value is $5$.
+
+
+\paragraph{ma57\_pivtol:}\label{opt:ma57_pivtol} Pivot tolerance for the linear solver MA57. \\
+ A smaller number pivots for sparsity, a larger number pivots for stability. This option is only available if Ipopt has been compiled with MA57. The valid range for this real option is 
+$0 <  {\tt ma57\_pivtol } <  1$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{ma57\_pivtolmax:}\label{opt:ma57_pivtolmax} Maximum pivot tolerance for the linear solver MA57. \\
+ Ipopt may increase pivtol as high as ma57\_pivtolmax to get a more accurate solution to the linear system.  This option is only available if Ipopt has been compiled with MA57. The valid range for this real option is 
+$0 <  {\tt ma57\_pivtolmax } <  1$
+and its default value is $0.0001$.
+
+
+\paragraph{ma57\_pre\_alloc:}\label{opt:ma57_pre_alloc} Safety factor for work space memory allocation for the linear solver MA57. \\
+ If 1 is chosen, the suggested amount of work space is used.  However, choosing a larger number might avoid reallocation if the suggest values do not suffice.  This option is only available if Ipopt has been compiled with MA57. The valid range for this real option is 
+$1 \le {\tt ma57\_pre\_alloc } <  {\tt +inf}$
+and its default value is $1.05$.
+
+
+\paragraph{ma57\_small\_pivot\_flag:}\label{opt:ma57_small_pivot_flag} If set to 1, then when small entries defined by CNTL(2) are detected they are removed and the corresponding pivots placed at the end of the factorization.  This can be particularly efficient if the matrix is highly rank deficient. \\
+ This is ICNTL(16) in MA57. The valid range for this integer option is
+$0 \le {\tt ma57\_small\_pivot\_flag } \le 1$
+and its default value is $0$.
+
+
+\subsection{MA77 Linear Solver}
+\label{sec:MA77LinearSolver}
+\htmlanchor{sec:MA77LinearSolver}
+\paragraph{ma77\_buffer\_lpage:}\label{opt:ma77_buffer_lpage} Number of scalars per MA77 buffer page \\
+ Number of scalars per an in-core buffer in the out-of-core solver MA77. Must be at most ma77\_file\_size. The valid range for this integer option is
+$1 \le {\tt ma77\_buffer\_lpage } <  {\tt +inf}$
+and its default value is $4096$.
+
+
+\paragraph{ma77\_buffer\_npage:}\label{opt:ma77_buffer_npage} Number of pages that make up MA77 buffer \\
+ Number of pages of size buffer\_lpage that exist in-core for the out-of-core solver MA77. The valid range for this integer option is
+$1 \le {\tt ma77\_buffer\_npage } <  {\tt +inf}$
+and its default value is $1600$.
+
+
+\paragraph{ma77\_file\_size:}\label{opt:ma77_file_size} Target size of each temporary file for MA77, scalars per type \\
+ MA77 uses many temporary files, this option controls the size of each one. It is measured in the number of entries (int or double), NOT bytes. The valid range for this integer option is
+$1 \le {\tt ma77\_file\_size } <  {\tt +inf}$
+and its default value is $2097152$.
+
+
+\paragraph{ma77\_maxstore:}\label{opt:ma77_maxstore} Maximum storage size for MA77 in-core mode \\
+ If greater than zero, the maximum size of factors stored in core before out-of-core mode is invoked. The valid range for this integer option is
+$0 \le {\tt ma77\_maxstore } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{ma77\_nemin:}\label{opt:ma77_nemin} Node Amalgamation parameter \\
+ Two nodes in elimination tree are merged if result has fewer than ma77\_nemin variables. The valid range for this integer option is
+$1 \le {\tt ma77\_nemin } <  {\tt +inf}$
+and its default value is $8$.
+
+
+\paragraph{ma77\_order:}\label{opt:ma77_order} Controls type of ordering used by HSL\_MA77 \\
+ This option controls ordering for the solver HSL\_MA77. The default value for this string option is "metis".
+\\ 
+Possible values:
+\begin{itemize}
+   \item amd: Use the HSL\_MC68 approximate minimum degree algorithm
+   \item metis: Use the MeTiS nested dissection algorithm (if available)
+\end{itemize}
+
+\paragraph{ma77\_print\_level:}\label{opt:ma77_print_level} Debug printing level for the linear solver MA77 \\
+ The valid range for this integer option is
+${\tt -inf} <  {\tt ma77\_print\_level } <  {\tt +inf}$
+and its default value is $-1$.
+
+
+\paragraph{ma77\_small:}\label{opt:ma77_small} Zero Pivot Threshold \\
+ Any pivot less than ma77\_small is treated as zero. The valid range for this real option is 
+$0 \le {\tt ma77\_small } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-20}$.
+
+
+\paragraph{ma77\_static:}\label{opt:ma77_static} Static Pivoting Threshold \\
+ See MA77 documentation. Either ma77\_static=0.0 or ma77\_static>ma77\_small. ma77\_static=0.0 disables static pivoting. The valid range for this real option is 
+$0 \le {\tt ma77\_static } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{ma77\_u:}\label{opt:ma77_u} Pivoting Threshold \\
+ See MA77 documentation. The valid range for this real option is 
+$0 \le {\tt ma77\_u } \le 0.5$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{ma77\_umax:}\label{opt:ma77_umax} Maximum Pivoting Threshold \\
+ Maximum value to which u will be increased to improve quality. The valid range for this real option is 
+$0 \le {\tt ma77\_umax } \le 0.5$
+and its default value is $0.0001$.
+
+
+\subsection{MA86 Linear Solver}
+\label{sec:MA86LinearSolver}
+\htmlanchor{sec:MA86LinearSolver}
+\paragraph{ma86\_nemin:}\label{opt:ma86_nemin} Node Amalgamation parameter \\
+ Two nodes in elimination tree are merged if result has fewer than ma86\_nemin variables. The valid range for this integer option is
+$1 \le {\tt ma86\_nemin } <  {\tt +inf}$
+and its default value is $32$.
+
+
+\paragraph{ma86\_order:}\label{opt:ma86_order} Controls type of ordering used by HSL\_MA86 \\
+ This option controls ordering for the solver HSL\_MA86. The default value for this string option is "auto".
+\\ 
+Possible values:
+\begin{itemize}
+   \item auto: Try both AMD and MeTiS, pick best
+   \item amd: Use the HSL\_MC68 approximate minimum degree algorithm
+   \item metis: Use the MeTiS nested dissection algorithm (if available)
+\end{itemize}
+
+\paragraph{ma86\_print\_level:}\label{opt:ma86_print_level} Debug printing level for the linear solver MA86 \\
+ The valid range for this integer option is
+${\tt -inf} <  {\tt ma86\_print\_level } <  {\tt +inf}$
+and its default value is $-1$.
+
+
+\paragraph{ma86\_scaling:}\label{opt:ma86_scaling} Controls scaling of matrix \\
+ This option controls scaling for the solver HSL\_MA86. The default value for this string option is "mc64".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: Do not scale the linear system matrix
+   \item mc64: Scale linear system matrix using MC64
+   \item mc77: Scale linear system matrix using MC77 [1,3,0]
+\end{itemize}
+
+\paragraph{ma86\_small:}\label{opt:ma86_small} Zero Pivot Threshold \\
+ Any pivot less than ma86\_small is treated as zero. The valid range for this real option is 
+$0 \le {\tt ma86\_small } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-20}$.
+
+
+\paragraph{ma86\_static:}\label{opt:ma86_static} Static Pivoting Threshold \\
+ See MA86 documentation. Either ma86\_static=0.0 or ma86\_static>ma86\_small. ma86\_static=0.0 disables static pivoting. The valid range for this real option is 
+$0 \le {\tt ma86\_static } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{ma86\_u:}\label{opt:ma86_u} Pivoting Threshold \\
+ See MA86 documentation. The valid range for this real option is 
+$0 \le {\tt ma86\_u } \le 0.5$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{ma86\_umax:}\label{opt:ma86_umax} Maximum Pivoting Threshold \\
+ Maximum value to which u will be increased to improve quality. The valid range for this real option is 
+$0 \le {\tt ma86\_umax } \le 0.5$
+and its default value is $0.0001$.
+
+
+\subsection{MA97 Linear Solver}
+\label{sec:MA97LinearSolver}
+\htmlanchor{sec:MA97LinearSolver}
+\paragraph{ma97\_nemin:}\label{opt:ma97_nemin} Node Amalgamation parameter \\
+ Two nodes in elimination tree are merged if result has fewer than ma97\_nemin variables. The valid range for this integer option is
+$1 \le {\tt ma97\_nemin } <  {\tt +inf}$
+and its default value is $8$.
+
+
+\paragraph{ma97\_order:}\label{opt:ma97_order} Controls type of ordering used by HSL\_MA97 \\
+ The default value for this string option is "auto".
+\\ 
+Possible values:
+\begin{itemize}
+   \item auto: Use HSL\_MA97 heuristic to guess best of AMD and METIS
+   \item best: Try both AMD and MeTiS, pick best
+   \item amd: Use the HSL\_MC68 approximate minimum degree algorithm
+   \item metis: Use the MeTiS nested dissection algorithm
+   \item matched-auto: Use the HSL\_MC80 matching with heuristic choice of AMD or METIS
+   \item matched-metis: Use the HSL\_MC80 matching based ordering with METIS
+   \item matched-amd: Use the HSL\_MC80 matching based ordering with AMD
+\end{itemize}
+
+\paragraph{ma97\_print\_level:}\label{opt:ma97_print_level} Debug printing level for the linear solver MA97 \\
+ The valid range for this integer option is
+${\tt -inf} <  {\tt ma97\_print\_level } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{ma97\_scaling:}\label{opt:ma97_scaling} Specifies strategy for scaling in HSL\_MA97 linear solver \\
+ The default value for this string option is "dynamic".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: Do not scale the linear system matrix
+   \item mc30: Scale all linear system matrices using MC30
+   \item mc64: Scale all linear system matrices using MC64
+   \item mc77: Scale all linear system matrices using MC77 [1,3,0]
+   \item dynamic: Dynamically select scaling according to rules specified by ma97\_scalingX and ma97\_switchX options.
+\end{itemize}
+
+\paragraph{ma97\_scaling1:}\label{opt:ma97_scaling1} First scaling. \\
+ If ma97\_scaling=dynamic, this scaling is used according to the trigger ma97\_switch1. If ma97\_switch2 is triggered it is disabled. The default value for this string option is "mc64".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: No scaling
+   \item mc30: Scale linear system matrix using MC30
+   \item mc64: Scale linear system matrix using MC64
+   \item mc77: Scale linear system matrix using MC77 [1,3,0]
+\end{itemize}
+
+\paragraph{ma97\_scaling2:}\label{opt:ma97_scaling2} Second scaling. \\
+ If ma97\_scaling=dynamic, this scaling is used according to the trigger ma97\_switch2. If ma97\_switch3 is triggered it is disabled. The default value for this string option is "mc64".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: No scaling
+   \item mc30: Scale linear system matrix using MC30
+   \item mc64: Scale linear system matrix using MC64
+   \item mc77: Scale linear system matrix using MC77 [1,3,0]
+\end{itemize}
+
+\paragraph{ma97\_scaling3:}\label{opt:ma97_scaling3} Third scaling. \\
+ If ma97\_scaling=dynamic, this scaling is used according to the trigger ma97\_switch3. The default value for this string option is "mc64".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: No scaling
+   \item mc30: Scale linear system matrix using MC30
+   \item mc64: Scale linear system matrix using MC64
+   \item mc77: Scale linear system matrix using MC77 [1,3,0]
+\end{itemize}
+
+\paragraph{ma97\_small:}\label{opt:ma97_small} Zero Pivot Threshold \\
+ Any pivot less than ma97\_small is treated as zero. The valid range for this real option is 
+$0 \le {\tt ma97\_small } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-20}$.
+
+
+\paragraph{ma97\_solve\_blas3:}\label{opt:ma97_solve_blas3} Controls if blas2 or blas3 routines are used for solve \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Use BLAS2 (faster, some implementations bit incompatible)
+   \item yes: Use BLAS3 (slower)
+\end{itemize}
+
+\paragraph{ma97\_switch1:}\label{opt:ma97_switch1} First switch, determine when ma97\_scaling1 is enabled. \\
+ If ma97\_scaling=dynamic, ma97\_scaling1 is enabled according to this condition. If ma97\_switch2 occurs this option is henceforth ignored. The default value for this string option is "od\_hd\_reuse".
+\\ 
+Possible values:
+\begin{itemize}
+   \item never: Scaling is never enabled.
+   \item at\_start: Scaling to be used from the very start.
+   \item at\_start\_reuse: Scaling to be used on first iteration, then reused thereafter.
+   \item on\_demand: Scaling to be used after Ipopt request improved solution (i.e. iterative refinement has failed).
+   \item on\_demand\_reuse: As on\_demand, but reuse scaling from previous itr
+   \item high\_delay: Scaling to be used after more than 0.05*n delays are present
+   \item high\_delay\_reuse: Scaling to be used only when previous itr created more that 0.05*n additional delays, otherwise reuse scaling from previous itr
+   \item od\_hd: Combination of on\_demand and high\_delay
+   \item od\_hd\_reuse: Combination of on\_demand\_reuse and high\_delay\_reuse
+\end{itemize}
+
+\paragraph{ma97\_switch2:}\label{opt:ma97_switch2} Second switch, determine when ma97\_scaling2 is enabled. \\
+ If ma97\_scaling=dynamic, ma97\_scaling2 is enabled according to this condition. If ma97\_switch3 occurs this option is henceforth ignored. The default value for this string option is "never".
+\\ 
+Possible values:
+\begin{itemize}
+   \item never: Scaling is never enabled.
+   \item at\_start: Scaling to be used from the very start.
+   \item at\_start\_reuse: Scaling to be used on first iteration, then reused thereafter.
+   \item on\_demand: Scaling to be used after Ipopt request improved solution (i.e. iterative refinement has failed).
+   \item on\_demand\_reuse: As on\_demand, but reuse scaling from previous itr
+   \item high\_delay: Scaling to be used after more than 0.05*n delays are present
+   \item high\_delay\_reuse: Scaling to be used only when previous itr created more that 0.05*n additional delays, otherwise reuse scaling from previous itr
+   \item od\_hd: Combination of on\_demand and high\_delay
+   \item od\_hd\_reuse: Combination of on\_demand\_reuse and high\_delay\_reuse
+\end{itemize}
+
+\paragraph{ma97\_switch3:}\label{opt:ma97_switch3} Third switch, determine when ma97\_scaling3 is enabled. \\
+ If ma97\_scaling=dynamic, ma97\_scaling3 is enabled according to this condition. The default value for this string option is "never".
+\\ 
+Possible values:
+\begin{itemize}
+   \item never: Scaling is never enabled.
+   \item at\_start: Scaling to be used from the very start.
+   \item at\_start\_reuse: Scaling to be used on first iteration, then reused thereafter.
+   \item on\_demand: Scaling to be used after Ipopt request improved solution (i.e. iterative refinement has failed).
+   \item on\_demand\_reuse: As on\_demand, but reuse scaling from previous itr
+   \item high\_delay: Scaling to be used after more than 0.05*n delays are present
+   \item high\_delay\_reuse: Scaling to be used only when previous itr created more that 0.05*n additional delays, otherwise reuse scaling from previous itr
+   \item od\_hd: Combination of on\_demand and high\_delay
+   \item od\_hd\_reuse: Combination of on\_demand\_reuse and high\_delay\_reuse
+\end{itemize}
+
+\paragraph{ma97\_u:}\label{opt:ma97_u} Pivoting Threshold \\
+ See MA97 documentation. The valid range for this real option is 
+$0 \le {\tt ma97\_u } \le 0.5$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{ma97\_umax:}\label{opt:ma97_umax} Maximum Pivoting Threshold \\
+ See MA97 documentation. The valid range for this real option is 
+$0 \le {\tt ma97\_umax } \le 0.5$
+and its default value is $0.0001$.
+
+
+\subsection{Mumps Linear Solver}
+\label{sec:MumpsLinearSolver}
+\htmlanchor{sec:MumpsLinearSolver}
+\paragraph{mumps\_dep\_tol:}\label{opt:mumps_dep_tol} Pivot threshold for detection of linearly dependent constraints in MUMPS. \\
+ When MUMPS is used to determine linearly dependent constraints, this is determines the threshold for a pivot to be considered zero.  This is CNTL(3) in MUMPS. The valid range for this real option is 
+${\tt -inf} <  {\tt mumps\_dep\_tol } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{mumps\_mem\_percent:}\label{opt:mumps_mem_percent} Percentage increase in the estimated working space for MUMPS. \\
+ In MUMPS when significant extra fill-in is caused by numerical pivoting, larger values of mumps\_mem\_percent may help use the workspace more efficiently.  On the other hand, if memory requirement are too large at the very beginning of the optimization, choosing a much smaller value for this option, such as 5, might reduce memory requirements. The valid range for this integer option is
+$0 \le {\tt mumps\_mem\_percent } <  {\tt +inf}$
+and its default value is $1000$.
+
+
+\paragraph{mumps\_permuting\_scaling:}\label{opt:mumps_permuting_scaling} Controls permuting and scaling in MUMPS \\
+ This is ICNTL(6) in MUMPS. The valid range for this integer option is
+$0 \le {\tt mumps\_permuting\_scaling } \le 7$
+and its default value is $7$.
+
+
+\paragraph{mumps\_pivot\_order:}\label{opt:mumps_pivot_order} Controls pivot order in MUMPS \\
+ This is ICNTL(7) in MUMPS. The valid range for this integer option is
+$0 \le {\tt mumps\_pivot\_order } \le 7$
+and its default value is $7$.
+
+
+\paragraph{mumps\_pivtol:}\label{opt:mumps_pivtol} Pivot tolerance for the linear solver MUMPS. \\
+ A smaller number pivots for sparsity, a larger number pivots for stability.  This option is only available if Ipopt has been compiled with MUMPS. The valid range for this real option is 
+$0 \le {\tt mumps\_pivtol } \le 1$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{mumps\_pivtolmax:}\label{opt:mumps_pivtolmax} Maximum pivot tolerance for the linear solver MUMPS. \\
+ Ipopt may increase pivtol as high as pivtolmax to get a more accurate solution to the linear system.  This option is only available if Ipopt has been compiled with MUMPS. The valid range for this real option is 
+$0 \le {\tt mumps\_pivtolmax } \le 1$
+and its default value is $0.1$.
+
+
+\paragraph{mumps\_scaling:}\label{opt:mumps_scaling} Controls scaling in MUMPS \\
+ This is ICNTL(8) in MUMPS. The valid range for this integer option is
+$-2 \le {\tt mumps\_scaling } \le 77$
+and its default value is $77$.
+
+
+\subsection{NLP}
+\label{sec:NLP}
+\htmlanchor{sec:NLP}
+\paragraph{bound\_relax\_factor:}\label{opt:bound_relax_factor} Factor for initial relaxation of the bounds. \\
+ Before start of the optimization, the bounds given by the user are relaxed.  This option sets the factor for this relaxation.  If it is set to zero, then then bounds relaxation is disabled. (See Eqn.(35) in implementation paper.) The valid range for this real option is 
+$0 \le {\tt bound\_relax\_factor } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{check\_derivatives\_for\_naninf:}\label{opt:check_derivatives_for_naninf} Indicates whether it is desired to check for Nan/Inf in derivative matrices \\
+ Activating this option will cause an error if an invalid number is detected in the constraint Jacobians or the Lagrangian Hessian.  If this is not activated, the test is skipped, and the algorithm might proceed with invalid numbers and fail.  If test is activated and an invalid number is detected, the matrix is written to output with print\_level corresponding to J\_MORE\_DETAILED; so beware of large output! The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Don't check (faster).
+   \item yes: Check Jacobians and Hessian for Nan and Inf.
+\end{itemize}
+
+\paragraph{dependency\_detection\_with\_rhs:}\label{opt:dependency_detection_with_rhs} Indicates if the right hand sides of the constraints should be considered during dependency detection \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: only look at gradients
+   \item yes: also consider right hand side
+\end{itemize}
+
+\paragraph{dependency\_detector:}\label{opt:dependency_detector} Indicates which linear solver should be used to detect linearly dependent equality constraints. \\
+ The default and available choices depend on how Ipopt has been compiled.  This is experimental and does not work well. The default value for this string option is "none".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: don't check; no extra work at beginning
+   \item mumps: use MUMPS
+   \item wsmp: use WSMP
+   \item ma28: use MA28
+\end{itemize}
+
+\paragraph{fixed\_variable\_treatment:}\label{opt:fixed_variable_treatment} Determines how fixed variables should be handled. \\
+ The main difference between those options is that the starting point in the "make\_constraint" case still has the fixed variables at their given values, whereas in the case "make\_parameter" the functions are always evaluated with the fixed values for those variables.  Also, for "relax\_bounds", the fixing bound constraints are relaxed (according to" bound\_relax\_factor"). For both "make\_constraints" and "relax\_bounds", bound multipliers are computed for the fixed variables. The defa [...]
+\\ 
+Possible values:
+\begin{itemize}
+   \item make\_parameter: Remove fixed variable from optimization variables
+   \item make\_constraint: Add equality constraints fixing variables
+   \item relax\_bounds: Relax fixing bound constraints
+\end{itemize}
+
+\paragraph{hessian\_constant:}\label{opt:hessian_constant} Indicates whether the problem is a quadratic problem \\
+ Activating this option will cause Ipopt to ask for the Hessian of the Lagrangian function only once from the NLP and reuse this information later. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Assume that Hessian changes
+   \item yes: Assume that Hessian is constant
+\end{itemize}
+
+\paragraph{honor\_original\_bounds:}\label{opt:honor_original_bounds} Indicates whether final points should be projected into original bounds. \\
+ Ipopt might relax the bounds during the optimization (see, e.g., option "bound\_relax\_factor").  This option determines whether the final point should be projected back into the user-provide original bounds after the optimization. The default value for this string option is "yes".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Leave final point unchanged
+   \item yes: Project final point back into original bounds
+\end{itemize}
+
+\paragraph{jac\_c\_constant:}\label{opt:jac_c_constant} Indicates whether all equality constraints are linear \\
+ Activating this option will cause Ipopt to ask for the Jacobian of the equality constraints only once from the NLP and reuse this information later. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Don't assume that all equality constraints are linear
+   \item yes: Assume that equality constraints Jacobian are constant
+\end{itemize}
+
+\paragraph{jac\_d\_constant:}\label{opt:jac_d_constant} Indicates whether all inequality constraints are linear \\
+ Activating this option will cause Ipopt to ask for the Jacobian of the inequality constraints only once from the NLP and reuse this information later. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Don't assume that all inequality constraints are linear
+   \item yes: Assume that equality constraints Jacobian are constant
+\end{itemize}
+
+\paragraph{kappa\_d:}\label{opt:kappa_d} Weight for linear damping term (to handle one-sided bounds). \\
+ (see Section 3.7 in implementation paper.) The valid range for this real option is 
+$0 \le {\tt kappa\_d } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-05}$.
+
+
+\paragraph{nlp\_lower\_bound\_inf:}\label{opt:nlp_lower_bound_inf} any bound less or equal this value will be considered -inf (i.e. not lower bounded). \\
+ The valid range for this real option is 
+${\tt -inf} <  {\tt nlp\_lower\_bound\_inf } <  {\tt +inf}$
+and its default value is $-1 \cdot 10^{+19}$.
+
+
+\paragraph{nlp\_upper\_bound\_inf:}\label{opt:nlp_upper_bound_inf} any bound greater or this value will be considered +inf (i.e. not upper bounded). \\
+ The valid range for this real option is 
+${\tt -inf} <  {\tt nlp\_upper\_bound\_inf } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+19}$.
+
+
+\paragraph{num\_linear\_variables:}\label{opt:num_linear_variables} Number of linear variables \\
+ When the Hessian is approximated, it is assumed that the first num\_linear\_variables variables are linear.  The Hessian is then not approximated in this space.  If the get\_number\_of\_nonlinear\_variables method in the TNLP is implemented, this option is ignored. The valid range for this integer option is
+$0 \le {\tt num\_linear\_variables } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\subsection{NLP Scaling}
+\label{sec:NLPScaling}
+\htmlanchor{sec:NLPScaling}
+\paragraph{nlp\_scaling\_constr\_target\_gradient:}\label{opt:nlp_scaling_constr_target_gradient} Target value for constraint function gradient size. \\
+ If a positive number is chosen, the scaling factor the constraint functions is computed so that the gradient has the max norm of the given size at the starting point.  This overrides nlp\_scaling\_max\_gradient for the constraint functions. The valid range for this real option is 
+$0 \le {\tt nlp\_scaling\_constr\_target\_gradient } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{nlp\_scaling\_max\_gradient:}\label{opt:nlp_scaling_max_gradient} Maximum gradient after NLP scaling. \\
+ This is the gradient scaling cut-off. If the maximum gradient is above this value, then gradient based scaling will be performed. Scaling parameters are calculated to scale the maximum gradient back to this value. (This is g\_max in Section 3.8 of the implementation paper.) Note: This option is only used if "nlp\_scaling\_method" is chosen as "gradient-based". The valid range for this real option is 
+$0 <  {\tt nlp\_scaling\_max\_gradient } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{nlp\_scaling\_method:}\label{opt:nlp_scaling_method} Select the technique used for scaling the NLP. \\
+ Selects the technique used for scaling the problem internally before it is solved. For user-scaling, the parameters come from the NLP. If you are using AMPL, they can be specified through suffixes ("scaling\_factor") The default value for this string option is "gradient-based".
+\\ 
+Possible values:
+\begin{itemize}
+   \item none: no problem scaling will be performed
+   \item user-scaling: scaling parameters will come from the user
+   \item gradient-based: scale the problem so the maximum gradient at the starting point is scaling\_max\_gradient
+   \item equilibration-based: scale the problem so that first derivatives are of order 1 at random points (only available with MC19)
+\end{itemize}
+
+\paragraph{nlp\_scaling\_min\_value:}\label{opt:nlp_scaling_min_value} Minimum value of gradient-based scaling values. \\
+ This is the lower bound for the scaling factors computed by gradient-based scaling method.  If some derivatives of some functions are huge, the scaling factors will otherwise become very small, and the (unscaled) final constraint violation, for example, might then be significant.  Note: This option is only used if "nlp\_scaling\_method" is chosen as "gradient-based". The valid range for this real option is 
+$0 \le {\tt nlp\_scaling\_min\_value } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{nlp\_scaling\_obj\_target\_gradient:}\label{opt:nlp_scaling_obj_target_gradient} Target value for objective function gradient size. \\
+ If a positive number is chosen, the scaling factor the objective function is computed so that the gradient has the max norm of the given size at the starting point.  This overrides nlp\_scaling\_max\_gradient for the objective function. The valid range for this real option is 
+$0 \le {\tt nlp\_scaling\_obj\_target\_gradient } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{obj\_scaling\_factor:}\label{opt:obj_scaling_factor} Scaling factor for the objective function. \\
+ This option sets a scaling factor for the objective function. The scaling is seen internally by Ipopt but the unscaled objective is reported in the console output. If additional scaling parameters are computed (e.g. user-scaling or gradient-based), both factors are multiplied. If this value is chosen to be negative, Ipopt will maximize the objective function instead of minimizing it. The valid range for this real option is 
+${\tt -inf} <  {\tt obj\_scaling\_factor } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\subsection{Output}
+\label{sec:Output}
+\htmlanchor{sec:Output}
+\paragraph{file\_print\_level:}\label{opt:file_print_level} Verbosity level for output file. \\
+ NOTE: This option only works when read from the ipopt.opt options file! Determines the verbosity level for the file specified by "output\_file".  By default it is the same as "print\_level". The valid range for this integer option is
+$0 \le {\tt file\_print\_level } \le 12$
+and its default value is $5$.
+
+
+\paragraph{inf\_pr\_output:}\label{opt:inf_pr_output} Determines what value is printed in the "inf\_pr" output column. \\
+ Ipopt works with a reformulation of the original problem, where slacks are introduced and the problem might have been scaled.  The choice "internal" prints out the constraint violation of this formulation. With "original" the true constraint violation in the original NLP is printed. The default value for this string option is "original".
+\\ 
+Possible values:
+\begin{itemize}
+   \item internal: max-norm of violation of internal equality constraints
+   \item original: maximal constraint violation in original NLP
+\end{itemize}
+
+\paragraph{option\_file\_name:}\label{opt:option_file_name} File name of options file (to overwrite default). \\
+ By default, the name of the Ipopt options file is "ipopt.opt" - or something else if specified in the IpoptApplication::Initialize call. If this option is set by SetStringValue BEFORE the options file is read, it specifies the name of the options file.  It does not make any sense to specify this option within the options file. The default value for this string option is "".
+\\ 
+Possible values:
+\begin{itemize}
+   \item *: Any acceptable standard file name
+\end{itemize}
+
+\paragraph{output\_file:}\label{opt:output_file} File name of desired output file (leave unset for no file output). \\
+ NOTE: This option only works when read from the ipopt.opt options file! An output file with this name will be written (leave unset for no file output).  The verbosity level is by default set to "print\_level", but can be overridden with "file\_print\_level".  The file name is changed to use only small letters. The default value for this string option is "".
+\\ 
+Possible values:
+\begin{itemize}
+   \item *: Any acceptable standard file name
+\end{itemize}
+
+\paragraph{print\_frequency\_iter:}\label{opt:print_frequency_iter} Determines at which iteration frequency the summarizing iteration output line should be printed. \\
+ Summarizing iteration output is printed every print\_frequency\_iter iterations, if at least print\_frequency\_time seconds have passed since last output. The valid range for this integer option is
+$1 \le {\tt print\_frequency\_iter } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{print\_frequency\_time:}\label{opt:print_frequency_time} Determines at which time frequency the summarizing iteration output line should be printed. \\
+ Summarizing iteration output is printed if at least print\_frequency\_time seconds have passed since last output and the iteration number is a multiple of print\_frequency\_iter. The valid range for this real option is 
+$0 \le {\tt print\_frequency\_time } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{print\_info\_string:}\label{opt:print_info_string} Enables printing of additional info string at end of iteration output. \\
+ This string contains some insider information about the current iteration.  For details, look for "Diagnostic Tags" in the Ipopt documentation. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't print string
+   \item yes: print string at end of each iteration output
+\end{itemize}
+
+\paragraph{print\_level:}\label{opt:print_level} Output verbosity level. \\
+ Sets the default verbosity level for console output. The larger this value the more detailed is the output. The valid range for this integer option is
+$0 \le {\tt print\_level } \le 12$
+and its default value is $5$.
+
+
+\paragraph{print\_options\_documentation:}\label{opt:print_options_documentation} Switch to print all algorithmic options. \\
+ If selected, the algorithm will print the list of all available algorithmic options with some documentation before solving the optimization problem. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't print list
+   \item yes: print list
+\end{itemize}
+
+\paragraph{print\_timing\_statistics:}\label{opt:print_timing_statistics} Switch to print timing statistics. \\
+ If selected, the program will print the CPU usage (user time) for selected tasks. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't print statistics
+   \item yes: print all timing statistics
+\end{itemize}
+
+\paragraph{print\_user\_options:}\label{opt:print_user_options} Print all options set by the user. \\
+ If selected, the algorithm will print the list of all options set by the user including their values and whether they have been used.  In some cases this information might be incorrect, due to the internal program flow. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't print options
+   \item yes: print options
+\end{itemize}
+
+\paragraph{replace\_bounds:}\label{opt:replace_bounds} Indicates if all variable bounds should be replaced by inequality constraints \\
+ This option must be set for the inexact algorithm The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: leave bounds on variables
+   \item yes: replace variable bounds by inequality constraints
+\end{itemize}
+
+\paragraph{skip\_finalize\_solution\_call:}\label{opt:skip_finalize_solution_call} Indicates if call to NLP::FinalizeSolution after optimization should be suppressed \\
+ In some Ipopt applications, the user might want to call the FinalizeSolution method separately.  Setting this option to "yes" will cause the IpoptApplication object to suppress the default call to that method. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: call FinalizeSolution
+   \item yes: do not call FinalizeSolution
+\end{itemize}
+
+\subsection{Pardiso Linear Solver}
+\label{sec:PardisoLinearSolver}
+\htmlanchor{sec:PardisoLinearSolver}
+\paragraph{pardiso\_iter\_coarse\_size:}\label{opt:pardiso_iter_coarse_size} Maximum Size of Coarse Grid Matrix \\
+ DPARM(3) The valid range for this integer option is
+$1 \le {\tt pardiso\_iter\_coarse\_size } <  {\tt +inf}$
+and its default value is $5000$.
+
+
+\paragraph{pardiso\_iter\_dropping\_factor:}\label{opt:pardiso_iter_dropping_factor} dropping value for incomplete factor \\
+ DPARM(5) The valid range for this real option is 
+$0 <  {\tt pardiso\_iter\_dropping\_factor } <  1$
+and its default value is $0.5$.
+
+
+\paragraph{pardiso\_iter\_dropping\_schur:}\label{opt:pardiso_iter_dropping_schur} dropping value for sparsify schur complement factor \\
+ DPARM(6) The valid range for this real option is 
+$0 <  {\tt pardiso\_iter\_dropping\_schur } <  1$
+and its default value is $0.1$.
+
+
+\paragraph{pardiso\_iter\_inverse\_norm\_factor:}\label{opt:pardiso_iter_inverse_norm_factor} ~ \\
+ DPARM(8) The valid range for this real option is 
+$1 <  {\tt pardiso\_iter\_inverse\_norm\_factor } <  {\tt +inf}$
+and its default value is $5 \cdot 10^{+06}$.
+
+
+\paragraph{pardiso\_iter\_max\_levels:}\label{opt:pardiso_iter_max_levels} Maximum Size of Grid Levels \\
+ DPARM(4) The valid range for this integer option is
+$1 \le {\tt pardiso\_iter\_max\_levels } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{pardiso\_iter\_max\_row\_fill:}\label{opt:pardiso_iter_max_row_fill} max fill for each row \\
+ DPARM(7) The valid range for this integer option is
+$1 \le {\tt pardiso\_iter\_max\_row\_fill } <  {\tt +inf}$
+and its default value is $10000000$.
+
+
+\paragraph{pardiso\_iter\_relative\_tol:}\label{opt:pardiso_iter_relative_tol} Relative Residual Convergence \\
+ DPARM(2) The valid range for this real option is 
+$0 <  {\tt pardiso\_iter\_relative\_tol } <  1$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{pardiso\_iterative:}\label{opt:pardiso_iterative} Switch on iterative solver in Pardiso library \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no
+   \item yes
+\end{itemize}
+
+\paragraph{pardiso\_matching\_strategy:}\label{opt:pardiso_matching_strategy} Matching strategy to be used by Pardiso \\
+ This is IPAR(13) in Pardiso manual.  This option is only available if Ipopt has been compiled with Pardiso. The default value for this string option is "complete+2x2".
+\\ 
+Possible values:
+\begin{itemize}
+   \item complete: Match complete (IPAR(13)=1)
+   \item complete+2x2: Match complete+2x2 (IPAR(13)=2)
+   \item constraints: Match constraints (IPAR(13)=3)
+\end{itemize}
+
+\paragraph{pardiso\_max\_droptol\_corrections:}\label{opt:pardiso_max_droptol_corrections} Maximal number of decreases of drop tolerance during one solve. \\
+ This is relevant only for iterative Pardiso options. The valid range for this integer option is
+$1 \le {\tt pardiso\_max\_droptol\_corrections } <  {\tt +inf}$
+and its default value is $4$.
+
+
+\paragraph{pardiso\_max\_iter:}\label{opt:pardiso_max_iter} Maximum number of Krylov-Subspace Iteration \\
+ DPARM(1) The valid range for this integer option is
+$1 \le {\tt pardiso\_max\_iter } <  {\tt +inf}$
+and its default value is $500$.
+
+
+\paragraph{pardiso\_msglvl:}\label{opt:pardiso_msglvl} Pardiso message level \\
+ This determines the amount of analysis output from the Pardiso solver. This is MSGLVL in the Pardiso manual. The valid range for this integer option is
+$0 \le {\tt pardiso\_msglvl } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{pardiso\_out\_of\_core\_power:}\label{opt:pardiso_out_of_core_power} Enables out-of-core variant of Pardiso \\
+ Setting this option to a positive integer k makes Pardiso work in the out-of-core variant where the factor is split in 2\^k subdomains.  This is IPARM(50) in the Pardiso manual.  This option is only available if Ipopt has been compiled with Pardiso. The valid range for this integer option is
+$0 \le {\tt pardiso\_out\_of\_core\_power } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{pardiso\_redo\_symbolic\_fact\_only\_if\_inertia\_wrong:}\label{opt:pardiso_redo_symbolic_fact_only_if_inertia_wrong} Toggle for handling case when elements were perturbed by Pardiso. \\
+ This option is only available if Ipopt has been compiled with Pardiso. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Always redo symbolic factorization when elements were perturbed
+   \item yes: Only redo symbolic factorization when elements were perturbed if also the inertia was wrong
+\end{itemize}
+
+\paragraph{pardiso\_repeated\_perturbation\_means\_singular:}\label{opt:pardiso_repeated_perturbation_means_singular} Interpretation of perturbed elements. \\
+ This option is only available if Ipopt has been compiled with Pardiso. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Don't assume that matrix is singular if elements were perturbed after recent symbolic factorization
+   \item yes: Assume that matrix is singular if elements were perturbed after recent symbolic factorization
+\end{itemize}
+
+\paragraph{pardiso\_skip\_inertia\_check:}\label{opt:pardiso_skip_inertia_check} Always pretend inertia is correct. \\
+ Setting this option to "yes" essentially disables inertia check. This option makes the algorithm non-robust and easily fail, but it might give some insight into the necessity of inertia control. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: check inertia
+   \item yes: skip inertia check
+\end{itemize}
+
+\subsection{Restoration Phase}
+\label{sec:RestorationPhase}
+\htmlanchor{sec:RestorationPhase}
+\paragraph{bound\_mult\_reset\_threshold:}\label{opt:bound_mult_reset_threshold} Threshold for resetting bound multipliers after the restoration phase. \\
+ After returning from the restoration phase, the bound multipliers are updated with a Newton step for complementarity.  Here, the change in the primal variables during the entire restoration phase is taken to be the corresponding primal Newton step. However, if after the update the largest bound multiplier exceeds the threshold specified by this option, the multipliers are all reset to 1. The valid range for this real option is 
+$0 \le {\tt bound\_mult\_reset\_threshold } <  {\tt +inf}$
+and its default value is $1000$.
+
+
+\paragraph{constr\_mult\_reset\_threshold:}\label{opt:constr_mult_reset_threshold} Threshold for resetting equality and inequality multipliers after restoration phase. \\
+ After returning from the restoration phase, the constraint multipliers are recomputed by a least square estimate.  This option triggers when those least-square estimates should be ignored. The valid range for this real option is 
+$0 \le {\tt constr\_mult\_reset\_threshold } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{evaluate\_orig\_obj\_at\_resto\_trial:}\label{opt:evaluate_orig_obj_at_resto_trial} Determines if the original objective function should be evaluated at restoration phase trial points. \\
+ Setting this option to "yes" makes the restoration phase algorithm evaluate the objective function of the original problem at every trial point encountered during the restoration phase, even if this value is not required.  In this way, it is guaranteed that the original objective function can be evaluated without error at all accepted iterates; otherwise the algorithm might fail at a point where the restoration phase accepts an iterate that is good for the restoration phase problem, but [...]
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: skip evaluation
+   \item yes: evaluate at every trial point
+\end{itemize}
+
+\paragraph{expect\_infeasible\_problem:}\label{opt:expect_infeasible_problem} Enable heuristics to quickly detect an infeasible problem. \\
+ This options is meant to activate heuristics that may speed up the infeasibility determination if you expect that there is a good chance for the problem to be infeasible.  In the filter line search procedure, the restoration phase is called more quickly than usually, and more reduction in the constraint violation is enforced before the restoration phase is left. If the problem is square, this option is enabled automatically. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: the problem probably be feasible
+   \item yes: the problem has a good chance to be infeasible
+\end{itemize}
+
+\paragraph{expect\_infeasible\_problem\_ctol:}\label{opt:expect_infeasible_problem_ctol} Threshold for disabling "expect\_infeasible\_problem" option. \\
+ If the constraint violation becomes smaller than this threshold, the "expect\_infeasible\_problem" heuristics in the filter line search are disabled. If the problem is square, this options is set to 0. The valid range for this real option is 
+$0 \le {\tt expect\_infeasible\_problem\_ctol } <  {\tt +inf}$
+and its default value is $0.001$.
+
+
+\paragraph{expect\_infeasible\_problem\_ytol:}\label{opt:expect_infeasible_problem_ytol} Multiplier threshold for activating "expect\_infeasible\_problem" option. \\
+ If the max norm of the constraint multipliers becomes larger than this value and "expect\_infeasible\_problem" is chosen, then the restoration phase is entered. The valid range for this real option is 
+$0 <  {\tt expect\_infeasible\_problem\_ytol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+08}$.
+
+
+\paragraph{max\_resto\_iter:}\label{opt:max_resto_iter} Maximum number of successive iterations in restoration phase. \\
+ The algorithm terminates with an error message if the number of iterations successively taken in the restoration phase exceeds this number. The valid range for this integer option is
+$0 \le {\tt max\_resto\_iter } <  {\tt +inf}$
+and its default value is $3000000$.
+
+
+\paragraph{max\_soft\_resto\_iters:}\label{opt:max_soft_resto_iters} Maximum number of iterations performed successively in soft restoration phase. \\
+ If the soft restoration phase is performed for more than so many iterations in a row, the regular restoration phase is called. The valid range for this integer option is
+$0 \le {\tt max\_soft\_resto\_iters } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{required\_infeasibility\_reduction:}\label{opt:required_infeasibility_reduction} Required reduction of infeasibility before leaving restoration phase. \\
+ The restoration phase algorithm is performed, until a point is found that is acceptable to the filter and the infeasibility has been reduced by at least the fraction given by this option. The valid range for this real option is 
+$0 \le {\tt required\_infeasibility\_reduction } <  1$
+and its default value is $0.9$.
+
+
+\paragraph{resto\_failure\_feasibility\_threshold:}\label{opt:resto_failure_feasibility_threshold} Threshold for primal infeasibility to declare failure of restoration phase. \\
+ If the restoration phase is terminated because of the "acceptable" termination criteria and the primal infeasibility is smaller than this value, the restoration phase is declared to have failed.  The default value is 1e2*tol, where tol is the general termination tolerance. The valid range for this real option is 
+$0 \le {\tt resto\_failure\_feasibility\_threshold } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{resto\_penalty\_parameter:}\label{opt:resto_penalty_parameter} Penalty parameter in the restoration phase objective function. \\
+ This is the parameter rho in equation (31a) in the Ipopt implementation paper. The valid range for this real option is 
+$0 <  {\tt resto\_penalty\_parameter } <  {\tt +inf}$
+and its default value is $1000$.
+
+
+\paragraph{resto\_proximity\_weight:}\label{opt:resto_proximity_weight} Weighting factor for the proximity term in restoration phase objective. \\
+ This determines how the parameter zera in equation (29a) in the implementation paper is computed.  zeta here is resto\_proximity\_weight*sqrt(mu), where mu is the current barrier parameter. The valid range for this real option is 
+$0 \le {\tt resto\_proximity\_weight } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{soft\_resto\_pderror\_reduction\_factor:}\label{opt:soft_resto_pderror_reduction_factor} Required reduction in primal-dual error in the soft restoration phase. \\
+ The soft restoration phase attempts to reduce the primal-dual error with regular steps. If the damped primal-dual step (damped only to satisfy the fraction-to-the-boundary rule) is not decreasing the primal-dual error by at least this factor, then the regular restoration phase is called. Choosing "0" here disables the soft restoration phase. The valid range for this real option is 
+$0 \le {\tt soft\_resto\_pderror\_reduction\_factor } <  {\tt +inf}$
+and its default value is $0.9999$.
+
+
+\paragraph{start\_with\_resto:}\label{opt:start_with_resto} Tells algorithm to switch to restoration phase in first iteration. \\
+ Setting this option to "yes" forces the algorithm to switch to the feasibility restoration phase in the first iteration. If the initial point is feasible, the algorithm will abort with a failure. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't force start in restoration phase
+   \item yes: force start in restoration phase
+\end{itemize}
+
+\subsection{Step Calculation}
+\label{sec:StepCalculation}
+\htmlanchor{sec:StepCalculation}
+\paragraph{fast\_step\_computation:}\label{opt:fast_step_computation} Indicates if the linear system should be solved quickly. \\
+ If set to yes, the algorithm assumes that the linear system that is solved to obtain the search direction, is solved sufficiently well. In that case, no residuals are computed, and the computation of the search direction is a little faster. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Verify solution of linear system by computing residuals.
+   \item yes: Trust that linear systems are solved well.
+\end{itemize}
+
+\paragraph{first\_hessian\_perturbation:}\label{opt:first_hessian_perturbation} Size of first x-s perturbation tried. \\
+ The first value tried for the x-s perturbation in the inertia correction scheme.(This is delta\_0 in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt first\_hessian\_perturbation } <  {\tt +inf}$
+and its default value is $0.0001$.
+
+
+\paragraph{jacobian\_regularization\_exponent:}\label{opt:jacobian_regularization_exponent} Exponent for mu in the regularization for rank-deficient constraint Jacobians. \\
+ (This is kappa\_c in the implementation paper.) The valid range for this real option is 
+$0 \le {\tt jacobian\_regularization\_exponent } <  {\tt +inf}$
+and its default value is $0.25$.
+
+
+\paragraph{jacobian\_regularization\_value:}\label{opt:jacobian_regularization_value} Size of the regularization for rank-deficient constraint Jacobians. \\
+ (This is bar delta\_c in the implementation paper.) The valid range for this real option is 
+$0 \le {\tt jacobian\_regularization\_value } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{max\_hessian\_perturbation:}\label{opt:max_hessian_perturbation} Maximum value of regularization parameter for handling negative curvature. \\
+ In order to guarantee that the search directions are indeed proper descent directions, Ipopt requires that the inertia of the (augmented) linear system for the step computation has the correct number of negative and positive eigenvalues. The idea is that this guides the algorithm away from maximizers and makes Ipopt more likely converge to first order optimal points that are minimizers. If the inertia is not correct, a multiple of the identity matrix is added to the Hessian of the Lagra [...]
+$0 <  {\tt max\_hessian\_perturbation } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+20}$.
+
+
+\paragraph{max\_refinement\_steps:}\label{opt:max_refinement_steps} Maximum number of iterative refinement steps per linear system solve. \\
+ Iterative refinement (on the full unsymmetric system) is performed for each right hand side.  This option determines the maximum number of iterative refinement steps. The valid range for this integer option is
+$0 \le {\tt max\_refinement\_steps } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{mehrotra\_algorithm:}\label{opt:mehrotra_algorithm} Indicates if we want to do Mehrotra's algorithm. \\
+ If set to yes, Ipopt runs as Mehrotra's predictor-corrector algorithm. This works usually very well for LPs and convex QPs.  This automatically disables the line search, and chooses the (unglobalized) adaptive mu strategy with the "probing" oracle, and uses "corrector\_type=affine" without any safeguards; you should not set any of those options explicitly in addition.  Also, unless otherwise specified, the values of "bound\_push", "bound\_frac", and "bound\_mult\_init\_val" are set more [...]
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Do the usual Ipopt algorithm.
+   \item yes: Do Mehrotra's predictor-corrector algorithm.
+\end{itemize}
+
+\paragraph{min\_hessian\_perturbation:}\label{opt:min_hessian_perturbation} Smallest perturbation of the Hessian block. \\
+ The size of the perturbation of the Hessian block is never selected smaller than this value, unless no perturbation is necessary. (This is delta\_w\^min in implementation paper.) The valid range for this real option is 
+$0 \le {\tt min\_hessian\_perturbation } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-20}$.
+
+
+\paragraph{min\_refinement\_steps:}\label{opt:min_refinement_steps} Minimum number of iterative refinement steps per linear system solve. \\
+ Iterative refinement (on the full unsymmetric system) is performed for each right hand side.  This option determines the minimum number of iterative refinements (i.e. at least "min\_refinement\_steps" iterative refinement steps are enforced per right hand side.) The valid range for this integer option is
+$0 \le {\tt min\_refinement\_steps } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{neg\_curv\_test\_tol:}\label{opt:neg_curv_test_tol} Tolerance for heuristic to ignore wrong inertia. \\
+ If positive, incorrect inertia in the augmented system is ignored, and we test if the direction is a direction of positive curvature.  This tolerance determines when the direction is considered to be sufficiently positive. The valid range for this real option is 
+$0 <  {\tt neg\_curv\_test\_tol } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{perturb\_always\_cd:}\label{opt:perturb_always_cd} Active permanent perturbation of constraint linearization. \\
+ This options makes the delta\_c and delta\_d perturbation be used for the computation of every search direction.  Usually, it is only used when the iteration matrix is singular. The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: perturbation only used when required
+   \item yes: always use perturbation
+\end{itemize}
+
+\paragraph{perturb\_dec\_fact:}\label{opt:perturb_dec_fact} Decrease factor for x-s perturbation. \\
+ The factor by which the perturbation is decreased when a trial value is deduced from the size of the most recent successful perturbation. (This is kappa\_w\^- in the implementation paper.) The valid range for this real option is 
+$0 <  {\tt perturb\_dec\_fact } <  1$
+and its default value is $0.333333$.
+
+
+\paragraph{perturb\_inc\_fact:}\label{opt:perturb_inc_fact} Increase factor for x-s perturbation. \\
+ The factor by which the perturbation is increased when a trial value was not sufficient - this value is used for the computation of all perturbations except for the first. (This is kappa\_w\^+ in the implementation paper.) The valid range for this real option is 
+$1 <  {\tt perturb\_inc\_fact } <  {\tt +inf}$
+and its default value is $8$.
+
+
+\paragraph{perturb\_inc\_fact\_first:}\label{opt:perturb_inc_fact_first} Increase factor for x-s perturbation for very first perturbation. \\
+ The factor by which the perturbation is increased when a trial value was not sufficient - this value is used for the computation of the very first perturbation and allows a different value for for the first perturbation than that used for the remaining perturbations. (This is bar\_kappa\_w\^+ in the implementation paper.) The valid range for this real option is 
+$1 <  {\tt perturb\_inc\_fact\_first } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{residual\_improvement\_factor:}\label{opt:residual_improvement_factor} Minimal required reduction of residual test ratio in iterative refinement. \\
+ If the improvement of the residual test ratio made by one iterative refinement step is not better than this factor, iterative refinement is aborted. The valid range for this real option is 
+$0 <  {\tt residual\_improvement\_factor } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{residual\_ratio\_max:}\label{opt:residual_ratio_max} Iterative refinement tolerance \\
+ Iterative refinement is performed until the residual test ratio is less than this tolerance (or until "max\_refinement\_steps" refinement steps are performed). The valid range for this real option is 
+$0 <  {\tt residual\_ratio\_max } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-10}$.
+
+
+\paragraph{residual\_ratio\_singular:}\label{opt:residual_ratio_singular} Threshold for declaring linear system singular after failed iterative refinement. \\
+ If the residual test ratio is larger than this value after failed iterative refinement, the algorithm pretends that the linear system is singular. The valid range for this real option is 
+$0 <  {\tt residual\_ratio\_singular } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-05}$.
+
+
+\subsection{Uncategorized}
+\label{sec:Uncategorized}
+\htmlanchor{sec:Uncategorized}
+\paragraph{warm\_start\_target\_mu:}\label{opt:warm_start_target_mu} Unsupported! \\
+ The valid range for this real option is 
+${\tt -inf} <  {\tt warm\_start\_target\_mu } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\subsection{Undocumented}
+\label{sec:Undocumented}
+\htmlanchor{sec:Undocumented}
+\paragraph{adaptive\_mu\_safeguard\_factor:}\label{opt:adaptive_mu_safeguard_factor} ~ \\
+ The valid range for this real option is 
+$0 \le {\tt adaptive\_mu\_safeguard\_factor } <  {\tt +inf}$
+and its default value is $0$.
+
+
+\paragraph{chi\_cup:}\label{opt:chi_cup} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt chi\_cup } <  {\tt +inf}$
+and its default value is $1.5$.
+
+
+\paragraph{chi\_hat:}\label{opt:chi_hat} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt chi\_hat } <  {\tt +inf}$
+and its default value is $2$.
+
+
+\paragraph{chi\_tilde:}\label{opt:chi_tilde} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt chi\_tilde } <  {\tt +inf}$
+and its default value is $5$.
+
+
+\paragraph{delta\_y\_max:}\label{opt:delta_y_max} a parameter used to check if the fast direction can be used asthe line search direction (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt delta\_y\_max } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+12}$.
+
+
+\paragraph{epsilon\_c:}\label{opt:epsilon_c} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt epsilon\_c } <  {\tt +inf}$
+and its default value is $0.01$.
+
+
+\paragraph{eta\_min:}\label{opt:eta_min} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt eta\_min } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{eta\_penalty:}\label{opt:eta_penalty} Relaxation factor in the Armijo condition for the penalty function. \\
+ The valid range for this real option is 
+$0 <  {\tt eta\_penalty } <  0.5$
+and its default value is $1 \cdot 10^{-08}$.
+
+
+\paragraph{fast\_des\_fact:}\label{opt:fast_des_fact} a parameter used to check if the fast direction can be used asthe line search direction (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt fast\_des\_fact } <  {\tt +inf}$
+and its default value is $0.1$.
+
+
+\paragraph{gamma\_hat:}\label{opt:gamma_hat} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt gamma\_hat } <  {\tt +inf}$
+and its default value is $0.04$.
+
+
+\paragraph{gamma\_tilde:}\label{opt:gamma_tilde} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt gamma\_tilde } <  {\tt +inf}$
+and its default value is $4$.
+
+
+\paragraph{kappa\_x\_dis:}\label{opt:kappa_x_dis} a parameter used to check if the fast direction can be used asthe line search direction (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt kappa\_x\_dis } <  {\tt +inf}$
+and its default value is $100$.
+
+
+\paragraph{kappa\_y\_dis:}\label{opt:kappa_y_dis} a parameter used to check if the fast direction can be used asthe line search direction (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt kappa\_y\_dis } <  {\tt +inf}$
+and its default value is $10000$.
+
+
+\paragraph{magic\_steps:}\label{opt:magic_steps} Enables magic steps. \\
+ DOESN'T REALLY WORK YET! The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: don't take magic steps
+   \item yes: take magic steps
+\end{itemize}
+
+\paragraph{min\_alpha\_primal:}\label{opt:min_alpha_primal} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt min\_alpha\_primal } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-13}$.
+
+
+\paragraph{mult\_diverg\_feasibility\_tol:}\label{opt:mult_diverg_feasibility_tol} tolerance for deciding if the multipliers are diverging \\
+ The valid range for this real option is 
+$0 <  {\tt mult\_diverg\_feasibility\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-07}$.
+
+
+\paragraph{mult\_diverg\_y\_tol:}\label{opt:mult_diverg_y_tol} tolerance for deciding if the multipliers are diverging \\
+ The valid range for this real option is 
+$0 <  {\tt mult\_diverg\_y\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+08}$.
+
+
+\paragraph{never\_use\_fact\_cgpen\_direction:}\label{opt:never_use_fact_cgpen_direction} Toggle to switch off the fast Chen-Goldfarb direction \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: always compute the fast direction
+   \item yes: never compute the fast direction
+\end{itemize}
+
+\paragraph{never\_use\_piecewise\_penalty\_ls:}\label{opt:never_use_piecewise_penalty_ls} Toggle to switch off the piecewise penalty method \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: always use the piecewise penalty method
+   \item yes: never use the piecewise penalty method
+\end{itemize}
+
+\paragraph{pen\_des\_fact:}\label{opt:pen_des_fact} a parameter used in penalty parameter computation (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt pen\_des\_fact } <  {\tt +inf}$
+and its default value is $0.2$.
+
+
+\paragraph{pen\_init\_fac:}\label{opt:pen_init_fac} a parameter used to choose initial penalty parameterswhen the regularized Newton method is used. \\
+ The valid range for this real option is 
+$0 <  {\tt pen\_init\_fac } <  {\tt +inf}$
+and its default value is $50$.
+
+
+\paragraph{pen\_theta\_max\_fact:}\label{opt:pen_theta_max_fact} Determines upper bound for constraint violation in the filter. \\
+ The algorithmic parameter theta\_max is determined as theta\_max\_fact times the maximum of 1 and the constraint violation at initial point.  Any point with a constraint violation larger than theta\_max is unacceptable to the filter (see Eqn. (21) in implementation paper). The valid range for this real option is 
+$0 <  {\tt pen\_theta\_max\_fact } <  {\tt +inf}$
+and its default value is $10000$.
+
+
+\paragraph{penalty\_init\_max:}\label{opt:penalty_init_max} Maximal value for the intial penalty parameter (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt penalty\_init\_max } <  {\tt +inf}$
+and its default value is $100000$.
+
+
+\paragraph{penalty\_init\_min:}\label{opt:penalty_init_min} Minimal value for the intial penalty parameter for line search(for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt penalty\_init\_min } <  {\tt +inf}$
+and its default value is $1$.
+
+
+\paragraph{penalty\_max:}\label{opt:penalty_max} Maximal value for the penalty parameter (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt penalty\_max } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+30}$.
+
+
+\paragraph{penalty\_update\_compl\_tol:}\label{opt:penalty_update_compl_tol} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt penalty\_update\_compl\_tol } <  {\tt +inf}$
+and its default value is $10$.
+
+
+\paragraph{penalty\_update\_infeasibility\_tol:}\label{opt:penalty_update_infeasibility_tol} Threshold for infeasibility in penalty parameter update test. \\
+ If the new constraint violation is smaller than this tolerance, the penalty parameter is not increased. The valid range for this real option is 
+$0 <  {\tt penalty\_update\_infeasibility\_tol } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-09}$.
+
+
+\paragraph{piecewisepenalty\_gamma\_infeasi:}\label{opt:piecewisepenalty_gamma_infeasi} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt piecewisepenalty\_gamma\_infeasi } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-13}$.
+
+
+\paragraph{piecewisepenalty\_gamma\_obj:}\label{opt:piecewisepenalty_gamma_obj} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt piecewisepenalty\_gamma\_obj } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-13}$.
+
+
+\paragraph{print\_options\_latex\_mode:}\label{opt:print_options_latex_mode} Undocumented \\
+ Undocumented The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Undocumented
+   \item yes: Undocumented
+\end{itemize}
+
+\paragraph{suppress\_all\_output:}\label{opt:suppress_all_output} Undocumented \\
+ Undocumented The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Undocumented
+   \item yes: Undocumented
+\end{itemize}
+
+\paragraph{theta\_min:}\label{opt:theta_min} LIFENG WRITES THIS. \\
+ The valid range for this real option is 
+$0 <  {\tt theta\_min } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{-06}$.
+
+
+\paragraph{vartheta:}\label{opt:vartheta} a parameter used to check if the fast direction can be used asthe line search direction (for Chen-Goldfarb line search). \\
+ The valid range for this real option is 
+$0 <  {\tt vartheta } <  {\tt +inf}$
+and its default value is $0.5$.
+
+
+\paragraph{wsmp\_iterative:}\label{opt:wsmp_iterative} Switches to iterative solver in WSMP. \\
+ EXPERIMENTAL! The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: use direct solver
+   \item yes: use iterative solver
+\end{itemize}
+
+\subsection{Warm Start}
+\label{sec:WarmStart}
+\htmlanchor{sec:WarmStart}
+\paragraph{warm\_start\_bound\_frac:}\label{opt:warm_start_bound_frac} same as bound\_frac for the regular initializer. \\
+ The valid range for this real option is 
+$0 <  {\tt warm\_start\_bound\_frac } \le 0.5$
+and its default value is $0.001$.
+
+
+\paragraph{warm\_start\_bound\_push:}\label{opt:warm_start_bound_push} same as bound\_push for the regular initializer. \\
+ The valid range for this real option is 
+$0 <  {\tt warm\_start\_bound\_push } <  {\tt +inf}$
+and its default value is $0.001$.
+
+
+\paragraph{warm\_start\_entire\_iterate:}\label{opt:warm_start_entire_iterate} Tells algorithm whether to use the GetWarmStartIterate method in the NLP. \\
+ The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: call GetStartingPoint in the NLP
+   \item yes: call GetWarmStartIterate in the NLP
+\end{itemize}
+
+\paragraph{warm\_start\_init\_point:}\label{opt:warm_start_init_point} Warm-start for initial point \\
+ Indicates whether this optimization should use a warm start initialization, where values of primal and dual variables are given (e.g., from a previous optimization of a related problem.) The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: do not use the warm start initialization
+   \item yes: use the warm start initialization
+\end{itemize}
+
+\paragraph{warm\_start\_mult\_bound\_push:}\label{opt:warm_start_mult_bound_push} same as mult\_bound\_push for the regular initializer. \\
+ The valid range for this real option is 
+$0 <  {\tt warm\_start\_mult\_bound\_push } <  {\tt +inf}$
+and its default value is $0.001$.
+
+
+\paragraph{warm\_start\_mult\_init\_max:}\label{opt:warm_start_mult_init_max} Maximum initial value for the equality multipliers. \\
+ The valid range for this real option is 
+${\tt -inf} <  {\tt warm\_start\_mult\_init\_max } <  {\tt +inf}$
+and its default value is $1 \cdot 10^{+06}$.
+
+
+\paragraph{warm\_start\_same\_structure:}\label{opt:warm_start_same_structure} Indicates whether a problem with a structure identical to the previous one is to be solved. \\
+ If "yes" is chosen, then the algorithm assumes that an NLP is now to be solved, whose structure is identical to one that already was considered (with the same NLP object). The default value for this string option is "no".
+\\ 
+Possible values:
+\begin{itemize}
+   \item no: Assume this is a new problem.
+   \item yes: Assume this is problem has known structure
+\end{itemize}
+
+\paragraph{warm\_start\_slack\_bound\_frac:}\label{opt:warm_start_slack_bound_frac} same as slack\_bound\_frac for the regular initializer. \\
+ The valid range for this real option is 
+$0 <  {\tt warm\_start\_slack\_bound\_frac } \le 0.5$
+and its default value is $0.001$.
+
+
+\paragraph{warm\_start\_slack\_bound\_push:}\label{opt:warm_start_slack_bound_push} same as slack\_bound\_push for the regular initializer. \\
+ The valid range for this real option is 
+$0 <  {\tt warm\_start\_slack\_bound\_push } <  {\tt +inf}$
+and its default value is $0.001$.
+
+
diff --git a/doc/options_set.tex b/doc/options_set.tex
new file mode 100644
index 0000000..13a2fc9
--- /dev/null
+++ b/doc/options_set.tex
@@ -0,0 +1,223 @@
+
+\begin{PageSummary}
+\PageName{Setting Options}
+\PageSection{Passing options to \Bonmin }{sec:opt_opt}
+\PageSection{List of options}{sec:options_list}
+\PageSection{Getting good solutions to nonconvex problems}{sec:opt_nonconv}
+\PageSection{Notes on \Ipopt\ options}{sec:opt_ipopt}
+\end{PageSummary}
+
+
+\PageTitle{Options}{sec:opt}
+\subsectionH{Passing options to \Bonmin}{sec:opt_opt}
+Options in \Bonmin\ can be set in several different ways.
+
+First, you can set options by putting them in a file called {\tt
+bonmin.opt} in the directory where {\tt bonmin} is executing. If you
+are familiar with the file
+\href{\IpoptDoc{34}}{\tt
+ipopt.opt} (formerly named {\tt PARAMS.DAT}) in {\tt Ipopt}, the
+syntax of the {\tt bonmin.opt} is similar. For those not familiar
+with {\tt ipopt.opt}, the syntax is simply to put the name of the
+option followed by its value, with no more than two options on a
+single line. Anything on a line after a \# symbol is ignored (i.e.,
+treated as a comment).
+
+Note that \Bonmin\ sets options for {\tt
+Ipopt}. If you want to set options for {\tt Ipopt} (when used inside \Bonmin) you have to set them
+in the file {\tt bonmin.opt} (the standard {\tt Ipopt} option file {\tt ipopt.opt}
+is not read by \Bonmin.)
+For a list and a description of all the {\tt Ipopt} options, the
+reader may refer to the
+\footlink{\IpoptDoc{39}}{documentation
+of {\tt
+Ipopt}}.
+
+Since {\tt bonmin.opt} contains both {\tt Ipopt} and \Bonmin\ options, for clarity
+all \Bonmin\ options should be preceded with the prefix ``{\tt bonmin.}'' in {\tt bonmin.opt}~.
+Note that some options can also be passed to the MILP subsolver used by \Bonmin\
+in the outer approximation decomposition
+and the hybrid (see Subsection \ref{sec:sub_solvers}).
+
+The most important option in \Bonmin\ is the choice of the solution
+algorithm. This can be set by using the option named {\tt
+bonmin.algorithm} which can be set to {\tt B-BB}, {\tt B-OA}, {\tt
+B-QG}, or {\tt B-Hyb} (it's default value is {\tt B-BB}). Depending
+on the value of this option, certain other options may be available
+or not. \latexhtml{Table \ref{tab:options} gives t}{T}he list of options together
+with their types, default values and availability in each of the
+four algorithms\latexhtml{}{ can be found \href{\OptListPage \#sec:options_list}{here}}. The column labeled `type' indicates the type of the
+parameter (`F' stands for float, `I' for integer, and `S' for
+string). The column labeled `default' indicates the global default
+value. Then for each of the algorithms {\tt B-BB}, {\tt B-OA},
+{\tt B-QG}, {\tt B-Hyb}, {\tt B-Ecp}, and {\tt B-iFP} `$\surd$' indicates that the option is
+available for that particular algorithm
+while `$-$' indicates that it is not.
+
+An example of a {\tt bonmin.opt} file including all the options
+with their default values is located in the {\tt Test}
+sub-directory.
+
+A small example is as follows:
+\begin{verbatim}
+   bonmin.bb_log_level 4
+   bonmin.algorithm B-BB
+   print_level 6
+\end{verbatim}
+This sets the level of output of the branch-and-bound in \Bonmin\ to $4$, the algorithm to branch-and-bound
+and the output level for {\tt Ipopt} to $6$.
+
+When \Bonmin\ is run from within {\tt AMPL}, another way to set
+an option is via the
+internal {\tt AMPL} command {\tt options}.
+For example
+\begin{verbatim}
+options bonmin_options "bonmin.bb_log-level 4 \
+                  bonmin.algorithm B-BB print_level 6";
+\end{verbatim}
+has the same affect as the {\tt bonmin.opt} example above.
+Note that any \Bonmin\ option specified in the file {\tt bonmin.opt}
+overrides any setting of that option from within {\tt AMPL}.
+
+A third way is to set options directly in the C/C++ code when
+running \Bonmin\ from inside a C/C++ program as is explained in the reference manual.
+
+A detailed description of all of the \Bonmin\ options is given \latexhtml{in Appendix \ref{sec:optList}}{\href{\OptListPage \#sec:options_list}{here}}.
+In the following, we give some more details on options for the MILP subsolver and
+on the options specifically designed
+for nonconvex problems.
+
+\latexhtml{
+\include{options_table}
+}{
+}
+
+\subsectionH{Passing options to local search based heuristics and oa generators}{sec:sub_solvers}
+%\label{sec:sub_solvers}
+Several parts of the algorithms in \Bonmin\ are based on solving a simplified version of the problem with another instance of \Bonmin:
+Outer Approximation Decomposition (called in {\tt B-Hyb} at the root node)
+and Feasibility Pump for MINLP (called in B-Hyb or B-BB at the root node), RINS, RENS, Local Branching.
+
+In all these cases, one can pass options to the sub-algorithm used through the bonmin.opt file. The basic principle is
+that the {\tt bonmin.} prefix  is replaced with a prefix that identifies the sub-algorithm used:
+\begin{itemize}
+\item {\tt oa\_decomposition.} to pass options to Outer Approximation Decomposition,
+\item {\tt pump\_for\_minlp.} to pass options to Feasibility Pump for MINLP
+\item {\tt rins.} to pass options to RINS,
+\item {\tt rens.} to pass options to RENS,
+\item {\tt local\_branch.} to pass options to Local Branching.
+\end{itemize}
+
+
+For example, we may want to run a maximum of 60 seconds of the feasibility pump for MINLP until 6 solutions are found at the beginning of the hybrid algorithm. To do so 
+we set the following option in {\tt bonmin.opt}
+\begin{verbatim}
+bonmin.algorithm B-Hyb
+
+bonmin.pump_for_minlp yes       # tells to run fp for MINLP
+pump_for_minlp.time_limit 60    # set a time limit for the pump
+pump_for_minlp.solution_limit 6 # set a solution limit
+\end{verbatim}
+
+Note that the actual solution and time limit will be the minimum of the global limits set for \Bonmin.
+
+A slightly more complicated set of options may be used when using RINS. Say for example that we want to run RINS inside B-BB. Each time RINS is called we want
+to solve the small-size MINLP generated using B-QG (we may run any algorithm available in \Bonmin for solving an MINLP) and want to stop as soon as B-QG found 1 solution.
+We set the following options in bonmin.opt
+
+\begin{verbatim}
+bonmin.algorithm B-BB
+
+bonmin.rins yes
+rins.algorithm B-QG
+rins.solution_limit 1
+
+\end{verbatim}
+This example shows that it is possible to set any option used in the sub-algorithm to be different than the one used for the main algorithm.
+
+
+In the context of OA and FP for MINLP, a standard MILP solver is used.
+Several option are available for configuring this MILP solver.
+\Bonmin\ allows a choice of different MILP solvers through the option
+{\tt bonmin.milp\_subsolver}. Values for this option are: {\tt Cbc\_D} which uses {\tt Cbc} with its
+default settings, {\tt Cplex} which uses {\tt Cplex} with its default settings, and
+{\tt Cbc\_Par} which uses a version of {\tt Cbc} that can be parametrized by the user.
+The options that can be set in {\tt Cbc\_Par} are the number of strong-branching candidates,
+the number of branches before pseudo costs are to be trusted, and the frequency of the various cut generators
+(these options are signaled in Table \ref{tab:options}).
+
+\subsectionH{Getting good solutions to nonconvex problems}{sec:opt_nonconv}
+\label{sec:non_convex}
+To solve a problem with non-convex constraints, one should only use the branch-and-bound algorithm {\tt B-BB}.
+
+
+A few options have been designed in \Bonmin\ specifically to treat
+problems that do not have a convex continuous relaxation.
+In such problems, the solutions obtained from {\tt Ipopt} are
+not necessarily globally optimal, but are only locally optimal. Also the outer-approximation
+constraints are not necessarily valid inequalities for the problem.
+
+No specific heuristic method for treating nonconvex problems is implemented
+yet within the OA framework.
+But for the pure branch-and-bound {\tt B-BB}, we implemented a few options having
+in mind that lower bounds provided by {\tt Ipopt} should not be trusted, and with the goal of
+trying to get good solutions. Such options are at a very experimental stage.
+
+First, in the context of nonconvex problems, {\tt Ipopt} may find different local optima when started
+from different starting points. The two options {\tt num\_re\-solve\_at\_root} and {\tt num\_resolve\_at\_node}
+allow for solving the root node or each node of the tree, respectively, with a user-specified
+number of different randomly-chosen
+starting points, saving the best solution found. Note that the function to generate a random starting point
+is very na\"{\i}ve: it chooses a random point (uniformly) between the bounds provided for the variable.
+In particular if there are some functions
+that can not be evaluated at some points of the domain, it may pick such points,
+ and so it is not robust in that respect.
+
+Secondly, since the solution given by {\tt Ipopt} does not truly give a lower bound, we allow for
+changing the fathoming rule
+to continue branching even if the solution value to the current node is worse
+than the best-known
+solution. This is achieved by setting {\tt allowable\_gap}
+and {\tt allowable\_fraction\_gap} and {\tt cutoff\_decr} to negative values.
+
+\subsectionH{Notes on {\tt Ipopt} options}{sec:opt_ipopt}
+%\label{sec:opt_ipopt}
+\Ipopt\ has a very large number of options, to get a complete description of them, you
+should refer to the \Ipopt\ manual.
+Here we only mention and explain some of the options that have been more important to us, so far,
+in developing and using \Bonmin.
+\subsubsection{Default options changed by \Bonmin}
+\Ipopt\ has been tailored to be more efficient when used in the context of the
+solution of a MINLP problem. In particular, we have tried to
+improve \Ipopt's warm-starting capabilities and its ability to prove quickly that a subproblem
+is infeasible. For ordinary NLP problems, \Ipopt\ does not use these options
+by default, but \Bonmin\ automatically changes these options from their default values.
+
+Note that options set by the user in {\tt bonmin.opt} will override these
+settings.
+
+\paragraph{{\tt mu\_strategy} and {\tt mu\_oracle}} are set, respectively, to
+{\tt adaptive} and {\tt probing} by default (these are newly implemented strategies in \Ipopt\
+for updating the barrier parameter \mycite{NocedalAdaptive}{Nocedal2004} which we have found to be
+more efficient in the context of MINLP).
+\paragraph{{\tt gamma\_phi} and {\tt gamma\_theta}} are set to $10^{-8}$ and $10^{-4}$
+respectively. This has the effect of reducing the size of the filter in the line search performed by \Ipopt.
+
+\paragraph{\tt required\_infeasibility\_reduction} is set to $0.1$.
+This increases the required infeasibility reduction when \Ipopt\ enters the
+restoration phase and should thus help to
+detect infeasible problems faster.
+
+\paragraph{\tt expect\_infeasible\_problem} is set to {\tt yes}, which enables some heuristics
+to detect infeasible problems faster.
+
+\paragraph{\tt warm\_start\_init\_point} is set to {\tt yes} when a full primal/dual starting
+point is available (generally all the optimizations after the continuous relaxation has been solved).
+
+\paragraph{\tt print\_level} is set to $0$ by default to turn off \Ipopt\ output.
+\subsubsection{Some useful \Ipopt\ options}
+\paragraph{bound\_relax\_factor} is by default set to $10^{-8}$ in \Ipopt. All of the bounds
+of the problem are relaxed by this factor. This may cause some trouble
+when constraint functions can only be evaluated within their bounds.
+In such cases, this
+option should be set to 0.
diff --git a/doc/options_table.tex b/doc/options_table.tex
new file mode 100644
index 0000000..99bdf32
--- /dev/null
+++ b/doc/options_table.tex
@@ -0,0 +1,157 @@
+\topcaption{\label{tab:options} 
+List of options and compatibility with the different algorithms.
+}
+\tablehead{\hline 
+Option & type & {\tt B-BB} & {\tt B-OA} & {\tt B-QG} & {\tt B-Hyb} & {\tt B-Ecp} & {\tt B-iFP} & {\tt Cbc\_Par} \\
+\hline
+\hline}
+\tabletail{\hline \multicolumn{9}{|c|}{continued on next page}\\\hline}
+\tablelasttail{\hline}
+{\footnotesize
+\begin{xtabular}{@{}|@{\;}l@{\;}|@{\;}r@{\;}|@{\;}c@{\;}|@{\;}c@{\;}|@{\;}c@{\;}|@{\;}c@{\;}|@{\;}c@{\;}|@{\;}c@{\;}|@{\;}c@{\;}|@{}}
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Algorithm choice}\\
+\hline
+algorithm& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Branch-and-bound options}\\
+\hline
+allowable\_fraction\_gap& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+allowable\_gap& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+cutoff& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+cutoff\_decr& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+enable\_dynamic\_nlp& S& $\surd$& -& -& -& -& -& -\\
+integer\_tolerance& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+iteration\_limit& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+nlp\_failure\_behavior& S& $\surd$& -& -& -& -& -& -\\
+node\_comparison& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+node\_limit& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+num\_cut\_passes& I& -& -& $\surd$& $\surd$& $\surd$& -& -\\
+num\_cut\_passes\_at\_root& I& -& -& $\surd$& $\surd$& $\surd$& -& -\\
+number\_before\_trust& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+number\_strong\_branch& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+random\_generator\_seed& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+read\_solution\_file& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+solution\_limit& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+sos\_constraints& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+time\_limit& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+tree\_search\_strategy& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+variable\_selection& S& $\surd$& -& $\surd$& $\surd$& $\surd$& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{ECP cuts generation}\\
+\hline
+ecp\_abs\_tol& F& -& -& $\surd$& $\surd$& -& -& -\\
+ecp\_max\_rounds& I& -& -& $\surd$& $\surd$& -& -& -\\
+ecp\_probability\_factor& F& -& -& $\surd$& $\surd$& -& -& -\\
+ecp\_rel\_tol& F& -& -& $\surd$& $\surd$& -& -& -\\
+filmint\_ecp\_cuts& I& -& -& $\surd$& $\surd$& -& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Feasibility checker using OA cuts}\\
+\hline
+feas\_check\_cut\_types& S& -& -& $\surd$& $\surd$& $\surd$& -& -\\
+feas\_check\_discard\_policy& S& -& -& $\surd$& $\surd$& $\surd$& -& -\\
+generate\_benders\_after\_so\_many\_oa& I& -& -& $\surd$& $\surd$& $\surd$& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{MILP Solver}\\
+\hline
+cpx\_parallel\_strategy& I& -& -& -& -& -& -& $\surd$\\
+milp\_solver& S& -& -& -& -& -& -& $\surd$\\
+milp\_strategy& S& -& -& -& -& -& -& $\surd$\\
+number\_cpx\_threads& I& -& -& -& -& -& -& $\surd$\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{MILP cutting planes in hybrid algorithm}\\
+\hline
+2mir\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+Gomory\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+clique\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+cover\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+flow\_cover\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+lift\_and\_project\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+mir\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+reduce\_and\_split\_cuts& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{NLP interface}\\
+\hline
+nlp\_solver& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+warm\_start& S& $\surd$& -& -& -& -& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{NLP solution robustness}\\
+\hline
+max\_consecutive\_failures& I& $\surd$& -& -& -& -& -& -\\
+max\_random\_point\_radius& F& $\surd$& -& -& -& -& -& -\\
+num\_iterations\_suspect& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+num\_retry\_unsolved\_random\_point& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+random\_point\_perturbation\_interval& F& $\surd$& -& -& -& -& -& -\\
+random\_point\_type& S& $\surd$& -& -& -& -& -& -\\
+resolve\_on\_small\_infeasibility& F& $\surd$& -& -& -& -& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{NLP solves in hybrid algorithm (B-Hyb)}\\
+\hline
+nlp\_solve\_frequency& I& -& -& -& $\surd$& -& -& -\\
+nlp\_solve\_max\_depth& I& -& -& -& $\surd$& -& -& -\\
+nlp\_solves\_per\_depth& F& -& -& -& $\surd$& -& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Nonconvex problems}\\
+\hline
+coeff\_var\_threshold& F& $\surd$& -& -& -& -& -& -\\
+dynamic\_def\_cutoff\_decr& S& $\surd$& -& -& -& -& -& -\\
+first\_perc\_for\_cutoff\_decr& F& $\surd$& -& -& -& -& -& -\\
+max\_consecutive\_infeasible& I& $\surd$& -& -& -& -& -& -\\
+num\_resolve\_at\_infeasibles& I& $\surd$& -& -& -& -& -& -\\
+num\_resolve\_at\_node& I& $\surd$& -& -& -& -& -& -\\
+num\_resolve\_at\_root& I& $\surd$& -& -& -& -& -& -\\
+second\_perc\_for\_cutoff\_decr& F& $\surd$& -& -& -& -& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Outer Approximation Decomposition (B-OA)}\\
+\hline
+oa\_decomposition& S& -& -& $\surd$& $\surd$& $\surd$& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Outer Approximation cuts generation}\\
+\hline
+add\_only\_violated\_oa& S& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+oa\_cuts\_scope& S& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+oa\_rhs\_relax& F& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+tiny\_element& F& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+very\_tiny\_element& F& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Output and Loglevel}\\
+\hline
+bb\_log\_interval& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+bb\_log\_level& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+file\_solution& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+fp\_log\_frequency& F& -& -& $\surd$& $\surd$& -& -& -\\
+fp\_log\_level& I& -& -& $\surd$& $\surd$& -& -& -\\
+lp\_log\_level& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+milp\_log\_level& I& -& -& -& -& -& -& $\surd$\\
+nlp\_log\_at\_root& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+nlp\_log\_level& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+oa\_cuts\_log\_level& I& -& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+oa\_log\_frequency& F& $\surd$& -& -& $\surd$& $\surd$& -& -\\
+oa\_log\_level& I& $\surd$& -& -& $\surd$& $\surd$& -& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Primal Heuristics}\\
+\hline
+feasibility\_pump\_objective\_norm& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+fp\_pass\_infeasible& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$\\
+heuristic\_RINS& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+heuristic\_dive\_MIP\_fractional& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+heuristic\_dive\_MIP\_vectorLength& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+heuristic\_dive\_fractional& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+heuristic\_dive\_vectorLength& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+heuristic\_feasibility\_pump& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+pump\_for\_minlp& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+\hline
+\multicolumn{1}{|c}{} & \multicolumn{8}{l|}{Strong branching setup}\\
+\hline
+candidate\_sort\_criterion& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+maxmin\_crit\_have\_sol& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+maxmin\_crit\_no\_sol& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+min\_number\_strong\_branch& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+number\_before\_trust\_list& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+number\_look\_ahead& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -& -\\
+number\_strong\_branch\_root& I& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+setup\_pseudo\_frac& F& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+trust\_strong\_branching\_for\_pseudo\_cost& S& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& $\surd$& -\\
+\hline
+\end{xtabular}
+}
diff --git a/doc/use.tex b/doc/use.tex
new file mode 100644
index 0000000..6b2500c
--- /dev/null
+++ b/doc/use.tex
@@ -0,0 +1,192 @@
+
+\begin{PageSummary}
+\PageName{Running \Bonmin}
+\PageSection{On an .nl file}{sec:run_nl}
+\PageSection{From AMPL}{sec:run_ampl}
+\PageSection{priorities and SOS in AMPL}{sub_sec:prio}
+\PageSection{From GAMS}{sec:run_gams}
+\PageSection{From a C++ Program}{sec:run_cpp}
+\end{PageSummary}
+
+\begin{quickref}
+\quickcitation{Writing \texttt{\bf .nl} files. D.M.~Gay.}{\BibPage \#Gay}
+\quickcitation{AMPL: A Modeling Language for Mathematical
+Programming, Second Edition, Duxbury Press Brooks Cole Publishing Co., 2003. R.~Fourer and D.M.~Gay and B.W.~Kernighan.}{\BibPage \#AMPL}
+\end{quickref}
+
+
+\PageTitle{Running \Bonmin}{sec:run}
+\Bonmin\ can be run
+\begin{itemize}
+\item [(i)] from a command line on a {\tt .nl} file
+(see \mycite{Gay}{Gay2005}),
+\item [(ii)] from the modeling language \footlink{http://www.ampl.com}{\tt AMPL} (see
+\mycite{AMPL}{Fourer2003}),
+\item[(iii)] from the \footlink{http://www.gams.com/}{GAMS} modeling language,
+\item [(iv)] by invoking it from a C/C++ program,
+\item[(v)] remotely through the \footlink{http://neos.mcs.anl.gov/neos}{NEOS} web interface,
+\item[(vi)] via the \footlink{https://projects.coin-or.org/OS}{Optimization Services} project,
+\item[(vii)] via the MATLAB \footlink{http://www.i2c2.aut.ac.nz/Wiki/OPTI}{OPTI Toolbox}.
+\end{itemize}
+
+In \latexhtml{the subsections that follow}{this page}, we give some details about the
+various ways to run \Bonmin.
+
+\subsectionH{On a {\tt .nl} file}{sec:run_nl}
+\Bonmin\ can read a {\tt .nl} file which could be generated by {\tt
+AMPL} (for example {\tt mytoy.nl} in the {\tt
+Bonmin-dist/Bonmin/test} subdirectory). The command line takes just
+one argument which is the name of the {\tt .nl} file to be
+processed.
+
+For example, if you want to solve {\tt mytoy.nl}, from the {\tt
+Bonmin-dist} directory, issue the command:
+
+\begin{colorverb}
+\begin{verbatim}
+
+bonmin test/mytoy.nl
+
+\end{verbatim}
+\end{colorverb}
+
+\subsectionH{From {\tt AMPL}}{sec:run_ampl}
+To use \Bonmin\ from {\tt AMPL} you just need to have the directory where the
+{\tt bonmin} executable is in your {\tt \$PATH} and to issue the
+command
+
+\begin{colorverb}
+\begin{verbatim}
+
+option solver bonmin;
+
+\end{verbatim}
+\end{colorverb}
+
+in the {\tt AMPL} environment. Then the next {\tt solve} will
+use \Bonmin\ to solve the model loaded in {\tt AMPL}.
+After the optimization is finished, the values of the variables in the best-known
+or optimal solution can be accessed in {\tt AMPL}. If the optimization is interrupted
+with {\tt <CTRL-C>} the best known solution is accessible (this feature is not available in Cygwin).
+
+\subsubsectionH{Example {\tt AMPL} model}{}
+A simple {\tt AMPL} example model follows:
+
+\begin{colorverb}
+\begin{verbatim}
+
+   # An AMPL version of toy
+
+   reset;
+
+   var x binary;
+   var z integer >= 0 <= 5;
+   var y{1..2} >=0;
+   minimize cost:
+       - x - y[1] - y[2] ;
+
+   subject to
+       c1: ( y[1] - 1/2 )^2 + (y[2] - 1/2)^2 <= 1/4 ;
+       c2: x - y[1] <= 0 ;
+       c3: x + y[2] + z <= 2;
+
+   option solver bonmin; # Choose BONMIN as the solver (assuming
+                         # that bonmin is in your PATH)
+
+   solve;                # Solve the model
+   display x;
+   display y;
+
+\end{verbatim}
+\end{colorverb}
+(This example model can be found in the \Bonmin\ package in the subdirectory {\tt Bonmin/examples/amplExamples/}.)
+
+\subsubsectionH{Setting up branching priorities, directions and declaring SOS1 constraints in AMPL}{sub_sec:prio}
+Branching priorities, branching directions and pseudo-costs can be passed using {\tt AMPL} suffixes.
+The suffix for branching priorities is {\tt "priority"} (variables with a higher priority
+will be chosen first for branching),
+for branching direction is {\tt "direction"} (if direction is $1$ the $\geq$ branch
+is explored first, if direction is $-1$ the $\leq$ branch is explored first), for up
+and down pseudo costs {\tt "upPseudoCost"} and {\tt "downPseudoCost"} respectively
+(note that if only one of the up and down pseudo-costs is set in the {\tt AMPL} model it will
+be used for both up and down).
+
+For example, to give branching priorities of $10$ to variables {\tt y} and 1 to variable {\tt x}
+and to set the branching directions to explore the upper branch first for all variables
+in the simple example given, we add before the call to solve:
+\begin{colorverb}
+\begin{verbatim}
+
+suffix priority IN, integer, >=0, <= 9999;
+y[1].priority := 10;
+y[2].priority := 10;
+x.priority := 1;
+
+suffix direction IN, integer, >=-1, <=1;
+y[1].direction := 1;
+y[2].direction := 1;
+x.direction := 1;
+
+\end{verbatim}
+\end{colorverb}
+
+SOS Type-1 branching is also available in \Bonmin\ from {\tt AMPL}. We
+follow the conventional way of doing this with suffixes.
+Two type of suffixes should be declared:
+
+\begin{colorverb}
+\begin{verbatim}
+suffix sosno IN, integer, >=1;  # Note that the solver assumes
+                                # that these values are positive
+                                # for SOS Type 1
+suffix ref IN;
+\end{verbatim}
+\end{colorverb}
+
+Next, suppose that we wish to have variables
+
+\begin{colorverb}
+\begin{verbatim}
+var X {i in 1..M, j in 1..N} binary;
+\end{verbatim}
+\end{colorverb}
+and the ``convexity'' constraints:
+
+\begin{colorverb}
+\begin{verbatim}
+subject to Convexity {i in 1..M}:
+   sum {j in 1..N} X[i,j] = 1;
+\end{verbatim}
+\end{colorverb}
+
+(note that we must explicitly include the convexity constraints in the {\tt AMPL} model).
+
+Then after reading in the data, we set the suffix values:
+\begin{colorverb}
+\begin{verbatim}
+
+# The numbers `val[i,j]' are chosen typically as
+#     the values `represented' by the discrete choices.
+let {i in 1..M, j in 1..N} X[i,j].ref := val[i,j];
+
+# These identify which SOS constraint each variable belongs to.
+let {i in 1..M, j in 1..N} X[i,j].sosno := i;
+\end{verbatim}
+\end{colorverb}
+
+\subsectionH{From {\tt GAMS}}{sec:run_gams}
+Thanks to the \footlink{http://projects.coin-or.org/GAMSlinks}{GAMSlinks} project, 
+Bonmin is available in {\tt GAMS} since release 22.5 of the \footlink{http://www.gams.com/}{\tt GAMS} modeling system. 
+The system is available for \footlink{http://download.gams.com/download}{download from GAMS}. Without buying a license it works as a demo with limited capabilities. Documentation for using \Bonmin\ in {\tt GAMS} is available
+\latexhtml{ at
+$$
+         \mbox{\tt http://www.gams.com/solvers/coin.pdf}
+$$
+}{\href{http://www.gams.com/solvers/coin.pdf}{here}.}
+
+
+\subsectionH{From a C/C++ program}{sec:run_cpp}
+\Bonmin\ can also be run from within a C/C++ program if the user codes
+the functions to compute first- and second-order derivatives.
+An example of such a program is available in the subdirectory {\tt CppExample} of
+the {\tt examples} directory. For further explanations, please refer to this example and to the reference manual.
diff --git a/examples/CppExample/Makefile.in b/examples/CppExample/Makefile.in
new file mode 100644
index 0000000..a38e088
--- /dev/null
+++ b/examples/CppExample/Makefile.in
@@ -0,0 +1,88 @@
+# Copyright (C) 2006 International Business Machines.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+#
+# Author: Andreas Waechter       IBM      2006-03-14
+
+# $Id: Makefile.in,v 1.1.2.1 2006/04/19 23:25:14 andreasw Exp $
+
+##########################################################################
+#    You can modify this example makefile to fit for your own program.   #
+#    Usually, you only need to change the five CHANGEME entries below.   #
+##########################################################################
+
+# CHANGEME: This should be the name of your executable
+EXE = CppExample at EXEEXT@
+
+# CHANGEME: Here is the name of all object files corresponding to the source
+#           code that you wrote in order to define the problem statement
+OBJS = MyBonmin. at OBJEXT@ MyTMINLP. at OBJEXT@
+
+# CHANGEME: Additional libraries
+ADDLIBS =
+
+# CHANGEME: Additional flags for compilation (e.g., include flags)
+ADDINCFLAGS =
+
+# CHANGEME: Directory to the sources for the (example) problem definition
+# files
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+
+##########################################################################
+#  Usually, you don't have to change anything below.  Note that if you   #
+#  change certain compiler options, you might have to recompile Bonmin.   #
+##########################################################################
+
+COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE at TRUE
+COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE at TRUE
+
+# C++ Compiler command
+CXX = @CXX@
+
+# C++ Compiler options
+CXXFLAGS = @CXXFLAGS@
+
+# additional C++ Compiler options for linking
+CXXLINKFLAGS = @RPATH_FLAGS@
+
+# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
+ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
+  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags bonmin`
+else
+  INCL = @BONMINLIB_CFLAGS_INSTALLED@
+endif
+INCL += $(ADDINCFLAGS)
+
+# Linker flags
+ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
+  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs bonmin`
+else
+  ifeq ($(COIN_CXX_IS_CL), TRUE)
+    LIBS = -link -libpath:`$(CYGPATH_W) @abs_lib_dir@` libbonmin.lib @BONMINLIB_LIBS_INSTALLED@
+  else
+    LIBS = -L at abs_lib_dir@ -lbonmin @BONMINLIB_LIBS_INSTALLED@
+  endif
+endif
+
+# The following is necessary under cygwin, if native compilers are used
+CYGPATH_W = @CYGPATH_W@
+
+all: $(EXE)
+
+.SUFFIXES: .cpp .c .o .obj
+
+$(EXE): $(OBJS)
+	bla=;\
+	for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
+	$(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
+
+clean:
+	rm -rf $(EXE) $(OBJS)
+
+.cpp.o:
+	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
+
+
+.cpp.obj:
+	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
diff --git a/examples/CppExample/MyBonmin.cpp b/examples/CppExample/MyBonmin.cpp
new file mode 100644
index 0000000..b361b05
--- /dev/null
+++ b/examples/CppExample/MyBonmin.cpp
@@ -0,0 +1,102 @@
+// (C) Copyright Carnegie Mellon University 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  03/17/2006
+
+
+#include <iomanip>
+#include <fstream>
+
+#include "CoinPragma.hpp"
+#include "CoinTime.hpp"
+#include "CoinError.hpp"
+
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonIpoptSolver.hpp"
+#include "MyTMINLP.hpp"
+#include "BonCbc.hpp"
+#include "BonBonminSetup.hpp"
+
+#include "BonOACutGenerator2.hpp"
+#include "BonEcpCuts.hpp"
+#include "BonOaNlpOptim.hpp"
+//#define REDIRECT
+
+int main (int argc, char *argv[])
+{
+  WindowsErrorPopupBlocker();
+
+  using namespace Ipopt;
+  using namespace Bonmin;
+  SmartPtr<MyTMINLP> tminlp = new MyTMINLP;
+  
+#ifdef REDIRECT
+  FILE * fp = fopen("log.out","w");
+  CoinMessageHandler handler(fp);
+  BonminSetup bonmin(&handler);
+#else
+  BonminSetup bonmin;
+#endif
+  bonmin.initializeOptionsAndJournalist();
+  //Register an additional option
+  bonmin.roptions()->AddStringOption2("print_solution","Do we print the solution or not?",
+                                 "yes",
+                                 "no", "No, we don't.",
+                                 "yes", "Yes, we do.",
+                                 "A longer comment can be put here");
+  
+  
+  
+  // Here we can change the default value of some Bonmin or Ipopt option
+  bonmin.options()->SetNumericValue("bonmin.time_limit", 5); //changes bonmin's time limit
+  bonmin.options()->SetStringValue("mu_oracle","loqo");
+  
+  //Here we read several option files
+  bonmin.readOptionsFile("Mybonmin.opt");
+  bonmin.readOptionsFile();// This reads the default file "bonmin.opt"
+  
+  // Options can also be set by using a string with a format similar to the bonmin.opt file
+  bonmin.readOptionsString("bonmin.algorithm B-BB\n");
+  
+  // Now we can obtain the value of the new option
+  int printSolution;
+  bonmin.options()->GetEnumValue("print_solution", printSolution,"");
+  if(printSolution == 1){
+    tminlp->printSolutionAtEndOfAlgorithm();
+  }
+
+  //Now initialize from tminlp
+  bonmin.initialize(GetRawPtr(tminlp));
+
+
+
+  //Set up done, now let's branch and bound
+  try {
+    Bab bb;
+    bb(bonmin);//process parameter file using Ipopt and do branch and bound using Cbc
+
+
+  }
+  catch(TNLPSolver::UnsolvedError *E) {
+    //There has been a failure to solve a problem with Ipopt.
+    std::cerr<<"Ipopt has failed to solve a problem"<<std::endl;
+  }
+  catch(OsiTMINLPInterface::SimpleError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+	     <<std::endl
+	     <<E.message()<<std::endl;
+  }
+  catch(CoinError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+	     <<std::endl
+	     <<E.message()<<std::endl;
+  }
+
+
+  return 0;
+}
+
diff --git a/examples/CppExample/MyTMINLP.cpp b/examples/CppExample/MyTMINLP.cpp
new file mode 100644
index 0000000..9c20cfd
--- /dev/null
+++ b/examples/CppExample/MyTMINLP.cpp
@@ -0,0 +1,217 @@
+// (C) Copyright Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  03/17/2006
+#include "MyTMINLP.hpp"
+#include "BonAmplInterface.hpp"
+
+bool 
+MyTMINLP::get_variables_types(Index n, VariableType* var_types)
+{
+  var_types[0] = BINARY;
+  var_types[1] = CONTINUOUS;
+  var_types[2] = CONTINUOUS;
+  var_types[3] = INTEGER;
+  return true;
+}
+
+
+bool 
+MyTMINLP::get_variables_linearity(Index n, Ipopt::TNLP::LinearityType* var_types)
+{
+  var_types[0] = Ipopt::TNLP::LINEAR;
+  var_types[1] = Ipopt::TNLP::NON_LINEAR;
+  var_types[2] = Ipopt::TNLP::NON_LINEAR;
+  var_types[3] = Ipopt::TNLP::LINEAR;
+  return true;
+}
+
+
+bool 
+MyTMINLP::get_constraints_linearity(Index m, Ipopt::TNLP::LinearityType* const_types)
+{
+  assert (m==3);
+  const_types[0] = Ipopt::TNLP::NON_LINEAR;
+  const_types[1] = Ipopt::TNLP::LINEAR;
+  const_types[2] = Ipopt::TNLP::LINEAR;
+  return true;
+}
+bool 
+MyTMINLP::get_nlp_info(Index& n, Index&m, Index& nnz_jac_g,
+                       Index& nnz_h_lag, TNLP::IndexStyleEnum& index_style)
+{
+  n = 4;//number of variable
+  m = 3;//number of constraints
+  nnz_jac_g = 7;//number of non zeroes in Jacobian
+  nnz_h_lag = 2;//number of non zeroes in Hessian of Lagrangean
+  index_style = TNLP::FORTRAN_STYLE;
+  return true;
+}
+
+bool 
+MyTMINLP::get_bounds_info(Index n, Number* x_l, Number* x_u,
+                            Index m, Number* g_l, Number* g_u)
+{
+  assert(n==4);
+  assert(m==3);
+  x_l[0] = 0.;
+  x_u[0] = 1.;
+  
+  x_l[1] = 0.;
+  x_u[1] = DBL_MAX;
+  
+  x_l[2] =0.;
+  x_u[2] = DBL_MAX;
+  
+  x_l[3] = 0;
+  x_u[3] = 5;
+  
+  g_l[0] = -DBL_MAX;
+  g_u[0] = 1./4.;
+
+  g_l[1] = -DBL_MAX;
+  g_u[1] = 0;
+  
+  g_l[2] = -DBL_MAX;
+  g_u[2] = 2;
+  return true;
+}
+
+bool 
+MyTMINLP::get_starting_point(Index n, bool init_x, Number* x,
+                             bool init_z, Number* z_L, Number* z_U,
+                             Index m, bool init_lambda,
+                             Number* lambda)
+{
+  assert(n==4);
+  assert(m==3);
+  
+  assert(init_x);
+  assert(!init_lambda);
+  x[0] = 0;
+  x[1] = 0;
+  x[2] = 0;
+  x[3] = 0;
+  return true;
+}
+
+bool 
+MyTMINLP::eval_f(Index n, const Number* x, bool new_x, Number& obj_value)
+{
+  assert(n==4);
+  obj_value = - x[0] - x[1] - x[2];
+  return true;
+}
+
+bool
+MyTMINLP::eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f)
+{
+  assert(n==4);
+  grad_f[0] = -1.;
+  grad_f[1] = -1.;  
+  grad_f[2] = -1.;
+  grad_f[3] = 0.;
+  return true;
+}
+
+bool
+MyTMINLP::eval_g(Index n, const Number* x, bool new_x, Index m, Number* g)
+{
+  assert(n==4);
+  assert(m==3);
+  
+  g[0] = (x[1] - 1./2.)*(x[1] - 1./2.) + (x[2] - 1./2.)*(x[2] - 1./2.);
+  g[1] = x[0] - x[1];
+  g[2] = x[0] + x[2] + x[3];
+  
+  return true;
+}
+
+bool
+MyTMINLP::eval_jac_g(Index n, const Number* x, bool new_x,
+                     Index m, Index nnz_jac, Index* iRow, Index *jCol,
+                     Number* values)
+{
+  assert(n==4);
+  assert(nnz_jac == 7);
+  if(values == NULL) {
+    iRow[0] = 2;
+    jCol[0] = 1;
+
+    iRow[1] = 3;
+    jCol[1] = 1;
+    
+    iRow[2] = 1;
+    jCol[2] = 2;
+    
+    iRow[3] = 2;
+    jCol[3] = 2;
+    
+    iRow[4] = 1;
+    jCol[4] = 3;
+        
+    iRow[5] = 3;
+    jCol[5] = 3;
+    
+    iRow[6] = 3;
+    jCol[6] = 4;
+    return true;
+  }
+  else {
+    values[0] = 1.;
+    values[1] = 1;
+
+    values[2] = 2*x[1] - 1;
+    values[3] = -1.;
+
+    values[4] = 2*x[2] - 1;
+    values[5] = 1.;
+    
+    values[6] = 1.;
+    
+    return true;
+  }
+}
+
+bool
+MyTMINLP::eval_h(Index n, const Number* x, bool new_x,
+                 Number obj_factor, Index m, const Number* lambda,
+                 bool new_lambda, Index nele_hess, Index* iRow,
+                 Index* jCol, Number* values)
+{
+  assert (n==4);
+  assert (m==3);
+  assert(nele_hess==2);
+  if(values==NULL)
+  {
+    iRow[0] = 2;
+    jCol[0] = 2;
+    
+    iRow[1] = 3;
+    jCol[1] = 3;
+  }
+  else {
+    values[0] = 2*lambda[0];
+    values[1] = 2*lambda[0];
+  }
+  return true;
+}
+
+void
+MyTMINLP::finalize_solution(TMINLP::SolverReturn status,
+                            Index n, const Number* x, Number obj_value)
+{
+  std::cout<<"Problem status: "<<status<<std::endl;
+  std::cout<<"Objective value: "<<obj_value<<std::endl;
+  if(printSol_ && x != NULL){
+    std::cout<<"Solution:"<<std::endl;
+    for(int i = 0 ; i < n ; i++){
+      std::cout<<"x["<<i<<"] = "<<x[i];
+      if(i < n-1) std::cout<<", ";}
+    std::cout<<std::endl;
+  }
+}
diff --git a/examples/CppExample/MyTMINLP.hpp b/examples/CppExample/MyTMINLP.hpp
new file mode 100644
index 0000000..4eb09c5
--- /dev/null
+++ b/examples/CppExample/MyTMINLP.hpp
@@ -0,0 +1,180 @@
+// (C) Copyright Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  03/17/2006
+#ifndef MyTNLP_HPP
+#define MyTNLP_HPP
+#include "BonTMINLP.hpp"
+using namespace  Ipopt;
+using namespace Bonmin;
+/** A C++ example for interfacing an MINLP with bonmin.
+   * This class implements the following NLP :
+  * \f[ 
+    \begin{array}{l}
+    \min - x_0 - x_1 - x_2 \\ 
+    \mbox{s.t}\\
+    (x_1 - \frac{1}{2})^2 + (x_2 - \frac{1}{2})^2 \leq \frac{1}{4} \\
+    x_0 - x_1 \leq 0 \\
+    x_0 + x_2 + x_3 \leq 2\\
+    x_0 \in \{0,1\}^n \; (x_1, x_2) \in R^2 \; x_3 \in N
+    \end{array}
+    \f]
+  */
+    
+class MyTMINLP : public TMINLP
+{
+public:
+  /// Default constructor.
+  MyTMINLP():
+printSol_(false){}
+  
+  /// virtual destructor.
+  virtual ~MyTMINLP(){}
+
+  
+	/** Copy constructor.*/   
+  MyTMINLP(const MyTMINLP &other):
+printSol_(other.printSol_){}
+  /** Assignment operator. no data = nothing to assign*/
+  //MyTMINLP& operator=(const MyTMINLP&) {}
+
+  
+  /** \name Overloaded functions specific to a TMINLP.*/
+  //@{
+  /** Pass the type of the variables (INTEGER, BINARY, CONTINUOUS) to the optimizer.
+     \param n size of var_types (has to be equal to the number of variables in the problem)
+  \param var_types types of the variables (has to be filled by function).
+  */
+  virtual bool get_variables_types(Index n, VariableType* var_types);
+ 
+  /** Pass info about linear and nonlinear variables.*/
+  virtual bool get_variables_linearity(Index n, Ipopt::TNLP::LinearityType* var_types);
+
+  /** Pass the type of the constraints (LINEAR, NON_LINEAR) to the optimizer.
+  \param m size of const_types (has to be equal to the number of constraints in the problem)
+  \param const_types types of the constraints (has to be filled by function).
+  */
+  virtual bool get_constraints_linearity(Index m, Ipopt::TNLP::LinearityType* const_types);
+//@}  
+    
+  /** \name Overloaded functions defining a TNLP.
+     * This group of function implement the various elements needed to define and solve a TNLP.
+     * They are the same as those in a standard Ipopt NLP problem*/
+  //@{
+  /** Method to pass the main dimensions of the problem to Ipopt.
+        \param n number of variables in problem.
+        \param m number of constraints.
+        \param nnz_jac_g number of nonzeroes in Jacobian of constraints system.
+        \param nnz_h_lag number of nonzeroes in Hessian of the Lagrangean.
+        \param index_style indicate wether arrays are numbered from 0 (C-style) or
+        from 1 (Fortran).
+        \return true in case of success.*/
+  virtual bool get_nlp_info(Index& n, Index&m, Index& nnz_jac_g,
+                            Index& nnz_h_lag, TNLP::IndexStyleEnum& index_style);
+  
+  /** Method to pass the bounds on variables and constraints to Ipopt. 
+       \param n size of x_l and x_u (has to be equal to the number of variables in the problem)
+       \param x_l lower bounds on variables (function should fill it).
+       \param x_u upper bounds on the variables (function should fill it).
+       \param m size of g_l and g_u (has to be equal to the number of constraints in the problem).
+       \param g_l lower bounds of the constraints (function should fill it).
+       \param g_u upper bounds of the constraints (function should fill it).
+  \return true in case of success.*/
+  virtual bool get_bounds_info(Index n, Number* x_l, Number* x_u,
+                               Index m, Number* g_l, Number* g_u);
+  
+  /** Method to to pass the starting point for optimization to Ipopt.
+    \param init_x do we initialize primals?
+    \param x pass starting primal points (function should fill it if init_x is 1).
+    \param m size of lambda (has to be equal to the number of constraints in the problem).
+    \param init_lambda do we initialize duals of constraints? 
+    \param lambda lower bounds of the constraints (function should fill it).
+    \return true in case of success.*/
+  virtual bool get_starting_point(Index n, bool init_x, Number* x,
+                                  bool init_z, Number* z_L, Number* z_U,
+                                  Index m, bool init_lambda,
+                                  Number* lambda);
+  
+  /** Method which compute the value of the objective function at point x.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param obj_value value of objective in x (has to be computed by the function).
+    \return true in case of success.*/
+  virtual bool eval_f(Index n, const Number* x, bool new_x, Number& obj_value);
+
+  /** Method which compute the gradient of the objective at a point x.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param grad_f gradient of objective taken in x (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f);
+
+  /** Method which compute the value of the functions defining the constraints at a point
+    x.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param m size of array g (has to be equal to the number of constraints in the problem)
+    \param grad_f values of the constraints (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_g(Index n, const Number* x, bool new_x, Index m, Number* g);
+
+  /** Method to compute the Jacobian of the functions defining the constraints.
+    If the parameter values==NULL fill the arrays iCol and jRow which store the position of
+    the non-zero element of the Jacobian.
+    If the paramenter values!=NULL fill values with the non-zero elements of the Jacobian.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param m size of array g (has to be equal to the number of constraints in the problem)
+    \param grad_f values of the constraints (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_jac_g(Index n, const Number* x, bool new_x,
+                          Index m, Index nele_jac, Index* iRow, Index *jCol,
+                          Number* values);
+  
+  /** Method to compute the Jacobian of the functions defining the constraints.
+    If the parameter values==NULL fill the arrays iCol and jRow which store the position of
+    the non-zero element of the Jacobian.
+    If the paramenter values!=NULL fill values with the non-zero elements of the Jacobian.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param m size of array g (has to be equal to the number of constraints in the problem)
+    \param grad_f values of the constraints (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_h(Index n, const Number* x, bool new_x,
+                      Number obj_factor, Index m, const Number* lambda,
+                      bool new_lambda, Index nele_hess, Index* iRow,
+                      Index* jCol, Number* values);
+
+  
+  /** Method called by Ipopt at the end of optimization.*/  
+  virtual void finalize_solution(TMINLP::SolverReturn status,
+                                 Index n, const Number* x, Number obj_value);
+  
+  //@}
+
+  virtual const SosInfo * sosConstraints() const{return NULL;}
+  virtual const BranchingInfo* branchingInfo() const{return NULL;}
+  
+  
+  void printSolutionAtEndOfAlgorithm(){
+    printSol_ = true;}
+  
+private:
+   bool printSol_;
+};
+
+#endif
diff --git a/examples/CppExample/Mybonmin.opt b/examples/CppExample/Mybonmin.opt
new file mode 100644
index 0000000..56c34d8
--- /dev/null
+++ b/examples/CppExample/Mybonmin.opt
@@ -0,0 +1 @@
+print_solution no
diff --git a/examples/OptionDocGen/DocGen.cpp b/examples/OptionDocGen/DocGen.cpp
new file mode 100644
index 0000000..ce54a99
--- /dev/null
+++ b/examples/OptionDocGen/DocGen.cpp
@@ -0,0 +1,58 @@
+// (C) Copyright Carnegie Mellon University 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  03/17/2006
+
+
+#include <iomanip>
+#include <fstream>
+
+#include "CoinPragma.hpp"
+#include "CoinTime.hpp"
+
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonIpoptSolver.hpp"
+#include "MyTMINLP.hpp"
+#include "BonCbc.hpp"
+#include "BonBonminSetup.hpp"
+
+#include "BonOACutGenerator2.hpp"
+#include "BonEcpCuts.hpp"
+#include "BonOaNlpOptim.hpp"
+
+
+int main (int argc, char *argv[])
+{
+  using namespace Ipopt;
+  using namespace Bonmin;
+  SmartPtr<MyTMINLP> tminlp = new MyTMINLP;
+  
+
+  BonminSetup bonmin;
+  bonmin.initializeOptionsAndJournalist();
+  //Now initialize from tminlp
+  bonmin.initialize(GetRawPtr(tminlp));
+
+  std::ofstream of("options_list_bonmin_content.tex");
+  bonmin.roptions()->writeLatexHtmlDoc(of, Bonmin::RegisteredOptions::BonminCategory);
+  of.close();
+  of.open("options_list_ipopt_content.tex");
+  bonmin.roptions()->writeLatexHtmlDoc(of, Bonmin::RegisteredOptions::IpoptCategory);
+  of.close();
+  of.open("options_list_filter_content.tex");
+  bonmin.roptions()->writeLatexHtmlDoc(of, Bonmin::RegisteredOptions::FilterCategory);
+  of.close();
+
+  of.open("options_table.tex");
+  bonmin.roptions()->writeLatexOptionsTable(of, Bonmin::RegisteredOptions::BonminCategory);
+  of.close();
+
+  of.open("bonmin.opt");
+  bonmin.roptions()->writeBonminOpt(of, Bonmin::RegisteredOptions::BonminCategory);
+  return 0;
+}
+
diff --git a/examples/OptionDocGen/Makefile.in b/examples/OptionDocGen/Makefile.in
new file mode 100644
index 0000000..4b10673
--- /dev/null
+++ b/examples/OptionDocGen/Makefile.in
@@ -0,0 +1,88 @@
+# Copyright (C) 2006 International Business Machines.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+#
+# Author: Andreas Waechter       IBM      2006-03-14
+
+# $Id: Makefile.in,v 1.1.2.1 2006/04/19 23:25:14 andreasw Exp $
+
+##########################################################################
+#    You can modify this example makefile to fit for your own program.   #
+#    Usually, you only need to change the five CHANGEME entries below.   #
+##########################################################################
+
+# CHANGEME: This should be the name of your executable
+EXE = DocGen at EXEEXT@
+
+# CHANGEME: Here is the name of all object files corresponding to the source
+#           code that you wrote in order to define the problem statement
+OBJS = DocGen. at OBJEXT@ MyTMINLP. at OBJEXT@
+
+# CHANGEME: Additional libraries
+ADDLIBS =
+
+# CHANGEME: Additional flags for compilation (e.g., include flags)
+ADDINCFLAGS =
+
+# CHANGEME: Directory to the sources for the (example) problem definition
+# files
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+
+##########################################################################
+#  Usually, you don't have to change anything below.  Note that if you   #
+#  change certain compiler options, you might have to recompile Bonmin.   #
+##########################################################################
+
+COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE at TRUE
+COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE at TRUE
+
+# C++ Compiler command
+CXX = @CXX@
+
+# C++ Compiler options
+CXXFLAGS = @CXXFLAGS@
+
+# additional C++ Compiler options for linking
+CXXLINKFLAGS = @RPATH_FLAGS@
+
+# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
+ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
+  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags bonmin`
+else
+  INCL = @BONMINLIB_CFLAGS_INSTALLED@
+endif
+INCL += $(ADDINCFLAGS)
+
+# Linker flags
+ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
+  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs bonmin`
+else
+  ifeq ($(COIN_CXX_IS_CL), TRUE)
+    LIBS = -link -libpath:`$(CYGPATH_W) @abs_lib_dir@` libbonmin.lib @BONMINLIB_LIBS_INSTALLED@
+  else
+    LIBS = -L at abs_lib_dir@ -lbonmin @BONMINLIB_LIBS_INSTALLED@
+  endif
+endif
+
+# The following is necessary under cygwin, if native compilers are used
+CYGPATH_W = @CYGPATH_W@
+
+all: $(EXE)
+
+.SUFFIXES: .cpp .c .o .obj
+
+$(EXE): $(OBJS)
+	bla=;\
+	for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
+	$(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
+
+clean:
+	rm -rf $(EXE) $(OBJS)
+
+.cpp.o:
+	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<
+
+
+.cpp.obj:
+	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
diff --git a/examples/OptionDocGen/MyTMINLP.cpp b/examples/OptionDocGen/MyTMINLP.cpp
new file mode 100644
index 0000000..9c20cfd
--- /dev/null
+++ b/examples/OptionDocGen/MyTMINLP.cpp
@@ -0,0 +1,217 @@
+// (C) Copyright Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  03/17/2006
+#include "MyTMINLP.hpp"
+#include "BonAmplInterface.hpp"
+
+bool 
+MyTMINLP::get_variables_types(Index n, VariableType* var_types)
+{
+  var_types[0] = BINARY;
+  var_types[1] = CONTINUOUS;
+  var_types[2] = CONTINUOUS;
+  var_types[3] = INTEGER;
+  return true;
+}
+
+
+bool 
+MyTMINLP::get_variables_linearity(Index n, Ipopt::TNLP::LinearityType* var_types)
+{
+  var_types[0] = Ipopt::TNLP::LINEAR;
+  var_types[1] = Ipopt::TNLP::NON_LINEAR;
+  var_types[2] = Ipopt::TNLP::NON_LINEAR;
+  var_types[3] = Ipopt::TNLP::LINEAR;
+  return true;
+}
+
+
+bool 
+MyTMINLP::get_constraints_linearity(Index m, Ipopt::TNLP::LinearityType* const_types)
+{
+  assert (m==3);
+  const_types[0] = Ipopt::TNLP::NON_LINEAR;
+  const_types[1] = Ipopt::TNLP::LINEAR;
+  const_types[2] = Ipopt::TNLP::LINEAR;
+  return true;
+}
+bool 
+MyTMINLP::get_nlp_info(Index& n, Index&m, Index& nnz_jac_g,
+                       Index& nnz_h_lag, TNLP::IndexStyleEnum& index_style)
+{
+  n = 4;//number of variable
+  m = 3;//number of constraints
+  nnz_jac_g = 7;//number of non zeroes in Jacobian
+  nnz_h_lag = 2;//number of non zeroes in Hessian of Lagrangean
+  index_style = TNLP::FORTRAN_STYLE;
+  return true;
+}
+
+bool 
+MyTMINLP::get_bounds_info(Index n, Number* x_l, Number* x_u,
+                            Index m, Number* g_l, Number* g_u)
+{
+  assert(n==4);
+  assert(m==3);
+  x_l[0] = 0.;
+  x_u[0] = 1.;
+  
+  x_l[1] = 0.;
+  x_u[1] = DBL_MAX;
+  
+  x_l[2] =0.;
+  x_u[2] = DBL_MAX;
+  
+  x_l[3] = 0;
+  x_u[3] = 5;
+  
+  g_l[0] = -DBL_MAX;
+  g_u[0] = 1./4.;
+
+  g_l[1] = -DBL_MAX;
+  g_u[1] = 0;
+  
+  g_l[2] = -DBL_MAX;
+  g_u[2] = 2;
+  return true;
+}
+
+bool 
+MyTMINLP::get_starting_point(Index n, bool init_x, Number* x,
+                             bool init_z, Number* z_L, Number* z_U,
+                             Index m, bool init_lambda,
+                             Number* lambda)
+{
+  assert(n==4);
+  assert(m==3);
+  
+  assert(init_x);
+  assert(!init_lambda);
+  x[0] = 0;
+  x[1] = 0;
+  x[2] = 0;
+  x[3] = 0;
+  return true;
+}
+
+bool 
+MyTMINLP::eval_f(Index n, const Number* x, bool new_x, Number& obj_value)
+{
+  assert(n==4);
+  obj_value = - x[0] - x[1] - x[2];
+  return true;
+}
+
+bool
+MyTMINLP::eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f)
+{
+  assert(n==4);
+  grad_f[0] = -1.;
+  grad_f[1] = -1.;  
+  grad_f[2] = -1.;
+  grad_f[3] = 0.;
+  return true;
+}
+
+bool
+MyTMINLP::eval_g(Index n, const Number* x, bool new_x, Index m, Number* g)
+{
+  assert(n==4);
+  assert(m==3);
+  
+  g[0] = (x[1] - 1./2.)*(x[1] - 1./2.) + (x[2] - 1./2.)*(x[2] - 1./2.);
+  g[1] = x[0] - x[1];
+  g[2] = x[0] + x[2] + x[3];
+  
+  return true;
+}
+
+bool
+MyTMINLP::eval_jac_g(Index n, const Number* x, bool new_x,
+                     Index m, Index nnz_jac, Index* iRow, Index *jCol,
+                     Number* values)
+{
+  assert(n==4);
+  assert(nnz_jac == 7);
+  if(values == NULL) {
+    iRow[0] = 2;
+    jCol[0] = 1;
+
+    iRow[1] = 3;
+    jCol[1] = 1;
+    
+    iRow[2] = 1;
+    jCol[2] = 2;
+    
+    iRow[3] = 2;
+    jCol[3] = 2;
+    
+    iRow[4] = 1;
+    jCol[4] = 3;
+        
+    iRow[5] = 3;
+    jCol[5] = 3;
+    
+    iRow[6] = 3;
+    jCol[6] = 4;
+    return true;
+  }
+  else {
+    values[0] = 1.;
+    values[1] = 1;
+
+    values[2] = 2*x[1] - 1;
+    values[3] = -1.;
+
+    values[4] = 2*x[2] - 1;
+    values[5] = 1.;
+    
+    values[6] = 1.;
+    
+    return true;
+  }
+}
+
+bool
+MyTMINLP::eval_h(Index n, const Number* x, bool new_x,
+                 Number obj_factor, Index m, const Number* lambda,
+                 bool new_lambda, Index nele_hess, Index* iRow,
+                 Index* jCol, Number* values)
+{
+  assert (n==4);
+  assert (m==3);
+  assert(nele_hess==2);
+  if(values==NULL)
+  {
+    iRow[0] = 2;
+    jCol[0] = 2;
+    
+    iRow[1] = 3;
+    jCol[1] = 3;
+  }
+  else {
+    values[0] = 2*lambda[0];
+    values[1] = 2*lambda[0];
+  }
+  return true;
+}
+
+void
+MyTMINLP::finalize_solution(TMINLP::SolverReturn status,
+                            Index n, const Number* x, Number obj_value)
+{
+  std::cout<<"Problem status: "<<status<<std::endl;
+  std::cout<<"Objective value: "<<obj_value<<std::endl;
+  if(printSol_ && x != NULL){
+    std::cout<<"Solution:"<<std::endl;
+    for(int i = 0 ; i < n ; i++){
+      std::cout<<"x["<<i<<"] = "<<x[i];
+      if(i < n-1) std::cout<<", ";}
+    std::cout<<std::endl;
+  }
+}
diff --git a/examples/OptionDocGen/MyTMINLP.hpp b/examples/OptionDocGen/MyTMINLP.hpp
new file mode 100644
index 0000000..f23a3f3
--- /dev/null
+++ b/examples/OptionDocGen/MyTMINLP.hpp
@@ -0,0 +1,180 @@
+// (C) Copyright Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  03/17/2006
+#ifndef MyTNLP_HPP
+#define MyTNLP_HPP
+#include "BonTMINLP.hpp"
+using namespace  Ipopt;
+using namespace Bonmin;
+/** A C++ example for interfacing an MINLP with bonmin.
+   * This class implements the following NLP :
+  * \f[ 
+    \begin{array}{l}
+    \min x_0 - x_1 - x_2 \\ 
+    \mbox{s.t}\\
+    (x_1 - \frac{1}{2})^2 + (x_2 - \frac{1}{2})^2 \leq \frac{1}{4} \\
+    x_0 - x_1 \leq 0 \\
+    x_1 + x_2 + x_3 \leq 2\\
+    x_0 \in \{0,1\}^n \; (x_1, x_2) \in R^2 \; x_3 \in N
+    \end{array}
+    \f]
+  */
+    
+class MyTMINLP : public TMINLP
+{
+public:
+  /// Default constructor.
+  MyTMINLP():
+printSol_(false){}
+  
+  /// virtual destructor.
+  virtual ~MyTMINLP(){}
+
+  
+	/** Copy constructor.*/   
+  MyTMINLP(const MyTMINLP &other):
+printSol_(other.printSol_){}
+  /** Assignment operator. no data = nothing to assign*/
+  //MyTMINLP& operator=(const MyTMINLP&) {}
+
+  
+  /** \name Overloaded functions specific to a TMINLP.*/
+  //@{
+  /** Pass the type of the variables (INTEGER, BINARY, CONTINUOUS) to the optimizer.
+     \param n size of var_types (has to be equal to the number of variables in the problem)
+  \param var_types types of the variables (has to be filled by function).
+  */
+  virtual bool get_variables_types(Index n, VariableType* var_types);
+ 
+  /** Pass info about linear and nonlinear variables.*/
+  virtual bool get_variables_linearity(Index n, Ipopt::TNLP::LinearityType* var_types);
+
+  /** Pass the type of the constraints (LINEAR, NON_LINEAR) to the optimizer.
+  \param m size of const_types (has to be equal to the number of constraints in the problem)
+  \param const_types types of the constraints (has to be filled by function).
+  */
+  virtual bool get_constraints_linearity(Index m, Ipopt::TNLP::LinearityType* const_types);
+//@}  
+    
+  /** \name Overloaded functions defining a TNLP.
+     * This group of function implement the various elements needed to define and solve a TNLP.
+     * They are the same as those in a standard Ipopt NLP problem*/
+  //@{
+  /** Method to pass the main dimensions of the problem to Ipopt.
+        \param n number of variables in problem.
+        \param m number of constraints.
+        \param nnz_jac_g number of nonzeroes in Jacobian of constraints system.
+        \param nnz_h_lag number of nonzeroes in Hessian of the Lagrangean.
+        \param index_style indicate wether arrays are numbered from 0 (C-style) or
+        from 1 (Fortran).
+        \return true in case of success.*/
+  virtual bool get_nlp_info(Index& n, Index&m, Index& nnz_jac_g,
+                            Index& nnz_h_lag, TNLP::IndexStyleEnum& index_style);
+  
+  /** Method to pass the bounds on variables and constraints to Ipopt. 
+       \param n size of x_l and x_u (has to be equal to the number of variables in the problem)
+       \param x_l lower bounds on variables (function should fill it).
+       \param x_u upper bounds on the variables (function should fill it).
+       \param m size of g_l and g_u (has to be equal to the number of constraints in the problem).
+       \param g_l lower bounds of the constraints (function should fill it).
+       \param g_u upper bounds of the constraints (function should fill it).
+  \return true in case of success.*/
+  virtual bool get_bounds_info(Index n, Number* x_l, Number* x_u,
+                               Index m, Number* g_l, Number* g_u);
+  
+  /** Method to to pass the starting point for optimization to Ipopt.
+    \param init_x do we initialize primals?
+    \param x pass starting primal points (function should fill it if init_x is 1).
+    \param m size of lambda (has to be equal to the number of constraints in the problem).
+    \param init_lambda do we initialize duals of constraints? 
+    \param lambda lower bounds of the constraints (function should fill it).
+    \return true in case of success.*/
+  virtual bool get_starting_point(Index n, bool init_x, Number* x,
+                                  bool init_z, Number* z_L, Number* z_U,
+                                  Index m, bool init_lambda,
+                                  Number* lambda);
+  
+  /** Method which compute the value of the objective function at point x.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param obj_value value of objective in x (has to be computed by the function).
+    \return true in case of success.*/
+  virtual bool eval_f(Index n, const Number* x, bool new_x, Number& obj_value);
+
+  /** Method which compute the gradient of the objective at a point x.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param grad_f gradient of objective taken in x (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f);
+
+  /** Method which compute the value of the functions defining the constraints at a point
+    x.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param m size of array g (has to be equal to the number of constraints in the problem)
+    \param grad_f values of the constraints (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_g(Index n, const Number* x, bool new_x, Index m, Number* g);
+
+  /** Method to compute the Jacobian of the functions defining the constraints.
+    If the parameter values==NULL fill the arrays iCol and jRow which store the position of
+    the non-zero element of the Jacobian.
+    If the paramenter values!=NULL fill values with the non-zero elements of the Jacobian.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param m size of array g (has to be equal to the number of constraints in the problem)
+    \param grad_f values of the constraints (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_jac_g(Index n, const Number* x, bool new_x,
+                          Index m, Index nele_jac, Index* iRow, Index *jCol,
+                          Number* values);
+  
+  /** Method to compute the Jacobian of the functions defining the constraints.
+    If the parameter values==NULL fill the arrays iCol and jRow which store the position of
+    the non-zero element of the Jacobian.
+    If the paramenter values!=NULL fill values with the non-zero elements of the Jacobian.
+    \param n size of array x (has to be the number of variables in the problem).
+    \param x point where to evaluate.
+    \param new_x Is this the first time we evaluate functions at this point? 
+    (in the present context we don't care).
+    \param m size of array g (has to be equal to the number of constraints in the problem)
+    \param grad_f values of the constraints (function has to fill it).
+    \return true in case of success.*/
+  virtual bool eval_h(Index n, const Number* x, bool new_x,
+                      Number obj_factor, Index m, const Number* lambda,
+                      bool new_lambda, Index nele_hess, Index* iRow,
+                      Index* jCol, Number* values);
+
+  
+  /** Method called by Ipopt at the end of optimization.*/  
+  virtual void finalize_solution(TMINLP::SolverReturn status,
+                                 Index n, const Number* x, Number obj_value);
+  
+  //@}
+
+  virtual const SosInfo * sosConstraints() const{return NULL;}
+  virtual const BranchingInfo* branchingInfo() const{return NULL;}
+  
+  
+  void printSolutionAtEndOfAlgorithm(){
+    printSol_ = true;}
+  
+private:
+   bool printSol_;
+};
+
+#endif
diff --git a/examples/amplExamples/toy.mod b/examples/amplExamples/toy.mod
new file mode 100644
index 0000000..c6721c8
--- /dev/null
+++ b/examples/amplExamples/toy.mod
@@ -0,0 +1,22 @@
+   # An Ampl version of toy
+
+   reset;
+
+   var x binary;
+   var z integer >= 0 <= 5;
+   var y{1..2} >=0;
+   minimize cost:
+       - x - y[1] - y[2] ;
+
+   subject to
+       c1: ( y[1] - 1/2 )^2 + (y[2] - 1/2)^2 <= 1/4 ;
+       c2: x - y[1] <= 0 ;
+       c3: x + y[2] + z <= 2;
+
+   option solver bonmin; # Choose BONMIN as the solver (assuming
+                         # that bonmin is in your PATH)
+
+   solve;                # Solve the model
+   display x;
+   display y;
+
diff --git a/experimental/Bcp/BB_cut.cpp b/experimental/Bcp/BB_cut.cpp
new file mode 100644
index 0000000..f3d5407
--- /dev/null
+++ b/experimental/Bcp/BB_cut.cpp
@@ -0,0 +1,54 @@
+// (C) Copyright International Business Machines Corporation 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University
+
+#include "BCP_buffer.hpp"
+#include "BB_cut.hpp"
+
+/****************************************************************************/
+
+void
+BB_cut::pack(BCP_buffer& buf) const
+{
+    buf.pack(OsiRowCut::lb())
+	.pack(OsiRowCut::ub());
+    const CoinPackedVector& v = OsiRowCut::row();
+    const int numElem = v.getNumElements();
+    buf.pack(v.getIndices(), numElem)
+	.pack(v.getElements(), numElem);
+}
+
+/****************************************************************************/
+BB_cut::BB_cut(BCP_buffer& buf) :
+    BCP_cut_algo(-1e40, 1e40), OsiRowCut()
+{
+    double lb, ub;
+    buf.unpack(lb)
+	.unpack(ub);
+    OsiRowCut::setLb(lb);
+    OsiRowCut::setUb(ub);
+
+    int numElem;
+    int* indices;
+    double* elements;
+    buf.unpack(indices, numElem, true)
+	.unpack(elements, numElem, true);
+    OsiRowCut::setRow(numElem, indices, elements);
+
+    if(numElem > 0) {
+	delete[] indices;
+	delete[] elements;
+    }
+}
+
+/****************************************************************************/
+BB_cut::BB_cut(const OsiRowCut& cut) :
+    BCP_cut_algo(cut.lb(), cut.ub()), OsiRowCut(cut)
+{}
+
+/****************************************************************************/
+BCP_MemPool BB_cut::memPool(sizeof(BB_cut));
diff --git a/experimental/Bcp/BB_cut.hpp b/experimental/Bcp/BB_cut.hpp
new file mode 100644
index 0000000..dc26585
--- /dev/null
+++ b/experimental/Bcp/BB_cut.hpp
@@ -0,0 +1,52 @@
+// (C) Copyright International Business Machines Corporation 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University
+
+#ifndef _BB_CUT_H
+#define _BB_CUT_H
+
+#include "BCP_cut.hpp"
+#include "BCP_mempool.hpp"
+#include "OsiRowCut.hpp"
+
+class BCP_buffer;
+
+/** Simple representation of a cut by storing non zero coefficients only */ 
+
+/****************************************************************************/
+class BB_cut : public BCP_cut_algo, public OsiRowCut {
+
+private:
+
+    static BCP_MemPool memPool;
+
+public:
+
+    static inline void * operator new(size_t size) {
+	return memPool.alloc(size);
+    }
+
+    static inline void operator delete(void *p, size_t size) {
+	memPool.free(p, size);
+    }
+
+    /// Packing cut to a buffer
+    void pack(BCP_buffer& buf) const;
+
+    /**@name Constructors and destructors */
+    //@{
+    /// Constructor from content of buffer 
+    BB_cut(BCP_buffer& buf);
+
+    /// Constructor from an OsiRowCut 
+    BB_cut(const OsiRowCut& cut);
+
+    /// Destructor
+    ~BB_cut() {}
+};
+
+#endif
diff --git a/experimental/Bcp/BM.cpp b/experimental/Bcp/BM.cpp
new file mode 100644
index 0000000..f3f074b
--- /dev/null
+++ b/experimental/Bcp/BM.cpp
@@ -0,0 +1,145 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006, 2007 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+#include <sstream>
+
+/* To get the cumulative time spent on a processor just use a gawk command
+   like this below. Look at the output first; probably the process id needs
+   to be prepended to the regexp and the procid may also change the $7 to
+   some other word.
+   gawk -e 'BEGIN {t=0} /^BCP_lp: Time spent in this node:/ {t+=$7} END {print t}' outfile
+*/
+
+#include "BM.hpp"
+
+using namespace std;
+
+//#############################################################################
+
+int main(int argc, char* argv[])
+{
+    CoinError::printErrors_ = true;
+    BM_init user_init;
+    int retcode = -1;
+#if 1
+    retcode = bcp_main(argc, argv, &user_init);
+#else
+    try {
+      retcode = bcp_main(argc, argv, &user_init);
+    }
+    catch(Bonmin::TNLPSolver::UnsolvedError &E) {
+      //      E.writeDiffFiles();
+      E.printError(std::cerr);
+   }
+   catch(Bonmin::OsiTMINLPInterface::SimpleError &E) {
+     std::cerr<<E.className()<<"::"<<E.methodName()
+              <<std::endl
+              <<E.message()<<std::endl;
+   }
+   catch(CoinError &E) {
+     std::cerr<<E.className()<<"::"<<E.methodName()
+              <<std::endl
+              <<E.message()<<std::endl;
+   }
+   catch (Ipopt::OPTION_INVALID &E)
+   {
+    std::cerr<<"Ipopt exception : "<<E.Message()<<std::endl;
+   }
+   catch(...) {
+     std::cerr<<" unrecognized exception"<<std::endl;
+     throw;
+   }
+#endif
+
+    return retcode;
+}
+
+//#############################################################################
+
+template <>
+void BCP_parameter_set<BM_par>::create_keyword_list() {
+    // Create the list of keywords for parameter file reading
+    keys.push_back(make_pair(BCP_string("BM_DisregardPriorities"),
+			     BCP_parameter(BCP_CharPar, DisregardPriorities)));
+    keys.push_back(make_pair(BCP_string("BM_PrintBranchingInfo"),
+			     BCP_parameter(BCP_CharPar, PrintBranchingInfo)));
+    keys.push_back(make_pair(BCP_string("BM_UsePseudoCosts"),
+			     BCP_parameter(BCP_IntPar, UsePseudoCosts)));
+    keys.push_back(make_pair(BCP_string("BM_DecreasingSortInSetupList"),
+			     BCP_parameter(BCP_IntPar, DecreasingSortInSetupList)));
+    keys.push_back(make_pair(BCP_string("BM_PreferHighCombinationInBranching"),
+			     BCP_parameter(BCP_IntPar, PreferHighCombinationInBranching)));
+    keys.push_back(make_pair(BCP_string("BM_NumNlpFailureMax"),
+			     BCP_parameter(BCP_IntPar, NumNlpFailureMax)));
+    keys.push_back(make_pair(BCP_string("BM_NL_filename"),
+			     BCP_parameter(BCP_StringPar, NL_filename)));
+    keys.push_back(make_pair(BCP_string("BM_IpoptParamfile"),
+			     BCP_parameter(BCP_StringPar, IpoptParamfile)));
+}
+
+/****************************************************************************/
+
+template <>
+void BCP_parameter_set<BM_par>::set_default_entries() {
+    set_entry(DisregardPriorities, false);
+    set_entry(PrintBranchingInfo, true);
+    set_entry(UsePseudoCosts, 1);
+    set_entry(DecreasingSortInSetupList, 1);
+    set_entry(PreferHighCombinationInBranching, 0);
+    set_entry(NumNlpFailureMax, 5);
+    set_entry(NL_filename, "");
+    set_entry(IpoptParamfile, "");
+}
+
+//#############################################################################
+
+BCP_lp_user *
+BM_init::lp_init(BCP_lp_prob& p)
+{
+    return new BM_lp;
+}
+
+/****************************************************************************/
+
+BCP_tm_user *
+BM_init::tm_init(BCP_tm_prob& p,
+                 const int argnum, const char * const * arglist)
+{
+    BM_tm* tm = new BM_tm;
+
+    if (argnum == 2) {
+	tm->par.read_from_file(arglist[1]);
+    } else if (argnum == 1) {
+	// work with defaults
+    } else {
+	tm->par.read_from_arglist(argnum, arglist);
+    }
+
+    tm->readIpopt();
+
+    return tm;
+}
+
+/****************************************************************************/
+
+BCP_user_pack *
+BM_init::packer_init(BCP_user_class* p)
+{
+    return new BM_pack;
+}
+
+/****************************************************************************/
+
+BM_stats::~BM_stats()
+{
+  // LACI: It would be nice to also print the process ID here, but I
+  // wasn't sure how to get it...
+
+  printf("Stats: #NodesSol = %d #SbSol = %d #Fixed = %d #SbDone = %d SumInd = %d SumPos = %e\n", numberNodeSolves_, numberSbSolves_, numberFixed_, numberStrongBranching_, sumStrongBranchingListIndices_, sumStrongBranchingListPositions_);
+}
diff --git a/experimental/Bcp/BM.hpp b/experimental/Bcp/BM.hpp
new file mode 100644
index 0000000..2f72509
--- /dev/null
+++ b/experimental/Bcp/BM.hpp
@@ -0,0 +1,473 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+#ifndef _BM_H
+#define _BM_H
+
+#include "BCP_USER.hpp"
+#include "BCP_parameters.hpp"
+#include "BCP_tm_user.hpp"
+#include "BCP_lp_user.hpp"
+
+#include "BB_cut.hpp"
+
+#include "BonIpoptWarmStart.hpp"
+
+#define BM_DISREGARD_SOS
+
+//#############################################################################
+
+class BM_node : public BCP_user_data {
+public:
+    /** A counter for how many times in a row did the NLP code fail. When the
+	NLP fails we branch; hopefully it'll be OK in the children. If it
+	fails too many times in a row then we fathom the node: it's hopelessly
+	difficult. */
+    int numNlpFailed_;
+public:
+    BM_node() : numNlpFailed_(0) {}
+    BM_node(BCP_buffer& buf) : numNlpFailed_(0) {
+	buf.unpack(numNlpFailed_);
+    }
+    ~BM_node() {}
+
+    inline void pack(BCP_buffer& buf) const {
+	buf.pack(numNlpFailed_);
+    }
+};
+
+//#############################################################################
+    
+enum BM_message {
+    BM_StrongBranchRequest,
+    BM_StrongBranchResult,
+    BM_PseudoCostUpdate
+};
+
+enum BM_BoundChange {
+    BM_Var_DownBranch,
+    BM_Var_UpBranch
+};
+
+//#############################################################################
+    
+class BM_par {
+public:
+    enum chr_params {
+        //
+	DisregardPriorities,
+	PrintBranchingInfo,
+        end_of_chr_params
+    };
+    enum int_params {
+        //
+        UsePseudoCosts,
+        DecreasingSortInSetupList,
+        PreferHighCombinationInBranching,
+        NumNlpFailureMax,
+
+	// twice the number of candidates if all candidates have 2 children.
+	// We want to do SB on at least this many (if there are this many)
+	SBNumBranchesInRoot,
+	
+	SBNumBranchesInTree,
+	// The level where (and below) there are no min number of branches to
+	// be considered and SB need not be done (we can use pseudo costs
+	// instead) 
+	SBMaxLevel,
+
+        end_of_int_params
+    };
+    enum dbl_params {
+        dummy_dbl_param,
+        //
+        end_of_dbl_params
+    };
+    enum str_params {
+        NL_filename,
+        IpoptParamfile,
+        //
+        end_of_str_params
+    };
+    enum str_array_params {
+        dummy_str_array_param,
+        //
+        end_of_str_array_params
+    };
+};
+
+//#############################################################################
+
+class BM_stats {
+public:
+  BM_stats() :
+    numberNodeSolves_(0),
+    numberSbSolves_(0),
+    numberFixed_(0),
+    numberStrongBranching_(0),
+    sumStrongBranchingListIndices_(0),
+    sumStrongBranchingListPositions_(0.)
+  {}
+
+  ~BM_stats();
+
+  inline void incNumberNodeSolves() {
+    numberNodeSolves_++;
+  }
+  inline void incNumberSbSolves(int cnt) {
+    numberSbSolves_ += cnt;
+  }
+  inline void incNumberFixed() {
+    numberFixed_++;
+  }
+  inline void updateStrongBrachingInfo(int chosenIndex, int listLength) {
+    numberStrongBranching_++;
+    sumStrongBranchingListIndices_ += chosenIndex;
+    sumStrongBranchingListPositions_ +=
+      (double)(listLength-chosenIndex)/(double)listLength;
+  }
+private:
+  /** Total number of NLP solves as node solves */
+  int numberNodeSolves_;
+  /** Total number of NLP solves for strong-branching */
+  int numberSbSolves_;
+  /** Total number of times variables were fixed due to strong branching */
+  int numberFixed_;
+  /** Total number of times this node did strong branching */
+  int numberStrongBranching_;
+  /** Sum of all list indices */
+  int sumStrongBranchingListIndices_;
+  /** Sum of all relative list positions */
+  double sumStrongBranchingListPositions_;
+};
+
+//#############################################################################
+
+// Data needed to be sent off to do strong branching
+
+struct BM_BranchData {
+  // These are the input for doing the branching
+  int changeType;
+  int objInd;
+  int colInd;
+  double solval;
+  double bd;
+  // These are the results of doing the branching
+  int status;
+  double objval;
+  int iter;
+  double time;
+};
+
+//#############################################################################
+
+class BM_tm : public BCP_tm_user {
+
+public:
+
+    /**@name Private data member */
+    BCP_string ipopt_file_content;
+    BCP_string nl_file_content;
+    BCP_parameter_set<BM_par> par;
+    OsiPseudoCosts pseudoCosts_;
+
+public:
+
+    /**@name Constructors and destructors */
+    //@{
+    /// Default constructor 
+    BM_tm() {}
+
+    /// Default destructor
+    virtual ~BM_tm() {}
+    //@}
+
+    /**@name Packing and unpacking methods */
+    //@{
+    virtual void pack_module_data(BCP_buffer& buf, BCP_process_t ptype);
+
+    //@}
+
+    /// Pass the core constraints and core variables to bcp
+    virtual void initialize_core(BCP_vec<BCP_var_core*>& vars,
+				 BCP_vec<BCP_cut_core*>& cuts,
+				 BCP_lp_relax*& matrix);
+
+    /** Create the set of extra variables and cuts that should be added to the
+	formulation in the root node. Also decide how variable pricing shuld be
+	done, that is, if column generation is requested in the
+	init_new_phase() method of this class then column
+	generation should be performed according to \c pricing_status.
+    */
+    virtual void
+    create_root(BCP_vec<BCP_var*>& added_vars,
+		BCP_vec<BCP_cut*>& added_cuts,
+		BCP_user_data*& user_data);
+
+    /// Print a feasible solution
+    virtual void display_feasible_solution(const BCP_solution* sol);
+
+    /** Process a message that has been sent by another process' user part to
+	this process' user part. */
+    virtual void
+    process_message(BCP_buffer& buf);
+  
+    void receive_pseudo_cost_update(BCP_buffer& buf);
+    void pack_pseudo_costs(BCP_buffer& buf);
+
+    /// Output the final solution
+    virtual void display_final_information(const BCP_lp_statistics& lp_stat);
+
+    virtual void init_new_phase(int phase,
+				BCP_column_generation& colgen,
+				CoinSearchTreeBase*& candidates);
+
+    void readIpopt();
+
+  private:
+
+  /// auxilliary method for handling output for AMPL
+  void write_AMPL_solution(const BCP_solution* sol,
+			   bool write_file, bool write_screen);
+
+};
+
+//#############################################################################
+
+struct BM_SB_result
+{
+  /** 0: Not done   1: Only down   2: only up   3: both ways */
+  int branchEval; 
+  int objInd;
+  int colInd;
+  int status[2];
+  int iter[2];
+  double objval[2];
+  double varChange[2];
+  double time[2];
+};
+
+//#############################################################################
+
+#include <OsiAuxInfo.hpp>
+#include <OsiCuts.hpp>
+#include "CglGomory.hpp"
+#include "CglProbing.hpp"
+#include "CglKnapsackCover.hpp"
+#include "CglMixedIntegerRounding.hpp"
+#include "BonOaFeasChecker.hpp"
+#include "BonOaNlpOptim.hpp"
+#include "BonEcpCuts.hpp"
+#include "BonOACutGenerator2.hpp"
+
+#include "BCP_lp_user.hpp"
+#include "BonAmplSetup.hpp"
+#include "BonChooseVariable.hpp"
+
+class BM_lp : public BCP_lp_user
+{
+    /* There's no totalTime_ and nodeTime_. Look at the top of BM.cpp */
+    //   double totalTime_;
+    //   double nodeTime_;
+    int in_strong;
+
+    BCP_string ipopt_file_content;
+    BCP_string nl_file_content;
+    BCP_parameter_set<BM_par> par;
+    BCP_buffer bm_buf;
+
+    /** This contains the setup for running Bonmin in particular nlp
+	solver, continuous solver, cut generators,...*/
+    Bonmin::BonminAmplSetup bonmin_;
+
+    double integerTolerance_;
+
+    /** A counter for how many times in a row did the NLP code fail. When the
+	NLP fails we branch; hopefully it'll be OK in the children. If it
+	fails too many times in a row then we fathom the node: it's hopelessly
+	difficult. */
+    int numNlpFailed_;
+
+    OsiCuts cuts_;
+
+  /** These are the indices of the integral (i.e., things that can be branched
+      on) objects in the solver, sorted based on the priority of the
+      corresponding objects */
+  int* objInd_;
+  int objNum_;
+
+  /** Every time when branching decisions are to be made, we create 6 arrays,
+      3 for those objects that are infeasible and 3 for those that are
+      feasible. infInd_ contains the indices of the objects (into the objects_
+      array of objects) that are not feasible, infUseful_ cointains their
+      usefulness and infNum_ their number. They are ordered by their priority
+      and within that by their usefulness (that depends on their pseudocosts,
+      etc.). feasXXX_ contains the same for objects that are feasible, except
+      that SOS objects are not listed there, nor variables that are fixed. */
+  int*    infInd_;
+  double* infUseful_;
+  int     infNum_;
+  int*    feasInd_;
+  double* feasUseful_;
+  int     feasNum_;
+
+  /** This is where we keep the results in case of distributed strong
+      branching. The length of the array is objNum_ */
+  BM_SB_result* sbResult_;
+  /** A pointer to the entry that got selected */
+  BM_SB_result* bestSbResult_;
+
+  /** The time when we started to process the node */
+  double node_start_time;
+      
+  /** Class for collecting statistics */
+  BM_stats bm_stats;
+
+public:
+    BM_lp();
+    virtual ~BM_lp();
+
+    inline int& numNlpFailed() {
+	return (dynamic_cast<BM_node*>(get_user_data()))->numNlpFailed_;
+    }
+
+    virtual void
+    unpack_module_data(BCP_buffer& buf);
+
+    /** Process a message that has been sent by another process' user part to
+	this process' user part. */
+    virtual void
+    process_message(BCP_buffer& buf);
+
+    virtual OsiSolverInterface *
+    initialize_solver_interface();
+
+    virtual void
+    load_problem(OsiSolverInterface& osi, BCP_problem_core* core,
+		 BCP_var_set& vars, BCP_cut_set& cuts);
+
+    virtual void
+    modify_lp_parameters(OsiSolverInterface* lp, bool in_strong_branching);
+
+    virtual BCP_solution*
+    test_feasibility(const BCP_lp_result& lp_result,
+		     const BCP_vec<BCP_var*>& vars,
+		     const BCP_vec<BCP_cut*>& cuts);
+    BCP_solution* test_feasibility_BB(const BCP_lp_result& lp_result,
+				      const BCP_vec<BCP_var*>& vars);
+    BCP_solution* test_feasibility_hybrid(const BCP_lp_result& lp_result,
+					  const BCP_vec<BCP_var*>& vars,
+					  const BCP_vec<BCP_cut*>& cuts);
+
+    virtual void
+    generate_cuts_in_lp(const BCP_lp_result& lpres,
+			const BCP_vec<BCP_var*>& vars,
+			const BCP_vec<BCP_cut*>& cuts,
+			BCP_vec<BCP_cut*>& new_cuts,
+			BCP_vec<BCP_row*>& new_rows);
+    virtual void
+    cuts_to_rows(const BCP_vec<BCP_var*>& vars, // on what to expand
+		 BCP_vec<BCP_cut*>& cuts,       // what to expand
+		 BCP_vec<BCP_row*>& rows,       // the expanded rows
+		 // things that the user can use for lifting cuts if allowed
+		 const BCP_lp_result& lpres,
+		 BCP_object_origin origin, bool allow_multiple);
+    virtual double
+    compute_lower_bound(const double old_lower_bound,
+			const BCP_lp_result& lpres,
+			const BCP_vec<BCP_var*>& vars,
+			const BCP_vec<BCP_cut*>& cuts);
+
+    virtual void 
+    initialize_new_search_tree_node(const BCP_vec<BCP_var*>& vars,
+				    const BCP_vec<BCP_cut*>& cuts,
+				    const BCP_vec<BCP_obj_status>& vs,
+				    const BCP_vec<BCP_obj_status>& cs,
+				    BCP_vec<int>& var_changed_pos,
+				    BCP_vec<double>& var_new_bd,
+				    BCP_vec<int>& cut_changed_pos,
+				    BCP_vec<double>& cut_new_bd);
+
+    virtual BCP_branching_decision
+    select_branching_candidates(const BCP_lp_result& lpres,
+				const BCP_vec<BCP_var*>& vars,
+				const BCP_vec<BCP_cut*>& cuts,
+				const BCP_lp_var_pool& local_var_pool,
+				const BCP_lp_cut_pool& local_cut_pool,
+				BCP_vec<BCP_lp_branching_object*>& cans,
+				bool force_branch = false);
+
+    BCP_branching_decision bbBranch(OsiBranchingInformation& brInfo,
+				    BCP_vec<BCP_lp_branching_object*>& cands);
+    BCP_branching_decision hybridBranch();
+
+    /** Methods invoked from bbBranch() */
+    void send_pseudo_cost_update(OsiBranchingInformation& branchInfo);
+    void unpack_pseudo_costs(BCP_buffer& buf);
+    int sort_objects(OsiBranchingInformation& branchInfo,
+		     Bonmin::BonChooseVariable* choose, int& branchNum);
+    void clear_SB_results();
+    void collect_branch_data(OsiBranchingInformation& branchInfo,
+			     OsiSolverInterface* solver,
+			     const int branchNum,
+			     BM_BranchData* branchData);
+    void do_distributed_SB(OsiBranchingInformation& branchInfo,
+			   OsiSolverInterface* solver,
+			   const CoinWarmStart* cws,
+			   const int branchNum,
+			   const int* pids, const int pidNum);
+    bool isBranchFathomable(int status, double obj);
+    int process_SB_results(OsiBranchingInformation& branchInfo,
+			   OsiSolverInterface* solver,
+			   Bonmin::BonChooseVariable* choose,
+			   OsiBranchingObject*& branchObject);
+    int try_to_branch(OsiBranchingInformation& branchInfo,
+		      OsiSolverInterface* solver,
+		      Bonmin::BonChooseVariable* choose,
+		      OsiBranchingObject*& branchObject,
+		      bool allowVarFix);
+
+    virtual void
+    set_user_data_for_children(BCP_presolved_lp_brobj* best, 
+			       const int selected);
+
+};
+
+//#############################################################################
+
+#include "BCP_USER.hpp"
+
+class BM_pack : public BCP_user_pack {
+public:
+    virtual ~BM_pack() {}
+
+    virtual void pack_user_data(const BCP_user_data* ud, BCP_buffer& buf);
+    virtual BCP_user_data* unpack_user_data(BCP_buffer& buf);
+
+    virtual void pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf);
+    virtual BCP_cut_algo* unpack_cut_algo(BCP_buffer& buf);
+
+};
+
+//#############################################################################
+
+class BM_init : public USER_initialize {
+
+public:
+
+    virtual BCP_tm_user * tm_init(BCP_tm_prob& p,
+				  const int argnum,
+				  const char * const * arglist);
+
+    virtual BCP_lp_user * lp_init(BCP_lp_prob& p);
+
+    virtual BCP_user_pack * packer_init(BCP_user_class* p);
+};
+
+#endif
diff --git a/experimental/Bcp/BM.par b/experimental/Bcp/BM.par
new file mode 100644
index 0000000..fbd7202
--- /dev/null
+++ b/experimental/Bcp/BM.par
@@ -0,0 +1,24 @@
+BCP_StrongBranch_CloseToHalfNum 1 
+BCP_StrongBranch_CloseToOneNum 0
+
+// VERBOSITY:
+
+BCP_VerbosityShutUp			1  // 0: regular output
+
+BCP_ReportWhenDefaultIsExecuted 	0  // 1: print a message when default
+                                           // functions are called
+
+BCP_TmVerb_SingleLineInfoFrequency 	1  // k: print the info line every
+                                           // k nodes 
+                                           // Default : 0 (disabled)
+
+BCP_LpVerb_RelaxedSolution              1  // 1: display LP sol at each iter
+
+BCP_LpVerb_FinalRelaxedSolution         1  // 1: display LP sol of final iter
+
+BCP_TmVerb_BestFeasibleSolution         0  // 1: display best sol at the end
+
+BCP_TreeSearchStrategy 			0  // 0: Best Bound 
+
+BM_NL_filename batch.nl
+BM_IpoptParamfile bonmin.opt
diff --git a/experimental/Bcp/BM_lp.cpp b/experimental/Bcp/BM_lp.cpp
new file mode 100644
index 0000000..5f0b356
--- /dev/null
+++ b/experimental/Bcp/BM_lp.cpp
@@ -0,0 +1,330 @@
+// (C) Copyright International Business Machines Corporation 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University
+
+#include "OsiClpSolverInterface.hpp"
+#include "BM.hpp"
+#include "BCP_message_mpi.hpp"
+#include "BCP_lp_node.hpp"
+#include "BCP_lp.hpp"
+
+#include "BonOACutGenerator2.hpp"
+#include "BonEcpCuts.hpp"
+#include "BonOaNlpOptim.hpp"
+
+// The following is included for "min"
+#include "CoinFinite.hpp"
+
+#ifndef BM_DEBUG_PRINT
+#define BM_DEBUG_PRINT 0
+#endif
+
+static char prefix[100];
+
+//#############################################################################
+
+BM_lp::BM_lp() :
+    BCP_lp_user(),
+    in_strong(0),
+    bonmin_(),
+    objInd_(NULL),
+    objNum_(0),
+    infInd_(NULL),
+    infUseful_(NULL),
+    infNum_(0),
+    feasInd_(NULL),
+    feasUseful_(NULL),
+    feasNum_(0),
+    sbResult_(NULL),
+    bestSbResult_(NULL)
+{
+}
+
+/****************************************************************************/
+
+BM_lp::~BM_lp()
+{
+  delete[] objInd_;
+  delete[] infInd_;
+  delete[] infUseful_;
+  delete[] feasInd_;
+  delete[] feasUseful_;
+  delete[] sbResult_;
+}
+
+/****************************************************************************/
+
+OsiSolverInterface *
+BM_lp::initialize_solver_interface()
+{
+#ifdef COIN_HAS_MPI
+  sprintf(prefix, "%i", getLpProblemPointer()->get_process_id());
+#else
+  prefix[0] = 0;
+#endif
+
+  OsiSolverInterface* solver = NULL;
+  if (bonmin_.getAlgorithm() == 0) {
+    // Pure B&B
+    solver = bonmin_.nonlinearSolver()->clone();
+  } else {
+    OsiClpSolverInterface * clp = new OsiClpSolverInterface;
+    OsiBabSolver babSolver(3);
+    babSolver.setSolver(clp);
+    clp->setAuxiliaryInfo(&babSolver);
+    clp->messageHandler()->setLogLevel(0);
+    setOsiBabSolver(dynamic_cast<OsiBabSolver *>(clp->getAuxiliaryInfo()));
+    solver = clp;
+  }
+  return solver;
+}
+
+/****************************************************************************/
+
+void
+BM_lp::initialize_new_search_tree_node(const BCP_vec<BCP_var*>& vars,
+				       const BCP_vec<BCP_cut*>& cuts,
+				       const BCP_vec<BCP_obj_status>& vs,
+				       const BCP_vec<BCP_obj_status>& cs,
+				       BCP_vec<int>& var_changed_pos,
+				       BCP_vec<double>& var_new_bd,
+				       BCP_vec<int>& cut_changed_pos,
+				       BCP_vec<double>& cut_new_bd)
+{
+    node_start_time = CoinWallclockTime();
+    BM_node* data = dynamic_cast<BM_node*>(get_user_data());
+    numNlpFailed_ = data->numNlpFailed_;
+
+    if (bonmin_.getAlgorithm() != 0) {
+      // Not pure BB, so an LP solver will be used. Now we have to...
+
+      // First copy the bounds into nlp. That way all the branching decisions
+      // will be transferred over.
+      int i;
+
+      OsiSolverInterface * osi = getLpProblemPointer()->lp_solver;
+      Bonmin::OsiTMINLPInterface& nlp = *bonmin_.nonlinearSolver();
+      nlp.setColLower(osi->getColLower());
+      nlp.setColUpper(osi->getColUpper());
+
+      // Carry the changes over to the object lists in nlp
+      const int numObj = nlp.numberObjects();
+      OsiObject** nlpObj = nlp.objects();
+      for (i = 0; i < numObj; ++i) {
+	OsiSimpleInteger* io = dynamic_cast<OsiSimpleInteger*>(nlpObj[i]);
+	if (io) {
+	  io->resetBounds(&nlp);
+	} else {
+	  // The rest is OsiSOS where we don't need to do anything
+	  break;
+	}
+      }
+
+      // copy over the OsiObjects from the nlp solver
+      osi->addObjects(nlp.numberObjects(), nlp.objects());
+    }
+
+    in_strong = 0;
+}
+
+/************************************************************************/
+void
+BM_lp::load_problem(OsiSolverInterface& osi, BCP_problem_core* core,
+		    BCP_var_set& vars, BCP_cut_set& cuts)
+{
+  if (bonmin_.getAlgorithm() != 0) {
+    // We are doing hybrid, so osi is an LP solver. Call the default.
+    BCP_lp_user::load_problem(osi, core, vars, cuts);
+    return;
+  }
+  // Otherwise we do B&B and osi is an NLP solver.
+  // There is no need to fill it with the data from bonmin_.nonlinearSolver()
+  // since osi is a clone() of the master_lp in the BCP_lp object, and the
+  // master_lp is a clone() of bonmin_.nonlinearSolver(), and that clone()
+  // copies the data as well.
+}
+
+/************************************************************************/
+void
+BM_lp::modify_lp_parameters(OsiSolverInterface* lp, bool in_strong_branching)
+    // Called each time the node LP is solved
+{
+  if (in_strong_branching) {
+    in_strong = 1;
+    //     lp->setIntParam(OsiMaxNumIterationHotStart, 50);
+  }
+}
+
+/****************************************************************************/
+
+BCP_solution*
+BM_lp::test_feasibility(const BCP_lp_result& lp_result,
+                        const BCP_vec<BCP_var*>& vars,
+                        const BCP_vec<BCP_cut*>& cuts)
+{
+  if (bonmin_.getAlgorithm() == 0) {
+    // if pure B&B
+    return test_feasibility_BB(lp_result, vars);
+  } else {
+    return test_feasibility_hybrid(lp_result, vars, cuts);
+  }
+  return NULL; // fake return to quiet gcc
+}
+
+/****************************************************************************/
+
+BCP_solution*
+BM_lp::test_feasibility_BB(const BCP_lp_result& lpres,
+			   const BCP_vec<BCP_var*>& vars)
+{
+  // We can just take the primal solution and test whether it satisfies
+  // integrality requirements
+  BCP_solution_generic* sol = test_full(lpres, vars, integerTolerance_);
+  if (sol) {
+    sol->set_objective_value(lpres.objval());
+#if (BM_DEBUG_PRINT != 0)
+    printf("LP %.3f: Solution found. node: %i  depth: %i  value: %f\n",
+	   CoinWallclockTime() - start_time(),
+	   current_index(), current_level(), lpres.objval());
+#endif
+  }
+  return sol;
+}
+
+/****************************************************************************/
+
+BCP_solution*
+BM_lp::test_feasibility_hybrid(const BCP_lp_result& lp_result,
+			       const BCP_vec<BCP_var*>& vars,
+			       const BCP_vec<BCP_cut*>& cuts)
+{
+    /* First test that the integrality requirements are met. */
+    BCP_solution_generic* gsol = test_full(lp_result, vars, integerTolerance_);
+    if (! gsol) {}
+	
+    /* TODO:
+       don't test feasibility in every node
+    */
+    
+
+    OsiSolverInterface * osi = getLpProblemPointer()->lp_solver;
+    
+    // Don't test feasibility if the node LP was infeasible
+    if (osi->isProvenPrimalInfeasible() ) {   
+	return NULL;
+    }
+
+    // The babSolver info used is the one containted in osi
+    OsiBabSolver * babSolver =
+	dynamic_cast<OsiBabSolver *> (osi->getAuxiliaryInfo());
+    babSolver->setSolver(*bonmin_.nonlinearSolver()); 
+    //Last cut generator is used to check feasibility
+    bonmin_.cutGenerators().back().cgl->generateCuts(*osi, cuts_);
+    const int numvar = vars.size();
+    double* solverSol = new double[numvar];
+    double objValue = 1e200;
+    
+    BCP_solution_generic* sol = NULL;
+    if (babSolver->solution(objValue, solverSol, numvar)) {
+        sol = new BCP_solution_generic(false);
+	// Just copy the solution stored in solver to sol
+	for (int i = 0 ; i < numvar ; i++) {
+	    if (solverSol[i] > lp_result.primalTolerance())
+		sol->add_entry(vars[i], solverSol[i]); 
+	}
+	sol->set_objective_value(objValue);
+    }
+    delete[] solverSol;
+    return sol;
+}
+
+/****************************************************************************/
+
+void
+BM_lp::generate_cuts_in_lp(const BCP_lp_result& lpres,
+                           const BCP_vec<BCP_var*>& vars,
+                           const BCP_vec<BCP_cut*>& cuts,
+                           BCP_vec<BCP_cut*>& new_cuts,
+                           BCP_vec<BCP_row*>& new_rows)
+{
+    if (bonmin_.getAlgorithm() > 0) { /* if not pure B&B */
+	/* TODO:
+	   don't invoke all of them, only the *good* ones. figure out
+	   some measurement of how good a generator is.
+	*/
+	
+	OsiSolverInterface& si = *getLpProblemPointer()->lp_solver;
+	double rand;
+  Bonmin::BabSetupBase::CuttingMethods::const_iterator end = bonmin_.cutGenerators().end();
+  end--;//have to go back one element because last cut generator checks feasibility
+    
+    /* FIXME: fill out the tree info! */
+    CglTreeInfo info;
+    for(Bonmin::BabSetupBase::CuttingMethods::const_iterator i = bonmin_.cutGenerators().begin() ;
+        i != end ; i++){
+    rand = 1 - CoinDrand48();
+    if(i->frequency > rand){
+      i->cgl->generateCuts(si, cuts_, info);
+    }
+  }
+  	
+	// fill cuts
+	// eventually fill rows if not in strong branching
+	int numCuts = cuts_.sizeRowCuts();
+	for(int i = 0 ; i < numCuts ; i++) {
+	    const OsiRowCut& cut = cuts_.rowCut(i);
+	    new_cuts.push_back(new BB_cut(cut));
+	    const CoinPackedVector& row = cut.row();
+	    new_rows.push_back(new BCP_row(row, cut.lb(), cut.ub()));
+	}
+    }
+    cuts_.dumpCuts();
+}
+
+/****************************************************************************/
+
+void
+BM_lp::cuts_to_rows(const BCP_vec<BCP_var*>& vars, // on what to expand
+                    BCP_vec<BCP_cut*>& cuts,       // what to expand
+                    BCP_vec<BCP_row*>& rows,       // the expanded rows
+                    // things that the user can use for lifting cuts if allowed
+                    const BCP_lp_result& lpres,
+                    BCP_object_origin origin, bool allow_multiple)
+{
+    const int numCuts = cuts.size();
+    for (int i = 0; i < numCuts; ++i) {
+	BB_cut* cut = dynamic_cast<BB_cut*>(cuts[i]);
+	if (!cut) {
+	    throw BCP_fatal_error("Non-\"BB_cut\" in cuts_to_rows!\n");
+	}
+	const CoinPackedVector& row = cut->row();
+	rows.push_back(new BCP_row(row, cuts[i]->lb(), cuts[i]->ub()));
+    }
+    cuts_.dumpCuts();
+}
+
+/****************************************************************************/
+
+double
+BM_lp::compute_lower_bound(const double old_lower_bound,
+                           const BCP_lp_result& lpres,
+                           const BCP_vec<BCP_var*>& vars,
+                           const BCP_vec<BCP_cut*>& cuts)
+{
+    double bd;
+    if (bonmin_.getAlgorithm() == 0) {
+	/* if pure B&B */
+	bd = lpres.objval();
+    } else {
+      /* FIXME: what the heck was this...
+	bd = CoinMax(babSolver_.mipBound(), lpres.objval());
+      */
+    }
+    return CoinMax(bd, old_lower_bound);
+}
+
+/*---------------------------------------------------------------------------*/
diff --git a/experimental/Bcp/BM_lp_branch.cpp b/experimental/Bcp/BM_lp_branch.cpp
new file mode 100644
index 0000000..fea29bc
--- /dev/null
+++ b/experimental/Bcp/BM_lp_branch.cpp
@@ -0,0 +1,1074 @@
+// (C) Copyright International Business Machines Corporation 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University
+
+#include "CoinHelperFunctions.hpp"
+#include "BCP_lp_node.hpp"
+#include "BCP_lp.hpp"
+#include "BCP_lp_functions.hpp"
+#include "BM.hpp"
+#include "BonChooseVariable.hpp"
+#include "BonCurvBranchingSolver.hpp"
+#include "BonQpBranchingSolver.hpp"
+#include "BonLpBranchingSolver.hpp"
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonIpoptWarmStart.hpp"
+
+#ifndef BM_DEBUG_PRINT
+#define BM_DEBUG_PRINT 0
+#endif
+
+static bool ifprint = true;
+static bool ifprint2 = false;
+
+//#############################################################################
+
+BCP_branching_decision
+BM_lp::select_branching_candidates(const BCP_lp_result& lpres,
+                                   const BCP_vec<BCP_var*>& vars,
+                                   const BCP_vec<BCP_cut*>& cuts,
+                                   const BCP_lp_var_pool& local_var_pool,
+                                   const BCP_lp_cut_pool& local_cut_pool,
+                                   BCP_vec<BCP_lp_branching_object*>& cands,
+				   bool force_branch)
+{
+  /* FIXME: this is good only for BB and using NLP to solve a node */
+  bm_stats.incNumberNodeSolves();
+
+  Bonmin::OsiTMINLPInterface* nlp =
+    dynamic_cast<Bonmin::OsiTMINLPInterface*>(getLpProblemPointer()->lp_solver);
+  // If we are doing pure B&B then we have an nlp, and then we check for
+  // consecutive failures.
+  if (nlp) {
+    if (lpres.termcode() & BCP_Abandoned) {
+      if (nlp->isIterationLimitReached()) {
+	print(ifprint, "\
+BM_lp: At node %i : WARNING: nlp reached iter limit. Will force branching\n",
+	       current_index());
+      } else {
+	print(ifprint, "\
+BM_lp: At node %i : WARNING: nlp is abandoned. Will force branching\n",
+	       current_index());
+      }
+      // nlp failed
+      nlp->forceBranchable();
+      numNlpFailed_++;
+      if (numNlpFailed_ >= par.entry(BM_par::NumNlpFailureMax)) {
+	print(ifprint, "WARNING! Too many (%i) NLP failures in a row. Abandoning node.",
+	       numNlpFailed_);
+	return BCP_DoNotBranch_Fathomed;
+      }
+    } else {
+      numNlpFailed_ = 0;
+    }
+  }
+
+  OsiBranchingInformation brInfo(nlp, false, true);
+  brInfo.cutoff_ = upper_bound() + get_param(BCP_lp_par::Granularity);
+  brInfo.objectiveValue_ = lpres.objval();
+  brInfo.integerTolerance_ = integerTolerance_;
+  brInfo.timeRemaining_ = get_param(BCP_lp_par::MaxRunTime) - CoinCpuTime();
+  brInfo.numberSolutions_ = 0; /*FIXME*/
+  brInfo.numberBranchingSolutions_ = 0; /*FIXME numBranchingSolutions_;*/
+  brInfo.depth_ = current_level();
+
+  BCP_branching_decision brDecision;
+  if (bonmin_.getAlgorithm() == 0) {
+    /* if pure B&B */
+    brDecision = bbBranch(brInfo, cands);
+  } else {
+    brDecision = hybridBranch();
+  }
+
+  return brDecision;
+}
+
+//-----------------------------------------------------------------------------
+
+BCP_branching_decision
+BM_lp::hybridBranch()
+{
+    // FIXME: most of the pureBB stuff should work here.
+    throw BCP_fatal_error("BM_lp: FIXME: make hybrid work...");
+}
+
+/*****************************************************************************/
+
+void
+BM_lp::unpack_pseudo_costs(BCP_buffer& buf)
+{
+  Bonmin::BonChooseVariable* choose =
+    dynamic_cast<Bonmin::BonChooseVariable*>(bonmin_.branchingMethod());
+  OsiPseudoCosts& pseudoCosts = choose->pseudoCosts();
+  int numObj = pseudoCosts.numberObjects();
+  double* upTotalChange = pseudoCosts.upTotalChange();
+  int* upNumber = pseudoCosts.upNumber();
+  double* downTotalChange = pseudoCosts.downTotalChange();
+  int* downNumber = pseudoCosts.downNumber();
+  
+  buf.unpack(upTotalChange, numObj, false);
+  buf.unpack(upNumber, numObj, false);
+  buf.unpack(downTotalChange, numObj, false);
+  buf.unpack(downNumber, numObj, false);
+}
+
+
+//-----------------------------------------------------------------------------
+
+void
+BM_lp::send_pseudo_cost_update(OsiBranchingInformation& branchInfo)
+{
+  bm_buf.clear();
+  int itmp;
+  double objchange;
+  itmp = BM_PseudoCostUpdate;
+  bm_buf.pack(itmp);
+  for (int i = 0; i < objNum_; ++i) {
+    const BM_SB_result& sbres = sbResult_[i];
+    if ((sbres.branchEval & 1) != 0 && sbres.status[0] != BCP_Abandoned) {
+      bm_buf.pack(sbres.objInd);
+      itmp = 0;
+      bm_buf.pack(itmp);
+      if (sbres.status[0] == BCP_ProvenOptimal) {
+	objchange = sbres.objval[0] - branchInfo.objectiveValue_;
+      } else { // Must be BCP_ProvenPrimalInf
+	if (branchInfo.cutoff_ < 1e50) {
+	  objchange = 2*(branchInfo.cutoff_-branchInfo.objectiveValue_);
+	} else {
+	  objchange = 2*fabs(branchInfo.objectiveValue_);
+	}
+      }
+      bm_buf.pack(objchange/sbres.varChange[0]);
+    }
+    if ((sbres.branchEval & 2) != 0 && sbres.status[1] != BCP_Abandoned) {
+      bm_buf.pack(sbres.objInd);
+      itmp = 1;
+      bm_buf.pack(itmp);
+      if (sbres.status[1] == BCP_ProvenOptimal) {
+	objchange = sbres.objval[1] - branchInfo.objectiveValue_;
+      } else { // Must be BCP_ProvenPrimalInf
+	if (branchInfo.cutoff_ < 1e50) {
+	  objchange = 2*(branchInfo.cutoff_-branchInfo.objectiveValue_);
+	} else {
+	  objchange = 2*fabs(branchInfo.objectiveValue_);
+	}
+      }
+      bm_buf.pack(objchange/sbres.varChange[1]);
+    }
+  }
+  itmp = -1;
+  bm_buf.pack(itmp);
+  send_message(parent(), bm_buf);
+}
+
+//-----------------------------------------------------------------------------
+
+int
+BM_lp::sort_objects(OsiBranchingInformation& branchInfo,
+		    Bonmin::BonChooseVariable* choose, int& branchNum)
+{
+  const OsiObject* const * objects = branchInfo.solver_->objects();
+  double upMult, downMult;
+  choose->computeMultipliers(upMult, downMult);
+  const double MAXMIN = choose->maxminCrit(&branchInfo);
+
+  /* Order all objects that can be branched on */
+  int lastPriority = objects[objInd_[0]]->priority();
+  int infBlockStart = 0;
+  int feasBlockStart = 0;
+  branchNum = 0;
+  infNum_ = 0;
+  feasNum_ = 0;
+
+  const bool isRoot = (current_index() == 0);
+  int way;
+
+  const bool disregardPriorities = par.entry(BM_par::DisregardPriorities);
+  const bool usePseudoCosts = par.entry(BM_par::UsePseudoCosts);
+
+  for (int i = 0; i < objNum_; ++i) {
+    const int ind = objInd_[i];
+    const OsiObject* object = objects[ind];
+    double value = object->infeasibility(&branchInfo, way);
+    if (value  > 0.0) {
+      if (value >= 1e50) { // infeasible
+	return -1;
+      }
+      if (! disregardPriorities) {
+	int priorityLevel = object->priority();
+	if (lastPriority < priorityLevel) {
+	  // sort the entries based on their usefulness
+	  if (infBlockStart < infNum_) {
+	    if (par.entry(BM_par::DecreasingSortInSetupList)) {
+	      CoinSort_2(infUseful_ + infBlockStart, infUseful_ + infNum_,
+			 infInd_ + infBlockStart,
+			 CoinFirstGreater_2<double,int>());
+	    } else {
+	      CoinSort_2(infUseful_ + infBlockStart, infUseful_ + infNum_,
+			 infInd_ + infBlockStart);
+	    }
+	    infBlockStart = infNum_;
+	  }
+	  lastPriority = priorityLevel;
+	}
+      }
+      double dummy;
+      infInd_[infNum_] = ind;
+      if (usePseudoCosts) {
+	infUseful_[infNum_] = isRoot ?
+	  value : choose->computeUsefulness(MAXMIN, upMult, downMult, value,
+					    object, ind, dummy);
+      } else {
+	infUseful_[infNum_] = value;
+      }
+
+      ++infNum_;
+      branchNum += 2;
+
+    } else { /* value == 0.0 */
+      const OsiSOS* sos = dynamic_cast<const OsiSOS*>(object);
+      if (sos) {
+	// if an sos is feasible thne we don't do strong branching on it
+	continue;
+      }
+      const int iCol = object->columnNumber();
+      const double lb = branchInfo.lower_[iCol];
+      const double ub = branchInfo.upper_[iCol];
+      if (fabs(ub - lb) < 0.1) {
+	continue;
+      }
+      value = branchInfo.solution_[iCol];
+      ++branchNum;
+      if (floor(value+0.5) > lb && ceil(value-0.5) < ub) {
+	// The variable is integer, but neither at its lower nor at its upper
+	// bound (the test accounts for tolerances)
+	++branchNum;
+      }
+      if (! disregardPriorities) {
+	int priorityLevel = object->priority();
+	if (lastPriority < priorityLevel) {
+	  // sort the entries based on their usefulness
+	  if (feasBlockStart < feasNum_) {
+	    if (par.entry(BM_par::DecreasingSortInSetupList)) {
+	      CoinSort_2(feasUseful_ + feasBlockStart, feasUseful_ + feasNum_,
+			 feasInd_ + feasBlockStart,
+			 CoinFirstGreater_2<double,int>());
+	    } else {
+	      CoinSort_2(feasUseful_ + feasBlockStart, feasUseful_ + feasNum_,
+			 feasInd_ + feasBlockStart);
+	    }
+	  }
+	  lastPriority = priorityLevel;
+	}
+      }
+      double dummy;
+      feasInd_[feasNum_] = ind;
+      feasUseful_[feasNum_] = choose->computeUsefulness(MAXMIN,
+							upMult, downMult, value,
+							object, ind, dummy);
+      ++feasNum_;
+    }
+  }
+  if (infBlockStart < infNum_) {
+    if (par.entry(BM_par::DecreasingSortInSetupList)) {
+      CoinSort_2(infUseful_ + infBlockStart, infUseful_ + infNum_,
+		 infInd_ + infBlockStart,
+		 CoinFirstGreater_2<double,int>());
+    } else {
+      CoinSort_2(infUseful_ + infBlockStart, infUseful_ + infNum_,
+		 infInd_ + infBlockStart);
+    }
+  }
+  if (feasBlockStart < feasNum_) {
+    if (par.entry(BM_par::DecreasingSortInSetupList)) {
+      CoinSort_2(feasUseful_ + feasBlockStart, feasUseful_ + feasNum_,
+		 feasInd_ + feasBlockStart,
+		 CoinFirstGreater_2<double,int>());
+    } else {
+      CoinSort_2(feasUseful_ + feasBlockStart, feasUseful_ + feasNum_,
+		 feasInd_ + feasBlockStart);
+    }
+  }
+
+#if (BM_DEBUG_PRINT != 0)
+  const double t = CoinWallclockTime();
+  printf("LP %.3f: node: %i  depth: %i  obj: %f  infNum: %i  feasNum: %i  soltime: %.3f\n",
+	 t-start_time(), current_index(), current_level(),
+	 branchInfo.objectiveValue_, 
+	 infNum_, feasNum_, t-node_start_time);
+  node_start_time = t;
+#endif
+  
+  return infNum_;
+}
+
+//-----------------------------------------------------------------------------
+
+void
+BM_lp::clear_SB_results()
+{
+  for (int i = 0; i < objNum_; ++i) {
+    sbResult_[i].branchEval = 0;
+  }
+  bestSbResult_ = NULL;
+}
+
+//-----------------------------------------------------------------------------
+
+void
+BM_lp::collect_branch_data(OsiBranchingInformation& branchInfo,
+			   OsiSolverInterface* solver,
+			   const int branchNum,
+			   BM_BranchData* branchData)
+{
+  int i;
+  int b = 0;
+  for (i = 0; i < infNum_; ++i) {
+    /* FIXME: think about SOS */
+    const int objInd = infInd_[i];
+    const int colInd = solver->object(objInd)->columnNumber();
+    const double val = branchInfo.solution_[colInd];
+    branchData[b].changeType = BM_Var_DownBranch;
+    branchData[b].objInd = objInd;
+    branchData[b].colInd = colInd;
+    branchData[b].solval = val;
+    branchData[b].bd = floor(val);
+    BM_SB_result& sbres = sbResult_[objInd];
+    sbres.objInd = objInd;
+    sbres.varChange[0] = val - floor(val);
+    ++b;
+    if (b == branchNum) {
+      return;
+    }
+    branchData[b].changeType = BM_Var_UpBranch;
+    branchData[b].objInd = objInd;
+    branchData[b].colInd = colInd;
+    branchData[b].solval = val;
+    branchData[b].bd = ceil(val);
+    sbres.varChange[1] = ceil(val) - val;
+    ++b;
+    if (b == branchNum) {
+      return;
+    }
+  }
+  for (i = 0; i < feasNum_; ++i) {
+    const int objInd = feasInd_[i];
+    const int colInd = solver->object(objInd)->columnNumber();
+    const double val = branchInfo.solution_[colInd];
+    const double lb = branchInfo.lower_[colInd];
+    const double ub = branchInfo.upper_[colInd];
+    if (floor(val+0.5) > lb) { // not at its lb
+      branchData[b].changeType = BM_Var_DownBranch;
+      branchData[b].objInd = objInd;
+      branchData[b].colInd = colInd;
+      branchData[b].solval = val;
+      branchData[b].bd = floor(val - 0.5);
+      ++b;
+      if (b == branchNum) {
+	return;
+      }
+    }
+    if (ceil(val-0.5) < ub) { // not at its ub
+      branchData[b].changeType = BM_Var_UpBranch;
+      branchData[b].objInd = objInd;
+      branchData[b].colInd = colInd;
+      branchData[b].solval = val;
+      branchData[b].bd = ceil(val + 0.5);
+      ++b;
+      if (b == branchNum) {
+	return;
+      }
+    }
+  }
+}
+
+//-----------------------------------------------------------------------------
+
+void
+BM_solve_branches(OsiSolverInterface* solver, const CoinWarmStart* cws,
+		  const int numBranch, BM_BranchData* bD)
+{
+  for (int i = 0; i < numBranch; ++i) {
+    double t = CoinWallclockTime();
+    const int ind = bD[i].colInd;
+    const int field = bD[i].changeType == BM_Var_UpBranch ? 1 : 0;
+    const double old_lb = solver->getColLower()[ind];
+    const double old_ub = solver->getColUpper()[ind];
+    if (field == 0) {
+      solver->setColUpper(ind, bD[i].bd);
+    } else {
+      solver->setColLower(ind, bD[i].bd);
+    }
+    if (cws) {
+      solver->setWarmStart(cws);
+      solver->resolve();
+    } else {
+      solver->initialSolve();
+    }
+    bD[i].status =
+      (solver->isAbandoned()              ? BCP_Abandoned : 0) |
+      (solver->isProvenOptimal()          ? BCP_ProvenOptimal : 0) |
+      (solver->isProvenPrimalInfeasible() ? BCP_ProvenPrimalInf : 0);
+    bD[i].objval =
+      (bD[i].status & BCP_ProvenOptimal) != 0 ? solver->getObjValue() : 0.0;
+    bD[i].iter = solver->getIterationCount();
+    solver->setColBounds(ind, old_lb, old_ub);
+    bD[i].time = CoinWallclockTime() - t;
+  }
+}
+
+//-----------------------------------------------------------------------------
+
+void
+BM_register_branch_results(const int numBranch, const BM_BranchData* bD,
+			   BM_SB_result* sbResults)
+{
+  for (int i = 0; i < numBranch; ++i) {
+    const int field = bD[i].changeType == BM_Var_UpBranch ? 1 : 0;
+    BM_SB_result& sbres = sbResults[bD[i].objInd];
+    sbres.objInd           = bD[i].objInd;
+    sbres.branchEval      |= field == 0 ? 1 : 2;
+    sbres.status[field]    = bD[i].status;
+    sbres.objval[field]    = bD[i].objval;
+    sbres.iter[field]      = bD[i].iter;
+    sbres.varChange[field] = fabs(bD[i].solval - bD[i].bd);
+  }
+}
+
+//-----------------------------------------------------------------------------
+
+void
+BM_lp::do_distributed_SB(OsiBranchingInformation& branchInfo,
+			 OsiSolverInterface* solver,
+			 const CoinWarmStart* cws,
+			 const int branchNum,
+			 const int* pids, const int pidNum)
+{
+  const double * clb = solver->getColLower();
+  const double * cub = solver->getColUpper();
+  const int numCols = solver->getNumCols();
+  bm_buf.clear();
+  int tag = BM_StrongBranchRequest;
+  bm_buf.pack(tag);
+  bm_buf.pack(clb, numCols);
+  bm_buf.pack(cub, numCols);
+  bm_buf.pack(branchInfo.objectiveValue_);
+  bm_buf.pack(branchInfo.cutoff_);
+  bool has_ws = cws != NULL;
+  bm_buf.pack(has_ws);
+  if (has_ws) {
+    BCP_lp_prob* p = getLpProblemPointer();
+    CoinWarmStart* cws_tmp = cws->clone(); // the next call destroys it
+    BCP_warmstart* ws = cws ? BCP_lp_convert_CoinWarmStart(*p, cws_tmp) : NULL;
+    BCP_pack_warmstart(ws, bm_buf);
+    delete ws;
+  }
+  
+  const int fixed_size = bm_buf.size();
+
+  // collect what we'll need to send off data
+  BM_BranchData* branchData = new BM_BranchData[branchNum];
+  collect_branch_data(branchInfo, solver, branchNum, branchData);
+
+  // We have branchNum branches to process on pidNum+1 (the last is the local
+  // process) processes.
+  int branchLeft = branchNum;
+  BM_BranchData* bD = branchData;
+  for (int pidLeft = pidNum; pidLeft > 0; --pidLeft) {
+    int numSend = branchLeft / pidLeft;
+    if (numSend * pidLeft < branchLeft) {
+      ++numSend;
+    }
+    bm_buf.set_size(fixed_size);
+    // Now pack where we are in branchData and pack numSend branches
+    int location = bD - branchData;
+    bm_buf.pack(location);
+    bm_buf.pack(numSend);
+    for (int s = 0; s < numSend; ++s) {
+      bm_buf.pack(bD[s].changeType);
+      bm_buf.pack(bD[s].objInd);
+      bm_buf.pack(bD[s].colInd);
+      bm_buf.pack(bD[s].solval);
+      bm_buf.pack(bD[s].bd);
+    }
+    send_message(pids[pidLeft-1], bm_buf);
+    bD += numSend;
+    branchLeft -= numSend;
+  }
+  assert(branchNum/(pidNum+1) == branchLeft);
+
+  // Process the leftover branches locally
+  /* FIXME: this assumes that the solver is the NLP solver. Maybe we should use
+     the nlp solver in BM_lp */
+  BM_solve_branches(solver, cws, branchLeft, bD);
+  bm_stats.incNumberSbSolves(branchLeft);
+  BM_register_branch_results(branchLeft, bD, sbResult_);
+
+  // Receive the results from the other processes
+  int numResults = branchLeft;
+  while (numResults < branchNum) {
+    bm_buf.clear();
+    receive_message(BCP_AnyProcess, bm_buf, BCP_Msg_User);
+    bm_buf.unpack(tag);
+    assert(tag == BM_StrongBranchResult);
+    int location;
+    int numRes;
+    bm_buf.unpack(location);
+    bm_buf.unpack(numRes);
+    BM_BranchData* bD = branchData + location;
+    for (int i = 0; i < numRes; ++i) {
+      bm_buf.unpack(bD[i].status);
+      bm_buf.unpack(bD[i].objval);
+      bm_buf.unpack(bD[i].iter);
+      bm_buf.unpack(bD[i].time);
+    }
+    BM_register_branch_results(numRes, bD, sbResult_);
+    numResults += numRes;
+  }
+}
+
+//-----------------------------------------------------------------------------
+
+bool
+BM_lp::isBranchFathomable(int status, double obj)
+{
+  return ( (status & BCP_ProvenPrimalInf) ||
+	   ((status & BCP_ProvenOptimal) && over_ub(obj)) );
+}
+
+//-----------------------------------------------------------------------------
+
+int
+BM_lp::process_SB_results(OsiBranchingInformation& branchInfo,
+			  OsiSolverInterface* solver,
+			  Bonmin::BonChooseVariable* choose,
+			  OsiBranchingObject*& branchObject)
+{
+  int evaluated = 0;
+  int i;
+#if defined(DEBUG_PRINT)
+  const double t = CoinWallclockTime()-start_time();
+#endif
+
+#if 0 // defined(DEBUG_PRINT)
+  const double t = CoinWallclockTime()-start_time();
+  for (i = 0; i < infNum_; ++i) {
+    const BM_SB_result& sbres = sbResult_[infInd_[i]];
+    if (sbres.branchEval == 0) {
+      continue;
+    }
+    printf("LP %.3f: SB: node: %i  inf col: %i  stati: %i %i,  obj: %f %f  time: %.3f %.3f\n",
+	   t, current_index(), sbres.colInd, 
+	   sbres.status[0], sbres.status[1],
+	   sbres.objval[0], sbres.objval[1], sbres.time[0], sbres.time[1]);
+  }
+  for (i = 0; i < feasNum_; ++i) {
+    const BM_SB_result& sbres = sbResult_[feasInd_[i]];
+    if (sbres.branchEval == 0) {
+      continue;
+    }
+    printf("LP %.3f: SB: node: %i  feas col: %i  stati: %i %i,  obj: %f %f  time: %.3f %.3f\n",
+	   t, current_index(), sbres.colInd, 
+	   sbres.status[0], sbres.status[1],
+	   sbres.objval[0], sbres.objval[1], sbres.time[0], sbres.time[1]);
+  }
+#endif
+  // First check if we can fathom the node
+  int listLen=0; // we want this for the bm_stats
+  for (i = 0; i < infNum_; ++i) {
+    const BM_SB_result& sbres = sbResult_[infInd_[i]];
+    if (sbres.branchEval == 0) {
+      continue;
+    }
+    assert(sbres.branchEval == 3);
+    if (isBranchFathomable(sbres.status[0], sbres.objval[0]) &&
+	isBranchFathomable(sbres.status[1], sbres.objval[1])) {
+#if (BM_DEBUG_PRINT != 0)
+      const double wallclock = CoinWallclockTime();
+#if 0
+      printf("LP %.3f: SBres: node: %i  FATHOM  inf/eval/cand: time: %.3f\n",
+	     wallclock-start_time(), current_index(),
+	     infNum_, 
+	     wallclock-node_start_time);
+#else 
+      printf("LP %.3f: SBres: node: %i  FATHOM  time: %.3f\n",
+	     wallclock-start_time(), current_index(),
+	     wallclock-node_start_time);
+#endif
+#endif
+      return -2;
+    }
+    ++listLen;
+  }
+
+  // Nope. Let's see if we can fix anything. 
+  // 0: nothing fixed   bit 0: fixed but stayd feas  bit 1: fixed and lost feas
+  int fixedStat = 0; 
+  for (i = 0; i < infNum_; ++i) {
+    const BM_SB_result& sbres = sbResult_[infInd_[i]];
+    if (sbres.branchEval == 0) {
+      continue;
+    }
+    ++evaluated;
+    if (isBranchFathomable(sbres.status[0], sbres.objval[0])) {
+      const int colInd = sbres.colInd;
+      solver->setColLower(colInd, ceil(branchInfo.solution_[colInd]));
+      fixedStat |= 2;
+      bm_stats.incNumberFixed();
+    }
+    if (isBranchFathomable(sbres.status[1], sbres.objval[1])) {
+      const int colInd = sbres.colInd;
+      solver->setColUpper(colInd, floor(branchInfo.solution_[colInd]));
+      fixedStat |= 2;
+      bm_stats.incNumberFixed();
+    }
+  }
+  for (i = 0; i < feasNum_; ++i) {
+    const BM_SB_result& sbres = sbResult_[feasInd_[i]];
+    if (sbres.branchEval == 0) {
+      continue;
+    }
+    ++evaluated;
+    if ( (sbres.branchEval & 1) &&
+	 isBranchFathomable(sbres.status[0], sbres.objval[0]) ) {
+      // Down branch evaluated and fathomable
+      const int colInd = sbres.colInd;
+      solver->setColLower(colInd, ceil(branchInfo.solution_[colInd] - 0.5));
+      fixedStat |= 1;
+      bm_stats.incNumberFixed();
+    }
+    if ( (sbres.branchEval & 2) &&
+	 isBranchFathomable(sbres.status[1], sbres.objval[1]) ) {
+      // Up branch evaluated and fathomable
+      const int colInd = sbres.colInd;
+      solver->setColUpper(colInd, floor(branchInfo.solution_[colInd] + 0.5));
+      fixedStat |= 1;
+      bm_stats.incNumberFixed();
+    }
+  }
+  if ((fixedStat & 2) != 0) {
+#if (BM_DEBUG_PRINT != 0)
+    printf("LP %.3f: SBres: node: %i  RESOLVE  time: %.3f\n",
+	   t - start_time(), current_index(), t-node_start_time);
+    node_start_time = t;
+#endif
+    return -1;
+  }
+
+  // OK, we may have fixed some, but we got to branch, nevertheless.
+  // Try to choose something where both sides have finished properly.
+  // Note: at this point all stati of the inf pieces is either abandoned,
+  // optimal (if primal infeas then we fixed and lost feasibility)
+  const bool preferHigh = par.entry(BM_par::PreferHighCombinationInBranching);
+  int best = -1;
+  int bestWhichWay = 1;
+  double bestTrusted = preferHigh ? -COIN_DBL_MAX : COIN_DBL_MAX;
+  const double MAXMIN = choose->maxminCrit(&branchInfo);
+
+  for (i = 0; i < infNum_; ++i) {
+    const int objInd = infInd_[i];
+    const BM_SB_result& sbres = sbResult_[objInd];
+    if (sbres.branchEval == 0) {
+      // FIXME: Check the pseudocost
+      continue;
+    }
+    if ((sbres.status[0]&BCP_Abandoned) || (sbres.status[1]&BCP_Abandoned)){
+      continue;
+    }
+    double upEst = sbres.objval[1] - branchInfo.objectiveValue_;
+    double downEst = sbres.objval[0] - branchInfo.objectiveValue_;
+    double value =
+      MAXMIN*CoinMin(upEst,downEst) + (1.0-MAXMIN)*CoinMax(upEst,downEst);
+    const bool better = ( (  preferHigh && (value > bestTrusted)) ||
+			  ( !preferHigh && (value < bestTrusted)) );
+    if (better) {
+      bestTrusted = value;
+      best = i;
+      bestWhichWay = upEst > downEst ? 0 : 1;
+      // override if there is a preferred way
+      const OsiObject* object = solver->object(objInd);
+      if (object->preferredWay() >= 0 && object->infeasibility()) {
+	bestWhichWay = object->preferredWay();
+      }
+    }
+  }
+  if (best == -1) {
+    // OMG... In *ALL* evaluated candidates at least one side was abandoned...
+    // Oh well, pick the first one not evaluated, or if no such thing then the
+    // first where only one side failed, or if no such thing then anything...
+    // FIXME: this loop will not be needed when pseudocosts are used
+    for (i = 0; i < infNum_; ++i) {
+      const BM_SB_result& sbres = sbResult_[infInd_[i]];
+      if (sbres.branchEval == 0) {
+	best = i;
+	break;
+      }
+    }
+    if (best == -1) {
+      for (i = 0; i < infNum_; ++i) {
+	const BM_SB_result& sbres = sbResult_[infInd_[i]];
+	if ((sbres.status[0] & BCP_Abandoned) == 0 ||
+	    (sbres.status[1] & BCP_Abandoned) == 0) {
+	  // prefer something where at least one side was not abandoned...
+	  best = i;
+	  break;
+	}
+	best = i;
+      }
+    }
+  }
+
+  bm_stats.updateStrongBrachingInfo(best, listLen);
+  
+  // At this point best is not -1, create the branching object
+  const OsiObject * object = solver->object(infInd_[best]);
+  branchObject = object->createBranch(solver, &branchInfo, bestWhichWay);
+  bestSbResult_ = sbResult_ + infInd_[best];
+#if (BM_DEBUG_PRINT != 0)
+  const int ind = object->columnNumber();
+  printf("LP %.3f: SBres: node: %i  depth: %i  BRANCH  time: %.3f  evaluated: %i  bvar: %i  val: %f  obj0: %f  obj1: %f  way: %i\n",
+	 t-start_time(), current_index(), current_level(), t-node_start_time, 
+	 evaluated, ind, branchInfo.solution_[ind], 
+	 bestSbResult_->objval[0], bestSbResult_->objval[1], bestWhichWay);
+  node_start_time = t;
+#endif
+
+  return (fixedStat & 1) != 0 ? -1 : 0;
+}
+
+//-----------------------------------------------------------------------------
+
+int
+BM_lp::try_to_branch(OsiBranchingInformation& branchInfo,
+		     OsiSolverInterface* solver,
+		     Bonmin::BonChooseVariable* choose,
+		     OsiBranchingObject*& branchObject,
+		     bool allowVarFix)
+{
+  int returnStatus = 0;
+
+  int branchNum; 
+  sort_objects(branchInfo, choose, branchNum);
+
+  if (infNum_ == 0) {
+    return 0;
+  }
+
+  const bool do_distributed_branching = true;
+
+  if (do_distributed_branching) {
+
+    bm_buf.clear();
+    bm_buf.pack(branchNum-1);
+    send_message(parent(), bm_buf, BCP_Msg_RequestProcessList);
+    bm_buf.clear();
+    receive_message(parent(), bm_buf, BCP_Msg_ProcessList);
+    int* pids = NULL;
+    int pidNum;
+    bm_buf.unpack(pids, pidNum);
+
+    clear_SB_results();
+
+    // Get the warmstart information
+    CoinWarmStart* cws = solver->getWarmStart();
+    Bonmin::IpoptWarmStart* iws = dynamic_cast<Bonmin::IpoptWarmStart*>(cws);
+    if (iws && iws->empty()) {
+      delete cws;
+      cws = NULL;
+    }
+
+    const int nodeIndex = current_index();
+    if (nodeIndex == 0) {
+      // we are in the root. We want to process all possible branches upto the
+      // parameter value.
+      branchNum = CoinMin(branchNum, par.entry(BM_par::SBNumBranchesInRoot));
+    } else {
+      if (nodeIndex < par.entry(BM_par::SBMaxLevel)) {
+	branchNum = CoinMin(branchNum,
+			    CoinMax(pidNum + 1,
+				    par.entry(BM_par::SBNumBranchesInTree)));
+      } else {
+	branchNum = pidNum > 0 ? pidNum + 1 : 0;
+      }
+    }
+
+    if (branchNum > 0) {
+      do_distributed_SB(branchInfo, solver, cws, branchNum, pids, pidNum);
+      returnStatus = process_SB_results(branchInfo, solver, choose,
+					branchObject);
+      send_pseudo_cost_update(branchInfo);
+    } else {
+      // We are too deep in the tree, just do something locally (like
+      // pseudocosts...)
+      returnStatus = BCP_lp_user::try_to_branch(branchInfo, solver, choose,
+						branchObject, allowVarFix);
+    }
+
+    delete[] pids;
+    delete cws;
+
+  } else { /* ! do_distributed_branching  ===> Do something locally */
+    
+  }
+
+  return returnStatus;
+}
+
+//-----------------------------------------------------------------------------
+
+BCP_branching_decision
+BM_lp::bbBranch(OsiBranchingInformation& brInfo,
+		BCP_vec<BCP_lp_branching_object*>& cands)
+{
+  BCP_lp_prob* p = getLpProblemPointer();
+  OsiSolverInterface* osi = p->lp_solver;
+  Bonmin::OsiTMINLPInterface* nlp =
+    dynamic_cast<Bonmin::OsiTMINLPInterface*>(osi);
+  assert(nlp);
+
+  nlp->getDblParam(OsiPrimalTolerance, brInfo.integerTolerance_);
+    
+  BCP_branching_decision retCode;
+  OsiBranchingObject* brObj = NULL;
+
+  const int numCols = nlp->getNumCols();
+  double* clb_old = new double[numCols];
+  double* cub_old = new double[numCols];
+  CoinDisjointCopyN(nlp->getColLower(), numCols, clb_old);
+  CoinDisjointCopyN(nlp->getColUpper(), numCols, cub_old);
+
+  Ipopt::SmartPtr<Ipopt::OptionsList> options = bonmin_.options();
+  int numSB = 0;
+  //const bool sbIsSet =
+    options->GetIntegerValue("number_strong_branch",numSB,"bonmin.");
+  int numSBroot = 0;
+  const bool sbRootIsSet =
+    options->GetIntegerValue("number_strong_branch_root",numSBroot,"bonmin.");
+
+  if (sbRootIsSet && brInfo.depth_ == 0) {
+    bonmin_.branchingMethod()->setNumberStrong(numSBroot);
+  } else {
+    bonmin_.branchingMethod()->setNumberStrong(numSB);
+  }
+
+  Bonmin::BonChooseVariable* choose =
+    dynamic_cast<Bonmin::BonChooseVariable*>(bonmin_.branchingMethod());
+  const int brResult = BM_lp::try_to_branch(brInfo, nlp, choose, brObj, true);
+
+#if 0
+  if (choose->goodSolution()) {
+    /* yipee! a feasible solution! Check that it's really */
+    const double* sol = choose->goodSolution();
+    BM_solution* bmsol = new BM_solution;
+    //Just copy the solution stored in solver to sol
+    double ptol = integerTolerance_;
+    for (int i = 0 ; i < numCols ; i++) {
+      if (fabs(sol[i]) > ptol)
+	bmsol->add_entry(i, sol[i]); 
+    }
+    bmsol->setObjective(choose->goodObjectiveValue());
+    choose->clearGoodSolution();
+    send_feasible_solution(bmsol);
+    delete bmsol;
+  }
+#endif
+
+  switch (brResult) {
+  case -2:
+    // when doing strong branching a candidate has proved that the
+    // problem is infeasible
+    retCode = BCP_DoNotBranch_Fathomed;
+    break;
+  case -1:
+    // OsiChooseVariable::chooseVariable() returned 2, 3, or 4
+    if (!brObj) {
+      // just go back and resolve
+      retCode = BCP_DoNotBranch;
+    } else {
+      // otherwise might as well branch. The forced variable is
+      // unlikely to jump up one more (though who knows...)
+      retCode = BCP_DoBranch;
+    }
+    break;
+  case 0:
+    if (!brObj) {
+      // nothing got fixed, yet couldn't find something to branch on
+      throw BCP_fatal_error("BM: Couldn't branch!\n");
+    }
+    // we've got a branching object
+    retCode = BCP_DoBranch;
+    break;
+  default:
+    throw BCP_fatal_error("\
+BM: BCP_lp_user::try_to_branch returned with unknown return code.\n");
+  }
+
+  if (brResult < 0) {
+    // If there were some fixings (brResult < 0) then propagate them
+    // where needed
+
+    // FIXME: This is not nice. Meddling w/ BCP internal data. The BCP
+    // user interface should provide a way to change bounds regardless
+    // whether branching is asked for or not.
+    const double* clb = nlp->getColLower();
+    const double* cub = nlp->getColUpper();
+
+    BCP_vec<BCP_var*>& vars = getLpProblemPointer()->node->vars;
+    for (int i = 0; i < numCols; ++i) {
+      if (clb_old[i] != clb[i] || cub_old[i] != cub[i]) {
+	vars[i]->change_bounds(clb[i], cub[i]);
+	nlp->setColBounds(i, clb[i], cub[i]);
+      }
+    }
+  }
+
+  if (retCode == BCP_DoBranch) {
+    // all possibilities are 2-way branches
+    int order[2] = {0, 1};
+    // Now interpret the result (at this point we must have a brObj
+    OsiIntegerBranchingObject* intBrObj =
+      dynamic_cast<OsiIntegerBranchingObject*>(brObj);
+    if (intBrObj) {
+      if (intBrObj->firstBranch() == 1) {
+	order[0] = 1;
+	order[1] = 0;
+      }
+      BCP_lp_integer_branching_object o(intBrObj);
+      cands.push_back(new BCP_lp_branching_object(o, order));
+      if (bestSbResult_) {
+	BCP_vec<double> lb(2, 0.0);
+	lb[0] = bestSbResult_->objval[order[0]];
+	lb[1] = bestSbResult_->objval[order[1]];
+	BCP_vec<int> tc(2, 0);
+	tc[0] = bestSbResult_->status[order[0]];
+	tc[1] = bestSbResult_->status[order[1]];
+	cands.back()->set_presolve_result(lb, tc);
+      }
+      if (par.entry(BM_par::PrintBranchingInfo)) {
+	print(ifprint2, "BM_lp: branching on variable %i   value: %f\n",
+	       intBrObj->originalObject()->columnNumber(),
+	       intBrObj->value());
+      }
+    }
+    OsiSOSBranchingObject* sosBrObj =
+      dynamic_cast<OsiSOSBranchingObject*>(brObj);
+    if (sosBrObj) {
+      if (sosBrObj->firstBranch() == 1) {
+	order[0] = 1;
+	order[1] = 0;
+      }
+      BCP_lp_sos_branching_object o(sosBrObj);
+      cands.push_back(new BCP_lp_branching_object(nlp, o, order));
+      if (bestSbResult_) {
+	BCP_vec<double> lb(2, 0.0);
+	lb[0] = bestSbResult_->objval[order[0]];
+	lb[1] = bestSbResult_->objval[order[1]];
+	BCP_vec<int> tc(2, 0);
+	tc[0] = bestSbResult_->status[order[0]];
+	tc[1] = bestSbResult_->status[order[1]];
+	cands.back()->set_presolve_result(lb, tc);
+      }
+      if (par.entry(BM_par::PrintBranchingInfo)) {
+	print(ifprint2, "BM_lp: branching on SOS %i   value: %f\n",
+	       sosBrObj->originalObject()->columnNumber(),
+	       sosBrObj->value());
+      }
+    }
+  }
+
+  delete brObj;
+  delete[] clb_old;
+  delete[] cub_old;
+
+  return retCode;
+}
+
+/****************************************************************************/
+
+void
+BM_lp::set_user_data_for_children(BCP_presolved_lp_brobj* best, 
+                                  const int selected)
+{
+    BM_node* data = NULL;
+    data = new BM_node;
+    data->numNlpFailed_ = numNlpFailed_;
+    best->user_data()[0] = data;
+    data = new BM_node;
+    data->numNlpFailed_ = numNlpFailed_;
+    best->user_data()[1] = data;
+}
+
+//#############################################################################
+
+void
+BM_lp::process_message(BCP_buffer& buf)
+{
+  int msgtag;
+  buf.unpack(msgtag);
+  assert(msgtag == BM_StrongBranchRequest);
+
+  Bonmin::OsiTMINLPInterface* nlp = bonmin_.nonlinearSolver();
+
+  int numCols;
+  double* clb;
+  double* cub;
+  double objvalOrig;
+  double cutoff;
+  buf.unpack(clb, numCols);
+  assert(numCols == nlp->getNumCols());
+  buf.unpack(cub, numCols);
+  assert(numCols == nlp->getNumCols());
+  buf.unpack(objvalOrig);
+  buf.unpack(cutoff);
+  bool has_ws;
+  buf.unpack(has_ws);
+  BCP_warmstart* ws = has_ws ? BCP_unpack_warmstart(buf) : NULL;
+  CoinWarmStart* cws = ws  ? ws->convert_to_CoinWarmStart() : NULL;
+  int location; // just a marker that we'll send back
+  int numBranch;
+  buf.unpack(location);
+  buf.unpack(numBranch);
+
+  int i;
+  BM_BranchData* branchData = new BM_BranchData[numBranch];
+  for (i = 0; i < numBranch; ++i) {
+    buf.unpack(branchData[i].changeType);
+    buf.unpack(branchData[i].objInd);
+    buf.unpack(branchData[i].colInd);
+    buf.unpack(branchData[i].solval);
+    buf.unpack(branchData[i].bd);
+  }
+
+  nlp->setColLower(clb);
+  nlp->setColUpper(cub);
+  BM_solve_branches(nlp, cws, numBranch, branchData);
+
+  bm_buf.clear();
+  msgtag = BM_StrongBranchResult;
+  bm_buf.pack(msgtag);
+  bm_buf.pack(location);
+  bm_buf.pack(numBranch);
+  for (i = 0; i < numBranch; ++i) {
+    const BM_BranchData& bD = branchData[i];
+    bm_buf.pack(bD.status);
+    bm_buf.pack(bD.objval);
+    bm_buf.pack(bD.iter);
+    bm_buf.pack(bD.time);
+  }
+  send_message(buf.sender(), bm_buf, BCP_Msg_User);
+
+  bm_buf.clear();
+  send_message(parent(), bm_buf, BCP_Msg_SBnodeFinished);
+
+  delete[] branchData;
+  delete cws;
+  delete ws;
+  delete[] clb;
+  delete[] cub;
+
+  bm_stats.incNumberSbSolves(numBranch);
+}
diff --git a/experimental/Bcp/BM_pack.cpp b/experimental/Bcp/BM_pack.cpp
new file mode 100644
index 0000000..c2f684b
--- /dev/null
+++ b/experimental/Bcp/BM_pack.cpp
@@ -0,0 +1,204 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+
+#include "BM.hpp"
+#include "BCP_lp.hpp"
+
+#include "BonAmplSetup.hpp"
+
+//#############################################################################
+
+void
+BM_tm::pack_module_data(BCP_buffer& buf, BCP_process_t ptype)
+{
+    // possible process types looked up in BCP_enum_process_t.hpp
+    switch (ptype) {
+    case BCP_ProcessType_LP:
+	par.pack(buf);
+	buf.pack(nl_file_content);
+	buf.pack(ipopt_file_content);
+	break;
+    case BCP_ProcessType_TS:
+	break;
+    default:
+	abort();
+    }
+}
+
+/****************************************************************************/
+
+void
+BM_lp::unpack_module_data(BCP_buffer& buf)
+{
+    using namespace Bonmin;
+
+    par.unpack(buf);
+    buf.unpack(nl_file_content);
+    buf.unpack(ipopt_file_content);
+
+    char* argv_[3];
+    char** argv = argv_;
+    argv[0] = NULL;
+    argv[1] = strdup("dont_even_try_to_open_it.nl");
+    argv[2] = NULL;
+    std::string ipopt_content(ipopt_file_content.c_str());
+    std::string nl_content(nl_file_content.c_str());
+
+    /* PIERRE create the setup for algorithm, last argument indicates that
+      continuous relaxation should not be created.*/
+    bonmin_.initialize(argv, ipopt_content, nl_content, false);
+    bonmin_.nonlinearSolver()->setExposeWarmStart(true);
+
+    free(argv[1]);
+
+    /* synchronize bonmin & BCP parameters */
+    Ipopt::SmartPtr<Ipopt::OptionsList> options = bonmin_.options();
+
+    /** update getting options directly from setup and store them in vars
+	local to the BM_lp object */
+    integerTolerance_ = bonmin_.getDoubleParameter(BabSetupBase::IntTol);
+    // cutOffDecrement_ could be negative
+    double cutOffDecrement =
+      bonmin_.getDoubleParameter(BabSetupBase::CutoffDecr);
+
+    BCP_lp_prob* bcp_lp = getLpProblemPointer();
+    const double bcp_intTol = bcp_lp->par.entry(BCP_lp_par::IntegerTolerance);
+    const double bcp_cutoffIncr = bcp_lp->par.entry(BCP_lp_par::Granularity);
+
+    if (fabs(integerTolerance_ - bcp_intTol) > 1e-10) {
+	printf("WARNING!\n");
+	printf("   The integrality tolerance parameters are different for\n");
+	printf("   BCP (%f) and bonmin (%f). They should be identical.\n",
+	       bcp_intTol, integerTolerance_);
+	printf("   For now both will be set to that of bonmin.\n");
+    }
+    if (fabs(bcp_cutoffIncr - cutOffDecrement) > 1e-10) {
+	printf("WARNING!\n");
+	printf("   The granularity (cutoff increment) parameters are different\n");
+	printf("   BCP (%f) and bonmin (%f). They should be identical.\n",
+	       bcp_cutoffIncr, cutOffDecrement);
+	printf("   For now both will be set to that of bonmin.\n");
+    }
+    bcp_lp->par.set_entry(BCP_lp_par::IntegerTolerance, integerTolerance_);
+    bcp_lp->par.set_entry(BCP_lp_par::Granularity, cutOffDecrement);
+
+    /* If pure BB is selected then a number of BCP parameters are changed */
+    if (bonmin_.getAlgorithm() == 0 /* pure B&B */) {
+	/* disable strong branching */
+	bcp_lp->par.set_entry(BCP_lp_par::MaxPresolveIter, -1);
+	/* disable a bunch of printing, all of which are meaningless, since the
+	   LP relaxation is meaningless */
+	bcp_lp->par.set_entry(BCP_lp_par::LpVerb_ReportLocalCutPoolSize, false);
+	bcp_lp->par.set_entry(BCP_lp_par::LpVerb_ReportLocalVarPoolSize, false);
+	bcp_lp->par.set_entry(BCP_lp_par::LpVerb_GeneratedCutCount, false);
+	bcp_lp->par.set_entry(BCP_lp_par::LpVerb_GeneratedVarCount, false);
+	bcp_lp->par.set_entry(BCP_lp_par::LpVerb_RowEffectivenessCount, false);
+    }
+
+    /* extract the sos constraints */
+    Bonmin::OsiTMINLPInterface& nlp = *bonmin_.nonlinearSolver();
+    const Bonmin::TMINLP::SosInfo * sos = nlp.model()->sosConstraints();
+    
+    int i;
+    const int numCols = nlp.getNumCols();
+    const double* clb = nlp.getColLower();
+    const double* cub = nlp.getColUpper();
+    const int* cPrio = nlp.getPriorities();
+
+    /* Find first the integer variables and then the SOS constraints */
+    int nObj = 0;
+    OsiObject** osiObj = new OsiObject*[numCols + sos->num];
+    for (i = 0; i < numCols; ++i) {
+	if (nlp.isInteger(i)) {
+	    osiObj[nObj] = new OsiSimpleInteger(i, clb[i], cub[i]);
+	    if (cPrio) {
+	      osiObj[nObj]->setPriority(cPrio[i]);
+	    }
+	    ++nObj;
+	}
+    }
+#if ! defined(BM_DISREGARD_SOS)
+    const int* starts = sos->starts;
+    for (i = 0; i < sos->num; ++i) {
+	OsiSOS* so = new OsiSOS(NULL, /* FIXME: why does the constr need */
+				starts[i+1] - starts[i],
+				sos->indices + starts[i],
+				sos->weights + starts[i],
+				sos->types[i]);
+	so->setPriority(sos->priorities ? sos->priorities[i] : 1);
+	osiObj[nObj++] = so;
+    }
+#endif
+    nlp.addObjects(nObj, osiObj);
+
+    objNum_ = nObj;
+    /* Allocate the storage arrays */
+    infInd_ = new int[objNum_];
+    infUseful_ = new double[objNum_];
+    feasInd_ = new int[objNum_];
+    feasUseful_ = new double[objNum_];
+    sbResult_ = new BM_SB_result[objNum_];
+
+    /* Sort the objects based on their priority */
+    int* prio = new int[objNum_];
+    objInd_ = new int[objNum_];
+    for (i = 0; i < objNum_; ++i) {
+      sbResult_[i].colInd = osiObj[i]->columnNumber();
+      objInd_[i] = i;
+      prio[i] = osiObj[i]->priority();
+    }
+    CoinSort_2(prio, prio+objNum_, objInd_);
+    delete[] prio;
+    
+    for (i = 0; i < nObj; ++i) {
+	delete osiObj[i];
+    }
+    delete[] osiObj;
+}
+
+//#############################################################################
+
+void
+BM_pack::pack_user_data(const BCP_user_data* ud, BCP_buffer& buf)
+{
+    const BM_node* data = dynamic_cast<const BM_node*>(ud);
+    data->pack(buf);
+    BM_tm* tm = dynamic_cast<BM_tm*>(user_class);
+    if (tm) {
+      tm->pack_pseudo_costs(buf);
+    }
+}
+
+/*---------------------------------------------------------------------------*/
+
+BCP_user_data*
+BM_pack::unpack_user_data(BCP_buffer& buf)
+{
+    BM_node* node = new BM_node(buf);
+    BM_lp* lp = dynamic_cast<BM_lp*>(user_class);
+    if (lp) {
+      lp->unpack_pseudo_costs(buf);
+    }
+    return node;
+}
+
+/*---------------------------------------------------------------------------*/
+
+void
+BM_pack::pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf)
+{
+    const BB_cut* bb_cut = dynamic_cast<const BB_cut*>(cut);
+    if (!bb_cut)
+	throw BCP_fatal_error("pack_cut_algo() : unknown cut type!\n");
+    bb_cut->pack(buf);
+}
+
+/*---------------------------------------------------------------------------*/
+BCP_cut_algo* BM_pack::unpack_cut_algo(BCP_buffer& buf)
+{
+    return new BB_cut(buf);
+}
diff --git a/experimental/Bcp/BM_tm.cpp b/experimental/Bcp/BM_tm.cpp
new file mode 100644
index 0000000..3b7d8ae
--- /dev/null
+++ b/experimental/Bcp/BM_tm.cpp
@@ -0,0 +1,341 @@
+// (C) Copyright International Business Machines Corporation 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Laszlo Ladanyi, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University
+
+#include "OsiClpSolverInterface.hpp"
+
+#include "BCP_problem_core.hpp"
+#include "BCP_tm.hpp"
+#include "BCP_lp.hpp"
+
+// #include "BonIpoptSolver.hpp"
+// #ifdef COIN_HAS_FILTERSQP
+// # include "BonFilterSolver.hpp"
+// #endif
+// #include "BonOACutGenerator2.hpp"
+// #include "BonEcpCuts.hpp"
+// #include "BonOaNlpOptim.hpp"
+#include "BonAmplSetup.hpp"
+
+#include "BM.hpp"
+
+//#############################################################################
+
+void
+BM_tm::readIpopt()
+{
+    if (par.entry(BM_par::IpoptParamfile).length() != 0) {
+	FILE* ipopt = fopen(par.entry(BM_par::IpoptParamfile).c_str(), "r");
+	if (!ipopt) {
+	    throw BCP_fatal_error("Non-existent IpoptParamfile\n");
+	}
+	fseek(ipopt, 0, SEEK_END);
+	int len = ftell(ipopt) + 1;
+	fseek(ipopt, 0, SEEK_SET);
+	char* ipopt_content = new char[len+1];
+	len = fread(ipopt_content, 1, len, ipopt);
+	ipopt_file_content.assign(ipopt_content, len);
+	delete[] ipopt_content;
+    }
+
+    FILE* nl = fopen(par.entry(BM_par::NL_filename).c_str(), "r");
+    if (!nl) {
+	throw BCP_fatal_error("Non-existent NL_filename\n");
+    }
+    fseek(nl, 0, SEEK_END);
+    int len = ftell(nl) + 1;
+    fseek(nl, 0, SEEK_SET);
+    char* nl_content = new char[len+1];
+    len = fread(nl_content, 1, len, nl);
+    nl_file_content.assign(nl_content, len);
+    delete[] nl_content;
+}
+
+/****************************************************************************/
+
+void
+BM_tm::initialize_core(BCP_vec<BCP_var_core*>& vars,
+                       BCP_vec<BCP_cut_core*>& cuts,
+                       BCP_lp_relax*& matrix)
+{
+    char* argv_[3];
+    char** argv = argv_;
+    argv[0] = NULL;
+    argv[1] = strdup(par.entry(BM_par::NL_filename).c_str());
+    argv[2] = NULL;
+    
+    /* Get the basic options. */
+    Bonmin::BonminAmplSetup bonmin;
+    bonmin.readOptionsFile(par.entry(BM_par::IpoptParamfile).c_str());
+    bonmin.initialize(argv);    
+    
+    free(argv[1]);
+
+    Bonmin::OsiTMINLPInterface& nlp = *bonmin.nonlinearSolver();
+#if defined(BM_DISREGARD_SOS)
+    const Bonmin::TMINLP::SosInfo * sos = nlp.model()->sosConstraints();
+    if (sos->num > 0) {
+      printf("There are SOS constraints... disregarding them...\n");
+    }
+#endif
+    
+    OsiSolverInterface& clp  = *bonmin.continuousSolver();
+    
+    const int numCols = clp.getNumCols();
+    const int numRows = clp.getNumRows();
+
+    const double* clb = clp.getColLower();
+    const double* cub = clp.getColUpper();
+
+    double* obj = new double[numCols];
+    if (bonmin.getAlgorithm() == Bonmin::B_BB /* pure B&B */) {
+      std::cout<<"Doing branch and bound"<<std::endl;
+      CoinFillN(obj, numCols, 0.0);
+      matrix = NULL;
+    } else {
+      std::cout<<"Doing hybrid"<<std::endl;
+      CoinDisjointCopyN(clp.getObjCoefficients(), numCols, obj);
+      cuts.reserve(numRows);
+      const double* rlb = clp.getRowLower();
+      const double* rub = clp.getRowUpper();
+      for (int i = 0; i < numRows; ++i)	{
+	cuts.push_back(new BCP_cut_core(rlb[i], rub[i]));
+      }
+      matrix = new BCP_lp_relax(true /*column major ordered*/);
+      matrix->copyOf(*clp.getMatrixByCol(), obj, clb, cub, rlb, rub);
+    }
+
+    vars.reserve(numCols);
+    for (int i = 0; i < numCols; ++i)	{
+      BCP_var_t type = BCP_ContinuousVar;
+      if (clp.isBinary(i)) type = BCP_BinaryVar;
+      if (clp.isInteger(i)) type = BCP_IntegerVar;
+      vars.push_back(new BCP_var_core(type, obj[i], clb[i], cub[i]));
+    }
+    delete[] obj;
+
+    /* Initialize pseudocosts */
+    int nObj = 0;
+    for (int i = 0; i < numCols; ++i) {
+	if (nlp.isInteger(i)) {
+	    ++nObj;
+	}
+    }
+#if ! defined(BM_DISREGARD_SOS)
+    const Bonmin::TMINLP::SosInfo * sos = nlp.model()->sosConstraints();
+    nObj += sos->num;
+#endif
+    pseudoCosts_.initialize(nObj);
+}
+
+/****************************************************************************/
+void
+BM_tm::create_root(BCP_vec<BCP_var*>& added_vars,
+                   BCP_vec<BCP_cut*>& added_cuts,
+                   BCP_user_data*& user_data)
+{
+    BM_node* data = new BM_node;
+    data->numNlpFailed_ = 0;
+    user_data = data;
+}
+
+void
+BM_tm::write_AMPL_solution(const BCP_solution* sol,
+			   bool write_file, bool write_screen)
+{
+  const BCP_solution_generic* bg =
+    dynamic_cast<const BCP_solution_generic*>(sol);
+
+  /* Parse again the input file so that we have a nice and clean ampl
+     setup */  
+  char* argv_[3];
+  char** argv = argv_;
+  argv[0] = NULL;
+  argv[1] = strdup(par.entry(BM_par::NL_filename).c_str());
+  argv[2] = NULL;
+  Bonmin::BonminAmplSetup bonmin;
+  bonmin.initialize(argv);    
+  
+  Bonmin::OsiTMINLPInterface& nlpSolver = *bonmin.nonlinearSolver();
+  free(argv[1]);
+  OsiSolverInterface& clp = *bonmin.continuousSolver();
+
+  const int numCols = clp.getNumCols();
+
+  int i;
+  
+  /* Create a dense vector with the value of each variable. Round the
+     integer vars (they were tested to be near enough to integrality) so
+     in the printouts we won't have 9.99999991234, etc.) */
+  double* dsol = new double[numCols];
+  for (i = 0; i < numCols; ++i) {
+    dsol[i] = 0.0;
+  }
+  const BCP_vec<BCP_var*>& vars = bg->_vars;
+  const BCP_vec<double>& values = bg->_values;;
+  const int size = vars.size();
+  for (i = 0; i < size; ++i) {
+    const int ind = vars[i]->bcpind();
+    const double v = values[i];
+    const BCP_var_t type = vars[i]->var_type();
+    dsol[ind] = (type == BCP_ContinuousVar) ? v : floor(v+0.5);
+  }
+
+  if (write_screen) {
+    /* Display the solution on the screen */
+    printf("bonmin: feasible solution found.  Objective value: %f\n",
+	   bg->objective_value());
+    for (i = 0; i < size; ++i) {
+      printf("    index: %5i   value: %f\n",
+	     vars[i]->bcpind(), dsol[vars[i]->bcpind()]);
+    }
+    printf("\n");
+  }
+
+  if (write_file) {
+    /* create the AMPL solfile */
+    nlpSolver.model()->finalize_solution(Bonmin::TMINLP::SUCCESS, nlpSolver.getNumCols(), 
+                                         dsol, bg->objective_value());
+  }
+  delete[] dsol;
+}
+
+//#############################################################################
+
+void
+BM_tm::process_message(BCP_buffer& buf)
+{
+  int msgtag;
+  buf.unpack(msgtag);
+  if (msgtag == BM_PseudoCostUpdate) {
+    receive_pseudo_cost_update(buf);
+  }
+}
+
+/****************************************************************************/
+
+void
+BM_tm::display_final_information(const BCP_lp_statistics& lp_stat)
+{
+  bool write_screen = false;
+  BCP_tm_prob *p = getTmProblemPointer();
+  if (p->param(BCP_tm_par::TmVerb_FinalStatistics)) {
+    printf("TM: Running time: %.3f\n", CoinWallclockTime() - p->start_time);
+    printf("TM: search tree size: %i   ( processed %i )   max depth: %i\n",
+	   int(p->search_tree.size()), int(p->search_tree.processed()),
+	   p->search_tree.maxdepth());
+    lp_stat.display();
+
+    if (! p->feas_sol) {
+      printf("TM: No feasible solution is found\n");
+    } else {
+      printf("TM: The best solution found has value %f\n",
+	     p->feas_sol->objective_value());
+      if (p->param(BCP_tm_par::TmVerb_BestFeasibleSolution)) {
+	write_screen = true;
+      }
+    }
+  }
+  if (p->feas_sol) {
+    write_AMPL_solution(p->feas_sol, true, write_screen);
+  }
+}
+
+/****************************************************************************/
+
+void
+BM_tm::display_feasible_solution(const BCP_solution* sol)
+{
+  // For now, we want to write also the AMPL solution file...(?)
+  // This needs to be changed though
+  write_AMPL_solution(sol, true, true);
+}
+
+struct BMSearchTreeCompareBest {
+  static const std::string compName;
+  static inline const char* name() { return "BMSearchTreeCompareBest"; }
+  inline bool operator()(const CoinTreeSiblings* x,
+			 const CoinTreeSiblings* y) const {
+    double allowable_gap = 1e-8;
+    const double xq = x->currentNode()->getQuality();
+    const double yq = y->currentNode()->getQuality();
+    const int xd = x->currentNode()->getDepth();
+    const int yd = y->currentNode()->getDepth();
+    return ((xq < yq-allowable_gap) ||
+	    (xq <= yq+allowable_gap && xd > yd));
+  }
+};
+
+const std::string
+BMSearchTreeCompareBest::compName("BMSearchTreeCompareBest");
+
+void
+BM_tm::init_new_phase(int phase,
+		      BCP_column_generation& colgen,
+		      CoinSearchTreeBase*& candidates)
+{
+  BCP_tm_prob* p = getTmProblemPointer();
+  colgen = BCP_DoNotGenerateColumns_Fathom;
+  switch (p->param(BCP_tm_par::TreeSearchStrategy)) {
+  case BCP_BestFirstSearch:
+    candidates = new CoinSearchTree<BMSearchTreeCompareBest>;
+    printf("Creating candidate list with BMSearchTreeCompareBest\n");
+    break;
+  case BCP_BreadthFirstSearch:
+    candidates = new CoinSearchTree<CoinSearchTreeCompareBreadth>;
+    printf("Creating candidate list with CoinSearchTreeCompareBreadth\n");
+    break;
+  case BCP_DepthFirstSearch:
+    candidates = new CoinSearchTree<CoinSearchTreeCompareDepth>;
+    printf("Creating candidate list with CoinSearchTreeCompareDepth\n");
+    break;
+  case BCP_PreferredFirstSearch:
+    candidates = new CoinSearchTree<CoinSearchTreeComparePreferred>;
+    printf("Creating candidate list with CoinSearchTreeComparePreferred\n");
+    break;
+  }
+}
+
+//#############################################################################
+
+void
+BM_tm::receive_pseudo_cost_update(BCP_buffer& buf)
+{
+  double* upTotalChange = pseudoCosts_.upTotalChange();
+  double* downTotalChange = pseudoCosts_.downTotalChange();
+  int* upNumber = pseudoCosts_.upNumber();
+  int* downNumber = pseudoCosts_.downNumber();
+  int objInd;
+  int branch;
+  double pcChange;
+  while (true) {
+    buf.unpack(objInd);
+    if (objInd == -1) {
+      break;
+    }
+    buf.unpack(branch);
+    buf.unpack(pcChange);
+    if (branch == 0) {
+      downTotalChange[objInd] += pcChange;
+      ++downNumber[objInd];
+    } else {
+      upTotalChange[objInd] += pcChange;
+      ++upNumber[objInd];
+    }
+  }
+}
+
+//-----------------------------------------------------------------------------
+
+void
+BM_tm::pack_pseudo_costs(BCP_buffer& buf)
+{
+  buf.pack(pseudoCosts_.upTotalChange(), pseudoCosts_.numberObjects());
+  buf.pack(pseudoCosts_.upNumber(), pseudoCosts_.numberObjects());
+  buf.pack(pseudoCosts_.downTotalChange(), pseudoCosts_.numberObjects());
+  buf.pack(pseudoCosts_.downNumber(), pseudoCosts_.numberObjects());
+}
diff --git a/experimental/Bcp/Makefile.am b/experimental/Bcp/Makefile.am
new file mode 100644
index 0000000..ed188b0
--- /dev/null
+++ b/experimental/Bcp/Makefile.am
@@ -0,0 +1,151 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 1852 2011-06-10 17:42:47Z stefan $
+
+AUTOMAKE_OPTIONS = foreign
+
+# What is done in this directory:
+
+if COIN_HAS_ASL
+  bin_PROGRAMS = bonminbcp
+endif
+
+########################################################################
+
+COINLIBS = \
+	$(BCPOBJDIR)/src/libBcp.la \
+	$(CBCOBJDIR)/src/libCbc.la \
+	$(CGLOBJDIR)/src/libCgl.la \
+	$(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
+	$(OSIOBJDIR)/src/libOsi.la \
+	$(CLPOBJDIR)/src/libClp.la \
+	$(COINUTILSOBJDIR)/src/libCoinUtils.la
+
+if COIN_HAS_CPX
+  COINLIBS += \
+	$(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la \
+	$(CPXLIB)
+endif
+
+IPOPTLIBS = \
+	$(IPOPTOBJDIR)/src/Interfaces/libipopt.la
+
+LIBS += `cat $(IPOPTOBJDIR)/src/Interfaces/ipopt_addlibs_cpp.txt` \
+	`cat $(BCPOBJDIR)/bcp_addlibs.txt` \
+	`cat $(CBCOBJDIR)/cbc_addlibs.txt` \
+	`cat $(CGLOBJDIR)/cgl_addlibs.txt` \
+	`cat $(OSIOBJDIR)/osi_addlibs.txt` \
+	`cat $(CLPOBJDIR)/clp_addlibs.txt` \
+	`cat $(COINUTILSOBJDIR)/coinutils_addlibs.txt`
+
+########################################################################
+#                                bonminbcp                                #
+########################################################################
+
+bonminbcp_SOURCES = BB_cut.hpp BM.hpp \
+	BB_cut.cpp BM.cpp BM_tm.cpp BM_lp.cpp BM_lp_branch.cpp BM_pack.cpp
+
+bonminbcp_DEPENDENCIES = \
+	../../src/CbcBonmin/libbonminampl.la \
+	../../src/CbcBonmin/libbonmin.la \
+	$(IPOPTOBJDIR)/src/Apps/AmplSolver/libamplinterface.la \
+	$(IPOPTLIBS) \
+	$(LIBCBCCOPY) \
+	$(COINLIBS) \
+	amplsolver.a
+
+AMPL_PATCHED_FILES = \
+	asl.h \
+	jac0dim.c \
+	misc.c \
+	pfg_read.c
+AMPL_SRC = $(abs_source_dir)/../ThirdParty/ASL/solvers
+
+amplsolver.a:
+	rm -rf solvers
+	mkdir -p solvers ; \
+	cd solvers ; \
+	for f in $(AMPL_SRC)/*.c* $(AMPL_SRC)/*.h* $(AMPL_SRC)/makefile.u; do \
+		$(LN_S) $$f ; \
+	done ; \
+	for f in $(AMPL_PATCHED_FILES); do \
+		rm $$f ; \
+		cp $(AMPL_SRC)/$$f . ; \
+	done ; \
+	patch -p1 < $(abs_source_dir)/experimental/Bcp/ampl_bcp.patch ; \
+	for f in `grep -l 'strtod' *.c *.h`; do \
+		mv $$f $$f.orig ; \
+		sed -e 's/strtod/ASLstrtod/g' -e 's/ASLASLstrtod/ASLstrtod/g' $$f.orig > $$f ; \
+		rm $$f.orig ; \
+	done ; \
+	for f in `grep -l 'atof(' *.c`; do \
+		mv $$f $$f.orig ; \
+		sed -e 's/atof/ASLatof/g' -e 's/ASLASLatof/ASLatof/g' $$f.orig > $$f ; \
+		rm $$f.orig ; \
+	done ; \
+	rm -f aslflags.txt ; \
+	grep ASLMAKEFLAGS ../../../../ThirdParty/ASL/config.log | tail -1 > aslflags.txt ; \
+	cat aslflags.txt ; \
+	eval `sed -e "s/ CFLAGS=\".*\"//" aslflags.txt`; \
+	eval `sed -e "s/.*CFLAGS=\"\(.*\)\".*/CFLAGS=\"-DNO_FUNCADD \1\"/" aslflags.txt` ; \
+	if test "$(EXEEXT)" = ".exe"; then \
+		sed -e 's/a.out/a.exe/' makefile.u > blabla ; \
+		mv blabla makefile.u ; \
+	fi ; \
+	$(MAKE) CC="$(CC)" $$ASLMAKEFLAGS CFLAGS="$$CFLAGS" -f makefile.u ; \
+	cp amplsolver.a ..
+	rm -rf solvers
+
+bonminbcp_LDADD = $(bonminbcp_DEPENDENCIES) \
+	$(ADDLIBS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` \
+	-I`$(CYGPATH_W) $(IPOPTOBJDIR)/inc` \
+	-I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Common` \
+	-I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Interfaces` \
+	-I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/LinAlg` \
+	-I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
+	-I`$(CYGPATH_W) $(COINUTILSOBJDIR)/inc` \
+	-I`$(CYGPATH_W) $(CBCSRCDIR)/src` \
+	-I`$(CYGPATH_W) $(CBCOBJDIR)/inc` \
+	-I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
+	-I`$(CYGPATH_W) $(CLPOBJDIR)/inc` \
+	-I`$(CYGPATH_W) $(OSISRCDIR)/src` \
+	-I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
+	-I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
+	-I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` \
+	-I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding` \
+	-I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglKnapsackCover` \
+	-I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglGomory` \
+	-I`$(CYGPATH_W) $(BCPSRCDIR)/src/include` \
+	-I`$(CYGPATH_W) $(BCPOBJDIR)/inc`
+
+if COIN_HAS_CPX
+  AM_CPPFLAGS += \
+	-I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
+	-I`$(CYGPATH_W) $(CPXINCDIR)`
+endif
+
+# This line is necessary to allow VPATH compilation with MS compilers
+# on Cygwin
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
+
+########################################################################
+#                         make distclean stuff                         #
+########################################################################
+
+CLEANFILES = $(LIBCBCCOPY) amplsolver.a
+
+DISTCLEANFILES = 
diff --git a/experimental/Bcp/Makefile.in b/experimental/Bcp/Makefile.in
new file mode 100644
index 0000000..4c6edcd
--- /dev/null
+++ b/experimental/Bcp/Makefile.in
@@ -0,0 +1,742 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at COIN_HAS_ASL_TRUE@bin_PROGRAMS = bonminbcp$(EXEEXT)
+ at COIN_HAS_CPX_TRUE@am__append_1 = \
+ at COIN_HAS_CPX_TRUE@	$(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la \
+ at COIN_HAS_CPX_TRUE@	$(CPXLIB)
+
+ at COIN_HAS_CPX_TRUE@am__append_2 = \
+ at COIN_HAS_CPX_TRUE@	-I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
+ at COIN_HAS_CPX_TRUE@	-I`$(CYGPATH_W) $(CPXINCDIR)`
+
+subdir = experimental/Bcp
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/inc/config_bonmin.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_bonminbcp_OBJECTS = BB_cut.$(OBJEXT) BM.$(OBJEXT) BM_tm.$(OBJEXT) \
+	BM_lp.$(OBJEXT) BM_lp_branch.$(OBJEXT) BM_pack.$(OBJEXT)
+bonminbcp_OBJECTS = $(am_bonminbcp_OBJECTS)
+am__DEPENDENCIES_1 = $(IPOPTOBJDIR)/src/Interfaces/libipopt.la
+am__DEPENDENCIES_2 =
+ at COIN_HAS_CPX_TRUE@am__DEPENDENCIES_3 =  \
+ at COIN_HAS_CPX_TRUE@	$(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la \
+ at COIN_HAS_CPX_TRUE@	$(am__DEPENDENCIES_2)
+am__DEPENDENCIES_4 = $(BCPOBJDIR)/src/libBcp.la \
+	$(CBCOBJDIR)/src/libCbc.la $(CGLOBJDIR)/src/libCgl.la \
+	$(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
+	$(OSIOBJDIR)/src/libOsi.la $(CLPOBJDIR)/src/libClp.la \
+	$(COINUTILSOBJDIR)/src/libCoinUtils.la $(am__DEPENDENCIES_3)
+am__DEPENDENCIES_5 = ../../src/CbcBonmin/libbonminampl.la \
+	../../src/CbcBonmin/libbonmin.la \
+	$(IPOPTOBJDIR)/src/Apps/AmplSolver/libamplinterface.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_4) amplsolver.a
+depcomp = $(SHELL) $(top_srcdir)/../depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(bonminbcp_SOURCES)
+DIST_SOURCES = $(bonminbcp_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADDLIBS = @ADDLIBS@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASLLIB = @ASLLIB@
+ASL_CPPFLAGS = @ASL_CPPFLAGS@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BCPDOCDIR = @BCPDOCDIR@
+BCPOBJDIR = @BCPOBJDIR@
+BCPSRCDIR = @BCPSRCDIR@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+BUILD_FP_FALSE = @BUILD_FP_FALSE@
+BUILD_FP_TRUE = @BUILD_FP_TRUE@
+CBCDOCDIR = @CBCDOCDIR@
+CBCOBJDIR = @CBCOBJDIR@
+CBCSRCDIR = @CBCSRCDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+CGLDOCDIR = @CGLDOCDIR@
+CGLOBJDIR = @CGLOBJDIR@
+CGLSRCDIR = @CGLSRCDIR@
+CLPDOCDIR = @CLPDOCDIR@
+CLPOBJDIR = @CLPOBJDIR@
+CLPSRCDIR = @CLPSRCDIR@
+COINUTILSDOCDIR = @COINUTILSDOCDIR@
+COINUTILSOBJDIR = @COINUTILSOBJDIR@
+COINUTILSSRCDIR = @COINUTILSSRCDIR@
+COIN_BUILD_GLPK_FALSE = @COIN_BUILD_GLPK_FALSE@
+COIN_BUILD_GLPK_TRUE = @COIN_BUILD_GLPK_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_BCP_FALSE = @COIN_HAS_BCP_FALSE@
+COIN_HAS_BCP_TRUE = @COIN_HAS_BCP_TRUE@
+COIN_HAS_CBC_FALSE = @COIN_HAS_CBC_FALSE@
+COIN_HAS_CBC_TRUE = @COIN_HAS_CBC_TRUE@
+COIN_HAS_CGL_FALSE = @COIN_HAS_CGL_FALSE@
+COIN_HAS_CGL_TRUE = @COIN_HAS_CGL_TRUE@
+COIN_HAS_CLP_FALSE = @COIN_HAS_CLP_FALSE@
+COIN_HAS_CLP_TRUE = @COIN_HAS_CLP_TRUE@
+COIN_HAS_COINUTILS_FALSE = @COIN_HAS_COINUTILS_FALSE@
+COIN_HAS_COINUTILS_TRUE = @COIN_HAS_COINUTILS_TRUE@
+COIN_HAS_COUENNE_FALSE = @COIN_HAS_COUENNE_FALSE@
+COIN_HAS_COUENNE_TRUE = @COIN_HAS_COUENNE_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_DYLP_FALSE = @COIN_HAS_DYLP_FALSE@
+COIN_HAS_DYLP_TRUE = @COIN_HAS_DYLP_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_FMP_FALSE = @COIN_HAS_FMP_FALSE@
+COIN_HAS_FMP_TRUE = @COIN_HAS_FMP_TRUE@
+COIN_HAS_GLPK_FALSE = @COIN_HAS_GLPK_FALSE@
+COIN_HAS_GLPK_TRUE = @COIN_HAS_GLPK_TRUE@
+COIN_HAS_IPOPT_FALSE = @COIN_HAS_IPOPT_FALSE@
+COIN_HAS_IPOPT_TRUE = @COIN_HAS_IPOPT_TRUE@
+COIN_HAS_MSK_FALSE = @COIN_HAS_MSK_FALSE@
+COIN_HAS_MSK_TRUE = @COIN_HAS_MSK_TRUE@
+COIN_HAS_OSI_FALSE = @COIN_HAS_OSI_FALSE@
+COIN_HAS_OSI_TRUE = @COIN_HAS_OSI_TRUE@
+COIN_HAS_OSL_FALSE = @COIN_HAS_OSL_FALSE@
+COIN_HAS_OSL_TRUE = @COIN_HAS_OSL_TRUE@
+COIN_HAS_SPX_FALSE = @COIN_HAS_SPX_FALSE@
+COIN_HAS_SPX_TRUE = @COIN_HAS_SPX_TRUE@
+COIN_HAS_SYM_FALSE = @COIN_HAS_SYM_FALSE@
+COIN_HAS_SYM_TRUE = @COIN_HAS_SYM_TRUE@
+COIN_HAS_VOL_FALSE = @COIN_HAS_VOL_FALSE@
+COIN_HAS_VOL_TRUE = @COIN_HAS_VOL_TRUE@
+COIN_HAS_XPR_FALSE = @COIN_HAS_XPR_FALSE@
+COIN_HAS_XPR_TRUE = @COIN_HAS_XPR_TRUE@
+COMPILE_BONMINBCP_FALSE = @COMPILE_BONMINBCP_FALSE@
+COMPILE_BONMINBCP_TRUE = @COMPILE_BONMINBCP_TRUE@
+COUENNEDOCDIR = @COUENNEDOCDIR@
+COUENNEOBJDIR = @COUENNEOBJDIR@
+COUENNESRCDIR = @COUENNESRCDIR@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DYLPDOCDIR = @DYLPDOCDIR@
+DYLPOBJDIR = @DYLPOBJDIR@
+DYLPSRCDIR = @DYLPSRCDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FADDLIBS = @FADDLIBS@
+FFLAGS = @FFLAGS@
+FILTERSQPLIBADD = @FILTERSQPLIBADD@
+FLIBS = @FLIBS@
+FMPINCDIR = @FMPINCDIR@
+FMPLIB = @FMPLIB@
+GLPKINCDIR = @GLPKINCDIR@
+GLPKLIB = @GLPKLIB@
+GLPKOBJDIR = @GLPKOBJDIR@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IPOPTDOCDIR = @IPOPTDOCDIR@
+IPOPTOBJDIR = @IPOPTOBJDIR@
+IPOPTSRCDIR = @IPOPTSRCDIR@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@ `cat \
+	$(IPOPTOBJDIR)/src/Interfaces/ipopt_addlibs_cpp.txt` `cat \
+	$(BCPOBJDIR)/bcp_addlibs.txt` `cat \
+	$(CBCOBJDIR)/cbc_addlibs.txt` `cat \
+	$(CGLOBJDIR)/cgl_addlibs.txt` `cat \
+	$(OSIOBJDIR)/osi_addlibs.txt` `cat \
+	$(CLPOBJDIR)/clp_addlibs.txt` `cat \
+	$(COINUTILSOBJDIR)/coinutils_addlibs.txt`
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+MSKINCDIR = @MSKINCDIR@
+MSKLIB = @MSKLIB@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSIDOCDIR = @OSIDOCDIR@
+OSIOBJDIR = @OSIOBJDIR@
+OSISRCDIR = @OSISRCDIR@
+OSLINCDIR = @OSLINCDIR@
+OSLLIB = @OSLLIB@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPXINCDIR = @SPXINCDIR@
+SPXLIB = @SPXLIB@
+STRIP = @STRIP@
+SYMDOCDIR = @SYMDOCDIR@
+SYMOBJDIR = @SYMOBJDIR@
+SYMSRCDIR = @SYMSRCDIR@
+VERSION = @VERSION@
+VOLDOCDIR = @VOLDOCDIR@
+VOLOBJDIR = @VOLOBJDIR@
+VOLSRCDIR = @VOLSRCDIR@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+XPRINCDIR = @XPRINCDIR@
+XPRLIB = @XPRLIB@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+COINLIBS = $(BCPOBJDIR)/src/libBcp.la $(CBCOBJDIR)/src/libCbc.la \
+	$(CGLOBJDIR)/src/libCgl.la \
+	$(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
+	$(OSIOBJDIR)/src/libOsi.la $(CLPOBJDIR)/src/libClp.la \
+	$(COINUTILSOBJDIR)/src/libCoinUtils.la $(am__append_1)
+IPOPTLIBS = \
+	$(IPOPTOBJDIR)/src/Interfaces/libipopt.la
+
+
+########################################################################
+#                                bonminbcp                                #
+########################################################################
+bonminbcp_SOURCES = BB_cut.hpp BM.hpp \
+	BB_cut.cpp BM.cpp BM_tm.cpp BM_lp.cpp BM_lp_branch.cpp BM_pack.cpp
+
+bonminbcp_DEPENDENCIES = \
+	../../src/CbcBonmin/libbonminampl.la \
+	../../src/CbcBonmin/libbonmin.la \
+	$(IPOPTOBJDIR)/src/Apps/AmplSolver/libamplinterface.la \
+	$(IPOPTLIBS) \
+	$(LIBCBCCOPY) \
+	$(COINLIBS) \
+	amplsolver.a
+
+AMPL_PATCHED_FILES = \
+	asl.h \
+	jac0dim.c \
+	misc.c \
+	pfg_read.c
+
+AMPL_SRC = $(abs_source_dir)/../ThirdParty/ASL/solvers
+bonminbcp_LDADD = $(bonminbcp_DEPENDENCIES) \
+	$(ADDLIBS)
+
+
+# Finally, the -rpath flag is used by libtool to make sure that the shared
+# library is found (in the lib install directory) when we are using dynamic
+# libraries.
+bonminbcp_LDFLAGS = -rpath $(libdir)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` -I`$(CYGPATH_W) \
+	$(IPOPTOBJDIR)/inc` -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Common` \
+	-I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Interfaces` -I`$(CYGPATH_W) \
+	$(IPOPTSRCDIR)/src/LinAlg` -I`$(CYGPATH_W) \
+	$(COINUTILSSRCDIR)/src` -I`$(CYGPATH_W) \
+	$(COINUTILSOBJDIR)/inc` -I`$(CYGPATH_W) $(CBCSRCDIR)/src` \
+	-I`$(CYGPATH_W) $(CBCOBJDIR)/inc` -I`$(CYGPATH_W) \
+	$(CLPSRCDIR)/src` -I`$(CYGPATH_W) $(CLPOBJDIR)/inc` \
+	-I`$(CYGPATH_W) $(OSISRCDIR)/src` -I`$(CYGPATH_W) \
+	$(OSISRCDIR)/src/OsiClp` -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
+	-I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` -I`$(CYGPATH_W) \
+	$(CGLSRCDIR)/src/CglMixedIntegerRounding` -I`$(CYGPATH_W) \
+	$(CGLSRCDIR)/src/CglKnapsackCover` -I`$(CYGPATH_W) \
+	$(CGLSRCDIR)/src/CglGomory` -I`$(CYGPATH_W) \
+	$(BCPSRCDIR)/src/include` -I`$(CYGPATH_W) $(BCPOBJDIR)/inc` \
+	$(am__append_2)
+
+# This line is necessary to allow VPATH compilation with MS compilers
+# on Cygwin
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
+
+########################################################################
+#                         make distclean stuff                         #
+########################################################################
+CLEANFILES = $(LIBCBCCOPY) amplsolver.a
+DISTCLEANFILES = 
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  experimental/Bcp/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  experimental/Bcp/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+bonminbcp$(EXEEXT): $(bonminbcp_OBJECTS) $(bonminbcp_DEPENDENCIES) 
+	@rm -f bonminbcp$(EXEEXT)
+	$(CXXLINK) $(bonminbcp_LDFLAGS) $(bonminbcp_OBJECTS) $(bonminbcp_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BB_cut.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BM.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BM_lp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BM_lp_branch.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BM_pack.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BM_tm.Po at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+
+amplsolver.a:
+	rm -rf solvers
+	mkdir -p solvers ; \
+	cd solvers ; \
+	for f in $(AMPL_SRC)/*.c* $(AMPL_SRC)/*.h* $(AMPL_SRC)/makefile.u; do \
+		$(LN_S) $$f ; \
+	done ; \
+	for f in $(AMPL_PATCHED_FILES); do \
+		rm $$f ; \
+		cp $(AMPL_SRC)/$$f . ; \
+	done ; \
+	patch -p1 < $(abs_source_dir)/experimental/Bcp/ampl_bcp.patch ; \
+	for f in `grep -l 'strtod' *.c *.h`; do \
+		mv $$f $$f.orig ; \
+		sed -e 's/strtod/ASLstrtod/g' -e 's/ASLASLstrtod/ASLstrtod/g' $$f.orig > $$f ; \
+		rm $$f.orig ; \
+	done ; \
+	for f in `grep -l 'atof(' *.c`; do \
+		mv $$f $$f.orig ; \
+		sed -e 's/atof/ASLatof/g' -e 's/ASLASLatof/ASLatof/g' $$f.orig > $$f ; \
+		rm $$f.orig ; \
+	done ; \
+	rm -f aslflags.txt ; \
+	grep ASLMAKEFLAGS ../../../../ThirdParty/ASL/config.log | tail -1 > aslflags.txt ; \
+	cat aslflags.txt ; \
+	eval `sed -e "s/ CFLAGS=\".*\"//" aslflags.txt`; \
+	eval `sed -e "s/.*CFLAGS=\"\(.*\)\".*/CFLAGS=\"-DNO_FUNCADD \1\"/" aslflags.txt` ; \
+	if test "$(EXEEXT)" = ".exe"; then \
+		sed -e 's/a.out/a.exe/' makefile.u > blabla ; \
+		mv blabla makefile.u ; \
+	fi ; \
+	$(MAKE) CC="$(CC)" $$ASLMAKEFLAGS CFLAGS="$$CFLAGS" -f makefile.u ; \
+	cp amplsolver.a ..
+	rm -rf solvers
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/experimental/Bcp/README b/experimental/Bcp/README
new file mode 100644
index 0000000..e1fa701
--- /dev/null
+++ b/experimental/Bcp/README
@@ -0,0 +1,3 @@
+This is an experimental code to hook Bonmin to Bcp instead of Cbc.
+
+This code is not supported anymore (won't compile)
diff --git a/experimental/Bcp/ampl_bcp.patch b/experimental/Bcp/ampl_bcp.patch
new file mode 100644
index 0000000..d60dc97
--- /dev/null
+++ b/experimental/Bcp/ampl_bcp.patch
@@ -0,0 +1,318 @@
+diff -c --exclude=.depend --exclude='*.html*' -r -w solvers/asl.h /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/asl.h
+*** solvers/asl.h	2005-06-25 12:56:47.000000000 -0400
+--- /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/asl.h	2006-03-03 14:50:03.000000000 -0500
+***************
+*** 200,205 ****
+--- 200,209 ----
+  	char rl_buf[80];
+  	void (*iadjfcn) ANSI((void*, unsigned long));
+  	void (*dadjfcn) ANSI((void*, unsigned long));
++ 	 /* LL */
++ 	char *snl;
++ 	int snl_pos;
++ 	int snl_len;
+  	} EdRead_ASL;
+  #define EdRead EdRead_ASL
+  
+***************
+*** 542,547 ****
+--- 546,552 ----
+  ASL {
+  	Edagpars p;
+  	Edaginfo i;
++ 	EdRead_ASL Rbackup;
+  	};
+  
+   typedef struct
+diff -c --exclude=.depend --exclude='*.html*' -r -w solvers/jac0dim.c /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/jac0dim.c
+*** solvers/jac0dim.c	2003-12-13 16:23:55.000000000 -0500
+--- /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/jac0dim.c	2006-03-03 14:50:01.000000000 -0500
+***************
+*** 122,134 ****
+  	FILE *nl;
+  	int i, k, nlv;
+  	char *s, *se;
+! 	EdRead ER, *R;
+  
+  	if (!asl)
+  		badasl_ASL(asl,0,"jac0dim");
+  	fpinit_ASL();	/* get IEEE arithmetic, if possible */
+  
+! 	if (stub_len <= 0)
+  		for(i = 0; stub[i]; i++);
+  	else
+  		for(i = stub_len; stub[i-1] == ' ' && i > 0; --i);
+--- 122,142 ----
+  	FILE *nl;
+  	int i, k, nlv;
+  	char *s, *se;
+! 	EdRead *R;
+  
+  	if (!asl)
+  		badasl_ASL(asl,0,"jac0dim");
+  	fpinit_ASL();	/* get IEEE arithmetic, if possible */
+  
+! 	R = EdReadInit_ASL(&asl->Rbackup, asl, NULL, 0);
+! 	if (stub_len < 0) {
+! 		/* Treat the stub as the content of the file */
+! 		R->snl = stub;
+! 		R->snl_pos = 0;
+! 		R->snl_len = -stub_len;
+! 		nl = NULL;
+! 	} else {
+! 		if (stub_len == 0)
+  			for(i = 0; stub[i]; i++);
+  		else
+  			for(i = stub_len; stub[i-1] == ' ' && i > 0; --i);
+***************
+*** 150,156 ****
+  		fprintf(Stderr, "can't open %s\n", filename);
+  		exit(1);
+  		}
+! 	R = EdReadInit_ASL(&ER, asl, nl, 0);
+  	R->Line = 0;
+  	s = read_line(R);
+  	binary_nl = 0;
+--- 158,165 ----
+  			fprintf(Stderr, "can't open %s\n", filename);
+  			exit(1);
+  		}
+! 	}
+! 	R->nl = nl;
+  	R->Line = 0;
+  	s = read_line(R);
+  	binary_nl = 0;
+***************
+*** 285,291 ****
+  {
+  	FILE *nl;
+  
+! 	if (nl = jac0dim_ASL(asl, stub, stub_len)) {
+  		*M = n_con;
+  		*N = n_var;
+  		*NO = n_obj;
+--- 294,303 ----
+  {
+  	FILE *nl;
+  
+! 	/* LL */
+! 	nl = jac0dim_ASL(asl, stub, stub_len);
+! 
+! 	if (nl && stub_len < 0) {
+  		*M = n_con;
+  		*N = n_var;
+  		*NO = n_obj;
+diff -c --exclude=.depend --exclude='*.html*' -r -w solvers/misc.c /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/misc.c
+*** solvers/misc.c	2005-05-09 00:34:50.000000000 -0400
+--- /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/misc.c	2006-03-02 19:38:28.000000000 -0500
+***************
+*** 44,49 ****
+--- 44,86 ----
+   static char anyedag[] = "fg_read (or one of its variants)";
+   static char psedag[] = "pfg_read, pfgh_read, or jacpdim";
+  
++ 
++  int 
++ #ifdef KR_headers
++ LL_getc(R) EdRead *R;
++ #else
++ LL_getc(EdRead *R)
++ #endif
++ {
++ 	int c;
++ 	if (R->nl) {
++ 		c = getc(R->nl);
++ 	} else {
++ 		if (R->snl_pos == R->snl_len) {
++ 			c = EOF;
++ 		} else {
++ 			c = R->snl[R->snl_pos++];
++ 		}
++ 	}
++ 	return c;
++     }
++ 	
++  void 
++ #ifdef KR_headers
++ LL_ungetc(c, R) int c; EdRead *R;
++ #else
++ LL_ungetc(int c, EdRead *R)
++ #endif
++ {
++ 	if (R->nl) {
++ 		ungetc(c, R->nl);
++ 	} else {
++ 		if (c != EOF) {
++ 			R->snl_pos--;
++ 		}
++ 	}
++     }
++ 	
+   void
+  #ifdef KR_headers
+  exit_ASL(R, n) EdRead *R; int n;
+***************
+*** 359,380 ****
+  	int c;
+  	R->Line++;
+  	R->lineinc = 0;
+! 	R->rl_buf[0] = c = getc(R->nl);
+  	return c;
+  	}
+  
+   static void
+  #ifdef KR_headers
+! eatcr(nl) FILE *nl;
+  #else
+! eatcr(FILE *nl)
+  #endif
+  {
+  	int c;
+  
+! 	while((c = getc(nl)) == '\r');
+  	if (c >= 0 && c != '\n')
+! 		ungetc(c, nl);
+  	}
+  
+   char *
+--- 396,417 ----
+  	int c;
+  	R->Line++;
+  	R->lineinc = 0;
+! 	R->rl_buf[0] = c = LL_getc(R);
+  	return c;
+  	}
+  
+   static void
+  #ifdef KR_headers
+! eatcr(R) EdRead *R;
+  #else
+! eatcr(EdRead *R)
+  #endif
+  {
+    int c;
+  
+!   while((c = LL_getc(R)) == '\r');
+    if (c >= 0 && c != '\n')
+! 	  LL_ungetc(c, R);
+  }
+  
+   char *
+***************
+*** 399,405 ****
+  		}
+  	rv = s;
+  	for(;;) {
+! 		x = getc(nl);
+  		if (x < ' ') {
+  			if (x < 0) {
+   eof:
+--- 436,442 ----
+  		}
+  	rv = s;
+  	for(;;) {
+! 		x = LL_getc(R);
+  		if (x < ' ') {
+  			if (x < 0) {
+   eof:
+***************
+*** 413,428 ****
+  			if (x == '\n')
+  				break;
+  			if (x == '\r') {
+! 				eatcr(nl);
+  				break;
+  				}
+  			}
+  		*s++ = x;
+  		if (s >= se) {
+  			for(;;) {
+! 				x = getc(nl);
+  				if (x == '\r') {
+! 					eatcr(nl);
+  					goto eol;
+  					}
+  				if (x == '\n')
+--- 450,465 ----
+  			if (x == '\n')
+  				break;
+  			if (x == '\r') {
+! 				eatcr(R);
+  				break;
+  				}
+  			}
+  		*s++ = x;
+  		if (s >= se) {
+  			for(;;) {
+! 				x = LL_getc(R);
+  				if (x == '\r') {
+! 					eatcr(R);
+  					goto eol;
+  					}
+  				if (x == '\n')
+***************
+*** 848,853 ****
+--- 885,893 ----
+  	R->can_end = 0;
+  	R->dadjfcn = asl->i.dadjfcn;
+  	R->iadjfcn = asl->i.iadjfcn;
++ 	R->snl = NULL;
++ 	R->snl_pos = 0;
++ 	R->snl_len = 0;
+  	return R;
+  	}
+  
+diff -c --exclude=.depend --exclude='*.html*' -r -w solvers/pfg_read.c /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/pfg_read.c
+*** solvers/pfg_read.c	2005-06-25 12:57:51.000000000 -0400
+--- /home/ladanyi/Ipopt.orig/Extern/ASL/solvers/pfg_read.c	2006-03-03 14:56:07.000000000 -0500
+***************
+*** 4651,4657 ****
+  #endif
+  {
+  	ASLTYPE *asl;
+! 	EdRead ER, *R;
+  	Jmp_buf JB;
+  	Static SS, *S;
+  	cgrad *cg, **cgp;
+--- 4651,4657 ----
+  #endif
+  {
+  	ASLTYPE *asl;
+! 	EdRead ER, *R, Rbackup;
+  	Jmp_buf JB;
+  	Static SS, *S;
+  	cgrad *cg, **cgp;
+***************
+*** 4667,4674 ****
+--- 4667,4679 ----
+  	ASL_CHECK(a, asltype, who);
+  	asl = (ASLTYPE*)a;
+  	S = S_init(&SS, asl);
++ 	Rbackup = a->Rbackup;
+  	ed_reset(asl);
+  	SS.R = R = EdReadInit_ASL(&ER, a, nl, S);
++ 	/* LL */
++ 	R->snl = Rbackup.snl;
++ 	R->snl_pos = Rbackup.snl_pos;
++ 	R->snl_len = Rbackup.snl_len;
+  	if (flags & ASL_return_read_err) {
+  		a->i.err_jmp_ = &JB;
+  		i = setjmp(JB.jb);
+***************
+*** 4796,4802 ****
+  		ER.can_end = 1;
+  		i = edag_peek(R);
+  		if (i == EOF) {
+! 			fclose(nl);
+  			do_ewalk(S);
+  			if (imap)
+  				del_mblk(kimap, imap);
+--- 4801,4808 ----
+  		ER.can_end = 1;
+  		i = edag_peek(R);
+  		if (i == EOF) {
+! 			/* LL */
+! 			if (nl) fclose(nl);
+  			do_ewalk(S);
+  			if (imap)
+  				del_mblk(kimap, imap);
diff --git a/experimental/RobotBonmin/BonNWayChoose.cpp b/experimental/RobotBonmin/BonNWayChoose.cpp
new file mode 100644
index 0000000..ed1dc49
--- /dev/null
+++ b/experimental/RobotBonmin/BonNWayChoose.cpp
@@ -0,0 +1,591 @@
+// Copyright (C) 2006, 2008 International Business Machines
+// Corporation and others.  All Rights Reserved.
+
+#include <climits>
+#include "CoinPragma.hpp"
+#include "BonNWayChoose.hpp"
+#include "BonNWayObject.hpp"
+#include "CoinTime.hpp"
+
+#ifndef NDEBUG
+#define ASSERTED_CAST static_cast
+#else
+#define ASSERTED_CAST dynamic_cast
+#endif
+namespace Bonmin
+{
+
+
+  BonNWayChoose::BonNWayChoose(BabSetupBase &b, const OsiSolverInterface* solver):
+      OsiChooseVariable(solver),
+      br_depth_(0),
+      bounds_(),
+      unit_changes_(),
+      num_ps_costs_(),
+      num_eval_(),
+      geo_means_(0)
+  {
+    Ipopt::SmartPtr<Ipopt::OptionsList> options = b.options();
+    options->GetNumericValue("time_limit", time_limit_, b.prefix());
+    options->GetNumericValue("cutoff_multiplier", cutoff_multiplier_, b.prefix());
+    options->GetNumericValue("pseudocost_trust_value", pseudocost_trust_value_, b.prefix());
+    options->GetIntegerValue("strong_branch_depth", br_depth_, b.prefix());
+    options->GetIntegerValue("nway_branch_log_level", log_, b.prefix());
+    options->GetEnumValue("do_fixings", do_fixings_, b.prefix());
+    options->GetEnumValue("use_geo_means", geo_means_, b.prefix());
+    /** Set values of standard branching options.*/
+    int numberObjects = solver_->numberObjects();
+    std::cout<<"Number objects "<<numberObjects<<std::endl;
+    start_time_ = CoinCpuTime();
+    OsiObject ** object = solver->objects();
+    for (int i=0;i<numberObjects;i++) {
+       BonNWayObject * nway = dynamic_cast<BonNWayObject *>(object[i]);
+      if(!nway) continue;
+      start_nway_ = i;
+      break;
+    }
+    numberObjects -= start_nway_;
+  }
+
+  BonNWayChoose::BonNWayChoose(const BonNWayChoose & rhs) :
+      OsiChooseVariable(rhs),
+      br_depth_(rhs.br_depth_),
+      do_fixings_(rhs.do_fixings_),
+      cutoff_multiplier_(rhs.cutoff_multiplier_),
+      pseudocost_trust_value_(rhs.pseudocost_trust_value_),
+      time_limit_(rhs.time_limit_),
+      start_time_(rhs.start_time_),
+      start_nway_(rhs.start_nway_),
+      log_(rhs.log_),
+      bounds_(rhs.bounds_),
+      unit_changes_(rhs.unit_changes_),
+      num_ps_costs_(rhs.num_ps_costs_),
+      num_eval_(rhs.num_eval_),
+      geo_means_(rhs.geo_means_)
+  {
+  }
+
+  BonNWayChoose &
+  BonNWayChoose::operator=(const BonNWayChoose & rhs)
+  {
+    if (this != &rhs) {
+      br_depth_ = rhs.br_depth_;
+      do_fixings_ = rhs.do_fixings_;
+      cutoff_multiplier_ = rhs.cutoff_multiplier_;
+      pseudocost_trust_value_ = rhs.pseudocost_trust_value_;
+      time_limit_ = rhs.time_limit_;
+      start_time_ = rhs.start_time_;
+      log_ = rhs.log_;
+      start_nway_ = rhs.start_nway_;
+      OsiChooseVariable::operator=(rhs);
+      bounds_ = rhs.bounds_;
+      unit_changes_ = rhs.unit_changes_;
+      num_ps_costs_ = rhs.num_ps_costs_;
+      num_eval_ = rhs.num_eval_;
+      geo_means_ = rhs.geo_means_;
+    }
+    return *this;
+  }
+
+  OsiChooseVariable *
+  BonNWayChoose::clone() const
+  {
+    return new BonNWayChoose(*this);
+  }
+
+  BonNWayChoose::~BonNWayChoose ()
+  {
+  }
+
+  void
+  BonNWayChoose::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("NWay Strong branching setup", RegisteredOptions::BonminCategory);
+    roptions->AddLowerBoundedIntegerOption("nway_branch_log_level",
+                                           "Log level for the branching on nways",
+                                           0,1,
+                                           "");
+
+    roptions->AddLowerBoundedIntegerOption("strong_branch_depth",
+                                           "To which level do we perform strong-branching",
+                                           0,0,
+                                           "");
+
+    roptions->AddLowerBoundedNumberOption("cutoff_multiplier",
+                                           "multiplier applied to cutoff_ for computing pseudo-cost of infeasible sub-problems",
+                                           1.,0,3.,
+                                           "");
+
+    roptions->AddLowerBoundedNumberOption("pseudocost_trust_value",
+                                           "Trust pseudo cost of best nway object if it is above this value",
+                                           0.,0,0,
+                                           "");
+
+    roptions->AddStringOption2("use_geo_means", "Use geometrical means to average pseudo-costs",
+                               "yes", 
+                               "no", "Use artihmetical means",
+                               "yes", "Use geometrical means","");
+
+    roptions->AddStringOption4("do_fixings",
+        "Do we fix variables in strong branching?",
+        "all",
+        "none", "Don't do any.",
+        "in-tree", "Fix only variables in the tree",
+        "strong-branching", "Fix variable in strong branching only",
+        "all", "Fix whenever possible",
+        "");
+
+
+  }
+
+  double
+  BonNWayChoose::compute_usefulness(int objectIndex, const OsiBranchingInformation * info) const
+  {
+    int nwayIndex = objectIndex - start_nway_;
+
+    BonNWayObject * nway = ASSERTED_CAST<BonNWayObject *>(info->solver_->objects()[objectIndex]);
+    assert(nway);
+    size_t n = nway->numberMembers();
+    const int * vars = nway->members();
+
+    std::vector<double> unit_changes(unit_changes_[nwayIndex]);
+    if(geo_means_){
+      for(size_t k = 0 ; k < unit_changes.size() ; k++) unit_changes[k] = (num_ps_costs_[nwayIndex][k]) ? pow(unit_changes[k], 1./(double) num_ps_costs_[nwayIndex][k]): unit_changes[k];
+    }
+    else {
+    for(size_t k = 0 ; k < unit_changes.size() ; k++) unit_changes[k] = (num_ps_costs_[nwayIndex][k]) ? unit_changes[k]/(double) num_ps_costs_[nwayIndex][k]: unit_changes[k];
+    }
+
+
+    double r_val = compute_usefulness(info, n, vars, bounds_[nwayIndex], unit_changes);
+    return r_val;
+  }
+
+  double
+  BonNWayChoose::compute_usefulness(const OsiBranchingInformation * info,
+                size_t n, const int * vars,const std::vector<double> &bounds, const std::vector<double> &unit_changes) const
+  {
+    const double * solution = info->solution_;
+    double obj_val = info->objectiveValue_;
+    const double * lower = info->lower_;
+    const double * upper = info->upper_;
+    double integerTolerance = info->integerTolerance_;
+    double cutoff = info->cutoff_*cutoff_multiplier_;
+    double r_val = (geo_means_) ? 1 : 0;
+
+    for(size_t  i = 0 ; i < n ; i++){
+      int iCol = vars[i];
+      if(fabs(lower[iCol] - upper[iCol]) < integerTolerance) {
+        //r_val *= (cutoff - obj_val);
+        continue; //Variable is fixed
+      }
+      assert(lower[iCol] < upper[iCol]);
+      double residual = upper[iCol] - solution[iCol];
+      double score = std::min(cutoff - obj_val, std::max(residual*unit_changes[i],bounds[i] - obj_val));
+      if(geo_means_)
+        r_val*=score;
+      else
+        r_val += score;
+    } 
+    return r_val;
+  }
+
+  int
+  BonNWayChoose::setupList ( OsiBranchingInformation *info, bool initialize)
+  {
+    assert(initialize);
+    if (initialize) {
+      status_=-2;
+      delete [] goodSolution_;
+      bestObjectIndex_=-1;
+      goodSolution_ = NULL;
+      goodObjectiveValue_ = COIN_DBL_MAX;
+    }
+
+
+    numberOnList_=0;
+    numberUnsatisfied_=0;
+    int numberObjects = info->solver_->numberObjects() - start_nway_;
+    double cutoff = info->cutoff_;
+    if(info->depth_ == 0){
+      bounds_.resize(0);
+      unit_changes_.resize(0);
+      bounds_.resize(numberObjects, std::vector<double>(numberObjects,cutoff));
+      unit_changes_.resize(numberObjects, std::vector<double>(numberObjects,0));
+      num_eval_.resize(numberObjects, 0);
+      num_ps_costs_.resize(numberObjects, std::vector<int>(numberObjects,0));
+    }
+    else {
+      assert(unit_changes_.size() == numberObjects);
+      assert(bounds_.size() == unit_changes_.size());
+    }
+    //Always allow all objects on the list  
+    int maximumStrong = numberObjects;
+
+    double check = -COIN_DBL_MAX;
+    int checkIndex=0;
+    int bestPriority=COIN_INT_MAX;
+    int putOther = numberObjects;
+    int i;
+    for (i=0;i<numberObjects;i++) {
+      list_[i]=-1;
+      useful_[i]=0.0;
+    }
+
+    OsiObject ** object = info->solver_->objects();
+    object += start_nway_;
+
+    // Say feasible
+    bool feasible = true;
+    for ( i=0;i<numberObjects;i++) {
+      int way;
+      double value = object[i]->infeasibility(info,way);
+      if (value>0.0) {
+        numberUnsatisfied_++;
+        int priorityLevel = object[i]->priority();
+        // Better priority? Flush choices.
+        if (priorityLevel<bestPriority) {
+          for (int j=maximumStrong-1;j>=0;j--) {
+            if (list_[j]>=0) {
+              int iObject = list_[j];
+              list_[j]=-1;
+              useful_[j]=0.0;
+              list_[--putOther]=iObject;
+            }
+          }
+          bestPriority = priorityLevel;
+          check=-COIN_DBL_MAX;
+          checkIndex=0;
+        }
+        if (priorityLevel==bestPriority) {
+          // Modify value
+          //Compute usefullness
+          if(info->depth_ != 0){
+            value = compute_usefulness(i + start_nway_, info); 
+          }
+
+          if (value>check) {
+            //add to list
+            int iObject = list_[checkIndex];
+            if (iObject>=0) {
+              assert (list_[putOther-1]<0);
+              list_[--putOther]=iObject;  // to end
+            }
+            list_[checkIndex]= i + start_nway_;
+            assert (checkIndex<putOther);
+            useful_[checkIndex]=value;
+            // find worst
+            check=COIN_DBL_MAX;
+            maximumStrong = CoinMin(maximumStrong,putOther);
+            for (int j=0;j<maximumStrong;j++) {
+              if (list_[j]>=0) {
+                if (useful_[j]<check) {
+                  check=useful_[j];
+                  checkIndex=j;
+                }
+               }
+               else {
+                 check=0.0;
+                 checkIndex = j;
+                 break;
+               }
+             }
+          }
+          else {
+            // to end
+            assert (list_[putOther-1]<0);
+            list_[--putOther]=i + start_nway_;
+            maximumStrong = CoinMin(maximumStrong,putOther);
+          }
+        }
+        else {
+          // worse priority
+          // to end
+          assert (list_[putOther-1]<0);
+          list_[--putOther]=i + start_nway_;
+          maximumStrong = CoinMin(maximumStrong,putOther);
+        }
+      }
+    }
+
+    // Get list
+    numberOnList_=0;
+    if (feasible) {
+      maximumStrong = CoinMin(maximumStrong,putOther);
+      for (i=0;i<maximumStrong;i++) {
+      if (list_[i]>=0) {
+          list_[numberOnList_]=list_[i];
+          useful_[numberOnList_++]=-useful_[i];
+        }
+      }
+      if (numberOnList_) {
+        // Sort
+        CoinSort_2(useful_,useful_+numberOnList_,list_);
+        // move others
+        i = numberOnList_;
+        for (;putOther<numberObjects;putOther++)
+          list_[i++]=list_[putOther];
+        assert (i==numberUnsatisfied_);
+        if (!numberStrong_)
+          numberOnList_=0;
+      }
+    }
+    else {
+      // not feasible
+      numberUnsatisfied_=-1;
+    }
+    // Get rid of any shadow prices info
+    info->defaultDual_ = -1.0; // switch off
+    delete [] info->usefulRegion_;
+    delete [] info->indexRegion_;
+
+    return numberUnsatisfied_;
+  }
+
+  /* Choose a variable
+     Returns -
+     -1 Node is infeasible
+     0  Normal termination - we have a candidate
+     1  All looks satisfied - no candidate
+     2  We can change the bound on a variable - but we also have a strong branching candidate
+     3  We can change the bound on a variable - but we have a non-strong branching candidate
+     4  We can change the bound on a variable - no other candidates
+     We can pick up branch from whichObject() and whichWay()
+     We can pick up a forced branch (can change bound) from whichForcedObject() and whichForcedWay()
+     If we have a solution then we can pick up from goodObjectiveValue() and goodSolution()
+  */
+  int
+  BonNWayChoose::chooseVariable(
+    OsiSolverInterface * solver,
+    OsiBranchingInformation *info,
+    bool fixVariables)
+  {
+    if(!numberUnsatisfied_) return 1;//Node is feasible
+
+
+    double cutoff = info->cutoff_;
+    double obj_val = info->objectiveValue_;
+    if(info->depth_ > br_depth_ &&  ( (- useful_[0]   > pseudocost_trust_value_ )|| num_eval_[list_[0] - start_nway_] >= 18) ){
+      const double * lower = info->lower_;
+      const double * upper = info->upper_;
+
+
+      // See if quick variable fixing can be done
+      int n_fixed = 0;
+      if(do_fixings_ > 1){
+         for(int i = 0 ; i < numberUnsatisfied_ ; i++){
+            int iObject = list_[i];
+            int nwayIndex = iObject - start_nway_;
+            const BonNWayObject * nway = ASSERTED_CAST<const BonNWayObject *>(solver->object(iObject));
+
+            size_t n = nway->numberMembers();
+            const int * vars = nway->members();
+            for(size_t  j = 0 ; j < n ; j++){
+              int iCol = vars[j];
+              if(upper[iCol] < lower[iCol] + 0.5) continue;//variable already fixed to lower buund
+              if(bounds_[nwayIndex][j] > cutoff){//It can be fixed
+                 solver->setColUpper(iCol, lower[iCol]);
+                 n_fixed ++;
+              }
+            }
+         }
+        if(n_fixed && log_ > 1)
+          printf("NWAY: Fixed %i variables\n", n_fixed);
+      }
+
+      assert(bounds_.size() == unit_changes_.size());
+      assert(unit_changes_.size() == info->solver_->numberObjects() - start_nway_);
+      //Just take the most usefull
+      bestObjectIndex_ = list_[0];
+      bestWhichWay_ = 1; 
+      OsiObject * obj = solver->objects()[bestObjectIndex_];
+      obj->setWhichWay(bestWhichWay_);
+
+      if(log_ > 1){
+        printf("level %i branch on %i bound %g usefullness %g.\n",
+               info->depth_, bestObjectIndex_ - start_nway_, obj_val, - useful_[0]);
+      }
+      if(n_fixed) return 2;
+      return 0;
+     }
+
+
+    if(log_ > 0)
+      printf("Restarting strong branching loop....\n\n");
+
+    numberStrongIterations_ = 0;
+    numberStrongDone_ = 0;
+    int numberLeft = numberOnList_;//Always do full strong at root
+    int returnCode=0;
+    bestObjectIndex_ = -1;
+    bestWhichWay_ = -1;
+    firstForcedObjectIndex_ = -1;
+    firstForcedWhichWay_ =-1;
+    double best_score = -COIN_DBL_MAX;
+    int bestPriority=0;
+
+    int n = solver->getNumCols();
+    std::vector<double> saveLower(n);
+    std::vector<double> saveUpper(n);
+    std::copy(info->lower_, info->lower_ + n, saveLower.begin());
+    std::copy(info->upper_, info->upper_ + n, saveUpper.begin());
+
+
+    solver->markHotStart();
+    for (int i=0;i<numberLeft;i++) {
+      int iObject = list_[i];
+      const int objectPriority = solver->object(iObject)->priority();
+      if (objectPriority >= bestPriority){
+             bestPriority = objectPriority;
+      }
+      else break;
+      double score;
+      int r_val = doStrongBranching(solver, info, iObject, saveLower.data(),
+                                     saveUpper.data(), score);
+      if(r_val == -1) {
+         if(log_ > 0)
+           std::cout<<"This is Infeasible"<<std::endl;
+         returnCode = -1;
+         break;
+      }
+
+      if(do_fixings_ > 1 && r_val == 1 && info->depth_ == 0) returnCode=2;
+      //Compute Score
+      if(log_ > 0)
+        printf("Usefullness from strong branching on %i : %g\n", iObject - start_nway_, score);
+      if(score > best_score){//We have a winner
+        best_score = score;
+        bestObjectIndex_ = iObject;
+        bestWhichWay_ = 0;
+      }
+      if (r_val==3) {
+          returnCode = 3;
+          // max time - just choose one
+          if(bestObjectIndex_ < 0){
+            bestObjectIndex_ = list_[0];
+            bestWhichWay_ = 0;
+          }
+          break;
+        }
+    }
+    solver->unmarkHotStart();
+    return returnCode;
+  }
+
+  /*  This is a utility function which does strong branching on
+      one nway object and stores the results in appropriate arrays of the class
+      and maybe more.
+      It returns -
+      -1 - branch was infeasible both ways
+       0 - nothing can be fixed
+       1 - object can be fixed (returnCriterion==0)
+       3 - time limit
+  */
+  int 
+  BonNWayChoose::doStrongBranching( OsiSolverInterface * solver, 
+  				    OsiBranchingInformation *info,
+  				    int objectIndex,
+                                    double * saveLower,
+                                    double * saveUpper, double & score)
+  {
+    int nwayIndex = objectIndex - start_nway_;
+    const double * lower = info->lower_;
+    const double * upper = info->upper_;
+
+    int numberColumns = solver->getNumCols();
+    double timeStart = CoinCpuTime();
+
+    int numberObjects = info->solver_->numberObjects();
+    const BonNWayObject * nway = ASSERTED_CAST<const BonNWayObject *>(solver->object(objectIndex));
+    assert(nway);
+    BonNWayBranchingObject * branch = ASSERTED_CAST<BonNWayBranchingObject *>(nway->createBranch(solver, info, 1));
+
+    int branches_left = branch->numberBranchesLeft();
+    int number_branches = branch->numberBranchesLeft();
+    int n_can_be_fixed = 0;
+
+    double big_val = cutoff_multiplier_*info->cutoff_;// For infeasibles
+    if(big_val > 1e10){ big_val = 10*info->objectiveValue_;}
+    big_val += fabs(big_val)*1e-5;
+    std::vector<double> unit_changes(numberObjects - start_nway_, -DBL_MAX);
+    //std::vector<double> unit_changes(numberObjects - start_nway_, 0);
+    while(branches_left){ 
+
+      branch->branch(solver);
+      int v_br = branch->var_branched_on();
+      int s_br = branch->seq_branched_on();
+      double residual = upper[v_br] - info->solution_[v_br];
+      solver->solveFromHotStart() ;
+      numberStrongIterations_ += solver->getIterationCount();
+      numberStrongDone_++;
+
+      double obj_val = solver->getObjValue();
+
+      if(solver->isProvenPrimalInfeasible() ||
+         (solver->isProvenOptimal() && obj_val > info->cutoff_)){//infeasible
+         if(info->depth_ == 0){
+         bounds_[nwayIndex][s_br] = big_val;
+         }
+         unit_changes[s_br] = (big_val - info->objectiveValue_)/residual;
+         if(do_fixings_ > 1){
+           n_can_be_fixed++;
+           if(log_ > 0)
+           printf("Fixing variable %i to 0 the cutoff is %g\n", v_br, big_val);
+           saveUpper[v_br] = saveLower[v_br];
+         }
+      }
+      else{
+         if(info->depth_ == 0){
+          bounds_[nwayIndex][s_br] = obj_val;
+         }
+         unit_changes[s_br] = (obj_val - info->objectiveValue_)/residual;
+      }
+
+      // Restore bounds
+      for (int j=0;j<numberColumns;j++) {
+        if (saveLower[j] != lower[j])
+  	solver->setColLower(j,saveLower[j]);
+        if (saveUpper[j] != upper[j])
+  	solver->setColUpper(j,saveUpper[j]);
+      }
+      branches_left = branch->numberBranchesLeft();
+    }
+
+    score = compute_usefulness(info, nway->numberMembers(), nway->members(), bounds_[nwayIndex], unit_changes);
+    if(info->depth_ == 0){//At root bounds contains valid bound on obj after branching, remember
+        if(do_fixings_ == 1 || do_fixings_ == 3)
+        nway->set_bounds(bounds_[nwayIndex]);
+        for(size_t k = 0 ; k < unit_changes.size() ; k++){
+           num_ps_costs_[nwayIndex][k]=1;
+        }
+        unit_changes_[nwayIndex] = unit_changes;
+        num_eval_[nwayIndex] = 1;
+    }
+    else if (n_can_be_fixed < number_branches -1){
+       num_eval_[nwayIndex]++;
+       for(size_t k = 0 ; k < unit_changes.size() ; k++){
+         if(unit_changes[k] > 0.){
+           if(geo_means_)
+              unit_changes_[nwayIndex][k] *= unit_changes[k];
+           else
+              unit_changes_[nwayIndex][k] += unit_changes[k];
+           num_ps_costs_[nwayIndex][k]++;
+         }
+       }
+    }
+    if(n_can_be_fixed == number_branches){
+       return -1;
+    }
+   if(n_can_be_fixed){
+     return 1;
+    }
+    bool hitMaxTime = ( CoinCpuTime()-timeStart > info->timeRemaining_)
+    		|| ( CoinCpuTime() - start_time_ > time_limit_);
+    if (hitMaxTime) {
+    return 3;
+    }
+    return 0;
+}
+
+}/* Ends Bonmin's namespace.*/
+
diff --git a/experimental/RobotBonmin/BonNWayChoose.hpp b/experimental/RobotBonmin/BonNWayChoose.hpp
new file mode 100644
index 0000000..70c4058
--- /dev/null
+++ b/experimental/RobotBonmin/BonNWayChoose.hpp
@@ -0,0 +1,124 @@
+// Copyright (C) 2006, 2008 International Business Machines
+// Corporation and others.  All Rights Reserved.
+#ifndef BonNWayChoose_H
+#define BonNWayChoose_H
+
+#include "OsiChooseVariable.hpp"
+#include "BonBabSetupBase.hpp"
+#include "BonNWayObject.hpp"
+
+#define OLD_USEFULLNESS
+
+namespace Bonmin
+{
+
+  /** This class chooses a variable to branch on
+
+      This is the base class for the branching rules in Bonmin (inherits
+      from OsiChooseVariable). This class implements a simple strong branching algorithm where the changes in the objective
+      value induced by branching on a specific object are estimated with the pure virtual function fill_changes.
+  */
+
+  class BonNWayChoose : public OsiChooseVariable
+  {
+  protected:
+
+  public:
+
+    /// Constructor from solver (so we can set up arrays etc)
+    BonNWayChoose (BabSetupBase& b, const OsiSolverInterface* solver);
+
+    /// Copy constructor
+    BonNWayChoose (const BonNWayChoose &);
+
+    /// Assignment operator
+    BonNWayChoose & operator= (const BonNWayChoose& rhs);
+
+    /// Clone
+    virtual OsiChooseVariable * clone() const;
+
+    /// Destructor
+    virtual ~BonNWayChoose ();
+
+    /** Helper function for setupList and chooseVariable, compute usefullness of an nway object */
+    double compute_usefulness(int objectIndex, const OsiBranchingInformation * info) const;
+
+    double compute_usefulness(const OsiBranchingInformation * info,
+                size_t n, const int * vars, const std::vector<double> &bounds, const std::vector<double> &unit_changes) const;
+    /** Sets up strong list and clears all if initialize is true.
+        Returns number of infeasibilities. */
+    virtual int setupList ( OsiBranchingInformation *info, bool initialize);
+
+    /** Choose a variable
+        Returns - 
+       -1 Node is infeasible
+       0  Normal termination - we have a candidate
+       1  All looks satisfied - no candidate
+       2  We can change the bound on a variable - but we also have a strong branching candidate
+       3  We can change the bound on a variable - but we have a non-strong branching candidate
+       4  We can change the bound on a variable - no other candidates
+       We can pick up branch from bestObjectIndex() and bestWhichWay()
+       We can pick up a forced branch (can change bound) from firstForcedObjectIndex() and firstForcedWhichWay()
+       If we have a solution then we can pick up from goodObjectiveValue() and goodSolution()
+       If fixVariables is true then 2,3,4 are all really same as problem changed
+    */
+    virtual int chooseVariable( OsiSolverInterface * solver, OsiBranchingInformation *info, bool fixVariables);
+
+  /**  This is a utility function which does strong branching on
+       a list of objects and stores the results in OsiHotInfo.objects.
+       On entry the object sequence is stored in the OsiHotInfo object
+       and maybe more.
+       It returns -
+       -1 - one branch was infeasible both ways
+       0 - all inspected - nothing can be fixed
+       1 - all inspected - some can be fixed (returnCriterion==0)
+       2 - may be returning early - one can be fixed (last one done) (returnCriterion==1) 
+       3 - returning because max time
+       
+  */
+  virtual int doStrongBranching( OsiSolverInterface * solver, 
+				 OsiBranchingInformation *info,
+				 int iObject, double * saveLow, double * saveUp, double &score);
+
+ 
+  /** Register class options.*/
+  static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+  private:
+    /** Default Constructor, forbiden for some reason.*/
+    BonNWayChoose ();
+
+    /** depth of strong-branching.*/
+    int br_depth_;
+    /** Do we fix?*.*/
+    Ipopt::Index do_fixings_;
+    /** Cutoff multiplier for infeasibles*/
+    double cutoff_multiplier_;
+    /** Trust value for the pseudo costs.*/
+    double pseudocost_trust_value_;
+    /** Global time limit for algorithm. */
+    double time_limit_;
+
+    /** Starting time of algorithm.*/
+    double start_time_;
+
+    /// Start of nway objects in array
+    int start_nway_;
+
+    /// log level
+    int log_;
+    typedef std::vector< std::vector<double> > full_mat;
+
+    full_mat bounds_;
+
+    full_mat unit_changes_;
+
+    std::vector < std::vector<int> > num_ps_costs_;
+
+    std::vector<int> num_eval_;
+
+    int geo_means_;
+  };
+
+}
+#endif
diff --git a/experimental/RobotBonmin/BonNWayObject.cpp b/experimental/RobotBonmin/BonNWayObject.cpp
new file mode 100644
index 0000000..18258e7
--- /dev/null
+++ b/experimental/RobotBonmin/BonNWayObject.cpp
@@ -0,0 +1,353 @@
+// $Id$
+// Copyright (C) 2002, International Business Machines
+// Corporation and others.  All Rights Reserved.
+// This code is licensed under the terms of the Eclipse Public License (EPL).
+
+// Edwin 11/9/2009-- carved out of CbcBranchActual
+
+#include <cassert>
+#include <cstdlib>
+#include <cmath>
+#include <cfloat>
+#include <climits>
+
+
+#include "CoinTypes.hpp"
+#include "OsiSolverInterface.hpp"
+#include "OsiSolverBranch.hpp"
+#include "BonNWayObject.hpp"
+#include "CoinSort.hpp"
+#include "CoinError.hpp"
+
+//#define FULL_PRINT
+namespace Bonmin {
+//##############################################################################
+
+// Default Constructor
+BonNWayObject::BonNWayObject ()
+        : OsiObject(),
+        members_(),
+        consequence_(NULL),
+        quicky_(false),
+        only_frac_branch_(0)
+{
+}
+
+// Useful constructor (which are integer indices)
+BonNWayObject::BonNWayObject (int numberMembers,
+                  const int * which, int identifier):
+       OsiObject(),
+       members_(numberMembers),
+        quicky_(false),
+        only_frac_branch_(0)//INT_MAX)
+{
+    if (numberMembers) {
+        memcpy(members_.data(), which, numberMembers*sizeof(int));
+    } else {
+    }
+    consequence_ = NULL;
+}
+
+// Copy constructor
+BonNWayObject::BonNWayObject ( const BonNWayObject & rhs)
+        : OsiObject(rhs), members_(rhs.members_), quicky_(rhs.quicky_), only_frac_branch_(rhs.only_frac_branch_)
+{
+    consequence_ = NULL;
+    if (members_.size()) {
+        if (rhs.consequence_) {
+            consequence_ = new n_way_consequences* [members_.size()];
+            for (size_t i = 0; i < members_.size(); i++) {
+                if (rhs.consequence_[i])
+                    consequence_[i] = rhs.consequence_[i]->clone();
+                else
+                    consequence_[i] = NULL;
+            }
+        }
+    } else {
+    }
+}
+
+// Clone
+OsiObject *
+BonNWayObject::clone() const
+{
+    return new BonNWayObject(*this);
+}
+
+// Assignment operator
+BonNWayObject &
+BonNWayObject::operator=( const BonNWayObject & rhs)
+{
+    if (this != &rhs) {
+        OsiObject::operator=(rhs);
+        members_ = rhs.members_;
+        quicky_ = rhs.quicky_;
+        only_frac_branch_ = rhs.only_frac_branch_;
+        if (consequence_) {
+            for (size_t i = 0; i < members_.size(); i++)
+                delete consequence_[i];
+            delete [] consequence_;
+            consequence_ = NULL;
+        }
+        if (rhs.consequence_) {
+            consequence_ = new n_way_consequences* [members_.size()];
+            for (size_t i = 0; i < members_.size(); i++) {
+                if (rhs.consequence_[i])
+                    consequence_[i] = rhs.consequence_[i]->clone();
+                else
+                    consequence_[i] = NULL;
+            }
+        }
+    }
+    return *this;
+}
+
+// Destructor
+BonNWayObject::~BonNWayObject ()
+{
+    if (consequence_) {
+        for (size_t i = 0; i < members_.size(); i++)
+            delete consequence_[i];
+        delete [] consequence_;
+    }
+}
+// Set up a consequence for a single member
+void
+BonNWayObject::setConsequence(int iMember, const n_way_consequences& consequence)
+{
+    if (!consequence_) {
+        consequence_ = new n_way_consequences* [members_.size()];
+        for (size_t i = 0; i < members_.size(); i++)
+            consequence_[i] = NULL;
+    }
+    consequence_[iMember] = consequence.clone();
+}
+
+// Applies a consequence for a single member
+void
+BonNWayObject::applyConsequence(OsiSolverInterface * solver, int iSequence, int state) const
+{
+    assert (state == -9999 || state == 9999);
+    if (consequence_) {
+        n_way_consequences* consequence = consequence_[iSequence];
+        if (consequence)
+            consequence->applyToSolver(solver, state);
+    }
+}
+double
+BonNWayObject::infeasibility(const OsiBranchingInformation * info,
+                       int &preferredWay) const
+{
+    int numberUnsatis = 0;
+    size_t j;
+    const double * solution = info->solution_;
+    const double * lower = info->lower_;
+    const double * upper = info->upper_;
+    double largestValue = 0.0;
+
+    double integerTolerance = info->integerTolerance_;
+
+    for (j = 0; j < members_.size(); j++) {
+        int iColumn = members_[j];
+        double value = solution[iColumn];
+        value = CoinMax(value, lower[iColumn]);
+        value = CoinMin(value, upper[iColumn]);
+        double distance = CoinMin(value - lower[iColumn], upper[iColumn] - value);
+        if (distance > integerTolerance) {
+            numberUnsatis++;
+            largestValue = CoinMax(distance, largestValue);
+        }
+    }
+    preferredWay = 1;
+    if (numberUnsatis) {
+        return largestValue;
+    } else {
+        return 0.0; // satisfied
+    }
+}
+
+// This looks at solution and sets bounds to contain solution
+double
+BonNWayObject::feasibleRegion(OsiSolverInterface * solver,
+                        const OsiBranchingInformation * info) const
+{
+    size_t j;
+    const double * solution = info->solution_;
+    const double * lower = info->lower_;
+    const double * upper = info->upper_;
+    double integerTolerance = info->integerTolerance_;
+    double r_val = 0;
+    for (j = 0; j < members_.size(); j++) {
+        int iColumn = members_[j];
+        double value = solution[iColumn];
+        value = CoinMax(value, lower[iColumn]);
+        value = CoinMin(value, upper[iColumn]);
+        if (value >= upper[iColumn] - integerTolerance) {
+            r_val += value - upper[iColumn];
+            solver->setColLower(iColumn, upper[iColumn]);
+        } else {
+            assert (value <= lower[iColumn] + integerTolerance);
+            r_val += value - lower[iColumn];
+            solver->setColUpper(iColumn, lower[iColumn]);
+        }
+    }
+    return r_val;
+}
+
+OsiBranchingObject *
+BonNWayObject::createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const
+{
+
+    const double * solution = info->solution_;
+    const double * lower = info->lower_;
+    const double * upper = info->upper_;
+    double integerTolerance = info->integerTolerance_;
+    double cutoff = info->cutoff_;
+    std::vector<int> list;
+    list.reserve(members_.size());
+    std::vector<double> sort;
+    sort.reserve(members_.size());
+
+    int n_skipped = 0;
+    std::list<int> skipped;
+
+    for (size_t j = 0; j < members_.size(); j++) {
+        const int& iColumn = members_[j];
+        double value = solution[iColumn];
+        value = CoinMax(value, lower[iColumn]);
+        value = CoinMin(value, upper[iColumn]);
+        if (upper[iColumn] > lower[iColumn]) {
+        if(bounds_.size() && bounds_[j] > cutoff) {
+          //printf("Fathom branch on bound %i : %g > %g\n", j, bounds_[j], cutoff);
+          continue;
+        }
+        if( (quicky_ || info->depth_ > only_frac_branch_ ) && fabs(solution[iColumn] - lower[iColumn]) < integerTolerance){
+            if(info->depth_ > only_frac_branch_) {
+               n_skipped++;
+               //printf("Skipping variable %i\n", iColumn);
+               skipped.push_back(static_cast<int>(j));
+               continue;
+            }
+          }
+            double distance = upper[iColumn] - value;
+            list.push_back(static_cast<int>(j));
+            sort.push_back(distance);
+        }
+    }
+
+    if(n_skipped == 1) {//False subset put back the missing since branching up allows applying consequences
+           const int& iColumn = members_[skipped.front()];
+           double value = solution[iColumn];
+           value = CoinMax(value, lower[iColumn]);
+           value = CoinMin(value, upper[iColumn]);
+           double distance = upper[iColumn] - value;
+           list.push_back(skipped.front());
+           sort.push_back(distance);
+           skipped.pop_front();
+           n_skipped --;
+    }
+
+    // sort
+    CoinSort_2(sort.data(), sort.data() + sort.size(), list.data());
+    // create object
+    OsiBranchingObject * branch;
+
+    //if(n_skipped) printf("Creating branch n_skipped is %i numberFree %i\n", n_skipped, numberFree);
+    branch = new BonNWayBranchingObject(solver, this, list, skipped);
+    return branch;
+}
+
+
+// Default Constructor
+BonNWayBranchingObject::BonNWayBranchingObject()
+        : OsiBranchingObject(), object_(NULL),
+          order_(), skipped_()
+{
+}
+
+// Useful constructor
+BonNWayBranchingObject::BonNWayBranchingObject (OsiSolverInterface * solver,
+        const BonNWayObject * nway,
+        const std::vector<int>& order, const std::list<int> &skipped)
+        : OsiBranchingObject(solver, 0.5), order_(order), skipped_(skipped)
+{
+    numberBranches_ = static_cast<int>(order_.size()) + (!skipped.empty());
+    object_ = nway;
+}
+
+// Copy constructor
+BonNWayBranchingObject::BonNWayBranchingObject ( const BonNWayBranchingObject & rhs) :
+           OsiBranchingObject(rhs), object_(rhs.object_), 
+           order_(rhs.order_), skipped_(rhs.skipped_)
+{
+    object_ = rhs.object_;
+}
+
+// Assignment operator
+BonNWayBranchingObject &
+BonNWayBranchingObject::operator=( const BonNWayBranchingObject & rhs)
+{
+    if (this != &rhs) {
+        OsiBranchingObject::operator=(rhs);
+        object_ = rhs.object_;
+        order_ = rhs.order_;
+        skipped_ = rhs.skipped_;
+    }
+    return *this;
+}
+OsiBranchingObject *
+BonNWayBranchingObject::clone() const
+{
+    return (new BonNWayBranchingObject(*this));
+}
+
+
+// Destructor
+BonNWayBranchingObject::~BonNWayBranchingObject ()
+{
+}
+
+double
+BonNWayBranchingObject::branch(OsiSolverInterface * solver)
+{
+    int which = branchIndex_;
+    branchIndex_++;
+    if(!skipped_.empty() && branchIndex_ == static_cast<int>(order_.size())){//We are branching on a subset last branch fixes all in subset to 0
+      which = -1; // Simply done by setting which to a dummy value;
+    }
+    return branch(solver, which);
+}
+
+double
+BonNWayBranchingObject::branch(OsiSolverInterface * solver, int which)
+{
+    const double * lower = solver->getColLower();
+    const double * upper = solver->getColUpper();
+    const int * members = object_->members();
+    for (size_t j = 0; j < order_.size(); j++) {
+        const int& iSequence = order_[j];
+        const int& iColumn = members[iSequence];
+        if (j != which) {
+            solver->setColUpper(iColumn, lower[iColumn]);
+            assert (lower[iColumn] > -1.0e20);
+        } else {
+            solver->setColLower(iColumn, upper[iColumn]);
+#ifdef FULL_PRINT
+            printf("Up Fix %d to %g\n", iColumn, upper[iColumn]);
+#endif
+            assert (upper[iColumn] < 1.0e20);
+            // apply any consequences
+            object_->applyConsequence(solver, iSequence, 9999);
+        }
+    }
+    if(which != -1){
+       for(std::list<int>::iterator k = skipped_.begin() ; k != skipped_.end() ; k++){
+           assert(upper[members[*k]] > lower[members[*k]] + 0.5);
+           solver->setColUpper(members[*k], lower[members[*k]]);
+       }
+    }
+    return 0.0;
+}
+
+}
+
diff --git a/experimental/RobotBonmin/BonNWayObject.hpp b/experimental/RobotBonmin/BonNWayObject.hpp
new file mode 100644
index 0000000..c152a27
--- /dev/null
+++ b/experimental/RobotBonmin/BonNWayObject.hpp
@@ -0,0 +1,203 @@
+// $Id$
+// Copyright (C) 2002, International Business Machines
+// Corporation and others.  All Rights Reserved.
+// This code is licensed under the terms of the Eclipse Public License (EPL).
+
+// Pierre Bonami 13/10/2011 copy and modify CbcNWay to adapt to use an OsiObject for Bonmin
+//
+// Edwin 11/9/2009-- carved out of CbcBranchActual
+
+/** Define an n-way class for variables.
+    Only valid value is one at UB others at LB
+    Normally 0-1
+*/
+#ifndef BonNWayObject_H
+#define BonNWayObject_H
+#include "OsiBranchingObject.hpp"
+#include "CbcConsequence.hpp"
+#include <list>
+
+namespace Bonmin {
+class n_way_consequences {
+public:
+  std::vector<int> indices;
+
+   n_way_consequences(): indices(){
+   }
+
+   n_way_consequences(const n_way_consequences& rhs): 
+        indices(rhs.indices){
+   }
+
+   n_way_consequences& operator=(const n_way_consequences& rhs){
+     if(this != &rhs){
+       indices = rhs.indices;
+     }
+     return *this;
+   }
+
+  n_way_consequences * clone() const{
+     return new n_way_consequences(*this);
+  }
+
+  void applyToSolver(OsiSolverInterface * solver, int state) const{
+     if(state < 0) return;
+     int num_one = 0;
+     for(size_t i = 0 ; i < indices.size() ; i++){
+         if(solver->getColLower()[indices[i]] > 0.9) num_one++;
+         solver->setColUpper(indices[i],solver->getColLower()[indices[i]]);
+     }
+     assert(num_one == 0);
+  }
+
+};
+
+class BonNWayObject : public OsiObject {
+
+public:
+
+    // Default Constructor
+    BonNWayObject ();
+
+    /** Useful constructor (which are matrix indices)
+    */
+    BonNWayObject (int numberMembers,
+             const int * which, int identifier);
+
+    // Copy constructor
+    BonNWayObject ( const BonNWayObject &);
+
+    /// Clone
+    virtual OsiObject * clone() const;
+
+    /// Assignment operator
+    BonNWayObject & operator=( const BonNWayObject& rhs);
+
+    /// Destructor
+    virtual ~BonNWayObject ();
+
+    /// Set up a consequence for a single member
+    void setConsequence(int iMember, const n_way_consequences & consequence);
+
+    /// Applies a consequence for a single member
+    void applyConsequence(OsiSolverInterface * solver,
+                          int iSequence, int state) const;
+
+    /// Infeasibility - large is 0.5 (and 0.5 will give this)
+    virtual double infeasibility(const OsiBranchingInformation * info,
+                                 int &preferredWay) const;
+
+    /// This looks at solution and sets bounds to contain solution
+    virtual double feasibleRegion(OsiSolverInterface * solver, const OsiBranchingInformation * info) const;
+
+    /// Creates a branching object
+    virtual OsiBranchingObject * createBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) const;
+
+    /// Number of members
+    inline size_t numberMembers() const {
+        return members_.size();
+    }
+
+    /// Members (indices in range 0 ... numberColumns-1)
+    inline const int * members() const {
+        return members_.data();
+    }
+
+    void set_bounds(std::vector<double> & bounds) const{
+      bounds_ = bounds;
+    }
+
+    void make_quick(){quicky_ = true;}
+
+    void set_only_frac_branches(int depth){
+      only_frac_branch_ = depth;
+    }
+private:
+    /// data
+
+    /// Members (indices in range 0 ... numberColumns-1)
+    std::vector<int> members_;
+    /// Consequences (normally NULL)
+    n_way_consequences ** consequence_;
+
+    /// Bounds on the members
+    mutable std::vector<double> bounds_;
+
+    /// Quicky only branch up on variables with non zero value
+    bool quicky_;
+    /// Only branch on fractional variables (last branch puts all of them to 0)
+    int only_frac_branch_;
+};
+/** N way branching Object class.
+    Variable is number of set.
+ */
+class BonNWayBranchingObject : public OsiBranchingObject {
+
+public:
+
+    // Default Constructor
+    BonNWayBranchingObject ();
+
+    /** Useful constructor - order had matrix indices
+        way_ -1 corresponds to setting first, +1 to second, +3 etc.
+        this is so -1 and +1 have similarity to normal
+    */
+    BonNWayBranchingObject (OsiSolverInterface * solver,  const BonNWayObject * nway,
+                            const std::vector<int>& order, const std::list<int>& skipped);
+
+    // Copy constructor
+    BonNWayBranchingObject ( const BonNWayBranchingObject &);
+
+    // Assignment operator
+    BonNWayBranchingObject & operator=( const BonNWayBranchingObject& rhs);
+
+    /// Clone
+    virtual OsiBranchingObject * clone() const;
+
+    // Destructor
+    virtual ~BonNWayBranchingObject ();
+
+    using OsiBranchingObject::branch ;
+    /// Does next branch and updates state
+    virtual double branch(OsiSolverInterface * solver);
+
+    /// Branch on specified  state
+    virtual double branch(OsiSolverInterface * solver, int state);
+
+    /** The number of branch arms created for this branching object
+    */
+    virtual int numberBranches() const {
+        return static_cast<int>(order_.size()) + (!skipped_.empty());
+    }
+    /// Is this a two way object (-1 down, +1 up)
+    virtual bool twoWay() const {
+        return false;
+    }
+
+    inline int var_branched_on(){
+      if(branchIndex_ > 0)
+        return object_->members()[order_[branchIndex_ - 1]];
+      return -1;
+    }
+
+    inline int seq_branched_on(){
+      if(branchIndex_ > 0)
+      return order_[branchIndex_ - 1];
+      return -1;
+    }
+
+    inline int state_branched_on(){
+      return branchIndex_ - 1;
+    }
+private:
+    /// Points back to object
+    const BonNWayObject * object_;
+    /// order of branching 
+    std::vector<int> order_;
+    /// Is only branching on a subset of variables (has to do a last branch with all variables in order set to 0)
+    std::list<int> skipped_;
+};
+
+}
+
+#endif
diff --git a/experimental/RobotBonmin/Makefile.am b/experimental/RobotBonmin/Makefile.am
new file mode 100644
index 0000000..df1ce37
--- /dev/null
+++ b/experimental/RobotBonmin/Makefile.am
@@ -0,0 +1,49 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 434 2007-03-28 12:58:54Z andreasw $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# What is done in this directory:
+
+bin_PROGRAMS = robotbonmin
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Apps` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin/Heuristics` \
+	$(BONMINLIB_CFLAGS) $(ASL_CFLAGS)
+
+########################################################################
+#                                robotbonmin                                  #
+########################################################################
+
+robotbonmin_SOURCES = Robot-bonmin.cpp \
+               RobotSetup.cpp RobotSetup.hpp \
+               BonNWayChoose.cpp  BonNWayChoose.hpp  BonNWayObject.cpp  BonNWayObject.hpp
+robotbonmin_LDADD = \
+	../../src/Interfaces/Ampl/libbonamplinterface.la \
+	../../src/CbcBonmin/libbonmin.la \
+	$(ASL_LIBS) \
+	$(BONMINLIB_LIBS)
+
+########################################################################
+#                         make distclean stuff                         #
+########################################################################
+
+CLEANFILES = 
+
+DISTCLEANFILES = 
diff --git a/experimental/RobotBonmin/Makefile.in b/experimental/RobotBonmin/Makefile.in
new file mode 100644
index 0000000..d2fa7d4
--- /dev/null
+++ b/experimental/RobotBonmin/Makefile.in
@@ -0,0 +1,614 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = robotbonmin$(EXEEXT)
+subdir = experimental/RobotBonmin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_robotbonmin_OBJECTS = Robot-bonmin.$(OBJEXT) RobotSetup.$(OBJEXT) \
+	BonNWayChoose.$(OBJEXT) BonNWayObject.$(OBJEXT)
+robotbonmin_OBJECTS = $(am_robotbonmin_OBJECTS)
+am__DEPENDENCIES_1 =
+robotbonmin_DEPENDENCIES =  \
+	../../src/Interfaces/Ampl/libbonamplinterface.la \
+	../../src/CbcBonmin/libbonmin.la $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/Interfaces -I$(top_builddir)/src/Interfaces
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(robotbonmin_SOURCES)
+DIST_SOURCES = $(robotbonmin_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Apps` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin/Heuristics` \
+	$(BONMINLIB_CFLAGS) $(ASL_CFLAGS)
+
+
+########################################################################
+#                                robotbonmin                                  #
+########################################################################
+robotbonmin_SOURCES = Robot-bonmin.cpp \
+               RobotSetup.cpp RobotSetup.hpp \
+               BonNWayChoose.cpp  BonNWayChoose.hpp  BonNWayObject.cpp  BonNWayObject.hpp
+
+robotbonmin_LDADD = \
+	../../src/Interfaces/Ampl/libbonamplinterface.la \
+	../../src/CbcBonmin/libbonmin.la \
+	$(ASL_LIBS) \
+	$(BONMINLIB_LIBS)
+
+
+########################################################################
+#                         make distclean stuff                         #
+########################################################################
+CLEANFILES = 
+DISTCLEANFILES = 
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  experimental/RobotBonmin/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  experimental/RobotBonmin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+robotbonmin$(EXEEXT): $(robotbonmin_OBJECTS) $(robotbonmin_DEPENDENCIES) 
+	@rm -f robotbonmin$(EXEEXT)
+	$(CXXLINK) $(robotbonmin_LDFLAGS) $(robotbonmin_OBJECTS) $(robotbonmin_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonNWayChoose.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonNWayObject.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Robot-bonmin.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/RobotSetup.Po at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/experimental/RobotBonmin/Robot-bonmin.cpp b/experimental/RobotBonmin/Robot-bonmin.cpp
new file mode 100644
index 0000000..742cfd8
--- /dev/null
+++ b/experimental/RobotBonmin/Robot-bonmin.cpp
@@ -0,0 +1,88 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+//
+// Date : 05/22/2010
+
+#include <iomanip>
+#include <fstream>
+
+#include "CoinPragma.hpp"
+#include "BonminConfig.h"
+#include "IpoptConfig.h"
+#include "CbcConfig.h"
+#include "CoinTime.hpp"
+#include "RobotSetup.hpp"
+#include "BonCbc.hpp"
+
+#define CATCH_ERRORS
+using namespace Bonmin;
+int main (int argc, char *argv[])
+{
+  using namespace Ipopt;
+  char * pbName = NULL;
+  
+  std::cout<<"Bonmin "
+           <<BONMIN_VERSION; 
+  std::cout<<" using Cbc "
+         <<CBC_VERSION; 
+  std::cout<<" and Ipopt "
+         <<IPOPT_VERSION<<std::endl; 
+  if(argc > 1) {
+    pbName = new char[strlen(argv[1])+1];
+    strcpy(pbName, argv[1]);
+  }
+#ifdef CATCH_ERRORS
+  try
+#endif 
+  {
+
+    //FILE * fp = fopen("log","w");
+    RobotSetup bonmin;
+    bonmin.initialize(argv);
+    Bab bb;
+
+    bb(bonmin);//do branch and bound
+
+  }
+#ifdef CATCH_ERRORS
+  catch(TNLPSolver::UnsolvedError *E) {
+    E->writeDiffFiles();
+    E->printError(std::cerr);
+    //There has been a failure to solve a problem with Ipopt.
+    //And we will output file with information on what has been changed in the problem to make it fail.
+    //Now depending on what algorithm has been called (B-BB or other) the failed problem may be at different place.
+    //    const OsiSolverInterface &si1 = (algo > 0) ? nlpSolver : *model.solver();
+  }
+  catch(OsiTMINLPInterface::SimpleError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+    <<std::endl
+    <<E.message()<<std::endl;
+  }
+  catch(CoinError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+    <<std::endl
+    <<E.message()<<std::endl;
+  }
+  catch (Ipopt::OPTION_INVALID &E)
+  {
+    std::cerr<<"Ipopt exception : "<<E.Message()<<std::endl;
+  }
+  catch (Ipopt::IpoptException &E)
+  {
+    std::cerr<<"Ipopt exception : "<<E.Message()<<std::endl;
+  }
+  catch(...) {
+    std::cerr<<pbName<<" unrecognized exception"<<std::endl;
+    std::cerr<<pbName<<"\t Finished \t exception"<<std::endl;
+    throw;
+  }
+#endif
+  
+  delete [] pbName;
+  return 0;
+}
+
diff --git a/experimental/RobotBonmin/RobotSetup.cpp b/experimental/RobotBonmin/RobotSetup.cpp
new file mode 100644
index 0000000..244dfc2
--- /dev/null
+++ b/experimental/RobotBonmin/RobotSetup.cpp
@@ -0,0 +1,190 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+//
+// Date : 05/22/2010
+
+#include <climits>
+
+#include "BonminConfig.h"
+#include "BonStrongBranchingSolver.hpp"
+
+#include "RobotSetup.hpp"
+#include "BonNWayObject.hpp"
+#include "BonNWayChoose.hpp"
+
+
+
+namespace Bonmin
+{
+  RobotSetup::RobotSetup(const CoinMessageHandler * handler):BonminSetup(handler)
+  {}
+
+  RobotSetup::RobotSetup(const RobotSetup &other):BonminSetup(other)
+  {}
+
+  RobotSetup::RobotSetup(const RobotSetup &other,
+                           OsiTMINLPInterface &nlp):
+      BonminSetup(other, nlp)
+  {
+  }
+
+  RobotSetup::RobotSetup(const RobotSetup &other,
+                           OsiTMINLPInterface &nlp,
+                           const std::string &prefix):
+    BonminSetup(other, nlp, prefix)
+  {
+    initializeRobot();
+  }
+
+  void RobotSetup::registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+     BonminSetup::registerAllOptions(roptions);
+     BonNWayChoose::registerOptions(roptions);
+
+
+    roptions->AddLowerBoundedIntegerOption("branch_on_frac_only",
+        "Starting at given depth branch on the subset of fractional variables (and set the last branch that one of them is 1)",
+        0,INT_MAX,"");
+
+    roptions->AddStringOption2("do_a_quick_one",
+        "Do we try our luck?",
+        "no",
+        "no", "Don't (of course).",
+        "yes", "Be crazy",
+        "");
+
+  }
+
+  /** Register all the Bonmin options.*/
+  void
+  RobotSetup::registerOptions()
+  {
+    registerAllOptions(roptions_);
+  }
+
+  /** Initialize, read options and create appropriate bonmin setup using initialized tminlp.*/
+  void
+  RobotSetup::initialize(Ipopt::SmartPtr<TMINLP> tminlp, bool createContinuousSolver /*= false*/)
+  {
+    BonminSetup::initialize(tminlp,createContinuousSolver);
+    initializeRobot();
+  }
+
+  /** Initialize, read options and create appropriate bonmin setup using initialized tminlp.*/
+  void
+  RobotSetup::initialize(const OsiTMINLPInterface &nlpSi, bool createContinuousSolver /*= false*/)
+  {
+    BonminSetup::initialize(nlpSi,createContinuousSolver);
+    initializeRobot();
+  }
+
+  void RobotSetup::initializeRobot()
+  {
+    assert(continuousSolver_ == nonlinearSolver_);
+
+    delete branchingMethod_;
+
+    continuousSolver_->deleteObjects();
+    continuousSolver_->findIntegersAndSOS(false);
+    setPriorities();
+    addNWays();
+    Ipopt::SmartPtr<StrongBranchingSolver> strong_solver = NULL;
+    nonlinearSolver_->SetStrongBrachingSolver(strong_solver);
+    BonNWayChoose* chooseVariable = new BonNWayChoose(*this,
+                                                      nonlinearSolver_);
+    branchingMethod_ = chooseVariable;
+    branchingMethod_->setNumberStrong(intParam_[NumberStrong]);
+
+  }
+
+  void
+  RobotSetup::addNWays()
+  {
+
+    int do_quick;
+    options()->GetEnumValue("do_a_quick_one", do_quick, prefix());
+    int depth_frac;
+    options()->GetIntegerValue("branch_on_frac_only", depth_frac, prefix());
+
+    // pass user set Sos constraints (code inspired from CoinSolve.cpp)
+    const TMINLP::SosInfo * sos = nonlinearSolver()->model()->sosConstraints();
+    if (!getIntParameter(BabSetupBase::DisableSos) && sos && sos->num > 0) //we have some sos constraints
+    {
+      const int & numSos = sos->num;
+      OsiObject ** objects = new OsiObject*[numSos];
+      const int * starts = sos->starts;
+      const int * indices = sos->indices;
+      //const char * types = sos->types;
+      const double * weights = sos->weights;
+      bool hasPriorities = false;
+      const int * varPriorities = nonlinearSolver()->getPriorities();
+      int numberObjects =  nonlinearSolver()->numberObjects();
+      if (varPriorities)
+      {
+        for (int i = 0 ; i < numberObjects ; i++) {
+          if (varPriorities[i]) {
+            hasPriorities = true;
+            break;
+          }
+        }
+      }
+      const int * sosPriorities = sos->priorities;
+      if (sosPriorities)
+      {
+        for (int i = 0 ; i < numSos ; i++) {
+          if (sosPriorities[i]) {
+            hasPriorities = true;
+            break;
+          }
+        }
+      }
+
+      std::vector<std::list<int> > groups(numSos + 1);
+
+      for (int i = 0 ; i < numSos ; i++)
+      {
+        int start = starts[i];
+        int length = starts[i + 1] - start;
+          for(int j = 0 ; j < length ; j++){
+              groups[(size_t) weights[j]].push_back(indices[start+j]);
+          }
+      }
+
+      for (int i = 0 ; i < numSos ; i++)
+      {
+        int start = starts[i];
+        int length = starts[i + 1] - start;
+          BonNWayObject * nway = new BonNWayObject(length, &indices[start],i);
+          nway->setPriority(1);
+          for(int j = 0 ; j < length ; j++){//Setup consequences
+             n_way_consequences cons;
+             std::vector<int>& ids = cons.indices;
+             int idx = (int) weights[j];
+             const std::list<int> &to_add = groups[idx];
+             for(std::list<int>::const_iterator k = to_add.begin() ; 
+                 k != to_add.end() ; k++){
+               if(*k != indices[start+j]) ids.push_back(*k);
+             }
+           nway->setConsequence(j, cons);
+          }
+          objects[i] = nway;
+
+        if(do_quick)
+          nway->make_quick();
+        nway->set_only_frac_branches(depth_frac);
+        if (hasPriorities && sosPriorities && sosPriorities[i]) {
+          objects[i]->setPriority(sosPriorities[i]);
+        }
+      }
+      nonlinearSolver()->addObjects(numSos, objects);
+      for (int i = 0 ; i < numSos ; i++)
+        delete objects[i];
+      delete [] objects;
+    }
+  }
+}/* end namespace Bonmin*/
+
diff --git a/experimental/RobotBonmin/RobotSetup.hpp b/experimental/RobotBonmin/RobotSetup.hpp
new file mode 100644
index 0000000..2dbbb01
--- /dev/null
+++ b/experimental/RobotBonmin/RobotSetup.hpp
@@ -0,0 +1,87 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#ifndef RobotSetup_H
+#define RobotSetup_H
+#include "BonBonminSetup.hpp"
+#include "BonAmplSetup.hpp"
+namespace Bonmin
+{
+  /** algorithm setup. */
+  class RobotSetup : public BonminSetup
+  {
+  public:
+    /** Default constructor. */
+    RobotSetup(const CoinMessageHandler * handler = NULL);
+    /** Copy constructor. */
+    RobotSetup(const RobotSetup & other);
+
+    /** Copy but uses an other nlp.*/
+    RobotSetup(const RobotSetup &setup,
+                OsiTMINLPInterface &nlp);
+
+    /** Copy but uses another nlp and algorithm.*/
+    RobotSetup(const RobotSetup &setup,
+                OsiTMINLPInterface &nlp,
+                const std::string & prefix);
+    /** virtual copy constructor. */
+    virtual BonminSetup * clone() const
+    {
+      return new RobotSetup(*this);
+    }
+    /** Make a copy with solver replace by one passed .*/
+    //    virtual BonminSetup *clone(OsiTMINLPInterface&nlp)const{
+    //      return new RobotSetup(*this, nlp);
+    //    }
+    /** Make a copy with solver replace by one passed .*/
+    RobotSetup *clone(OsiTMINLPInterface&nlp)const{
+      return new RobotSetup(*this, nlp);
+    }
+    /** Make a copy but take options with different prefix.*/
+    RobotSetup *clone(OsiTMINLPInterface &nlp, const std::string & prefix)const{
+      return new RobotSetup(*this, nlp, prefix);
+    }
+    virtual ~RobotSetup()
+    {}
+    /** @name Methods to instantiate: Registering and retrieving options and initializing everything. */
+    /** @{ */
+    /** Register all the options for this algorithm instance.*/
+    virtual void registerOptions();
+    /** @} */
+    /** Register all bonmin type executable options.*/
+    static void registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    /** Initialize, read options and create appropriate bonmin setup.*/
+    void initialize(Ipopt::SmartPtr<TMINLP> tminlp, bool createContinuousSolver = true);
+    /** Initialize, read options and create appropriate bonmin setup.*/
+    void initialize(const OsiTMINLPInterface& nlpSi, bool createContinuousSolver = true);
+
+    /** Ampl initialization*/
+void initialize(char **& argv)
+  {
+    readOptionsFile();
+    /* Read the model.*/
+    Ipopt::SmartPtr<AmplTMINLP> model = new AmplTMINLP(ConstPtr(journalist()), roptions(), options(),
+                                                argv, NULL, "bonmin", NULL);
+    mayPrintDoc();
+    initialize(Ipopt::GetRawPtr(model), true);
+  }
+
+
+
+  protected:
+    /** Add nway objects*/
+    void addNWays();
+    /** Initialize a branch-and-with robot nway.*/
+    void initializeRobot();
+  };
+}/** end namespace Bonmin*/
+
+#endif
+
diff --git a/experimental/Separable/BonHeuristicInnerApproximation.cpp b/experimental/Separable/BonHeuristicInnerApproximation.cpp
new file mode 100644
index 0000000..d74933e
--- /dev/null
+++ b/experimental/Separable/BonHeuristicInnerApproximation.cpp
@@ -0,0 +1,480 @@
+
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+//Test MySVN
+#include "BonHeuristicInnerApproximation.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+#include "BonSubMipSolver.hpp"
+#include "BonCbcLpStrategy.hpp"
+
+#ifdef COIN_HAS_CPX
+#include "OsiCpxSolverInterface.hpp"
+#endif
+
+#include "OsiClpSolverInterface.hpp"
+
+#include "OsiAuxInfo.hpp"
+
+#include "CoinTime.hpp"
+
+#include <fstream>
+
+#include <iomanip>
+
+#include "CoinHelperFunctions.hpp"
+
+#define DEBUG_BON_HEURISTIC
+
+using namespace std;
+
+namespace Bonmin {
+
+HeuristicInnerApproximation::HeuristicInnerApproximation(BonminSetup * setup) :
+  CbcHeuristic(), setup_(setup), howOften_(100), mip_(NULL),
+        nbAp_(50) {
+  Initialize(setup);
+}
+
+HeuristicInnerApproximation::HeuristicInnerApproximation(
+    const HeuristicInnerApproximation &copy) :
+    CbcHeuristic(copy),
+        setup_(copy.setup_), 
+        howOften_(copy.howOften_), 
+        mip_(new SubMipSolver(*copy.mip_)),
+        nbAp_(copy.nbAp_) {
+}
+
+HeuristicInnerApproximation &
+HeuristicInnerApproximation::operator=(const HeuristicInnerApproximation& rhs) {
+  if (this != &rhs) {
+    CbcHeuristic::operator=(rhs);
+    setup_ = rhs.setup_;
+    howOften_ = rhs.howOften_;
+                nbAp_ = rhs.nbAp_;
+    delete mip_;
+    if (rhs.mip_)
+      mip_ = new SubMipSolver(*rhs.mip_);
+  }
+  return *this;
+}
+
+void HeuristicInnerApproximation::registerOptions(Ipopt::SmartPtr<
+    Bonmin::RegisteredOptions> roptions) {
+  roptions->SetRegisteringCategory("Initial Approximations descriptions",
+      RegisteredOptions::UndocumentedCategory);
+  roptions->AddStringOption2("heuristic_inner_approximation",
+      "if yes runs the InnerApproximation heuristic", "yes", "no",
+      "don't run it", "yes", "runs the heuristic", "");
+
+        roptions->setOptionExtraInfo("heuristic_inner_approximation", 63);
+}
+
+void
+HeuristicInnerApproximation::Initialize(BonminSetup * b) {
+
+   delete mip_;
+   mip_ = new SubMipSolver (*b, "inner_approximation");
+   b->options()->GetIntegerValue("number_approximations_initial_outer",
+       nbAp_, b->prefix());
+}
+
+HeuristicInnerApproximation::~HeuristicInnerApproximation() {
+delete mip_;
+}
+
+/** Returns a feasible solution to the MINLP 
+ * The heuristic constructs a MIP based approximating all univariate functions appearing in nonlinear constraints 
+ * The linear approximation is obtained by adding inner chords linking pairs of points until covering the range of each variable **/
+int
+HeuristicInnerApproximation::solution(double &solutionValue, double *betterSolution)
+{
+if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+if ((model_->getNodeCount()%howOften_)!=0||model_->getCurrentPassNumber()>1)
+return 0;
+
+int returnCode = 0; // 0 means it didn't find a feasible solution
+
+OsiTMINLPInterface * nlp = NULL;
+if(setup_->getAlgorithm() == B_BB)
+nlp = dynamic_cast<OsiTMINLPInterface *>(model_->solver()->clone());
+else
+nlp = dynamic_cast<OsiTMINLPInterface *>(setup_->nonlinearSolver()->clone());
+
+TMINLP2TNLP* minlp = nlp->problem();
+// set tolerances
+double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+
+int numberColumns;
+int numberRows;
+int nnz_jac_g;
+int nnz_h_lag;
+Ipopt::TNLP::IndexStyleEnum index_style;
+minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+    nnz_h_lag, index_style);
+
+const Bonmin::TMINLP::VariableType* variableType = minlp->var_types();
+
+const double* x_sol = minlp->x_sol();
+
+double* newSolution = new double [numberColumns];
+memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+double* new_g_sol = new double [numberRows];
+
+bool feasible = true;
+// load the problem to OSI
+#ifdef DEBUG_BON_HEURISTIC
+cout << "Loading the problem to OSI\n";
+#endif
+OsiSolverInterface *si = mip_->solver(); // the MIP solver
+
+bool delete_si = false;
+if(si == NULL) {
+  si = new OsiClpSolverInterface;
+  mip_->setLpSolver(si);
+  delete_si = true;
+}
+CoinMessageHandler * handler = model_->messageHandler()->clone();
+si->passInMessageHandler(handler);
+si->messageHandler()->setLogLevel(2);
+#ifdef DEBUG_BON_HEURISTIC
+cout << "Loading problem into si\n";
+#endif
+extractInnerApproximation(*nlp, *si, newSolution, true); // Call the function construncting the inner approximation description 
+#ifdef DEBUG_BON_HEURISTIC
+cout << "problem loaded\n";
+cout << "**** Running optimization ****\n";
+#endif
+mip_->optimize(DBL_MAX, 2, 180); // Optimize the MIP
+#ifdef DEBUG_BON_HEURISTIC
+cout << "Optimization finished\n";
+#endif
+if(mip_->getLastSolution()) { // if the MIP solver returns a feasible solution
+  const double* solution = mip_->getLastSolution();
+  for (size_t iLCol=0;iLCol<numberColumns;iLCol++) {
+    newSolution[iLCol] = solution[iLCol];
+  }
+}
+else
+feasible = false;
+
+if(delete_si) {
+  delete si;
+}
+delete handler;
+
+const double* x_l = minlp->x_l();
+const double* x_u = minlp->x_u();
+const double* g_l = minlp->g_l();
+const double* g_u = minlp->g_u();
+double primalTolerance = 1.0e-6;
+#if 1
+if(feasible ) {
+
+  std::vector<double> memLow(numberColumns);
+  std::vector<double> memUpp(numberColumns);
+  std::copy(minlp->x_l(), minlp->x_l() + numberColumns, memLow.begin());
+  std::copy(minlp->x_u(), minlp->x_u() + numberColumns, memUpp.begin());
+  // fix the integer variables and solve the NLP
+  for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+        if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+          double value=floor(newSolution[iColumn]+0.5);
+          minlp->SetVariableUpperBound(iColumn, value);
+          minlp->SetVariableLowerBound(iColumn, value);
+        }
+  }
+  if(feasible) {
+    nlp->initialSolve();
+    if(minlp->optimization_status() != Ipopt::SUCCESS) {
+      feasible = false;
+    }
+    memcpy(newSolution,minlp->x_sol(),numberColumns*sizeof(double));
+  }
+
+ 
+  for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+    if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+        minlp->SetVariableUpperBound(iColumn, memUpp[iColumn]);
+        minlp->SetVariableLowerBound(iColumn, memLow[iColumn]);
+    }
+  }
+}
+#endif
+#endif
+
+if(feasible) {
+  double newSolutionValue;
+  minlp->eval_f(numberColumns, newSolution, true, newSolutionValue);
+  if(newSolutionValue < solutionValue) {
+    memcpy(betterSolution,newSolution,numberColumns*sizeof(double));
+    solutionValue = newSolutionValue;
+    returnCode = 1;
+  }
+}
+
+delete [] newSolution;
+delete [] new_g_sol;
+
+delete nlp;
+
+#ifdef DEBUG_BON_HEURISTIC
+std::cout<<"Inner approximation returnCode = "<<returnCode<<std::endl;
+#endif
+return returnCode;
+}
+
+/** Get an inner-approximation constraint obtained by drawing a chord linking the two given points x and x2. 
+ * This only applies to nonlinear constraints featuring univariate functions (f(x) <= y).**/
+bool
+HeuristicInnerApproximation::getMyInnerApproximation(OsiTMINLPInterface &si, OsiCuts &cs, int ind,
+    const double * x, const double * x2) {
+
+  int n, m, nnz_jac_g, nnz_h_lag;
+  Ipopt::TNLP::IndexStyleEnum index_style;
+        TMINLP2TNLP * problem = si.problem(); 
+  problem->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+
+  CoinPackedVector cut;
+  double lb = 0;
+  double ub = 0;
+
+  double infty = si.getInfinity();
+
+  lb = -infty; // we only compute <= constraints
+
+  double g = 0;
+  double g2 = 0;
+  double diff = 0;
+  double a = 0;
+  problem->eval_gi(n, x, 1, ind, g);
+  problem->eval_gi(n, x2, 1, ind, g2);
+  vector<int> jCol(n);
+  int nnz;
+  problem->eval_grad_gi(n, x2, 0, ind, nnz, jCol(), NULL);
+  vector<double> jValues(nnz);
+  problem->eval_grad_gi(n, x2, 0, ind, nnz, NULL, jValues());
+  bool add = false;
+  for (int i = 0; i < nnz; i++) {
+    const int &colIdx = jCol[i];
+    if(index_style == Ipopt::TNLP::FORTRAN_STYLE) jCol[i]--;
+    diff = x[colIdx] - x2[colIdx];
+
+    if (fabs(diff) >= 1e-8) {
+                   a = (g - g2) / diff;
+                   cut.insert(colIdx, a);
+                   ub = a * x[colIdx] - g;
+                   add = true;
+    } else
+                  cut.insert(colIdx, jValues[i]);
+  }
+
+  if (add) {
+
+    OsiRowCut newCut;
+    newCut.setGloballyValidAsInteger(1);
+    newCut.setLb(lb);
+    
+      //********* Perspective Extension ********//
+    int* ids = problem->get_const_xtra_id(); // vector of indices corresponding to the binary variable activating the corresponding constraint
+    int binary_id = (ids == NULL) ? -1 : ids[ind]; // Get the index of the corresponding indicator binary variable
+    if(binary_id>0) {// If this hyperplane is a linearization of a disjunctive constraint, we link its righthand side to the corresponding indicator binary variable
+        cut.insert(binary_id, -ub); // ∂x ≤ ub => ∂x - ub*z ≤ 0
+        newCut.setUb(0);
+    }
+    else
+        newCut.setUb(ub);
+    //********* Perspective Extension ********//
+
+    newCut.setRow(cut);
+    cs.insert(newCut);
+    return true;
+  }
+  return false;
+}
+void 
+HeuristicInnerApproximation::extractInnerApproximation(OsiTMINLPInterface & nlp, OsiSolverInterface &si,
+                                                       const double * x, bool getObj) {
+   int n;
+   int m;
+   int nnz_jac_g;
+   int nnz_h_lag;
+   Ipopt::TNLP::IndexStyleEnum index_style;
+   TMINLP2TNLP * problem = nlp.problem(); 
+   //Get problem information
+   problem->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+   
+   vector<int> jRow(nnz_jac_g);
+   vector<int> jCol(nnz_jac_g);
+   vector<double> jValues(nnz_jac_g);
+   problem->eval_jac_g(n, NULL, 0, m, nnz_jac_g, jRow(), jCol(), NULL);
+   if(index_style == Ipopt::TNLP::FORTRAN_STYLE)//put C-style
+   {
+     for(int i = 0 ; i < nnz_jac_g ; i++){
+       jRow[i]--;
+       jCol[i]--;
+     }
+   }
+   
+   //get Jacobian
+   problem->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL,
+       jValues());
+   
+   vector<double> g(m);
+   problem->eval_g(n, x, 1, m, g());
+   
+   vector<int> nonLinear(m);
+   //store non linear constraints (which are to be removed from IA)
+   int numNonLinear = 0;
+   const double * rowLower = nlp.getRowLower();
+   const double * rowUpper = nlp.getRowUpper();
+   const double * colLower = nlp.getColLower();
+   const double * colUpper = nlp.getColUpper();
+   assert(m == nlp.getNumRows());
+   double infty = si.getInfinity();
+   double nlp_infty = nlp.getInfinity();
+   vector<Ipopt::TNLP::LinearityType>  constTypes(m);
+   problem->get_constraints_linearity(m, constTypes());
+   for (int i = 0; i < m; i++) {
+     if (constTypes[i] == Ipopt::TNLP::NON_LINEAR) {
+       nonLinear[numNonLinear++] = i;
+     }
+   }
+   vector<double> rowLow(m - numNonLinear);
+   vector<double> rowUp(m - numNonLinear);
+   int ind = 0;
+   for (int i = 0; i < m; i++) {
+     if (constTypes[i] != Ipopt::TNLP::NON_LINEAR) {
+       if (rowLower[i] > -nlp_infty) {
+         //   printf("Lower %g ", rowLower[i]);
+         rowLow[ind] = (rowLower[i]);
+       } else
+         rowLow[ind] = -infty;
+       if (rowUpper[i] < nlp_infty) {
+         //   printf("Upper %g ", rowUpper[i]);
+         rowUp[ind] = (rowUpper[i]);
+       } else
+         rowUp[ind] = infty;
+       ind++;
+     }
+   
+   }
+   
+   CoinPackedMatrix mat(true, jRow(), jCol(), jValues(), nnz_jac_g);
+   mat.setDimensions(m, n); // In case matrix was empty, this should be enough
+   
+   //remove non-linear constraints
+   mat.deleteRows(numNonLinear, nonLinear());
+   
+   int numcols = nlp.getNumCols();
+   vector<double> obj(numcols);
+   for (int i = 0; i < numcols; i++)
+     obj[i] = 0.;
+   
+   si.loadProblem(mat, nlp.getColLower(), nlp.getColUpper(), 
+                  obj(), rowLow(), rowUp());
+   const Bonmin::TMINLP::VariableType* variableType = problem->var_types();
+   for (int i = 0; i < n; i++) {
+     if ((variableType[i] == TMINLP::BINARY) || (variableType[i]
+         == TMINLP::INTEGER))
+       si.setInteger(i);
+   }
+   if (getObj) {
+     bool addObjVar = false;
+     if (problem->hasLinearObjective()) {
+       double zero;
+       vector<double> x0(n, 0.);
+       problem->eval_f(n, x0(), 1, zero);
+       si.setDblParam(OsiObjOffset, -zero);
+       //Copy the linear objective and don't create a dummy variable.
+       problem->eval_grad_f(n, x, 1, obj());
+       si.setObjective(obj());
+     } else {
+       addObjVar = true;
+     }
+   
+     if (addObjVar) {
+       nlp.addObjectiveFunction(si, x);
+     }
+   }
+   
+   // Hassan IA initial description
+   int InnerDesc = 1;
+   if (InnerDesc == 1) {
+     OsiCuts cs;
+   
+     double * p = CoinCopyOfArray(colLower, n);
+     double * pp = CoinCopyOfArray(colLower, n);
+     double * up = CoinCopyOfArray(colUpper, n);
+   
+     const int& nbAp = nbAp_;
+     std::vector<int> nbG(m, 0);// Number of generated points for each nonlinear constraint
+   
+     std::vector<double> step(n);
+   
+     for (int i = 0; i < n; i++) {
+   
+       if (colUpper[i] > 1e08) {
+         up[i] = 0;
+       }
+   
+       if (colUpper[i] > 1e08 || colLower[i] < -1e08 || (variableType[i]
+           == TMINLP::BINARY) || (variableType[i] == TMINLP::INTEGER)) {
+         step[i] = 0;
+       } else
+         step[i] = (up[i] - colLower[i]) / (nbAp);
+   
+       if (colLower[i] < -1e08) {
+         p[i] = 0;
+         pp[i] = 0;
+       }
+   
+     }
+     vector<double> g_p(m);
+     vector<double> g_pp(m);
+   
+     for (int j = 1; j <= nbAp; j++) {
+   
+       for (int i = 0; i < n; i++) {
+         pp[i] += step[i];
+       }
+   
+       problem->eval_g(n, p, 1, m, g_p());
+       problem->eval_g(n, pp, 1, m, g_pp());
+       double diff = 0;
+       int varInd = 0;
+       for (int i = 0; (i < m && constTypes[i] == Ipopt::TNLP::NON_LINEAR); i++) {
+         if (varInd == n - 1)
+           varInd = 0;
+         diff = std::abs(g_p[i] - g_pp[i]);
+         if (nbG[i] < nbAp - 1) {
+           getMyInnerApproximation(nlp, cs, i, p, pp);// Generate a chord connecting the two points
+           p[varInd] = pp[varInd];
+           nbG[i]++;
+         }
+         varInd++;
+       }
+     }
+   
+     for(int i = 0; (i< m && constTypes[i] == Ipopt::TNLP::NON_LINEAR); i++) {
+      //  getConstraintOuterApproximation(cs, i, colUpper, NULL, true);// Generate Tangents at current point
+         getMyInnerApproximation(nlp, cs, i, p, up);// Generate a chord connecting the two points
+     }
+
+        delete [] p; 
+        delete [] pp;
+        delete [] up; 
+     si.applyCuts(cs);
+   }
+  }
+
+}
+
diff --git a/experimental/Separable/BonHeuristicInnerApproximation.hpp b/experimental/Separable/BonHeuristicInnerApproximation.hpp
new file mode 100644
index 0000000..16a4a31
--- /dev/null
+++ b/experimental/Separable/BonHeuristicInnerApproximation.hpp
@@ -0,0 +1,80 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#ifndef BonHeuristicInnerApproximation_HPP
+#define BonHeuristicInnerApproximation_HPP
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonBonminSetup.hpp"
+#include "CbcHeuristic.hpp"
+#include "CbcStrategy.hpp"
+
+namespace Bonmin {
+class SubMipSolver;
+class HeuristicInnerApproximation: public CbcHeuristic {
+public:
+
+	/// Constructor with setup
+	HeuristicInnerApproximation(BonminSetup * setup);
+
+	/// Copy constructor
+	HeuristicInnerApproximation(const HeuristicInnerApproximation &copy);
+
+	/// Destructor
+	~HeuristicInnerApproximation();
+
+	/// Assignment operator
+	HeuristicInnerApproximation & operator=(
+			const HeuristicInnerApproximation & rhs);
+
+	/// Clone
+	virtual CbcHeuristic * clone() const {
+		return new HeuristicInnerApproximation(*this);
+	}
+
+	/// Initialize method 
+	void Initialize(BonminSetup * setup);
+
+	/// Resets stuff if model changes
+	virtual void resetModel(CbcModel * model) {
+		setModel(model);
+	}
+
+	/// Performs heuristic
+	virtual int solution(double &solutionValue, double *betterSolution);
+
+	/** Register the options common to all local search based heuristics.*/
+	static void registerOptions(
+			Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+protected:
+	/** Setup to use for local searches (will make copies).*/
+	BonminSetup * setup_;
+
+private:
+	/// How often to do (code can change)
+	int howOften_;
+
+	/// A subsolver for MIP
+	SubMipSolver * mip_;
+
+        /// Number of Approximation points
+        int nbAp_;
+
+        void extractInnerApproximation(OsiTMINLPInterface & nlp, OsiSolverInterface &si,
+                                       const double * x, bool getObj);
+
+        bool getMyInnerApproximation(OsiTMINLPInterface &si, OsiCuts &cs, int ind,
+                const double * x, const double * x2);
+
+
+};
+}
+
+#endif
diff --git a/experimental/Separable/BonOuterDescription.cpp b/experimental/Separable/BonOuterDescription.cpp
new file mode 100644
index 0000000..7ddacd6
--- /dev/null
+++ b/experimental/Separable/BonOuterDescription.cpp
@@ -0,0 +1,378 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#include "BonOuterDescription.hpp"
+#include "BonOsiTMINLPInterface.hpp"
+
+namespace Bonmin{
+
+
+//Copied from OsiTMINLPInterface
+
+//A procedure to try to remove small coefficients in OA cuts (or make it non small
+static inline
+bool cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny)
+{
+  if(fabs(value)>= tiny) return 1;
+
+  if(fabs(value)<veryTiny) return 0;//Take the risk?
+
+  //try and remove
+  double infty = 1e20;
+  bool colUpBounded = colUpper < 10000;
+  bool colLoBounded = colLower > -10000;
+  bool rowNotLoBounded =  rowLower <= - infty;
+  bool rowNotUpBounded = rowUpper >= infty;
+  bool pos =  value > 0;
+
+  if(colLoBounded && pos && rowNotUpBounded) {
+    lb += value * (colsol - colLower);
+    return 0;
+  }
+  else
+    if(colLoBounded && !pos && rowNotLoBounded) {
+      ub += value * (colsol - colLower);
+      return 0;
+    }
+    else
+      if(colUpBounded && !pos && rowNotUpBounded) {
+        lb += value * (colsol - colUpper);
+        return 0;
+      }
+      else
+        if(colUpBounded && pos && rowNotLoBounded) {
+          ub += value * (colsol - colUpper);
+          return 0;
+        }
+  //can not remove coefficient increase it to smallest non zero
+  if(pos) value = tiny;
+  else
+    value = - tiny;
+  return 1;
+}
+
+
+/** Get the outer approximation constraints at provided point and only for the specified constraint 
+ * (ind is the constraint or row number).
+ * If x2 is different from NULL only add cuts violated by x2 by more than delta. **/
+void getMyOuterApproximation(
+                OsiTMINLPInterface &si, OsiCuts &cs, int ind,
+		const double * x, int getObj, const double * x2, double theta,
+		bool global) {
+	int n, m, nnz_jac_g, nnz_h_lag;
+	Ipopt::TNLP::IndexStyleEnum index_style;
+        TMINLP2TNLP* problem = si.problem();
+	problem->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+        double g_i = 0;
+	problem->eval_gi(n, x, 1, ind, g_i);
+        vector<int> jCol(n);
+        int nnz;
+        problem->eval_grad_gi(n, x, 0, ind, nnz, jCol(), NULL);
+        vector<double> jValues(nnz);
+        problem->eval_grad_gi(n, x, 0, ind, nnz, NULL, jValues());
+	//As jacobian is stored by cols fill OsiCuts with cuts
+	CoinPackedVector cut;
+	double lb;
+	double ub;
+
+	const double * rowLower = si.getRowLower();
+	const double * rowUpper = si.getRowUpper();
+	const double * colLower = si.getColLower();
+	const double * colUpper = si.getColUpper();
+	const double * duals = si.getRowPrice() + 2 * n;
+	double infty = si.getInfinity();
+	double nlp_infty = infty;
+	int rowIdx = ind;
+
+	if (rowLower[rowIdx] > -nlp_infty)
+		lb = rowLower[rowIdx] - g_i;
+	else
+		lb = -infty;
+	if (rowUpper[rowIdx] < nlp_infty)
+		ub = rowUpper[rowIdx] - g_i;
+	else
+		ub = infty;
+	if (rowLower[rowIdx] > -infty && rowUpper[rowIdx] < infty) {
+		if (duals[rowIdx] >= 0)// <= inequality
+			lb = -infty;
+		if (duals[rowIdx] <= 0)// >= inequality
+			ub = infty;
+	}
+
+        double tiny = 1e-08;
+        double veryTiny = 1e-20;
+
+	for (int i = 0; i < nnz; i++) {
+	  if(index_style == Ipopt::TNLP::FORTRAN_STYLE) jCol[i]--;
+	  const int &colIdx = jCol[i];
+	//"clean" coefficient
+	if (cleanNnz(jValues[i], colLower[colIdx], colUpper[colIdx],
+			rowLower[rowIdx], rowUpper[rowIdx], x[colIdx], lb, ub,
+			tiny, veryTiny)) {
+		cut.insert(colIdx, jValues[i]);
+        
+		if (lb > -infty)
+		lb += jValues[i] * x[colIdx];
+		if (ub < infty)
+		ub += jValues[i] * x[colIdx];
+	}
+	}
+
+
+	bool add = true;
+	//Compute cut violation
+	if (x2 != NULL) {
+		double rhs = cut.dotProduct(x2);
+		double violation = 0.;
+		if (ub < infty)
+			violation = std::max(violation, fabs(rhs - ub));
+		if (lb > -infty)
+			violation = std::max(violation, fabs(lb - rhs));
+		if (violation < theta) {
+			add = false;
+		}
+	} 
+	OsiRowCut newCut;
+	//    if(lb[i]>-1e20) assert (ub[i]>1e20);
+
+	if (add) {
+		if (global) {
+		newCut.setGloballyValidAsInteger(1);
+		}
+		//newCut.setEffectiveness(99.99e99);
+
+        //********* Perspective Extension ********//
+        const int* ids = problem->get_const_xtra_id(); // vector of indices corresponding to the binary variable activating the corresponding constraint
+        // Get the index of the corresponding indicator binary variable
+        int binary_id = (ids == NULL) ? -1 : ids[ind];// index corresponding to the binary variable activating the corresponding constraint
+        if(binary_id>0) {// If this hyperplane is a linearization of a disjunctive constraint, we link its righthand (or lefthand) side to the corresponding indicator binary variable
+            if (lb > -infty) { // ∂x ≥ lb => ∂x - lb*z ≥ 0
+                cut.insert(binary_id, -lb);
+                newCut.setLb(0);
+                newCut.setUb(ub);
+                
+            }
+            if (ub < infty) { // ∂x ≤ ub => ∂x - ub*z ≤ 0
+                cut.insert(binary_id, -ub);
+                newCut.setLb(lb);
+                newCut.setUb(0);
+                
+            }
+        }
+        else {
+            newCut.setLb(lb);
+            newCut.setUb(ub);
+        }
+        //********* Perspective Extension ********//
+
+		newCut.setRow(cut);
+		//newCut.print();
+		cs.insert(newCut);
+	}
+}
+    
+/* Old Uniform sampling method
+void addOuterDescription(OsiTMINLPInterface &nlp, OsiSolverInterface &si,
+		const double * x, int nbAp, bool getObj) {
+	int n;
+	int m;
+	int nnz_jac_g;
+	int nnz_h_lag;
+	Ipopt::TNLP::IndexStyleEnum index_style;
+	//Get problem information
+        TMINLP2TNLP* problem = nlp.problem();
+	problem->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+   const double * colLower = nlp.getColLower();
+   const double * colUpper = nlp.getColUpper();
+   const Bonmin::TMINLP::VariableType* variableType = problem->var_types();
+   vector<Ipopt::TNLP::LinearityType>  constTypes(m);
+   problem->get_constraints_linearity(m, constTypes());
+	// Hassan OA initial description
+	int OuterDesc = 0;
+	if (OuterDesc == 0) {
+		OsiCuts cs;
+
+		double * p = CoinCopyOfArray(nlp.getColLower(), n);
+		double * pp = CoinCopyOfArray(nlp.getColLower(), n);
+		double * up = CoinCopyOfArray(nlp.getColUpper(), n);
+		//b->options()->GetIntegerValue("number_approximations_initial_outer",nbAp, b->prefix());
+		std::vector<int> nbG(m, 0);// Number of generated points for each nonlinear constraint
+
+		std::vector<double> step(n);
+
+		for (int i = 0; i < n; i++) {
+
+			if (colUpper[i] > 1e08) {
+				up[i] = 0;
+			}
+
+			if (colUpper[i] > 1e08 || colLower[i] < -1e08 || (variableType[i]
+					== TMINLP::BINARY) || (variableType[i] == TMINLP::INTEGER)) {
+				step[i] = 0;
+			} else
+				step[i] = (up[i] - colLower[i]) / (nbAp);
+
+			if (colLower[i] < -1e08) {
+				p[i] = 0;
+				pp[i] = 0;
+			}
+		}
+		vector<double> g_p(m);
+		vector<double> g_pp(m);
+		for (int i = 0; (i < m); i++) {
+                        if(constTypes[i] != Ipopt::TNLP::NON_LINEAR) continue;
+			getMyOuterApproximation(nlp, cs, i, p, 0, NULL, 10000, true);// Generate Tangents at current point    	 
+		}
+		for (int j = 1; j <= nbAp; j++) {
+
+			for (int i = 0; i < n; i++) {
+				pp[i] += step[i];
+			}
+
+		
+		problem->eval_g(n, p, 1, m, g_p());
+		problem->eval_g(n, pp, 1, m, g_pp());
+		double diff = 0;
+		int varInd = 0;
+		for (int i = 0; (i < m); i++) {
+                        if(constTypes[i] != Ipopt::TNLP::NON_LINEAR) continue;
+			if (varInd == n - 1)
+				varInd = 0;
+			diff = std::abs(g_p[i] - g_pp[i]);
+
+			if (nbG[i] < nbAp && diff ) {
+				getMyOuterApproximation(nlp, cs, i, pp, 0, NULL, 10000, true);// Generate Tangents at current point
+				p[varInd] = pp[varInd];
+				nbG[i]++;
+			}
+			varInd++;
+		}
+		}
+		for (int i = 0; i < m ; i++) {
+                        if(constTypes[i] != Ipopt::TNLP::NON_LINEAR) continue;
+			getMyOuterApproximation(nlp, cs, i, up, 0, NULL, 10000, true);// Generate Tangents at current point
+		}
+		
+		si.applyCuts(cs);
+		delete [] p;
+		delete [] pp;
+		delete [] up;
+	}
+
+} */
+    // New curvature based sampling method
+    void addOuterDescription(OsiTMINLPInterface &nlp, OsiSolverInterface &si,
+                             const double * x, int nbAp, bool getObj) {
+        int n;
+        int m;
+        int nnz_jac_g;
+        int nnz_h_lag;
+        Ipopt::TNLP::IndexStyleEnum index_style;
+        //Get problem information
+        TMINLP2TNLP* problem = nlp.problem();
+        problem->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+        
+        const double * colLower = nlp.getColLower();
+        const double * colUpper = nlp.getColUpper();
+        const Bonmin::TMINLP::VariableType* variableType = problem->var_types();
+        vector<Ipopt::TNLP::LinearityType>  constTypes(m);
+        problem->get_constraints_linearity(m, constTypes());
+        // Hassan OA initial description
+        int OuterDesc = 0;
+        if (OuterDesc == 0) {
+            OsiCuts cs;
+            
+            double * p = CoinCopyOfArray(nlp.getColLower(), n);
+            double * pp = CoinCopyOfArray(nlp.getColLower(), n);
+            double * up = CoinCopyOfArray(nlp.getColUpper(), n);
+            //b->options()->GetIntegerValue("number_approximations_initial_outer",nbAp, b->prefix());
+            std::vector<int> nbG(m, 2);// Number of generated points for each nonlinear constraint, we always generate two cuts at lower and upper bounds.
+            
+            std::vector<double> step(n);
+            
+            for (int i = 0; i < n; i++) {
+                
+                if (colUpper[i] > 1e08) {
+                    up[i] = 0;
+                }
+                
+                if (colUpper[i] > 1e08 || colLower[i] < -1e08 || (variableType[i]
+                                                                  == TMINLP::BINARY) || (variableType[i] == TMINLP::INTEGER)) {
+                    step[i] = 0;
+                } else
+                    step[i] = (up[i] - colLower[i]) / 2e02; // if step[i]!=0 then variable i appears in one univariate nonlinear function, a small step is computed in order to perform curavture based sampling
+                
+                if (colLower[i] < -1e08) {
+                    p[i] = 0;
+                    pp[i] = 0;
+                }
+            }
+            vector<double> g_p(m);
+            double g_p_i, g_pp_i;
+            problem->eval_g(n, p, 1, m, g_p()); // Evaluate function g at lowerbounds
+            vector<double> g_pp(m);
+            vector<double> g_up(m);
+            problem->eval_g(n, up, 1, m, g_up()); // Evaluate function g at upperbounds
+            
+            for (int i = 0; (i < m); i++) {
+                if(constTypes[i] != Ipopt::TNLP::NON_LINEAR) continue;
+                getMyOuterApproximation(nlp, cs, i, p, 0, NULL, 10000, true);// Generate Tangents at lowerbounds    	 
+            }
+            vector<double> thr(m); // minimum threshold value for the variation of function g (curvature) for generating a cut at point pp
+            for (int i = 0; i < m; i++) {
+                thr[i] = std::abs(g_up[i]-g_p[i])/nbAp;
+            }
+            double diff = 0;
+            for (int i = 0; (i < m); i++) { // Generate Outer-Approximation initial cuts for all nonlinear constraints
+                if(constTypes[i] != Ipopt::TNLP::NON_LINEAR) continue;
+                p = CoinCopyOfArray(nlp.getColLower(), n); // For each nonlinear constraint reset all points to lowerbounds
+                pp = CoinCopyOfArray(nlp.getColLower(), n);
+                while (nbG[i] < nbAp) { // Iterate untill the number of initial approximations is reached for each nonlinear constraint
+                
+                    // Curvature sampling
+                    for (int j = 0; j < n; j++) {
+                        pp[j] += step[j];
+                    }
+                    problem->eval_gi(n, p, 1, i, g_p_i);
+                    problem->eval_gi(n, pp, 1, i, g_pp_i);
+                    diff = std::abs(g_p_i - g_pp_i);  
+                        
+                    if (diff>=thr[i] ) {
+                        getMyOuterApproximation(nlp, cs, i, pp, 0, NULL, 10000, true);// Generate Tangents at current point
+                        for (int j = 0; j < n; j++) {
+                            p[j] = pp[j]; // Move all previous points to the current one
+                        }
+                        
+                        nbG[i]++;
+                    }
+                }
+                
+            }
+            
+            for (int i = 0; i < m ; i++) {
+                if(constTypes[i] != Ipopt::TNLP::NON_LINEAR) continue;
+                getMyOuterApproximation(nlp, cs, i, up, 0, NULL, 10000, true);// Generate Tangents at upperbounds
+            }
+            
+            si.applyCuts(cs);
+            delete [] p;
+            delete [] pp;
+            delete [] up;
+        
+        }
+
+
+    }
+}
+
diff --git a/experimental/Separable/BonOuterDescription.hpp b/experimental/Separable/BonOuterDescription.hpp
new file mode 100644
index 0000000..c6208d3
--- /dev/null
+++ b/experimental/Separable/BonOuterDescription.hpp
@@ -0,0 +1,38 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#ifndef OuterDescription_H
+#define OuterDescription_H
+
+#define INT_BIAS 0e-8
+
+#include <string>
+#include <iostream>
+
+#include "BonOsiTMINLPInterface.hpp"
+#include "CoinWarmStartBasis.hpp"
+
+#include "BonCutStrengthener.hpp"
+
+namespace Bonmin {
+
+	/** Get the outer approximation constraints at provided point and only for the specified constraint (ind is the constraint or row number).
+	 If x2 is different from NULL only add cuts violated by x2 by more than delta. **/
+	void getMyOuterApproximation(OsiTMINLPInterface &si,
+                                     OsiCuts &cs, int ind, const double * x,
+			             int getObj, const double * x2,
+                                     double theta, bool global);
+
+/** Adds an outer description of problem to linear formulation.*/
+void addOuterDescription(OsiTMINLPInterface &nlp, OsiSolverInterface &si,
+		const double * x, int nbAp, bool getObj);
+
+}
+#endif
diff --git a/experimental/Separable/Makefile.am b/experimental/Separable/Makefile.am
new file mode 100644
index 0000000..97bc0f8
--- /dev/null
+++ b/experimental/Separable/Makefile.am
@@ -0,0 +1,54 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 434 2007-03-28 12:58:54Z andreasw $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# What is done in this directory:
+
+bin_PROGRAMS = sepa
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Apps` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin/Heuristics` \
+	$(BONMINLIB_CFLAGS) $(ASL_CFLAGS)
+
+########################################################################
+#                                sepa                                  #
+########################################################################
+
+sepa_SOURCES = Sepa.cpp \
+               SepaSetup.cpp SepaSetup.hpp \
+               SepaTMINLP2OsiLP.cpp  SepaTMINLP2OsiLP.hpp \
+               SepaHeuristicInnerApproximation.hpp \
+               SepaHeuristicInnerApproximation.cpp \
+               BonOuterDescription.cpp \
+               BonOuterDescription.hpp
+
+sepa_LDADD = \
+	../../src/Interfaces/Ampl/libbonamplinterface.la \
+	../../src/CbcBonmin/libbonmin.la \
+	$(ASL_LIBS) \
+	$(BONMINLIB_LIBS)
+
+########################################################################
+#                         make distclean stuff                         #
+########################################################################
+
+CLEANFILES = 
+
+DISTCLEANFILES = 
diff --git a/experimental/Separable/Makefile.in b/experimental/Separable/Makefile.in
new file mode 100644
index 0000000..ebcca2b
--- /dev/null
+++ b/experimental/Separable/Makefile.in
@@ -0,0 +1,620 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = sepa$(EXEEXT)
+subdir = experimental/Separable
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_sepa_OBJECTS = Sepa.$(OBJEXT) SepaSetup.$(OBJEXT) \
+	SepaTMINLP2OsiLP.$(OBJEXT) \
+	SepaHeuristicInnerApproximation.$(OBJEXT) \
+	BonOuterDescription.$(OBJEXT)
+sepa_OBJECTS = $(am_sepa_OBJECTS)
+am__DEPENDENCIES_1 =
+sepa_DEPENDENCIES = ../../src/Interfaces/Ampl/libbonamplinterface.la \
+	../../src/CbcBonmin/libbonmin.la $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/Interfaces -I$(top_builddir)/src/Interfaces
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(sepa_SOURCES)
+DIST_SOURCES = $(sepa_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Apps` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin/Heuristics` \
+	$(BONMINLIB_CFLAGS) $(ASL_CFLAGS)
+
+
+########################################################################
+#                                sepa                                  #
+########################################################################
+sepa_SOURCES = Sepa.cpp \
+               SepaSetup.cpp SepaSetup.hpp \
+               SepaTMINLP2OsiLP.cpp  SepaTMINLP2OsiLP.hpp \
+               SepaHeuristicInnerApproximation.hpp \
+               SepaHeuristicInnerApproximation.cpp \
+               BonOuterDescription.cpp \
+               BonOuterDescription.hpp
+
+sepa_LDADD = \
+	../../src/Interfaces/Ampl/libbonamplinterface.la \
+	../../src/CbcBonmin/libbonmin.la \
+	$(ASL_LIBS) \
+	$(BONMINLIB_LIBS)
+
+
+########################################################################
+#                         make distclean stuff                         #
+########################################################################
+CLEANFILES = 
+DISTCLEANFILES = 
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  experimental/Separable/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  experimental/Separable/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+sepa$(EXEEXT): $(sepa_OBJECTS) $(sepa_DEPENDENCIES) 
+	@rm -f sepa$(EXEEXT)
+	$(CXXLINK) $(sepa_LDFLAGS) $(sepa_OBJECTS) $(sepa_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOuterDescription.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Sepa.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SepaHeuristicInnerApproximation.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SepaSetup.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SepaTMINLP2OsiLP.Po at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/experimental/Separable/Sepa.cpp b/experimental/Separable/Sepa.cpp
new file mode 100644
index 0000000..73cede0
--- /dev/null
+++ b/experimental/Separable/Sepa.cpp
@@ -0,0 +1,89 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#include <iomanip>
+#include <fstream>
+
+#include "CoinPragma.hpp"
+#include "BonminConfig.h"
+#include "IpoptConfig.h"
+#include "CbcConfig.h"
+#include "CoinTime.hpp"
+#include "SepaSetup.hpp"
+#include "BonCbc.hpp"
+
+#define CATCH_ERRORS
+int main (int argc, char *argv[])
+{
+  using namespace Ipopt;
+  char * pbName = NULL;
+  
+  std::cout<<"Bonmin "
+           <<BONMIN_VERSION; 
+  std::cout<<" using Cbc "
+         <<CBC_VERSION; 
+  std::cout<<" and Ipopt "
+         <<IPOPT_VERSION<<std::endl; 
+  if(argc > 1) {
+    pbName = new char[strlen(argv[1])+1];
+    strcpy(pbName, argv[1]);
+  }
+#define CATCH_ERRORS 
+#ifdef CATCH_ERRORS
+  try
+#endif 
+  {
+
+    //FILE * fp = fopen("log","w");
+    Sepa::SepaSetup bonmin;
+    bonmin.initialize(argv);
+    Bonmin::Bab bb;
+
+    bb(bonmin);//do branch and bound
+
+  }
+#ifdef CATCH_ERRORS
+  catch(Bonmin::TNLPSolver::UnsolvedError *E) {
+    E->writeDiffFiles();
+    E->printError(std::cerr);
+    //There has been a failure to solve a problem with Ipopt.
+    //And we will output file with information on what has been changed in the problem to make it fail.
+    //Now depending on what algorithm has been called (B-BB or other) the failed problem may be at different place.
+    //    const OsiSolverInterface &si1 = (algo > 0) ? nlpSolver : *model.solver();
+  }
+  catch(Bonmin::OsiTMINLPInterface::SimpleError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+    <<std::endl
+    <<E.message()<<std::endl;
+  }
+  catch(CoinError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+    <<std::endl
+    <<E.message()<<std::endl;
+  }
+  catch (Ipopt::OPTION_INVALID &E)
+  {
+    std::cerr<<"Ipopt exception : "<<E.Message()<<std::endl;
+  }
+  catch (Ipopt::IpoptException &E)
+  {
+    std::cerr<<"Ipopt exception : "<<E.Message()<<std::endl;
+  }
+  catch(...) {
+    std::cerr<<pbName<<" unrecognized exception"<<std::endl;
+    std::cerr<<pbName<<"\t Finished \t exception"<<std::endl;
+    throw;
+  }
+#endif
+  
+  delete [] pbName;
+  return 0;
+}
+
diff --git a/experimental/Separable/SepaHeuristicInnerApproximation.cpp b/experimental/Separable/SepaHeuristicInnerApproximation.cpp
new file mode 100644
index 0000000..acbd5f8
--- /dev/null
+++ b/experimental/Separable/SepaHeuristicInnerApproximation.cpp
@@ -0,0 +1,498 @@
+
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+//Test MySVN
+#include "SepaHeuristicInnerApproximation.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+#include "BonSubMipSolver.hpp"
+#include "BonCbcLpStrategy.hpp"
+
+#ifdef COIN_HAS_CPX
+#include "OsiCpxSolverInterface.hpp"
+#endif
+
+#include "OsiClpSolverInterface.hpp"
+
+#include "OsiAuxInfo.hpp"
+
+#include "CoinTime.hpp"
+
+#include <fstream>
+
+#include <iomanip>
+
+#include "CoinHelperFunctions.hpp"
+
+//#define DEBUG_BON_HEURISTIC
+
+namespace Sepa{
+
+HeuristicInnerApproximation::HeuristicInnerApproximation(Bonmin::BonminSetup * setup) :
+  CbcHeuristic(), setup_(setup), howOften_(100), mip_(NULL),
+        nbAp_(50), time_limit_(10.) {
+  Initialize(setup);
+}
+
+HeuristicInnerApproximation::HeuristicInnerApproximation(
+    const HeuristicInnerApproximation &copy) :
+    CbcHeuristic(copy),
+        setup_(copy.setup_), 
+        howOften_(copy.howOften_), 
+        mip_(new Bonmin::SubMipSolver(*copy.mip_)),
+        nbAp_(copy.nbAp_),
+        time_limit_(copy.time_limit_)
+ {
+}
+
+HeuristicInnerApproximation &
+HeuristicInnerApproximation::operator=(const HeuristicInnerApproximation& rhs) {
+  if (this != &rhs) {
+    CbcHeuristic::operator=(rhs);
+    setup_ = rhs.setup_;
+    howOften_ = rhs.howOften_;
+                nbAp_ = rhs.nbAp_;
+    delete mip_;
+    if (rhs.mip_)
+      mip_ = new Bonmin::SubMipSolver(*rhs.mip_);
+  }
+  return *this;
+}
+
+void HeuristicInnerApproximation::registerOptions(Ipopt::SmartPtr<
+    Bonmin::RegisteredOptions> roptions) {
+  roptions->SetRegisteringCategory("Initial Approximations descriptions",
+      Bonmin::RegisteredOptions::UndocumentedCategory);
+  roptions->AddStringOption2("heuristic_inner_approximation",
+      "if yes runs the InnerApproximation heuristic", "yes", "no",
+      "don't run it", "yes", "runs the heuristic", "");
+
+ roptions->setOptionExtraInfo("heuristic_inner_approximation", 63);
+
+ roptions->AddLowerBoundedIntegerOption("number_inner_approximation_points",
+       "Set the number of points to use for linear inner approximation of nonlinear functions in heuristic",
+       1, 20);
+ roptions->setOptionExtraInfo("number_inner_approximation_points", 63);
+
+ roptions->AddLowerBoundedNumberOption("inner_time_limit",
+       "Time limit for inner approximation",
+       0, true, 10, "");
+ roptions->setOptionExtraInfo("number_inner_approximation_points", 63);
+}
+
+void
+HeuristicInnerApproximation::Initialize(Bonmin::BonminSetup * b) {
+
+   delete mip_;
+   mip_ = new Bonmin::SubMipSolver (*b, "inner_approximation");
+   b->options()->GetIntegerValue("number_inner_approximation_points",
+       nbAp_, b->prefix());
+   b->options()->GetNumericValue("inner_time_limit",
+       time_limit_, b->prefix());
+}
+
+HeuristicInnerApproximation::~HeuristicInnerApproximation() {
+delete mip_;
+}
+
+/** Returns a feasible solution to the MINLP 
+ * The heuristic constructs a MIP based approximating all univariate functions appearing in nonlinear constraints 
+ * The linear approximation is obtained by adding inner chords linking pairs of points until covering the range of each variable **/
+int
+HeuristicInnerApproximation::solution(double &solutionValue, double *betterSolution)
+{
+if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+if ((model_->getNodeCount()%howOften_)!=0||model_->getCurrentPassNumber()>1)
+return 0;
+
+int returnCode = 0; // 0 means it didn't find a feasible solution
+
+Bonmin::OsiTMINLPInterface * nlp = NULL;
+if(setup_->getAlgorithm() == Bonmin::B_BB)
+nlp = dynamic_cast<Bonmin::OsiTMINLPInterface *>(model_->solver()->clone());
+else
+nlp = dynamic_cast<Bonmin::OsiTMINLPInterface *>(setup_->nonlinearSolver()->clone());
+
+Bonmin::TMINLP2TNLP* minlp = nlp->problem();
+// set tolerances
+
+//double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+
+int numberColumns;
+int numberRows;
+int nnz_jac_g;
+int nnz_h_lag;
+Ipopt::TNLP::IndexStyleEnum index_style;
+minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+    nnz_h_lag, index_style);
+
+//const Bonmin::TMINLP::VariableType* variableType = minlp->var_types();
+
+const double* x_sol = minlp->x_sol();
+
+double* newSolution = new double [numberColumns];
+memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+double* new_g_sol = new double [numberRows];
+
+bool feasible = true;
+// load the problem to OSI
+#ifdef DEBUG_BON_HEURISTIC
+std::cout << "Loading the problem to OSI\n";
+#endif
+OsiSolverInterface *si = mip_->solver(); // the MIP solver
+
+bool delete_si = false;
+if(si == NULL) {
+  si = new OsiClpSolverInterface;
+  mip_->setLpSolver(si);
+  delete_si = true;
+}
+CoinMessageHandler * handler = model_->messageHandler()->clone();
+si->passInMessageHandler(handler);
+si->messageHandler()->setLogLevel(2);
+#ifdef DEBUG_BON_HEURISTIC
+std::cout << "Loading problem into si\n";
+#endif
+extractInnerApproximation(*nlp, *si, newSolution, true); // Call the function construncting the inner approximation description 
+#ifdef DEBUG_BON_HEURISTIC
+std::cout << "problem loaded\n";
+std::cout << "**** Running optimization ****\n";
+#endif
+mip_->optimize(DBL_MAX, 2, time_limit_); // Optimize the MIP
+#ifdef DEBUG_BON_HEURISTIC
+std::cout << "Optimization finished\n";
+#endif
+if(mip_->getLastSolution()) { // if the MIP solver returns a feasible solution
+  const double* solution = mip_->getLastSolution();
+  std::copy(solution, solution + numberColumns, newSolution);
+  }
+  else
+  feasible = false;
+
+if(delete_si) {
+  delete si;
+}
+delete handler;
+
+
+#if 0 // Set to 1 if you need to test the feasibility of the returned solution
+const double* x_l = minlp->x_l();
+const double* x_u = minlp->x_u();
+const double* g_l = minlp->g_l();
+const double* g_u = minlp->g_u();
+double primalTolerance = 1.0e-6;
+
+Bonmin::vector<Ipopt::TNLP::LinearityType>  constTypes(numberRows);
+minlp->get_constraints_linearity(numberRows, constTypes());
+feasible = true;
+for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+  double value=newSolution[iColumn];
+  if(value - x_l[iColumn] < -1e-8|| value - x_u[iColumn] > 1e-8) {
+    std::cout<<"Solution found infeasible because: "<<std::endl;
+    std::cout<<"x_l["<<iColumn<<"]= "<<x_l[iColumn]<<" "
+    <<"x_sol["<<iColumn<<"]= "<<value<<" "
+    <<"x_u["<<iColumn<<"]= "<<x_u[iColumn]<<std::endl;
+    feasible = false;
+    break;
+  }
+}
+minlp->eval_g(numberColumns, newSolution, true,
+    numberRows, new_g_sol);
+for(int iRow=0; iRow<numberRows; iRow++) {
+  if(new_g_sol[iRow]<g_l[iRow]-primalTolerance ||
+      new_g_sol[iRow]>g_u[iRow]+primalTolerance) {
+      std::cout<<"It should be infeasible because: "<<std::endl;
+      std::cout<<"g_l["<<iRow<<"]= "<<g_l[iRow]<<" "
+      <<"g_sol["<<iRow<<"]= "<<new_g_sol[iRow]<<" "
+      <<"g_u["<<iRow<<"]= "<<g_u[iRow]<<std::endl;
+      std::cout<<"primalTolerance= "<<primalTolerance<<std::endl;
+      if(constTypes[iRow] == Ipopt::TNLP::NON_LINEAR)
+      std::cout<<"nonLinear constraint number "<<iRow<<std::endl;
+      feasible = false;
+  }
+}
+std::cout<<"Every thing is feasible"<<std::endl;
+#endif
+
+if(feasible) {
+  double newSolutionValue;
+  minlp->eval_f(numberColumns, newSolution, true, newSolutionValue);
+  if(newSolutionValue < solutionValue) {
+    memcpy(betterSolution,newSolution,numberColumns*sizeof(double));
+    solutionValue = newSolutionValue;
+    returnCode = 1;
+  }
+}
+
+delete [] newSolution;
+delete [] new_g_sol;
+
+delete nlp;
+
+#ifdef DEBUG_BON_HEURISTIC
+std::cout<<"Inner approximation returnCode = "<<returnCode<<std::endl;
+#endif
+return returnCode;
+}
+
+/** Get an inner-approximation constraint obtained by drawing a chord linking the two given points x and x2. 
+ * This only applies to nonlinear constraints featuring univariate functions (f(x) <= y).**/
+bool
+HeuristicInnerApproximation::getMyInnerApproximation(Bonmin::OsiTMINLPInterface &si, OsiCuts &cs, int ind,
+    const double * x, const double * x2) {
+
+  int n, m, nnz_jac_g, nnz_h_lag;
+  Ipopt::TNLP::IndexStyleEnum index_style;
+  Bonmin::TMINLP2TNLP * problem = si.problem(); 
+  problem->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+  double infty = si.getInfinity();
+
+
+  CoinPackedVector cut;
+  double lb = -infty;
+  double ub = 0;
+
+
+  double g = 0;
+  double g2 = 0;
+  double diff = 0;
+  double a = 0;
+  problem->eval_gi(n, x, 1, ind, g);
+  problem->eval_gi(n, x2, 1, ind, g2);
+  Bonmin::vector<int> jCol(n);
+  int nnz;
+  problem->eval_grad_gi(n, x2, 0, ind, nnz, jCol(), NULL);
+  Bonmin::vector<double> jValues(nnz);
+  problem->eval_grad_gi(n, x2, 0, ind, nnz, NULL, jValues());
+  bool add = false;
+  //printf("const %i nnz %i\n", ind, nnz);
+  for (int i = 0; i < nnz; i++) {
+    const int &colIdx = jCol[i];
+    if(index_style == Ipopt::TNLP::FORTRAN_STYLE) jCol[i]--;
+    diff = x[colIdx] - x2[colIdx];
+
+    if (fabs(diff) >= 1e-8) {
+       a = (g - g2) / diff;
+       cut.insert(colIdx, a);
+       ub = (a * x[colIdx] - g) - fabs(a * x[colIdx] - g)*1e-6;
+       //printf("const %i col %i p[col] %g pp[col] %g g %g g2 %g diff %g\n",ind, colIdx, x[colIdx], x2[colIdx], g, g2, diff);
+       add = true;
+    } else {
+       cut.insert(colIdx, jValues[i]);
+       //printf("const %i col %i val %g\n",ind, colIdx, jValues[i]);
+    }
+  }
+
+  if (add) {
+
+    OsiRowCut newCut;
+    newCut.setGloballyValidAsInteger(1);
+    newCut.setLb(lb);
+    
+      //********* Perspective Extension ********//
+    int binary_id = 0; // index corresponding to the binary variable activating the corresponding constraint
+    const int* ids = problem->get_const_xtra_id(); // vector of indices corresponding to the binary variable activating the corresponding constraint
+    // Get the index of the corresponding indicator binary variable
+    binary_id = (ids == NULL) ? -1 : ids[ind];
+    if(binary_id>0) {// If this hyperplane is a linearization of a disjunctive constraint, we link its righthand side to the corresponding indicator binary variable
+        cut.insert(binary_id, -ub); // ∂x ≤ ub => ∂x - ub*z ≤ 0
+        newCut.setUb(0);
+    }
+    else
+        newCut.setUb(ub);
+    //********* Perspective Extension ********//
+
+    newCut.setRow(cut);
+    cs.insert(newCut);
+    //newCut.print();
+    return true;
+  }
+  return false;
+}
+
+void 
+HeuristicInnerApproximation::extractInnerApproximation(Bonmin::OsiTMINLPInterface & nlp, OsiSolverInterface &si,
+  const double * x, bool getObj) {
+   printf("************  Start extracting inner approx");
+   int n;
+   int m;
+   int nnz_jac_g;
+   int nnz_h_lag;
+   Ipopt::TNLP::IndexStyleEnum index_style;
+   Bonmin::TMINLP2TNLP * problem = nlp.problem(); 
+   //Get problem information
+   problem->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+   
+   Bonmin::vector<int> jRow(nnz_jac_g);
+   Bonmin::vector<int> jCol(nnz_jac_g);
+   Bonmin::vector<double> jValues(nnz_jac_g);
+   problem->eval_jac_g(n, NULL, 0, m, nnz_jac_g, jRow(), jCol(), NULL);
+   if(index_style == Ipopt::TNLP::FORTRAN_STYLE)//put C-style
+   {
+     for(int i = 0 ; i < nnz_jac_g ; i++){
+       jRow[i]--;
+       jCol[i]--;
+     }
+   }
+   
+   //get Jacobian
+   problem->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL,
+       jValues());
+   
+   Bonmin::vector<double> g(m);
+   problem->eval_g(n, x, 1, m, g());
+   
+   Bonmin::vector<int> nonLinear(m);
+   //store non linear constraints (which are to be removed from IA)
+   int numNonLinear = 0;
+   const double * rowLower = nlp.getRowLower();
+   const double * rowUpper = nlp.getRowUpper();
+   const double * colLower = nlp.getColLower();
+   const double * colUpper = nlp.getColUpper();
+   assert(m == nlp.getNumRows());
+   double infty = si.getInfinity();
+   double nlp_infty = nlp.getInfinity();
+   Bonmin::vector<Ipopt::TNLP::LinearityType>  constTypes(m);
+   Bonmin::vector<Ipopt::TNLP::LinearityType>  varTypes(n);
+   problem->get_constraints_linearity(m, constTypes());
+   problem->get_variables_linearity(n, varTypes());
+   for (int i = 0; i < m; i++) {
+     if (constTypes[i] == Ipopt::TNLP::NON_LINEAR) {
+       nonLinear[numNonLinear++] = i;
+     }
+   }
+   Bonmin::vector<double> rowLow(m - numNonLinear);
+   Bonmin::vector<double> rowUp(m - numNonLinear);
+   int ind = 0;
+   for (int i = 0; i < m; i++) {
+     if (constTypes[i] != Ipopt::TNLP::NON_LINEAR) {
+       if (rowLower[i] > -nlp_infty) {
+         //   printf("Lower %g ", rowLower[i]);
+         rowLow[ind] = (rowLower[i]);
+       } else
+         rowLow[ind] = -infty;
+       if (rowUpper[i] < nlp_infty) {
+         //   printf("Upper %g ", rowUpper[i]);
+         rowUp[ind] = (rowUpper[i]);
+       } else
+         rowUp[ind] = infty;
+       ind++;
+     }
+   
+   }
+   
+   CoinPackedMatrix mat(true, jRow(), jCol(), jValues(), nnz_jac_g);
+   mat.setDimensions(m, n); // In case matrix was empty, this should be enough
+   
+   //remove non-linear constraints
+   mat.deleteRows(numNonLinear, nonLinear());
+   
+   int numcols = nlp.getNumCols();
+   Bonmin::vector<double> obj(numcols);
+   for (int i = 0; i < numcols; i++)
+     obj[i] = 0.;
+   
+   si.loadProblem(mat, nlp.getColLower(), nlp.getColUpper(), 
+                  obj(), rowLow(), rowUp());
+   const Bonmin::TMINLP::VariableType* variableType = problem->var_types();
+   for (int i = 0; i < n; i++) {
+     if ((variableType[i] == Bonmin::TMINLP::BINARY) || (variableType[i] == Bonmin::TMINLP::INTEGER))
+       si.setInteger(i);
+   }
+   if (getObj) {
+     bool addObjVar = false;
+     if (problem->hasLinearObjective()) {
+       double zero;
+       Bonmin::vector<double> x0(n, 0.);
+       problem->eval_f(n, x0(), 1, zero);
+       si.setDblParam(OsiObjOffset, -zero);
+       //Copy the linear objective and don't create a dummy variable.
+       problem->eval_grad_f(n, x, 1, obj());
+       si.setObjective(obj());
+     } else {
+       addObjVar = true;
+     }
+   
+     if (addObjVar) {
+       nlp.addObjectiveFunction(si, x);
+     }
+   }
+   
+   // Hassan IA initial description
+   int InnerDesc = 1;
+   if (InnerDesc == 1) {
+     OsiCuts cs;
+   
+     double * p = CoinCopyOfArray(colLower, n);
+     double * pp = CoinCopyOfArray(colLower, n);
+     double * up = CoinCopyOfArray(colUpper, n);
+   
+     for (int i = 0; i < n; i++) {
+       if (p[i] < -1e3){
+          p[i] = pp[i] = -1e3;
+       }
+       if (up[i] > 1e2){
+          up[i] = 1e2;
+       }
+     } 
+
+     const int& nbAp = nbAp_;
+     printf("Generating approximation with %i points.\n", nbAp);
+   
+     std::vector<double> step(n);
+     int n_lin = 0;
+   
+     for (int i = 0; i < n; i++) {
+       //if ((variableType[i] == Bonmin::TMINLP::BINARY) || (variableType[i] == Bonmin::TMINLP::INTEGER)) {
+       if (varTypes[i] == Ipopt::TNLP::LINEAR) {
+         n_lin ++;
+         step[i] = 0;
+         p[i] = pp[i] = up[i] = 0;
+       }
+       else {
+         step[i] = (up[i] - p[i]) / (nbAp);
+       }
+     }
+     printf("Number of linears %i\n", n_lin);
+   
+     for (int j = 1; j < nbAp; j++) {
+   
+       for (int i = 0; i < n; i++) {
+         pp[i] += step[i];
+       }
+   
+       for (int i = 0; (i < m ); i++) {
+         if (constTypes[i] == Ipopt::TNLP::LINEAR) continue;
+         bool status = getMyInnerApproximation(nlp, cs, i, p, pp);// Generate a chord connecting the two points
+         if(status == false){
+           printf("Error in generating inner approximation\n");
+           exit(1);
+         }
+       }
+       std::copy(pp, pp+n, p);
+      
+     }
+   
+     for(int i = 0; (i< m); i++) {
+         if (constTypes[i] == Ipopt::TNLP::LINEAR) continue;
+         getMyInnerApproximation(nlp, cs, i, p, up);// Generate a chord connecting the two points
+     }
+
+        delete [] p; 
+        delete [] pp;
+        delete [] up; 
+     si.applyCuts(cs);
+   }
+   printf("************  Done extracting inner approx ********");
+  }
+
+}
+
diff --git a/experimental/Separable/SepaHeuristicInnerApproximation.hpp b/experimental/Separable/SepaHeuristicInnerApproximation.hpp
new file mode 100644
index 0000000..2d3d348
--- /dev/null
+++ b/experimental/Separable/SepaHeuristicInnerApproximation.hpp
@@ -0,0 +1,86 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#ifndef BonHeuristicInnerApproximation_HPP
+#define BonHeuristicInnerApproximation_HPP
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonBonminSetup.hpp"
+#include "CbcHeuristic.hpp"
+#include "CbcStrategy.hpp"
+
+namespace Bonmin {
+class SubMipSolver;
+}
+
+namespace Sepa{
+class HeuristicInnerApproximation: public CbcHeuristic {
+public:
+
+	/// Constructor with setup
+	HeuristicInnerApproximation(Bonmin::BonminSetup * setup);
+
+	/// Copy constructor
+	HeuristicInnerApproximation(const HeuristicInnerApproximation &copy);
+
+	/// Destructor
+	~HeuristicInnerApproximation();
+
+	/// Assignment operator
+	HeuristicInnerApproximation & operator=(
+			const HeuristicInnerApproximation & rhs);
+
+	/// Clone
+	virtual CbcHeuristic * clone() const {
+		return new HeuristicInnerApproximation(*this);
+	}
+
+	/// Initialize method 
+	void Initialize(Bonmin::BonminSetup * setup);
+
+	/// Resets stuff if model changes
+	virtual void resetModel(CbcModel * model) {
+		setModel(model);
+	}
+
+	/// Performs heuristic
+	virtual int solution(double &solutionValue, double *betterSolution);
+
+	/** Register the options common to all local search based heuristics.*/
+	static void registerOptions(
+			Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+protected:
+	/** Setup to use for local searches (will make copies).*/
+	Bonmin::BonminSetup * setup_;
+
+private:
+	/// How often to do (code can change)
+	int howOften_;
+
+	/// A subsolver for MIP
+	Bonmin::SubMipSolver * mip_;
+
+        /// Number of Approximation points
+        int nbAp_;
+
+        /// Time limit for mip
+        double time_limit_;
+
+        void extractInnerApproximation(Bonmin::OsiTMINLPInterface & nlp, OsiSolverInterface &si,
+                                       const double * x, bool getObj);
+
+        bool getMyInnerApproximation(Bonmin::OsiTMINLPInterface &si, OsiCuts &cs, int ind,
+                const double * x, const double * x2);
+
+
+};
+}
+
+#endif
diff --git a/experimental/Separable/SepaSetup.cpp b/experimental/Separable/SepaSetup.cpp
new file mode 100644
index 0000000..703a895
--- /dev/null
+++ b/experimental/Separable/SepaSetup.cpp
@@ -0,0 +1,139 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#include "BonminConfig.h"
+#include "OsiClpSolverInterface.hpp"
+
+#include "SepaSetup.hpp"
+#include "SepaTMINLP2OsiLP.hpp"
+#include "SepaHeuristicInnerApproximation.hpp"
+#include "BonOuterDescription.hpp"
+
+namespace Sepa
+{
+  SepaSetup::SepaSetup(const CoinMessageHandler * handler):BonminSetup(handler)
+  {
+  }
+
+  SepaSetup::SepaSetup(const SepaSetup &other):BonminSetup(other)
+  {}
+
+  SepaSetup::SepaSetup(const SepaSetup &other,
+                           Bonmin::OsiTMINLPInterface &nlp):
+      BonminSetup(other, nlp)
+  {
+  }
+
+  SepaSetup::SepaSetup(const SepaSetup &other,
+                           Bonmin::OsiTMINLPInterface &nlp,
+                           const std::string &prefix):
+    BonminSetup(other, nlp, prefix)
+  {
+   Bonmin::Algorithm algo = getAlgorithm();
+    if (algo == Bonmin::B_OA)
+      initializeSepa();
+  }
+
+  void SepaSetup::registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+     Bonmin::BonminSetup::registerAllOptions(roptions);
+
+     Sepa::HeuristicInnerApproximation::registerOptions(roptions);
+
+     roptions->SetRegisteringCategory("Initial Approximations descriptions", Bonmin::RegisteredOptions::UndocumentedCategory);
+     roptions->AddStringOption2("initial_outer_description",
+                                "Do we add all Outer Approximation constraints defining the initial Outer Approximation "
+                                "description of the MINLP. See the number_approximations_initial_outer option for fixing the "
+                                "number of approximation points",
+                                "yes", "no","Do not generate the description", "yes","Generate the description",
+                                "");
+
+     roptions->AddUpperBoundedIntegerOption("number_approximations_initial_outer",
+                                            "Number of Outer Approximation points needed for generating the initial Outer Approximation description, maximum value = 500, default value = 50",
+                                            500, 50, "");
+  }
+
+  /** Register all the Bonmin options.*/
+  void
+  SepaSetup::registerOptions()
+  {
+    registerAllOptions(roptions_);
+  }
+
+  /** Initialize, read options and create appropriate bonmin setup using initialized tminlp.*/
+  void
+  SepaSetup::initialize(Ipopt::SmartPtr<Bonmin::TMINLP> tminlp, bool createContinuousSolver /*= false*/)
+  {
+
+    int do_outer;
+    int n_approx;
+    options()->GetEnumValue("initial_outer_description", do_outer, prefix_.c_str());
+    options()->GetIntegerValue("number_approximations_initial_outer",
+                               n_approx, prefix_.c_str());
+    SepaTMINLP2OsiLP* linearizer = new SepaTMINLP2OsiLP;
+    linearizer_ = linearizer;
+    if(do_outer)
+      linearizer->set_num_approx(n_approx);
+
+    Bonmin::BonminSetup::initialize(tminlp, createContinuousSolver);
+
+    if (getAlgorithm() == Bonmin::B_OA)
+      initializeSepa();
+  }
+
+  /** Initialize, read options and create appropriate bonmin setup using initialized tminlp.*/
+  void
+  SepaSetup::initialize(const Bonmin::OsiTMINLPInterface &nlpSi, bool createContinuousSolver /*= false*/)
+  {
+    int do_outer;
+    int n_approx;
+    options()->GetEnumValue("initial_outer_description", do_outer, prefix_.c_str());
+    options()->GetIntegerValue("number_approximations_initial_outer",
+                               n_approx, prefix_.c_str());
+    SepaTMINLP2OsiLP* linearizer = new SepaTMINLP2OsiLP;
+    linearizer_ = linearizer;
+    if(do_outer)
+      linearizer->set_num_approx(n_approx);
+    
+    BonminSetup::initialize(nlpSi, createContinuousSolver);
+    if (getAlgorithm() == Bonmin::B_OA)
+      initializeSepa();
+  }
+
+  void SepaSetup::initializeSepa()
+  {
+
+
+    int doOuter;
+    int nbAp = 10;
+    options()->GetEnumValue("initial_outer_description", doOuter, prefix_.c_str());
+    options()->GetIntegerValue("number_approximations_initial_outer",
+                               nbAp, prefix_.c_str());
+
+#ifdef USE_OLD_FUNC
+    if(doOuter)
+      addOuterDescription(*nonlinearSolver(), *continuousSolver(), nonlinearSolver()->getColSolution(), nbAp, false);
+#endif
+  
+    int doInner;
+    
+    options()->GetEnumValue("heuristic_inner_approximation", doInner, prefix_.c_str());
+    if(doInner){
+      Sepa::HeuristicInnerApproximation * inner = new Sepa::HeuristicInnerApproximation(this);
+      HeuristicMethod h;
+      h.heuristic = inner;
+      h.id = "InnerApproximation";
+      heuristics_.push_back(h);
+    }
+
+  }
+
+}/* end namespace Bonmin*/
+
diff --git a/experimental/Separable/SepaSetup.hpp b/experimental/Separable/SepaSetup.hpp
new file mode 100644
index 0000000..aa2e7e5
--- /dev/null
+++ b/experimental/Separable/SepaSetup.hpp
@@ -0,0 +1,85 @@
+// (C) Copyright CNRS and others 2010
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Université de la Méditérannée
+// Hassan Hijazi, Orange Labs
+//
+// Date : 05/22/2010
+
+#ifndef SepaSetup_H
+#define SepaSetup_H
+#include "BonBonminSetup.hpp"
+#include "BonAmplSetup.hpp"
+namespace Sepa
+{
+  /** algorithm setup. */
+  class SepaSetup : public Bonmin::BonminSetup
+  {
+  public:
+    /** Default constructor. */
+    SepaSetup(const CoinMessageHandler * handler = NULL);
+    /** Copy constructor. */
+    SepaSetup(const SepaSetup & other);
+
+    /** Copy but uses an other nlp.*/
+    SepaSetup(const SepaSetup &setup,
+                Bonmin::OsiTMINLPInterface &nlp);
+
+    /** Copy but uses another nlp and algorithm.*/
+    SepaSetup(const SepaSetup &setup,
+                Bonmin::OsiTMINLPInterface &nlp,
+                const std::string & prefix);
+    /** virtual copy constructor. */
+    virtual BabSetupBase * clone() const
+    {
+      return new SepaSetup(*this);
+    }
+    /** Make a copy with solver replace by one passed .*/
+    //    virtual BabSetupBase *clone(OsiTMINLPInterface&nlp)const{
+    //      return new SepaSetup(*this, nlp);
+    //    }
+    /** Make a copy with solver replace by one passed .*/
+    SepaSetup *clone(Bonmin::OsiTMINLPInterface&nlp)const{
+      return new SepaSetup(*this, nlp);
+    }
+    /** Make a copy but take options with different prefix.*/
+    SepaSetup *clone(Bonmin::OsiTMINLPInterface &nlp, const std::string & prefix)const{
+      return new SepaSetup(*this, nlp, prefix);
+    }
+    virtual ~SepaSetup()
+    {}
+    /** @name Methods to instantiate: Registering and retrieving options and initializing everything. */
+    /** @{ */
+    /** Register all the options for this algorithm instance.*/
+    virtual void registerOptions();
+    /** @} */
+    /** Register all bonmin type executable options.*/
+    static void registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    /** Initialize, read options and create appropriate bonmin setup.*/
+    void initialize(Ipopt::SmartPtr<Bonmin::TMINLP> tminlp, bool createContinuousSolver = true);
+    /** Initialize, read options and create appropriate bonmin setup.*/
+    void initialize(const Bonmin::OsiTMINLPInterface& nlpSi, bool createContinuousSolver = true);
+
+    /** Ampl initialization*/
+void initialize(char **& argv)
+  {
+    readOptionsFile();
+    /* Read the model.*/
+    Ipopt::SmartPtr<Bonmin::AmplTMINLP> model = new Bonmin::AmplTMINLP(ConstPtr(journalist()), roptions(), options(),
+                                                argv, NULL, "bonmin", NULL);
+    mayPrintDoc();
+    initialize(Ipopt::GetRawPtr(model), true);
+  }
+
+
+
+  protected:
+    /** Initialize a branch-and-cut with some OA.*/
+    void initializeSepa();
+  };
+}/** end namespace Bonmin*/
+
+#endif
+
diff --git a/experimental/Separable/SepaTMINLP2OsiLP.cpp b/experimental/Separable/SepaTMINLP2OsiLP.cpp
new file mode 100644
index 0000000..b195772
--- /dev/null
+++ b/experimental/Separable/SepaTMINLP2OsiLP.cpp
@@ -0,0 +1,512 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/16/2007
+#include "SepaTMINLP2OsiLP.hpp"
+#include "BonTypes.hpp"
+#include "OsiSolverInterface.hpp"
+#include "BonTMINLP2TNLP.hpp"
+#include "CoinPackedMatrix.hpp"
+
+#include <vector>
+#include <sstream>
+#include <climits>
+
+using namespace Ipopt;
+
+namespace Sepa {
+
+void
+SepaTMINLP2OsiLP::extract(OsiSolverInterface *si, 
+                     const double * x, bool getObj)
+{
+  assert(IsValid(model_));
+  int n;
+  int m;
+  int nnz_jac_g;
+  int nnz_h_lag;
+  TNLP::IndexStyleEnum index_style;
+  //Get problem information
+  model_->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+  //get Jacobian
+  model_->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL, value_());
+
+
+  Bonmin::vector<double> g(m);
+  model_->eval_g(n, x, 1, m, g());
+
+  Bonmin::vector<double> rowLow(m);
+  Bonmin::vector<double> rowUp(m);
+
+
+
+  const double * rowLower = model_->g_l();
+  const double * rowUpper = model_->g_u();
+  const double * colLower = model_->x_l();
+  const double * colUpper = model_->x_u();
+
+  double nlp_infty = si->getInfinity();
+  double infty = DBL_MAX;
+
+  for(int i = 0 ; i < m ; i++) {
+    if(const_types_[i] == Ipopt::TNLP::NON_LINEAR) {
+      if(rowLower[i] > - nlp_infty){
+        rowLow[i] = (rowLower[i] - g[i]) - 1e-07;
+      }
+      else
+        rowLow[i] = - infty;
+      if(rowUpper[i] < nlp_infty)
+        rowUp[i] =  (rowUpper[i] - g[i]) + 1e-07;
+      else
+        rowUp[i] = infty;
+    }
+    else {
+      if(rowLower[i] > -nlp_infty){
+         rowLow[i] = (rowLower[i]);
+      }
+      else
+        rowLow[i] = - infty;
+      if(rowUpper[i] < nlp_infty){
+         rowUp[i] =  (rowUpper[i]);
+      }
+      else
+        rowUp[i] = infty;
+    }
+  }
+
+  
+  
+  //Then convert everything to a CoinPackedMatrix
+  //Go through values, clean coefficients and fix bounds
+  for(int i = 0 ; i < nnz_jac_g ; i++) {
+    if(const_types_[iRow_[i]] != TNLP::LINEAR){//For linear just copy is fine.
+       if(//For other clean tinys
+       cleanNnz(value_[i],colLower[jCol_[i]], colUpper[jCol_[i]],
+                rowLower[iRow_[i]], rowUpper[iRow_[i]],
+                x[jCol_[i]],
+                rowLow[iRow_[i]],
+                rowUp[iRow_[i]], tiny_, very_tiny_)) {      
+          if(rowLow[iRow_[i]] > -infty)
+            rowLow[iRow_[i]] += value_[i] * x[jCol_[i]];
+          if(rowUp[iRow_[i]] < infty)
+            rowUp[iRow_[i]] += value_[i] *x[jCol_[i]];
+       }
+    }
+  }
+  CoinPackedMatrix mat(true, iRow_(), jCol_(), value_(), nnz_jac_g);
+  mat.setDimensions(m,n); // In case matrix was empty, this should be enough
+  
+#if 0
+  vector<double> act(m);
+  mat.times(x, act());
+  for(int j = 0 ; j < m ; j++){
+    if(j==10  && fabs(x[0] - 4.73032) < 1e-4)
+    assert(act[j] + 1e-5 > rowLow[j] && act[j] - 1e-5 < rowUp[j] + g[j]);
+  }
+#endif
+
+  Bonmin::vector<double> obj(n);
+  for(int i = 0 ; i < n; i++)
+    obj[i] = 0.;
+  
+  
+  si->loadProblem(mat, colLower, colUpper, obj(), rowLow(), rowUp());
+  for(int i = 0 ; i < n ; i++) {
+    if(model_->var_types()[i] == Bonmin::TMINLP::BINARY || model_->var_types()[i] == Bonmin::TMINLP::INTEGER )
+      si->setInteger(i);
+  }
+  if(getObj) {
+     if(model_->hasLinearObjective()){
+       double zero;
+       Bonmin::vector<double> x0(n,0.);
+       model_->eval_f(n, x0(), 1, zero);
+       si->setDblParam(OsiObjOffset, -zero);
+       //Copy the linear objective and don't create a dummy variable.
+       model_->eval_grad_f(n, x, 1,obj());
+       si->setObjective(obj());
+    }
+    else {
+      throw -1;
+   }
+   
+  }
+  
+  OsiCuts cs;
+  get_oas(cs, x, 0, 1);
+  si->applyCuts(cs);
+
+  
+}
+ 
+void 
+SepaTMINLP2OsiLP::get_oas(OsiCuts &cs, const double *x, bool getObj, bool global) const {
+
+  int n,m, nnz_jac_g, nnz_h_lag;
+  TNLP::IndexStyleEnum index_style;
+  model_->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+  Bonmin::vector<double> g(m);
+
+  model_->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL, value_());
+  model_->eval_g(n,x,0,m,g());
+
+  //As jacobian is stored by cols fill OsiCuts with cuts
+  Bonmin::vector<double> lb(m + 1);
+  Bonmin::vector<double> ub(m + 1);
+
+  Bonmin::vector<int> row2cutIdx(m,-1);//store correspondance between index of row and index of cut (some cuts are not generated for rows because linear, or not binding). -1 if constraint does not generate a cut, otherwise index in cuts.
+
+  std::vector<int> cut2rowIdx;
+
+  int numCuts = 0;
+
+  const double * rowLower = model_->g_l();
+  const double * rowUpper = model_->g_u();
+  const double * colLower = model_->x_l();
+  const double * colUpper = model_->x_u();
+  double nlp_infty = infty_;
+  double infty = DBL_MAX;
+  
+  for(int rowIdx = 0; rowIdx < m ; rowIdx++) {
+    if(const_types_[rowIdx] == TNLP::NON_LINEAR) {
+      row2cutIdx[rowIdx] = numCuts;
+      cut2rowIdx.push_back(rowIdx);
+      if(rowLower[rowIdx] > - nlp_infty)
+        lb[numCuts] = rowLower[rowIdx] - g[rowIdx];
+      else
+        lb[numCuts] = - infty;
+      if(rowUpper[rowIdx] < nlp_infty)
+        ub[numCuts] = rowUpper[rowIdx] - g[rowIdx];
+      else
+        ub[numCuts] = infty;
+      numCuts++;
+    }
+  }
+
+  lb.resize(numCuts);
+  ub.resize(numCuts);
+  Bonmin::vector<CoinPackedVector>  cuts(numCuts);
+
+
+  for(int i = 0 ; i < nnz_jac_g ; i++) {
+    const int &rowIdx = iRow_[i];
+    const int & cutIdx = row2cutIdx[ rowIdx ];
+    if(cutIdx != -1) {
+      const int &colIdx = jCol_[i];
+      //"clean" coefficient
+      if(cleanNnz(value_[i],colLower[colIdx], colUpper[colIdx],
+        rowLower[rowIdx], rowUpper[rowIdx],
+        x[colIdx],
+        lb[cutIdx],
+        ub[cutIdx], tiny_, very_tiny_)) {
+        if(fabs(value_[i]) > 1e15) {
+           printf("Not generating cut because of big coefficient %g col %i x[%i] = %g\n", value_[i], colIdx, colIdx, x[colIdx]);
+           return;
+        }
+        cuts[cutIdx].insert(colIdx,value_[i]);
+        if(lb[cutIdx] > - infty)
+          lb[cutIdx] += value_[i] * x[colIdx];
+        if(ub[cutIdx] < infty)
+     ub[cutIdx] += value_[i] * x[colIdx];
+      }
+    }
+  }
+
+  for(int cutIdx = 0; cutIdx < numCuts; cutIdx++) {
+    OsiRowCut newCut;
+    if(global)
+      newCut.setGloballyValidAsInteger(1);
+    //********* Perspective Extension ********//
+    const int* ids = model_->get_const_xtra_id(); // vector of indices corresponding to the binary variable activating the corresponding constraint
+    // Get the index of the corresponding indicator binary variable
+    int binary_id = (ids == NULL) ? -1 : ids[cut2rowIdx[cutIdx]];// index corresponding to the binary variable activating the corresponding constraint
+    if(binary_id>0) {// If this hyperplane is a linearization of a disjunctive constraint, we link its righthand (or lefthand) side to the corresponding indicator binary variable
+        //printf("Using perspectives\n");
+        if (lb[cutIdx] > -infty) { // ∂x ≥ lb => ∂x - lb*z ≥ 0
+            cuts[cutIdx].insert(binary_id, -lb[cutIdx]);
+            newCut.setLb(0);
+            newCut.setUb(ub[cutIdx]);
+            
+        }
+        if (ub[cutIdx] < infty) { // ∂x ≤ ub => ∂x - ub*z ≤ 0
+            cuts[cutIdx].insert(binary_id, -ub[cutIdx]);
+            newCut.setLb(lb[cutIdx]);
+            newCut.setUb(0);
+            
+        }
+    }
+    else {
+        newCut.setLb(lb[cutIdx]);
+        newCut.setUb(ub[cutIdx]);
+    }
+    //********* Perspective Extension ********//
+    newCut.setRow(cuts[cutIdx]);
+    cs.insert(newCut);
+  }
+  printf("++++++++   I have generated %i cuts   +++++++++\n", numCuts);
+
+  return;
+
+
+}
+
+void 
+SepaTMINLP2OsiLP::get_oa(int rowIdx, OsiCuts &cs, const double *x, bool getObj, bool global) const {
+
+  int n,m, nnz_jac_g, nnz_h_lag;
+  TNLP::IndexStyleEnum index_style;
+  model_->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+  double gi;
+  model_->eval_gi(n,x,1, rowIdx,gi);
+  Bonmin::vector<int> jCol(n);
+  int nnz;
+  model_->eval_grad_gi(n, x, 0, rowIdx, nnz, jCol(), NULL);
+  model_->eval_grad_gi(n, x, 0, rowIdx, nnz, NULL, value_());
+
+
+  //As jacobian is stored by cols fill OsiCuts with cuts
+  double lb;
+  double ub;
+
+  const double * rowLower = model_->g_l();
+  const double * rowUpper = model_->g_u();
+  const double * colLower = model_->x_l();
+  const double * colUpper = model_->x_u();
+  double nlp_infty = infty_;
+  double infty = DBL_MAX;
+  
+  if (rowLower[rowIdx] > -nlp_infty)
+    lb = rowLower[rowIdx] - gi;
+  else
+    lb = -infty;
+  if (rowUpper[rowIdx] < nlp_infty)
+    ub = rowUpper[rowIdx] - gi;
+  else
+    ub = infty;
+
+  CoinPackedVector  cut;
+
+
+  for(int i = 0 ; i < nnz ; i++) {
+    if(index_style == Ipopt::TNLP::FORTRAN_STYLE) jCol[i]--;
+    const int &colIdx = jCol[i];
+    //"clean" coefficient
+    if(cleanNnz(value_[i],colLower[colIdx], colUpper[colIdx],
+      rowLower[rowIdx], rowUpper[rowIdx],
+      x[colIdx],
+      lb,
+      ub, tiny_, very_tiny_)) {
+      if(fabs(value_[i]) > 1e15) {
+         printf("Not generating cut because of big coefficient %g col %i x[%i] = %g\n", value_[i], colIdx, colIdx, x[colIdx]);
+         return;
+      }
+      cut.insert(colIdx,value_[i]);
+        if(lb > - infty)
+          lb += value_[i] * x[colIdx];
+        if(ub < infty)
+           ub += value_[i] * x[colIdx];
+      }
+  }
+
+  OsiRowCut newCut;
+  if(global)
+    newCut.setGloballyValidAsInteger(1);
+  //********* Perspective Extension ********//
+  const int* ids = model_->get_const_xtra_id(); // vector of indices corresponding to the binary variable activating the corresponding constraint
+  // Get the index of the corresponding indicator binary variable
+  int binary_id = (ids == NULL) ? -1 : ids[rowIdx];// index corresponding to the binary variable activating the corresponding constraint
+    if(binary_id>0) {// If this hyperplane is a linearization of a disjunctive constraint, we link its righthand (or lefthand) side to the corresponding indicator binary variable
+        //printf("Using perspectives\n");
+        if (lb > -infty) { // ∂x ≥ lb => ∂x - lb*z ≥ 0
+            cut.insert(binary_id, -lb);
+            newCut.setLb(0);
+            newCut.setUb(ub);
+            
+        }
+        if (ub < infty) { // ∂x ≤ ub => ∂x - ub*z ≤ 0
+            cut.insert(binary_id, -ub);
+            newCut.setLb(lb);
+            newCut.setUb(0);
+        }
+    }
+    else {
+        newCut.setLb(lb);
+        newCut.setUb(ub);
+    }
+    //********* Perspective Extension ********//
+    newCut.setRow(cut);
+    cs.insert(newCut);
+  return;
+}
+
+void 
+SepaTMINLP2OsiLP::get_refined_oa(OsiCuts & cs) const{
+   if(num_approx_ <= 0)
+     return;
+   int n;
+   int m;
+   int nnz_jac_g;
+   int nnz_h_lag;
+   Ipopt::TNLP::IndexStyleEnum index_style;
+   //Get problem information
+   model_->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+  //const double * rowLower = model_->g_l();
+  //const double * rowUpper = model_->g_u();
+  const double * colLower = model_->x_l();
+  const double * colUpper = model_->x_u();
+  Bonmin::vector<Ipopt::TNLP::LinearityType>  varTypes(n);
+
+   model_->get_variables_linearity(n, varTypes());
+   //const Bonmin::TMINLP::VariableType* variableType = model_->var_types();
+   // Hassan OA initial description
+
+   double * p = CoinCopyOfArray(colLower, n);
+   double * pp = CoinCopyOfArray(colLower, n);
+   double * up = CoinCopyOfArray(colUpper, n);
+
+   std::vector<double> step(n);
+
+
+     for (int i = 0; i < n; i++) {
+       if (p[i] < -1e4){
+          p[i] = pp[i] = -1e4;
+       }
+       if (up[i] > 1e4){
+          up[i] = 1e4;
+       }
+     } 
+
+
+   //Step step
+   for (int i = 0; i < n; i++) {
+
+      if (varTypes[i] == Ipopt::TNLP::LINEAR) {
+         step[i] = 0;
+         p[i] = pp[i] = up[i] = 0;
+      }
+      else
+        step[i] = (up[i] - p[i]) / (num_approx_);
+
+    }
+    get_oas(cs, p, 0, true);// Generate Tangents at current point        
+    for (int j = 1; j <= num_approx_; j++) {
+
+      for (int i = 0; i < n; i++) {
+        pp[i] += step[i];
+      }
+      
+      get_oas(cs, pp, 0, true);// Generate Tangents at current point
+
+   }
+
+   get_oas(cs, up, 0, true);// Generate Tangents at current point
+      
+   delete [] p;
+   delete [] pp;
+   delete [] up;
+  }
+
+void 
+SepaTMINLP2OsiLP::add_outer_description_function_values(OsiSolverInterface &si) {
+   int n;
+   int m;
+   int nnz_jac_g;
+   int nnz_h_lag;
+   Ipopt::TNLP::IndexStyleEnum index_style;
+   //Get problem information
+   model_->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+  //const double * rowLower = model_->g_l();
+  //const double * rowUpper = model_->g_u();
+  const double * colLower = model_->x_l();
+  const double * colUpper = model_->x_u();
+   Bonmin::vector<Ipopt::TNLP::LinearityType>  varTypes(n);
+
+   model_->get_variables_linearity(n, varTypes());
+   const Bonmin::TMINLP::VariableType* variableType = model_->var_types();
+   // Hassan OA initial description
+   OsiCuts cs;
+
+   double * p = CoinCopyOfArray(colLower, n);
+   double * pp = CoinCopyOfArray(colLower, n);
+   double * up = CoinCopyOfArray(colUpper, n);
+   double * low = CoinCopyOfArray(colLower, n);
+
+   Bonmin::vector<double> step(n);
+   Bonmin::vector<int> nbG(m,2);
+
+
+     for (int i = 0; i < n; i++) {
+       if (low[i] < -1e4){
+          low[i] = -1e4;
+       }
+       if (up[i] > 1e4){
+          up[i] = 1e4;
+       }
+     } 
+
+
+   for (int i = 0; i < n; i++) {
+
+      if (varTypes[i] == Ipopt::TNLP::LINEAR) {
+         step[i] = 0;
+         low[i] = p[i] = pp[i] = up[i] = 0;
+      }
+      else
+        step[i] = (up[i] - low[i]) / (num_approx_*20);
+
+    }
+    get_oas(cs, low, 0, true);// Generate Tangents at start point        
+    get_oas(cs, up, 0, true);// Generate Tangents at end point        
+    Bonmin::vector<double> g_p(m);
+    Bonmin::vector<double> g_pp(m);
+    model_->eval_g(n, low, 1, m, g_p()); // Evaluate function g at lowerbounds
+    model_->eval_g(n, up, 1, m, g_pp()); // Evaluate function g at upperbounds
+
+    for (int i = 0; (i < m); i++) { // Generate Outer-Approximation initial cuts for all nonlinear constraints
+      if(const_types_[i] != Ipopt::TNLP::NON_LINEAR) continue;
+      double thresh = std::abs(g_pp[i] - g_p[i])/(num_approx_-1);
+      
+      printf("Constraint %i threshold is %g lower val %g upper %g\n",i, thresh,
+             g_p[i], g_pp[i]);
+      std::copy(low, low + n, p);
+      std::copy(low, low + n, pp);
+      double g_p_i, g_pp_i;
+      g_p_i = g_p[i];
+      int n_steps = 0;
+      while (nbG[i] < num_approx_) { // Iterate untill increase is sufficient 
+        n_steps++;
+        // Curvature sampling
+        for (int j = 0; j < n; j++) {
+          pp[j] += step[j];
+        }
+        model_->eval_gi(n, pp, 1, i, g_pp_i);
+    //    printf("Difference in function value: %g\n", std::abs(g_p_i - g_pp_i)); 
+        if (std::abs(g_p_i - g_pp_i)>=thresh ) {
+          printf("Function value after %i steps %g\n", n_steps, g_pp_i);
+          get_oa(i, cs, pp, 0, true);// Generate Tangents at current point
+          for (int j = 0; j < n; j++) {
+            p[j] = pp[j]; // Move all previous points to the current one
+          }
+          g_p_i = g_pp_i; 
+          nbG[i]++;
+        }
+      }
+      
+    }
+
+
+      
+   si.applyCuts(cs);
+   delete [] p;
+   delete [] pp;
+   delete [] up;
+  }
+}
diff --git a/experimental/Separable/SepaTMINLP2OsiLP.hpp b/experimental/Separable/SepaTMINLP2OsiLP.hpp
new file mode 100644
index 0000000..962e76a
--- /dev/null
+++ b/experimental/Separable/SepaTMINLP2OsiLP.hpp
@@ -0,0 +1,82 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/16/2007
+#ifndef SepaSepaTMINLP2OsiLP_H
+#define SepaSepaTMINLP2OsiLP_H
+
+#include <cmath>
+#include <cstdio>
+#include "IpSmartPtr.hpp"
+#include "IpTNLP.hpp"
+#include "BonTypes.hpp"
+#include "BonTMINLP2OsiLP.hpp"
+
+
+namespace Sepa {
+
+  /** A transformer class to build outer approximations i.e. transfomrs nonlinear programs into linear programs.*/
+  class SepaTMINLP2OsiLP: public Bonmin::TMINLP2OsiLP {
+
+  public:
+
+   /** Default constructor.*/
+   SepaTMINLP2OsiLP():
+    TMINLP2OsiLP(),
+    num_approx_(0)
+   {}
+
+   /** Copy constructor.*/
+   SepaTMINLP2OsiLP(const SepaTMINLP2OsiLP & other):
+    TMINLP2OsiLP(other), 
+    num_approx_(other.num_approx_){
+    }
+
+   TMINLP2OsiLP * clone() const{
+     return new SepaTMINLP2OsiLP(*this);
+   }
+
+   /** Assignment operator.*/
+   SepaTMINLP2OsiLP & operator=(const SepaTMINLP2OsiLP& rhs){
+    if(this != & rhs){
+      TMINLP2OsiLP::operator=(rhs);
+      num_approx_ = rhs.num_approx_;
+    }
+    return (*this);
+   }
+
+   void set_num_approx(int v){
+     num_approx_ = v;
+   }
+
+   /** Destructor.*/
+   ~SepaTMINLP2OsiLP(){}
+
+   /** Build the Outer approximation of model_ in x and put it in si.*/
+   virtual void extract(OsiSolverInterface *si, 
+                const double * x, bool getObj) ;
+
+   /** Get OAs of nonlinear constraints in x.*/
+   virtual void get_oas(OsiCuts & cs, 
+                const double * x, bool getObj, bool global) const;
+
+   virtual void get_refined_oa(OsiCuts & cs) const;
+   /** Get OA of one constraints in x.*/
+   virtual void get_oa(int iRow, OsiCuts & cs, 
+                const double * x, bool getObj, bool global) const;
+
+   void add_outer_description(OsiSolverInterface &si) ;
+   void add_outer_description_function_values(OsiSolverInterface &si) ;
+   private:
+   int num_approx_;
+  };
+
+
+}
+
+#endif
+
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..4d4a951
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-05-14.22
+
+# 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.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. 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}"
+
+chmodcmd="$chmodprog 0755"
+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 -n "$1"; 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) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        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 $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # 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
+	break;;
+  esac
+done
+
+if test -z "$1"; 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
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  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
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # 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
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $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 "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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 "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); 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/ltmain.sh b/ltmain.sh
new file mode 100755
index 0000000..06823e0
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,6863 @@
+# 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 at 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"
+
+# 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)"
+
+# 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
+
+# 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.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# 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/"
+
+#####################################
+# 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_xdir="$my_gentop/$my_xlib"
+
+      $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\"
+
+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 ;;
+    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)
+	if test "X$arg" = "X-all-static"; then
+	  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
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	fi
+	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)
+	# 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 -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)
+	    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
+	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
+	  if test "$?" -eq 0 ; 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" -ne "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
+		$LTCC $LTCFLAGS -o conftest conftest.c $i
+		# Did it work?
+		if test "$?" -eq 0 ; 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=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; 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
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	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" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+            else
+              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+            ;;
+          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" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$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" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $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" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if 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'
+
+# 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 \${1+\"\$@\"}\"
+      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" | $Xsed -e "$sed_quote_subst"`
+      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" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  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" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $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
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # 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 at 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 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/missing b/missing
new file mode 100755
index 0000000..894e786
--- /dev/null
+++ b/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# 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'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    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 [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -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 [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -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 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -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 's/.*-o \([^ ]*\).*/\1/p'`
+    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/Algorithms/Ampl/BonAmplSetup.cpp b/src/Algorithms/Ampl/BonAmplSetup.cpp
new file mode 100644
index 0000000..ab416e4
--- /dev/null
+++ b/src/Algorithms/Ampl/BonAmplSetup.cpp
@@ -0,0 +1,99 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/15/2007
+
+#include "BonAmplSetup.hpp"
+#include "BonSolReader.hpp"
+namespace Bonmin
+{
+  void BonminAmplSetup::initialize(char **& argv)
+  {
+    readOptionsFile();
+    /* Read the model.*/
+    Ipopt::SmartPtr<AmplTMINLP> model = new AmplTMINLP(ConstPtr(journalist()), roptions(), options(),
+                                                argv, NULL, "bonmin", NULL);
+    mayPrintDoc();
+    BonminSetup::initialize(GetRawPtr(model), true);
+#if 1
+    int ival;
+    options()->GetEnumValue("read_solution_file", ival, "bonmin.");
+    if(ival){
+      printf("Reading solution file");
+      SolReader read(argv[1], ".dbg_sol");
+      read.set_n_cols(nonlinearSolver()->getNumCols());
+      read.readFile();
+      nonlinearSolver()->activateRowCutDebugger(read.x());
+    }
+#endif
+  }
+
+  void
+  BonminAmplSetup::initialize(AmplInterface &toFill, char **& argv)
+  {
+    Ipopt::SmartPtr<TNLPSolver> solver = toFill.solver();
+    setOptionsAndJournalist(solver->roptions(),
+        solver->options(),
+        solver->journalist());
+    /* Get the basic options. */
+    readOptionsFile();
+    /* Read the model.*/
+    Ipopt::SmartPtr<AmplTMINLP> model = new AmplTMINLP(ConstPtr(journalist()), roptions(),
+                                                options(), argv, NULL, "bonmin", NULL);
+    mayPrintDoc();
+    toFill.initialize(roptions_, options_, journalist_, prefix(), GetRawPtr(model));
+    BonminSetup::initialize(toFill, true);
+  }
+
+  /** initialize bonmin with ampl model using the command line arguments reading options and nl file from strings.*/
+  void
+  BonminAmplSetup::initialize(char **& argv, std::string& opt_file_content, std::string& nl_file_content, bool createContinuousSolver /*= false*/)
+  {
+    /* Get the basic options. */
+    readOptionsString(opt_file_content);
+    /* read nl file by creating AmplTMINLP.*/
+    Ipopt::SmartPtr<AmplTMINLP> model = new AmplTMINLP(ConstPtr(journalist()), roptions(),
+                                                options(), argv, NULL, "bonmin", &nl_file_content);
+    mayPrintDoc();
+    BonminSetup::initialize(GetRawPtr(model), createContinuousSolver);
+  }
+
+
+  /** initialize bonmin with ampl model using the command line arguments and an existing OsiTMINLPInterface reading options and nl file from strings.*/
+  void
+  BonminAmplSetup::initialize(AmplInterface &toFill, char **& argv, std::string& opt_file_content,
+      std::string& nl_file_content, bool createContinuousSolver /*=  false*/
+                             )
+  {
+    /* Get the basic options. */
+    readOptionsString(opt_file_content);
+    /* read nl file by creating AmplTMINLP.*/
+    Ipopt::SmartPtr<AmplTMINLP> model = new AmplTMINLP(ConstPtr(journalist()), roptions(),
+                                                options(), argv, NULL, "bonmin", &nl_file_content);
+    mayPrintDoc();
+    toFill.initialize(roptions_, options_, journalist_, prefix(), GetRawPtr(model));
+    BonminSetup::initialize(toFill, createContinuousSolver);
+  }
+
+  /** Usefull for Bcp */
+  void BonminAmplSetup::fillOsiInterface(AmplInterface &toFill, char ** &argv, std::string & options,
+      std::string & nl, bool createContinuousSolver /*=  false*/)
+  {
+
+    /* Get the basic options. */
+    readOptionsString(options);
+    /* Read the model.*/
+    Ipopt::SmartPtr<AmplTMINLP> model =
+      new AmplTMINLP(ConstPtr(journalist_),
+          roptions_,
+          options_,
+          argv, NULL, "bonmin", &nl);
+    toFill.initialize(roptions(), options_, journalist(), prefix(), GetRawPtr(model));
+  }
+
+}
+
diff --git a/src/Algorithms/Ampl/BonAmplSetup.hpp b/src/Algorithms/Ampl/BonAmplSetup.hpp
new file mode 100644
index 0000000..e1128fe
--- /dev/null
+++ b/src/Algorithms/Ampl/BonAmplSetup.hpp
@@ -0,0 +1,32 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/15/2007
+
+#ifndef BonAmplSetup_H
+#define BonAmplSetup_H
+#include "BonBonminSetup.hpp"
+#include "BonAmplInterface.hpp"
+
+namespace Bonmin
+{
+  class BonminAmplSetup: public BonminSetup
+  {
+  public:
+    /** initialize bonmin with ampl model using the command line arguments.*/
+    void initialize(char **& argv);
+    /** initialize bonmin with ampl model using the command line arguments and an existing OsiTMINLPInterface.*/
+    void initialize(AmplInterface &toFill, char **& argv);
+    /** initialize bonmin with ampl model using the command line arguments reading options and nl file from strings.*/
+    void initialize(char **& argv, std::string& opt_file_content, std::string& nl_file_content, bool createContinuousSolver /*= false*/);
+    /** initialize bonmin with ampl model using the command line arguments and an existing OsiTMINLPInterface reading options and nl file from strings.*/
+    void initialize(AmplInterface &toFill, char **& argv, std::string& opt_file_content, std::string& nl_file_content, bool createContinuousSolver = true);
+    /** For Bcp. Initialize the passed OsiTMINLP interface with ampl model using the options and nl files contained in two strings.*/
+    void fillOsiInterface(AmplInterface &toFill, char **& argv, std::string & options, std::string & nl, bool createContinuousSolver = true);
+  };
+}
+#endif
diff --git a/src/Algorithms/Ampl/Makefile.am b/src/Algorithms/Ampl/Makefile.am
new file mode 100644
index 0000000..d2ad5ac
--- /dev/null
+++ b/src/Algorithms/Ampl/Makefile.am
@@ -0,0 +1,73 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 433 2007-03-28 05:01:22Z andreasw $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonamplsetup.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonamplsetup_la_SOURCES = BonAmplSetup.cpp BonAmplSetup.hpp 
+
+# This is for libtool
+libbonamplsetup_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ampl` \
+	$(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = BonAmplSetup.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonAmplSetup.cppbak BonAmplSetup.hppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Algorithms/Ampl/Makefile.in b/src/Algorithms/Ampl/Makefile.in
new file mode 100644
index 0000000..4f7e2c3
--- /dev/null
+++ b/src/Algorithms/Ampl/Makefile.in
@@ -0,0 +1,636 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/Algorithms/Ampl
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libbonamplsetup_la_LIBADD =
+am_libbonamplsetup_la_OBJECTS = BonAmplSetup.lo
+libbonamplsetup_la_OBJECTS = $(am_libbonamplsetup_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonamplsetup_la_SOURCES)
+DIST_SOURCES = $(libbonamplsetup_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonamplsetup.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonamplsetup_la_SOURCES = BonAmplSetup.cpp BonAmplSetup.hpp 
+
+# This is for libtool
+libbonamplsetup_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ampl` \
+	$(BONMINLIB_CFLAGS)
+
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = BonAmplSetup.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonAmplSetup.cppbak BonAmplSetup.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Algorithms/Ampl/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Algorithms/Ampl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonamplsetup.la: $(libbonamplsetup_la_OBJECTS) $(libbonamplsetup_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonamplsetup_la_LDFLAGS) $(libbonamplsetup_la_OBJECTS) $(libbonamplsetup_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonAmplSetup.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Algorithms/BonBabSetupBase.cpp b/src/Algorithms/BonBabSetupBase.cpp
new file mode 100644
index 0000000..4608e17
--- /dev/null
+++ b/src/Algorithms/BonBabSetupBase.cpp
@@ -0,0 +1,866 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/12/2007
+
+#include "BonminConfig.h"
+#ifdef COIN_HAS_FILTERSQP
+# include "BonFilterSolver.hpp"
+#endif
+#include "BonBabSetupBase.hpp"
+#include <climits>
+#include <fstream>
+#include <sstream>
+
+#include "BonDiver.hpp"
+#include "BonQpBranchingSolver.hpp"
+#include "BonLpBranchingSolver.hpp"
+#include "BonChooseVariable.hpp"
+#include "BonTMINLP2Quad.hpp"
+#include "BonTMINLPLinObj.hpp"
+namespace Bonmin
+{
+  int BabSetupBase::defaultIntParam_[BabSetupBase::NumberIntParam] = {
+        1 /* BabLogLevel*/,
+        100 /* BabLogInterval*/,
+        2 /* MaxFailures.*/,
+        0 /* FailureBehavior.*/,
+        0 /* MaxInfeasible*/,
+        5 /*NumberStrong*/,
+        2 /* MinReliability*/,
+        COIN_INT_MAX /* MaxNodes*/,
+        COIN_INT_MAX /* MaxSolutions*/,
+        COIN_INT_MAX /* MaxIterations*/,
+        0 /* SpecialOption*/,
+        0 /* DisableSos.*/,
+        1 /* numCutPasses.*/,
+        20 /* numCutPassesAtRoot.*/,
+        0 /* log level at root.*/
+      };
+
+
+  double BabSetupBase::defaultDoubleParam_[BabSetupBase::NumberDoubleParam] = {
+        0 /* CutoffDecr*/,
+        COIN_DBL_MAX /* Cutoff*/,
+        0 /* AllowableGap*/,
+        0 /*AllowableFractionGap*/,
+        1e-09 /*IntTol*/,
+        COIN_DBL_MAX /* MaxTime*/,
+      };
+
+  BabSetupBase::BabSetupBase(const CoinMessageHandler * handler):
+      nonlinearSolver_(NULL),
+      continuousSolver_(NULL),
+      linearizer_(NULL),
+      cutGenerators_(),
+      heuristics_(),
+      branchingMethod_(NULL),
+      nodeComparisonMethod_(),
+      treeTraversalMethod_(),
+      objects_(0),
+      journalist_(NULL),
+      options_(NULL),
+      roptions_(NULL),
+      readOptions_(false),
+      messageHandler_(NULL),
+      prefix_("bonmin.")
+  {
+    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
+    CoinCopyN(defaultDoubleParam_, NumberDoubleParam, doubleParam_);
+    if(handler) messageHandler_ = handler->clone();
+  }
+
+  /** Copy constructor. */
+  BabSetupBase::BabSetupBase(const BabSetupBase & other):
+      nonlinearSolver_(NULL),
+      continuousSolver_(NULL),
+      linearizer_(other.linearizer_),
+      cutGenerators_(),
+      heuristics_(),
+      branchingMethod_(NULL),
+      nodeComparisonMethod_(other.nodeComparisonMethod_),
+      treeTraversalMethod_(other.treeTraversalMethod_),
+      objects_(other.objects_),
+      journalist_(other.journalist_),
+      options_(NULL),
+      roptions_(other.roptions_),
+      readOptions_(other.readOptions_),
+      messageHandler_(NULL),
+      prefix_(other.prefix_)
+  {
+    if (other.nonlinearSolver_) {
+      nonlinearSolver_ = static_cast<OsiTMINLPInterface *>(other.nonlinearSolver_->clone());
+    }
+    if (other.continuousSolver_) {
+      continuousSolver_ = other.continuousSolver_->clone();
+    }
+    if (other.messageHandler_) {
+      messageHandler_ = other.messageHandler_->clone();
+      continuousSolver_->passInMessageHandler(messageHandler_);
+    }
+    for (CuttingMethods::const_iterator i = other.cutGenerators_.begin() ; i != other.cutGenerators_.end() ; i++) {
+      cutGenerators_.push_back(*i);
+      cutGenerators_.back().cgl = cutGenerators_.back().cgl->clone();
+    }
+
+    for (HeuristicMethods::iterator i = heuristics_.begin() ; i != heuristics_.end() ; i++) {
+      heuristics_.push_back(*i);
+      heuristics_.back().heuristic = i->heuristic->clone();
+    }
+  
+    if(other.branchingMethod_ != NULL)
+      branchingMethod_ = other.branchingMethod_->clone();
+    if (IsValid(other.options_)) {
+      options_ = new Ipopt::OptionsList;
+      *options_ = *other.options_;
+    }
+    CoinCopyN(other.intParam_, NumberIntParam, intParam_);
+    CoinCopyN(other.doubleParam_, NumberDoubleParam, doubleParam_);
+    for (unsigned int i = 0 ; i < objects_.size() ; i++) {
+      objects_[i]->clone();
+    }
+  }
+
+  /** Copy constructor with change of nlp. */
+  BabSetupBase::BabSetupBase(const BabSetupBase & other,
+                             OsiTMINLPInterface &nlp):
+      nonlinearSolver_(NULL),
+      continuousSolver_(NULL),
+      linearizer_(other.linearizer_),
+      cutGenerators_(),
+      heuristics_(),
+      branchingMethod_(NULL),
+      nodeComparisonMethod_(other.nodeComparisonMethod_),
+      treeTraversalMethod_(other.treeTraversalMethod_),
+      objects_(other.objects_),
+      journalist_(other.journalist_),
+      options_(NULL),
+      roptions_(other.roptions_),
+      readOptions_(other.readOptions_),
+      messageHandler_(NULL),
+      prefix_(other.prefix_)
+  {
+    nonlinearSolver_ = &nlp;
+    if (other.continuousSolver_ != other.nonlinearSolver_) {
+      continuousSolver_ = NULL;
+    }
+    else
+      continuousSolver_ = nonlinearSolver_;
+    if (other.messageHandler_) {
+      messageHandler_ = other.messageHandler_->clone();
+      continuousSolver_->passInMessageHandler(messageHandler_);
+    }
+    for (CuttingMethods::const_iterator i = other.cutGenerators_.begin() ; i != other.cutGenerators_.end() ; i++) {
+      cutGenerators_.push_back(*i);
+      cutGenerators_.back().cgl = cutGenerators_.back().cgl->clone();
+    }
+
+    for (HeuristicMethods::iterator i = heuristics_.begin() ; i != heuristics_.end() ; i++) {
+      heuristics_.push_back(*i);
+      heuristics_.back().heuristic = i->heuristic->clone();
+    }
+  
+    if(other.branchingMethod_ != NULL)
+      branchingMethod_ = other.branchingMethod_->clone();
+    if (IsValid(other.options_)) {
+      options_ = new Ipopt::OptionsList;
+      *options_ = *other.options_;
+    }
+    CoinCopyN(other.intParam_, NumberIntParam, intParam_);
+    CoinCopyN(other.doubleParam_, NumberDoubleParam, doubleParam_);
+    for (unsigned int i = 0 ; i < objects_.size() ; i++) {
+      objects_[i]->clone();
+    }
+  }
+  /** Copy constructor with change of nlp. */
+  BabSetupBase::BabSetupBase(const BabSetupBase & other,
+                             OsiTMINLPInterface &nlp,
+                             const std::string & prefix):
+      nonlinearSolver_(other.nonlinearSolver_),
+      continuousSolver_(NULL),
+      linearizer_(other.linearizer_),
+      cutGenerators_(),
+      heuristics_(),
+      branchingMethod_(NULL),
+      nodeComparisonMethod_(),
+      treeTraversalMethod_(),
+      objects_(other.objects_),
+      journalist_(other.journalist_),
+      options_(NULL),
+      roptions_(other.roptions_),
+      readOptions_(other.readOptions_),
+      messageHandler_(NULL),
+      prefix_(prefix)
+  {
+    nonlinearSolver_ = &nlp;
+    if (IsValid(other.options_)) {
+      options_ = new Ipopt::OptionsList;
+      *options_ = *other.options_;
+    }
+    if (other.messageHandler_) {
+      messageHandler_ = other.messageHandler_->clone();
+      nonlinearSolver_->passInMessageHandler(messageHandler_);
+    }
+    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
+    CoinCopyN(defaultDoubleParam_, NumberDoubleParam, doubleParam_);
+    gatherParametersValues(options_);
+    for (unsigned int i = 0 ; i < objects_.size() ; i++) {
+      objects_[i]->clone();
+    }
+  }
+
+  BabSetupBase::BabSetupBase(Ipopt::SmartPtr<TMINLP> tminlp, const CoinMessageHandler * handler):
+      nonlinearSolver_(NULL),
+      continuousSolver_(NULL),
+      linearizer_(NULL),
+      cutGenerators_(),
+      heuristics_(),
+      branchingMethod_(NULL),
+      nodeComparisonMethod_(),
+      treeTraversalMethod_(),
+      objects_(0),
+      readOptions_(false),
+      messageHandler_(NULL),
+      prefix_("bonmin.")
+  {
+    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
+    CoinCopyN(defaultDoubleParam_, NumberDoubleParam, doubleParam_);
+    if(handler) messageHandler_ = handler->clone();
+    use(tminlp);
+  }
+
+
+  /** Make a copy with solver replace by one passed .*/
+  BabSetupBase *
+  BabSetupBase::clone(OsiTMINLPInterface&nlp)const {
+     throw(CoinError("BabSetupBase", "CloneWithOtherNlp","Not implemented"));
+  }
+
+
+  void
+  BabSetupBase::use(Ipopt::SmartPtr<TMINLP> tminlp)
+  {
+    readOptionsFile();
+    assert(IsValid(tminlp));
+    nonlinearSolver_ = new OsiTMINLPInterface;
+    int ival;
+    options_->GetEnumValue("enable_dynamic_nlp", ival, "bonmin.");
+    if(ival && ! tminlp->hasLinearObjective()){
+      Ipopt::SmartPtr<Bonmin::TMINLPLinObj> linObj =
+                        new Bonmin::TMINLPLinObj;
+      linObj->setTminlp(GetRawPtr(tminlp));
+      tminlp = GetRawPtr(linObj);
+    }
+    nonlinearSolver_->initialize(roptions_, options_, journalist_, prefix(), tminlp);
+    if(messageHandler_ != NULL)
+      nonlinearSolver_->passInMessageHandler(messageHandler_);
+    else
+      messageHandler_ = nonlinearSolver_->messageHandler()->clone();
+    if (ival){
+      nonlinearSolver_->use(new Bonmin::TMINLP2TNLPQuadCuts(tminlp));
+    }
+  }
+
+  BabSetupBase::BabSetupBase(const OsiTMINLPInterface& nlp):
+      nonlinearSolver_(NULL),
+      continuousSolver_(NULL),
+      linearizer_(NULL),
+      cutGenerators_(),
+      heuristics_(),
+      branchingMethod_(NULL),
+      nodeComparisonMethod_(),
+      treeTraversalMethod_(),
+      objects_(0),
+      journalist_(NULL),
+      options_(NULL),
+      roptions_(NULL),
+      readOptions_(false),
+      messageHandler_(NULL),
+      prefix_("bonmin.")
+  {
+    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
+    CoinCopyN(defaultDoubleParam_, NumberDoubleParam, doubleParam_);
+    use(nlp);
+  }
+
+  void
+  BabSetupBase::use(const OsiTMINLPInterface& nlp)
+  {
+    nonlinearSolver_ = dynamic_cast<OsiTMINLPInterface *>(nlp.clone());
+    options_ = nonlinearSolver_->solver()->options();
+    roptions_ = nonlinearSolver_->solver()->roptions();
+    journalist_ = nonlinearSolver_->solver()->journalist();
+    if(messageHandler_ != NULL ) delete messageHandler_;		
+    messageHandler_ = nlp.messageHandler()->clone();
+    readOptions_ = true;
+  }
+
+  BabSetupBase::BabSetupBase( Ipopt::SmartPtr<TNLPSolver> app):
+      nonlinearSolver_(NULL),
+      continuousSolver_(NULL),
+      linearizer_(NULL),
+      cutGenerators_(),
+      heuristics_(),
+      branchingMethod_(NULL),
+      nodeComparisonMethod_(),
+      treeTraversalMethod_(),
+      objects_(0),
+      journalist_(app->journalist()),
+      options_(app->options()),
+      roptions_(app->roptions()),
+      readOptions_(true),
+      messageHandler_(NULL),
+      prefix_("bonmin.")
+  {
+    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
+    CoinCopyN(defaultDoubleParam_, NumberDoubleParam, doubleParam_);
+  }
+
+
+  BabSetupBase::~BabSetupBase()
+  {
+    if (nonlinearSolver_ != continuousSolver_) {
+      delete nonlinearSolver_;
+    }
+    delete continuousSolver_;
+    delete branchingMethod_;
+    for (CuttingMethods::iterator i = cutGenerators_.begin() ; i != cutGenerators_.end() ; i++) {
+      delete i->cgl;
+      i->cgl = NULL;
+    }
+
+    for (HeuristicMethods::iterator i = heuristics_.begin() ; i != heuristics_.end() ; i++) {
+      delete i->heuristic;
+    }
+
+    for (unsigned int i = 0 ; i < objects_.size() ; i++) {
+      delete objects_[i];
+    }
+
+    if(messageHandler_)
+      delete messageHandler_;
+  }
+
+
+  void
+  BabSetupBase::gatherParametersValues(Ipopt::SmartPtr<Ipopt::OptionsList> options)
+  {
+
+    options->GetIntegerValue("bb_log_level",intParam_[BabLogLevel],prefix_.c_str());
+    options->GetIntegerValue("bb_log_interval",intParam_[BabLogInterval],prefix_.c_str());
+    options->GetIntegerValue("max_consecutive_failures",intParam_[MaxFailures],prefix_.c_str());
+    options->GetEnumValue("nlp_failure_behavior",intParam_[FailureBehavior],prefix_.c_str());
+    options->GetIntegerValue("max_consecutive_infeasible",intParam_[MaxInfeasible],prefix_.c_str());
+    options->GetIntegerValue("number_strong_branch",intParam_[NumberStrong],prefix_.c_str());
+    options->GetIntegerValue("number_before_trust",intParam_[MinReliability],prefix_.c_str());
+    options->GetIntegerValue("node_limit",intParam_[MaxNodes],prefix_.c_str());
+    options->GetIntegerValue("solution_limit",intParam_[MaxSolutions],prefix_.c_str());
+    options->GetIntegerValue("iteration_limit",intParam_[MaxIterations],prefix_.c_str());
+    options->GetEnumValue("sos_constraints",intParam_[DisableSos],prefix_.c_str());
+    options->GetIntegerValue("num_cut_passes",intParam_[NumCutPasses],prefix_.c_str());
+    options->GetIntegerValue("num_cut_passes_at_root",intParam_[NumCutPassesAtRoot],prefix_.c_str());
+    options->GetIntegerValue("nlp_log_at_root",intParam_[RootLogLevel],prefix_.c_str());
+
+    options->GetNumericValue("cutoff_decr",doubleParam_[CutoffDecr],prefix_.c_str());
+    options->GetNumericValue("cutoff",doubleParam_[Cutoff],prefix_.c_str());
+    options->GetNumericValue("allowable_gap",doubleParam_[AllowableGap],prefix_.c_str());
+    options->GetNumericValue("allowable_fraction_gap",doubleParam_[AllowableFractionGap],prefix_.c_str());
+    options->GetNumericValue("integer_tolerance",doubleParam_[IntTol],prefix_.c_str());
+    options->GetNumericValue("time_limit", doubleParam_[MaxTime],prefix_.c_str());
+
+    int ival;
+    int seed = 0;
+    ival = options->GetIntegerValue("random_generator_seed",seed,prefix_.c_str());
+    if(seed == -1)
+      CoinSeedRandom((int)CoinGetTimeOfDay());
+    else if (ival != 0) CoinSeedRandom(seed);
+
+    options->GetEnumValue("node_comparison",ival,prefix_.c_str());
+    nodeComparisonMethod_ = NodeComparison(ival);
+
+    options->GetEnumValue("tree_search_strategy", ival, prefix_.c_str());
+    treeTraversalMethod_ = TreeTraversal(ival);
+
+    int varSelection;
+    options->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
+    // Set branching strategy
+    if (varSelection == MOST_FRACTIONAL) {
+      intParam_[NumberStrong] = 0;
+      intParam_[MinReliability] = 0;
+      options_->SetIntegerValue("bonmin.number_strong_branch",intParam_[BabSetupBase::NumberStrong],true,true);
+      options_->SetIntegerValue("bonmin.number_before_trust",intParam_[BabSetupBase::MinReliability],true,true);
+    }
+    else if (varSelection == RELIABILITY_BRANCHING) {
+      intParam_[MinReliability] = 10;
+      options_->SetIntegerValue("bonmin.number_before_trust",intParam_[BabSetupBase::MinReliability],true,true);
+    }
+  }
+
+  void
+  BabSetupBase::registerOptions()
+  {
+    registerAllOptions(roptions_);
+  }
+
+  void
+  BabSetupBase::registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    OsiTMINLPInterface::registerOptions(roptions);
+    /* BabSetup options.*/
+    roptions->SetRegisteringCategory("Output and Loglevel", RegisteredOptions::BonminCategory);
+
+    roptions->AddBoundedIntegerOption("bb_log_level",
+        "specify main branch-and-bound log level.",
+        0,5,1,
+        "Set the level of output of the branch-and-bound : "
+        "0 - none, 1 - minimal, 2 - normal low, 3 - normal high"
+                                     );
+    roptions->setOptionExtraInfo("bb_log_level", 127);
+
+    roptions->AddLowerBoundedIntegerOption("bb_log_interval",
+        "Interval at which node level output is printed.",
+        0,100,
+        "Set the interval (in terms of number of nodes) at which "
+        "a log on node resolutions (consisting of lower and upper bounds) is given.");
+    roptions->setOptionExtraInfo("bb_log_interval", 127);
+
+    roptions->AddBoundedIntegerOption("lp_log_level",
+        "specify LP log level.",
+        0,4,0,
+        "Set the level of output of the linear programming sub-solver in B-Hyb or B-QG : "
+        "0 - none, 1 - minimal, 2 - normal low, 3 - normal high, 4 - verbose"
+                                     );
+    roptions->setOptionExtraInfo("lp_log_level", 119);
+
+    roptions->AddBoundedIntegerOption("nlp_log_at_root","specify a different log level "
+                                           "for root relaxation.",
+                                            0,12,0,
+                                            "");
+    roptions->setOptionExtraInfo("nlp_log_at_root",63);
+
+    roptions->SetRegisteringCategory("Branch-and-bound options", RegisteredOptions::BonminCategory);
+
+  roptions->AddLowerBoundedIntegerOption
+  ("random_generator_seed",
+   "Set seed for random number generator (a value of -1 sets seeds to time since Epoch).",
+   -1,0,
+   "");
+  roptions->setOptionExtraInfo("random_generator_seed",127);
+
+    roptions->AddLowerBoundedNumberOption("time_limit",
+        "Set the global maximum computation time (in secs) for the algorithm.",
+        0.,0,1e10,
+        "");
+    roptions->setOptionExtraInfo("time_limit", 127);
+
+    roptions->AddLowerBoundedIntegerOption("node_limit",
+        "Set the maximum number of nodes explored in the branch-and-bound search.",
+        0,COIN_INT_MAX,
+        "");
+    roptions->setOptionExtraInfo("node_limit", 127);
+
+    roptions->AddLowerBoundedIntegerOption("iteration_limit",
+        "Set the cumulative maximum number of iteration in the algorithm used to process nodes continuous relaxations in the branch-and-bound.",
+        0,COIN_INT_MAX,
+        "value 0 deactivates option.");
+    roptions->setOptionExtraInfo("iteration_limit", 127);
+
+    roptions->AddLowerBoundedIntegerOption("solution_limit",
+        "Abort after that much integer feasible solution have been found by algorithm",
+        0,COIN_INT_MAX,
+        "value 0 deactivates option");
+    roptions->setOptionExtraInfo("solution_limit", 127);
+
+    roptions->AddLowerBoundedNumberOption("integer_tolerance",
+        "Set integer tolerance.",
+        0.,1,1e-06,
+        "Any number within that value of an integer is considered integer.");
+    roptions->setOptionExtraInfo("integer_tolerance", 127);
+
+    roptions->AddBoundedNumberOption("allowable_gap",
+        "Specify the value of absolute gap under which the algorithm stops.",
+        -1.e20,0,1.e20,0,0.,
+        "Stop the tree search when the gap between the objective value of the best known solution"
+        " and the best bound on the objective of any solution is less than this.");
+    roptions->setOptionExtraInfo("allowable_gap", 127);
+
+    roptions->AddBoundedNumberOption("allowable_fraction_gap",
+        "Specify the value of relative gap under which the algorithm stops.",
+        -1.e20,0,1.e20,0,0.0,
+        "Stop the tree search when the gap between the objective value of the best known solution "
+        "and the best bound on the objective of any solution is less than this "
+        "fraction of the absolute value of the best known solution value.");
+    roptions->setOptionExtraInfo("allowable_fraction_gap", 127);
+
+    roptions->AddBoundedNumberOption("cutoff",
+        "Specify cutoff value.",
+        -1e100,0,1e100,0,1e100,
+        "cutoff should be the value of a feasible solution known by the user "
+        "(if any). The algorithm will only look for solutions better than cutoff.");
+    roptions->setOptionExtraInfo("cutoff", 127);
+
+
+    roptions->AddBoundedNumberOption("cutoff_decr",
+        "Specify cutoff decrement.",
+        -1e10,0,1e10,0,1e-05,
+        "Specify the amount by which cutoff is decremented below "
+        "a new best upper-bound"
+        " (usually a small positive value but in non-convex problems it may be a negative value).");
+    roptions->setOptionExtraInfo("cutoff_decr", 127);
+
+
+    roptions->AddStringOption5("node_comparison",
+        "Choose the node selection strategy.",
+        "best-bound",
+        "best-bound", "choose node with the smallest bound,",
+        "depth-first", "Perform depth first search,",
+        "breadth-first", "Perform breadth first search,",
+        "dynamic", "Cbc dynamic strategy (starts with a depth first search and turn to best bound after 3 "
+        "integer feasible solutions have been found).",
+        "best-guess", "choose node with smallest guessed integer solution",
+        "Choose the strategy for selecting the next node to be processed.");
+    roptions->setOptionExtraInfo("node_comparison", 63);
+
+    roptions->AddStringOption5("tree_search_strategy",
+        "Pick a strategy for traversing the tree",
+        "probed-dive",
+        "top-node"," Always pick the top node as sorted by the node comparison function",
+        "dive","Dive in the tree if possible, otherwise pick top node as sorted by the tree comparison function.",
+        "probed-dive","Dive in the tree exploring two children before continuing the dive at each level.",
+        "dfs-dive","Dive in the tree if possible doing a depth first search. "
+        "Backtrack on leaves or when a prescribed depth is attained or "
+        "when estimate of best possible integer feasible solution in subtree "
+        "is worst than cutoff. "
+        "Once a prescribed limit of backtracks is attained pick top node "
+        "as sorted by the tree comparison function",
+        "dfs-dive-dynamic","Same as dfs-dive but once enough solution are found switch to best-bound and if too many nodes switch to depth-first.",
+        "All strategies can be used in conjunction with any of the node comparison functions. "
+        "Options which affect dfs-dive are max-backtracks-in-dive and max-dive-depth. "
+        "The dfs-dive won't work in a non-convex problem where objective does not decrease down branches."
+                              );
+    roptions->setOptionExtraInfo("tree_search_strategy", 63);
+
+    roptions->AddLowerBoundedIntegerOption("number_strong_branch",
+        "Choose the maximum number of variables considered for strong branching.",
+        0,20,
+        "Set the number of variables on which to do strong branching.");
+    roptions->setOptionExtraInfo("number_strong_branch", 127);
+
+ 
+    roptions->AddLowerBoundedIntegerOption
+    ("number_before_trust",
+     "Set the number of branches on a variable before its pseudo costs are to be believed "
+     "in dynamic strong branching.",
+     0,8,
+     "A value of 0 disables pseudo costs.");
+    roptions->setOptionExtraInfo("number_before_trust", 127);
+
+    roptions->AddStringOption2("nlp_failure_behavior",
+        "Set the behavior when an NLP or a series of NLP are unsolved by Ipopt (we call unsolved an NLP for which Ipopt is not "
+        "able to guarantee optimality within the specified tolerances).",
+        "stop",
+        "stop", "Stop when failure happens.",
+        "fathom", "Continue when failure happens.",
+        "If set to \"fathom\", the algorithm will fathom the node when Ipopt fails to find a solution to the nlp "
+        "at that node within the specified tolerances. "
+        "The algorithm then becomes a heuristic, and the user will be warned that the solution might not be optimal.");
+    roptions->setOptionExtraInfo("nlp_failure_behavior", 8);
+
+    roptions->AddStringOption2("sos_constraints",
+        "Whether or not to activate SOS constraints.",
+        "enable",
+        "enable","",
+        "disable","",
+        "(only type 1 SOS are supported at the moment)");
+    roptions->setOptionExtraInfo("sos_constraints", 63);
+
+#ifdef BONMIN_CURVATURE_BRANCHING
+    roptions->AddStringOption10("variable_selection",
+#else
+    roptions->AddStringOption9("variable_selection",
+#endif
+        "Chooses variable selection strategy",
+        "strong-branching",
+        "most-fractional", "Choose most fractional variable",
+        "strong-branching", "Perform strong branching",
+        "reliability-branching", "Use reliability branching",
+#ifdef BONMIN_CURVATURE_BRANCHING
+        "curvature-estimator", "Use curvature estimation to select branching variable",
+#endif
+        "qp-strong-branching", "Perform strong branching with QP approximation",
+        "lp-strong-branching", "Perform strong branching with LP approximation",
+        "nlp-strong-branching", "Perform strong branching with NLP approximation",
+        "osi-simple", "Osi method to do simple branching",
+        "osi-strong", "Osi method to do strong branching",
+        "random", "Method to choose branching variable randomly");
+
+    roptions->setOptionExtraInfo("variable_selection", 27);
+
+    roptions->AddLowerBoundedIntegerOption("num_cut_passes",
+        "Set the maximum number of cut passes at regular nodes of the branch-and-cut.",
+        0,1,
+        "");
+    roptions->setOptionExtraInfo("num_cut_passes", 19);
+
+    roptions->AddLowerBoundedIntegerOption("num_cut_passes_at_root",
+        "Set the maximum number of cut passes at regular nodes of the branch-and-cut.",
+        0,20,
+        "");
+    roptions->setOptionExtraInfo("num_cut_passes_at_root", 19);
+
+    roptions->AddStringOption2("enable_dynamic_nlp",
+               "Enable dynamic linear and quadratic rows addition in nlp",
+               "no",
+               "no", "",
+               "yes", "",
+               "");
+    roptions->setOptionExtraInfo("enable_dynamic_nlp", 19);
+
+
+    //roptions->SetRegisteringCategory("Debugging",RegisteredOptions::UndocumentedCategory);
+    roptions->AddStringOption2("read_solution_file",
+               "Read a file with the optimal solution to test if algorithms cuts it.",
+               "no",
+               "no","",
+               "yes","",
+               "For Debugging purposes only.");
+    roptions->setOptionExtraInfo("enable_dynamic_nlp", 8);
+
+    /* Branching options.*/
+    LpBranchingSolver::registerOptions(roptions);
+
+#ifdef COIN_HAS_FILTERSQP
+    FilterSolver::registerOptions(roptions);
+    BqpdSolver::registerOptions(roptions);
+#endif
+    CbcDiver::registerOptions(roptions);
+    CbcDfsDiver::registerOptions(roptions);
+    BonChooseVariable::registerOptions(roptions);
+  }
+
+
+  /** Initialize the options and the journalist.*/
+  void
+  BabSetupBase::initializeOptionsAndJournalist()
+  {
+    options_ = new Ipopt::OptionsList();
+
+    journalist_= new Ipopt::Journalist();
+    roptions_ = new Bonmin::RegisteredOptions();
+
+    try {
+      Ipopt::SmartPtr<Ipopt::Journal> stdout_journal =
+        journalist_->AddFileJournal("console", "stdout", Ipopt::J_ITERSUMMARY);
+
+      options_->SetJournalist(journalist_);
+      options_->SetRegisteredOptions(GetRawPtr(roptions_));
+    }
+    catch (Ipopt::IpoptException &E) {
+      E.ReportException(*journalist_);
+      throw E;
+    }
+    catch (std::bad_alloc) {
+      journalist_->Printf(Ipopt::J_ERROR, Ipopt::J_MAIN, "\n Not enough memory .... EXIT\n");
+      throw -1;
+    }
+    catch (...) {
+      Ipopt::IpoptException E("Uncaught exception in FilterSolver::FilterSolver()",
+          "BonFilterSolver.cpp",-1);
+      throw E;
+    }
+
+    registerOptions();
+  }
+
+  /** Get the options from given fileName */
+  void
+  BabSetupBase::readOptionsFile(std::string fileName)
+  {
+    if (GetRawPtr(options_) == NULL || GetRawPtr(roptions_) == NULL || GetRawPtr(journalist_) == NULL)
+      initializeOptionsAndJournalist();
+    std::ifstream is;
+    if (fileName != "") {
+      try {
+        is.open(fileName.c_str());
+      }
+      catch (std::bad_alloc) {
+        journalist_->Printf(Ipopt::J_SUMMARY, Ipopt::J_MAIN, "\nEXIT: Not enough memory.\n");
+        throw -1;
+      }
+      catch (...) {
+        Ipopt::IpoptException E("Unknown Exception caught in ipopt", "Unknown File", -1);
+        E.ReportException(*journalist_);
+        throw -1;
+      }
+    }
+    readOptionsStream(is);
+    if (is) {
+      is.close();
+    }
+  }
+
+  /** Get the options from long string containing all.*/
+  void
+  BabSetupBase::readOptionsString(std::string opt_string)
+  {
+    if (GetRawPtr(options_) == NULL || GetRawPtr(roptions_) == NULL || GetRawPtr(journalist_) == NULL)
+      initializeOptionsAndJournalist();
+    std::stringstream is(opt_string.c_str());
+    readOptionsStream(is);
+  }
+
+
+  void
+  BabSetupBase::readOptionsStream(std::istream& is)
+  {
+    if (GetRawPtr(options_) == NULL || GetRawPtr(roptions_) == NULL || GetRawPtr(journalist_) == NULL)
+      initializeOptionsAndJournalist();
+    if (is.good()) {
+      try {
+        options_->ReadFromStream(*journalist_, is);
+      }
+      catch (Ipopt::IpoptException &E) {
+        E.ReportException(*journalist_);
+        throw E;
+      }
+    }
+    mayPrintDoc();
+    readOptions_=true;
+  }
+
+  /** May print documentation of options if options print_options_documentation is set to yes.*/
+  void
+  BabSetupBase::mayPrintDoc()
+  {
+    bool print_options_documentation;
+    options_->GetBoolValue("print_options_documentation",
+        print_options_documentation, "");
+    if (print_options_documentation) {
+      std::list<std::string> categories;
+      categories.push_back("Algorithm choice");
+      categories.push_back("Branch-and-bound options");
+      categories.push_back("ECP cuts generation");
+      categories.push_back("Feasibility checker using OA cuts");
+      categories.push_back("MILP Solver");
+      categories.push_back("MILP cutting planes in hybrid algorithm");
+      categories.push_back("Primal Heuristics");
+      categories.push_back("NLP interface");
+      categories.push_back("NLP solution robustness");
+      categories.push_back("NLP solves in hybrid algorithm");
+      categories.push_back("Nonconvex problems");
+      categories.push_back("Outer Approximation Decomposition (B-OA)");
+      categories.push_back("Outer Approximation cuts generation");
+      categories.push_back("Output and Loglevel");
+      categories.push_back("Strong branching setup");
+      // Undocumented categories
+      categories.push_back("Diving options");
+      categories.push_back("ECP based strong branching");
+      categories.push_back("Primal Heuristics (undocumented)");
+      categories.push_back("Outer Approximation strengthening");
+#ifdef COIN_HAS_FILTERSQP
+      categories.push_back("FilterSQP options");
+#endif
+      //    roptions->OutputLatexOptionDocumentation2(*app_->Jnlst(),categories);
+      roptions_->OutputOptionDocumentation(*(journalist_),categories);
+    }
+  }
+
+  void
+  BabSetupBase::setPriorities()
+  {
+    const int * priorities = nonlinearSolver()->getPriorities();
+    const double * upPsCosts = nonlinearSolver()->getUpPsCosts();
+    const int * directions = nonlinearSolver()->getBranchingDirections();
+    bool hasPseudo = (upPsCosts!=NULL);
+    if (priorities == NULL && directions && NULL && hasPseudo)
+      return;
+    int n = nonlinearSolver()->numberObjects();
+    OsiObject ** objects = nonlinearSolver()->objects();
+    for (int i = 0 ; i < n; i++) {
+      OsiObject2 * object = dynamic_cast<OsiObject2 *>(objects[i]);
+      int iCol = objects[i]->columnNumber();
+      if (iCol < 0) {
+        throw CoinError("BabSetupBase","setPriorities",
+            "Don't know how to set priority for non-column object.");
+      }
+      if (priorities) {
+        objects[i]->setPriority(priorities[iCol]);
+      }
+      if (directions) {
+        if (object == NULL) {
+          throw CoinError("BabSetupBase","setPriorities",
+              "Don't know how to set preferred way for object.");
+        }
+        object->setPreferredWay(directions[iCol]);
+      }
+      if (upPsCosts) {
+        throw CoinError("BabSetupBase","setPriorities",
+            "Can not handle user set pseudo-costs with OsiObjects\n"
+            "You should use one of the Cbc branching rules:\n"
+            "most-fractional or strong-branching.");
+      }
+    }
+  }
+
+  void
+  BabSetupBase::addSos()
+  {
+
+    // pass user set Sos constraints (code inspired from CoinSolve.cpp)
+    const TMINLP::SosInfo * sos = nonlinearSolver()->model()->sosConstraints();
+    if (!getIntParameter(BabSetupBase::DisableSos) && sos && sos->num > 0) //we have some sos constraints
+    {
+      const int & numSos = sos->num;
+      OsiObject ** objects = new OsiObject*[numSos];
+      const int * starts = sos->starts;
+      const int * indices = sos->indices;
+      const char * types = sos->types;
+      const double * weights = sos->weights;
+      bool hasPriorities = false;
+      const int * varPriorities = nonlinearSolver()->getPriorities();
+      int numberObjects =  nonlinearSolver()->numberObjects();
+      if (varPriorities)
+      {
+        for (int i = 0 ; i < numberObjects ; i++) {
+          if (varPriorities[i]) {
+            hasPriorities = true;
+            break;
+          }
+        }
+      }
+      const int * sosPriorities = sos->priorities;
+      if (sosPriorities)
+      {
+        for (int i = 0 ; i < numSos ; i++) {
+          if (sosPriorities[i]) {
+            hasPriorities = true;
+            break;
+          }
+        }
+      }
+      for (int i = 0 ; i < numSos ; i++)
+      {
+        int start = starts[i];
+        int length = starts[i + 1] - start;
+        objects[i] = new OsiSOS(nonlinearSolver(), length, &indices[start],
+            &weights[start], (int) types[i]);
+
+        objects[i]->setPriority(10);
+        if (hasPriorities && sosPriorities && sosPriorities[i]) {
+          objects[i]->setPriority(sosPriorities[i]);
+        }
+      }
+      nonlinearSolver()->addObjects(numSos, objects);
+      for (int i = 0 ; i < numSos ; i++)
+        delete objects[i];
+      delete [] objects;
+    }
+  }
+
+
+}/* End namespace Bonmin.*/
+
diff --git a/src/Algorithms/BonBabSetupBase.hpp b/src/Algorithms/BonBabSetupBase.hpp
new file mode 100644
index 0000000..13760b6
--- /dev/null
+++ b/src/Algorithms/BonBabSetupBase.hpp
@@ -0,0 +1,386 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/12/2007
+
+#ifndef BabSetupBase_H
+#define BabSetupBase_H
+
+#include <string>
+#include <list>
+#include "CglCutGenerator.hpp"
+#include "CbcHeuristic.hpp"
+#include "OsiChooseVariable.hpp"
+#include "BonOsiTMINLPInterface.hpp"
+#include "IpSmartPtr.hpp"
+#include "BonTMINLP2OsiLP.hpp"
+
+namespace Bonmin
+{
+  /** A class to have all elements necessary to setup a branch-and-bound.*/
+  class BabSetupBase
+  {
+  public:
+    /** Type for cut generation method with its frequency and string identification. */
+    struct CuttingMethod 
+    {
+      int frequency;
+      std::string id;
+      CglCutGenerator * cgl;
+      bool atSolution;
+      bool normal;
+      bool always;
+      CuttingMethod():
+          atSolution(false),
+          normal(true),
+          always(false)
+      {}
+
+      CuttingMethod(const CuttingMethod & other):
+          frequency(other.frequency),
+          id(other.id),
+          cgl(other.cgl),
+          atSolution(other.atSolution),
+          normal(other.normal),
+          always(other.always)
+      {}
+    };
+    /** Type for heuristic method with its string identification. */
+    struct HeuristicMethod
+    {
+      std::string id;
+      CbcHeuristic* heuristic;
+      HeuristicMethod()
+      {}
+
+      HeuristicMethod(const HeuristicMethod & other):
+          id(other.id),
+          heuristic(other.heuristic)
+      {}
+    };
+    typedef std::list<CuttingMethod> CuttingMethods;
+    typedef std::list<HeuristicMethod  > HeuristicMethods;
+
+    /** Strategies for comparing the nodes on the heap. */
+    enum NodeComparison {
+      bestBound = 0 /** Best bound*/,
+      DFS /** Depth First Search*/,
+      BFS /** Best First Search */,
+      dynamic /** Dynamic strategy, see <a href="http://www.coin-or.org/Doxygen/Cbc/class_cbc_branch_dynamic_decision.html">
+      		  CbcBranchActual.hpp </a> for explanations.*/,
+      bestGuess /** Best guessed integer solution is subtree below, based on pseudo costs */
+    };
+
+    /** Strategies for traversing the tree.*/
+    enum TreeTraversal {
+      HeapOnly=0 /** Only using the heap, uses CbcTree.*/,
+      DiveFromBest /** dive from top node of the heap untill it gets to a leaf of the tree. Uses Bonmin::CbcDiver.*/,
+      ProbedDive /** Eplore two kids before following on dive.*/,
+      DfsDiveFromBest /** dive from top node of the heap with more elaborate strategy (see options doc). Uses Bonmin::CbcDfsDiver.*/,
+      DfsDiveDynamic /** Same as DfsDiveFromBest, but after a prescribed number of integer solution are found switch to best-bound and if too many node switches to depth-first. Uses Bonmin::CbcDfsDiver.*/
+    };
+
+
+    /** @name Enums for optionslist parameters */
+    enum VarSelectStra_Enum {
+      MOST_FRACTIONAL=0,
+      STRONG_BRANCHING,
+      RELIABILITY_BRANCHING,
+#ifdef BONMIN_CURVATURE_BRANCHING
+      CURVATURE_ESTIMATOR,
+#endif
+      QP_STRONG_BRANCHING,
+      LP_STRONG_BRANCHING,
+      NLP_STRONG_BRANCHING,
+      OSI_SIMPLE,
+      OSI_STRONG,
+      RANDOM
+    };
+
+    /** Parameters represented by an integer. */
+    enum IntParameter{
+      BabLogLevel = 0 /** Log level of main branch-and-bound*/,
+      BabLogInterval/** Display information every logIntervval nodes.*/,
+      MaxFailures /** Max number of failures in a branch.*/,
+      FailureBehavior /** Behavior of the algorithm in the case of a failure.*/,
+      MaxInfeasible /** Max number of consecutive infeasible problem in a branch
+            before fathoming.*/,
+      NumberStrong /** Number of candidates for strong branching.*/,
+      MinReliability /** Minimum reliability before trust pseudo-costs.*/,
+      MaxNodes /** Global node limit.*/,
+      MaxSolutions /** limit on number of integer feasible solution.*/,
+      MaxIterations /** Global iteration limit. */,
+      SpecialOption /** Spetial option in particular for Cbc. */,
+      DisableSos /** Consider or not SOS constraints.*/,
+      NumCutPasses/** Number of cut passes at nodes.*/,
+      NumCutPassesAtRoot/** Number of cut passes at nodes.*/,
+      RootLogLevel/** Log level for root relaxation.*/,
+      NumberIntParam /** Dummy end to size table*/
+    };
+
+
+    /** Parameters represented by a double.*/
+    enum DoubleParameter{
+      CutoffDecr = 0 /** Amount by which cutoff is incremented */,
+      Cutoff /** cutoff value */,
+      AllowableGap /** Stop if absolute gap is less than this. */,
+      AllowableFractionGap /** Stop if relative gap is less than this.*/,
+      IntTol /** Integer tolerance.*/,
+      MaxTime /** Global time limit. */,
+      NumberDoubleParam /** Dummy end to size table*/
+    };
+
+    /** Default constructor. */
+    BabSetupBase(const CoinMessageHandler * handler = NULL);
+
+    /** Construct from existing tminlp. */
+    BabSetupBase(Ipopt::SmartPtr<TMINLP> tminlp, const CoinMessageHandler * handler = NULL);
+    /** Construct from existing application.*/
+    BabSetupBase(Ipopt::SmartPtr<TNLPSolver> app);
+    /** Construct from existing TMINLP interface.*/
+    BabSetupBase(const OsiTMINLPInterface& nlp);
+    /** Copy but uses an other nlp.*/
+    BabSetupBase(const BabSetupBase &setup,
+                 OsiTMINLPInterface &nlp);
+
+    /** Copy but uses an other nlp.*/
+    BabSetupBase(const BabSetupBase &setup,
+                 OsiTMINLPInterface &nlp,
+                 const std::string &prefix);
+
+    /** Copy constructor. */
+    BabSetupBase(const BabSetupBase & other);
+
+    /** virtual copy constructor. */
+    virtual BabSetupBase * clone() const = 0;
+
+    /** Make a copy with solver replace by one passed .*/
+    virtual BabSetupBase *clone(OsiTMINLPInterface&nlp)const;
+    /** Virtual destructor. */
+    virtual ~BabSetupBase();
+
+    /** @name Methods to initialize algorithm with various inputs. */
+    /** @{ */
+    /** use existing TMINLP interface (containing the options).*/
+    void use(const OsiTMINLPInterface& nlp);
+    /** Read options (if not done before) and create interface using tminlp.*/
+    void use(Ipopt::SmartPtr<TMINLP> tminlp );
+    /** use specific instanciation of a TMINLP2TNLP.*/
+    void use(Ipopt::SmartPtr<TMINLP2TNLP> prob);
+    /** Set the non-linear solver used */
+    void setNonlinearSolver(OsiTMINLPInterface * s)
+    {
+      nonlinearSolver_ = s;
+    }
+    /** @} */
+
+    /** @name Methods to manipulate options. */
+    /** @{ */
+    /** Register all the options for this algorithm instance.*/
+    virtual void registerOptions();
+    /** Setup the defaults options for this algorithm. */
+    virtual void setBabDefaultOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+    {}
+    /** Register all the options for this algorithm instance.*/
+    static void registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+    /** Get the options from default text file (bonmin.opt) if don't already have them.*/
+    virtual void readOptionsFile()
+    {
+      if (readOptions_) return;
+      readOptionsFile("bonmin.opt");
+    }
+
+    /** Get the options from given fileName */
+    void readOptionsFile(std::string fileName);
+
+    /** Get the options from long string containing all.*/
+    void readOptionsString(std::string opt_string);
+
+    /** Get the options from stream.*/
+    void readOptionsStream(std::istream& is);
+
+    /** May print documentation of options if options print_options_documentation is set to yes.*/
+    void mayPrintDoc();
+
+
+    /** Get prefix to use for options.*/
+    const char * prefix() const {
+      return prefix_.c_str();
+    }
+
+    /** Set the value for options, output...*/
+    void setOptionsAndJournalist(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        Ipopt::SmartPtr<Ipopt::Journalist> journalist)
+    {
+      options_ = options;
+      roptions_ = roptions;
+      journalist_ = journalist;
+    }
+
+    /** Initialize the options and the journalist.*/
+    void initializeOptionsAndJournalist();
+    /** @} */
+
+    /** @name Elements of the branch-and-bound setup.*/
+    /** @{ */
+    /** Pointer to the non-linear solver used.*/
+    OsiTMINLPInterface * nonlinearSolver()
+    {
+      return nonlinearSolver_;
+    }
+    /** Pointer to the continuous solver to use for relaxations. */
+    OsiSolverInterface * continuousSolver()
+    {
+      return continuousSolver_;
+    }
+    /** list of cutting planes methods to apply with their frequencies. */
+    CuttingMethods& cutGenerators()
+    {
+      return cutGenerators_;
+    }
+    /** list of Heuristic methods to use. */
+    HeuristicMethods& heuristics()
+    {
+      return heuristics_;
+    }
+    /** branching method to use. */
+    OsiChooseVariable * branchingMethod()
+    {
+      return branchingMethod_;
+    }
+    /** Method used to compare nodes. */
+    NodeComparison& nodeComparisonMethod()
+    {
+      return nodeComparisonMethod_;
+    }
+    /** Method used to traverse tree.*/
+    TreeTraversal treeTraversalMethod()
+    {
+      return treeTraversalMethod_;
+    }
+    /** Return value of integer parameter. */
+    int getIntParameter(const IntParameter &p) const
+    {
+      return intParam_[p];
+    }
+    /** Return value of double parameter.*/
+    double getDoubleParameter(const DoubleParameter &p) const
+    {
+      return doubleParam_[p];
+    }
+    /** Return value of integer parameter. */
+    void setIntParameter(const IntParameter &p, const int v)
+    {
+      intParam_[p] = v;
+    }
+    /** Return value of double parameter.*/
+    void setDoubleParameter(const DoubleParameter &p, const double v)
+    {
+      doubleParam_[p] = v;
+    }
+    /** @} */
+
+    /** Get the values of base parameters from the options stored.*/
+    void gatherParametersValues()
+    {
+      gatherParametersValues(options_);
+    }
+    /** Get the values of the base parameters from the passed options.*/
+    void gatherParametersValues(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+    /** Acces storage of Journalist for output */
+    Ipopt::SmartPtr<Ipopt::Journalist> journalist()
+    {
+      return journalist_;
+    }
+
+    /** Acces list of Options */
+    Ipopt::SmartPtr<Ipopt::OptionsList> options()
+    {
+      return options_;
+    }
+
+    /** Access registered Options */
+    Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions()
+    {
+      return roptions_;
+    }
+
+    /** Access to extra objects.*/
+    const vector<OsiObject *>& objects() const
+    {
+      return objects_;
+    }
+
+    /** Access to extra objects.*/
+    vector<OsiObject *>& objects()
+    {
+      return objects_;
+    }
+  
+    void addCutGenerator(CuttingMethod & cg){
+      cutGenerators_.push_back(cg);
+    }
+
+    void set_linearizer(TMINLP2OsiLP * linearizer){
+      linearizer_ = linearizer;
+    }
+
+  protected:
+    /** Set the priorities into OsiTMINLPInterface when needed.*/
+    void setPriorities();
+    /** Add SOS constraints to OsiTMINLPInterface when needed.*/
+    void addSos();
+
+    /** storage of integer parameters.*/
+    int intParam_[NumberIntParam];
+    /** default values for int parameters.*/
+    static int defaultIntParam_[NumberIntParam];
+    /** storage of double parameters. */
+    double doubleParam_[NumberDoubleParam];
+    /** default values for double parameters. */
+    static double defaultDoubleParam_[NumberDoubleParam];
+    /** Storage of the non-linear solver used.*/
+    OsiTMINLPInterface * nonlinearSolver_;
+    /** Storage of continuous solver.*/
+    OsiSolverInterface * continuousSolver_;
+    /** Method to linearize MINLPs */
+    Ipopt::SmartPtr<TMINLP2OsiLP> linearizer_;
+    /** Cut generation methods. */
+    CuttingMethods cutGenerators_;
+    /** Heuristic methods. */
+    HeuristicMethods heuristics_;
+    /** Branching method.*/
+    OsiChooseVariable * branchingMethod_;
+    /** Node comparison method.*/
+    NodeComparison nodeComparisonMethod_;
+    /** Tree traversal method.*/
+    TreeTraversal treeTraversalMethod_;
+    /** Extra object to add to Cbc (not OsiObjects).*/
+    vector<OsiObject *> objects_;
+    
+
+    /** Storage of Journalist for output */
+    Ipopt::SmartPtr<Ipopt::Journalist> journalist_;
+
+    /** List of Options */
+    Ipopt::SmartPtr<Ipopt::OptionsList> options_;
+
+    /** Registered Options */
+    Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions_;
+
+    /** flag to say if option file was read.*/
+    bool readOptions_;
+    /** separate message handler.*/
+    CoinMessageHandler * messageHandler_;
+    /** Prefix to use when reading options.*/
+    std::string prefix_;
+  };
+}/* End namespace Bonmin. */
+#endif
+
diff --git a/src/Algorithms/BonBonminSetup.cpp b/src/Algorithms/BonBonminSetup.cpp
new file mode 100644
index 0000000..d0d5a81
--- /dev/null
+++ b/src/Algorithms/BonBonminSetup.cpp
@@ -0,0 +1,920 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/13/2007
+
+#include "BonminConfig.h"
+#include "OsiClpSolverInterface.hpp"
+
+#include "BonBonminSetup.hpp"
+#ifdef BONMIN_CURVATURE_BRANCHING
+#include "BonCurvBranchingSolver.hpp"
+#endif
+#include "BonChooseVariable.hpp"
+#include "BonRandomChoice.hpp"
+#include "BonDiver.hpp"
+#include "BonQpBranchingSolver.hpp"
+#include "BonLpBranchingSolver.hpp"
+
+//OA machinery
+#include "BonDummyHeuristic.hpp"
+#include "BonOACutGenerator2.hpp"
+#include "BonFpForMinlp.hpp"
+#include "BonOaFeasChecker.hpp"
+#include "BonOaNlpOptim.hpp"
+#include "BonEcpCuts.hpp"
+
+#include "BonCbcNode.hpp"
+#ifdef COIN_HAS_FILTERSQP
+# include "BonFilterSolver.hpp"
+#endif
+
+//MILP cuts
+#include "CglGomory.hpp"
+#include "CglProbing.hpp"
+#include "CglKnapsackCover.hpp"
+#include "CglOddHole.hpp"
+#include "CglClique.hpp"
+#include "CglFlowCover.hpp"
+#include "CglMixedIntegerRounding2.hpp"
+#include "CglTwomir.hpp"
+#include "CglPreProcess.hpp"
+#include "CglLandP.hpp"
+#include "CglRedSplit.hpp"
+#include "BonLinearCutsGenerator.hpp"
+
+#include "BonFixAndSolveHeuristic.hpp"
+#include "BonDummyPump.hpp"
+#include "BonPumpForMinlp.hpp"
+#include "BonHeuristicRINS.hpp"
+#include "BonHeuristicLocalBranching.hpp"
+#include "BonHeuristicFPump.hpp"
+#include "BonHeuristicDiveFractional.hpp"
+#include "BonHeuristicDiveVectorLength.hpp"
+#include "BonHeuristicDiveMIPFractional.hpp"
+#include "BonHeuristicDiveMIPVectorLength.hpp"
+#include "BonMilpRounding.hpp"
+//#include "BonInnerApproximation.hpp"
+namespace Bonmin
+{
+  BonminSetup::BonminSetup(const CoinMessageHandler * handler):BabSetupBase(handler),algo_(Dummy)
+  {}
+
+  BonminSetup::BonminSetup(const BonminSetup &other):BabSetupBase(other),
+      algo_(other.algo_)
+  {}
+
+  BonminSetup::BonminSetup(const BonminSetup &other,
+                           OsiTMINLPInterface &nlp):
+      BabSetupBase(other, nlp),
+      algo_(other.algo_)
+  {
+    if(algo_ != B_BB){
+      assert(continuousSolver_ == NULL);
+      continuousSolver_ = new OsiClpSolverInterface;
+      int lpLogLevel;
+      options_->GetIntegerValue("lp_log_level",lpLogLevel,prefix_.c_str());
+      if(messageHandler_)
+        continuousSolver_->passInMessageHandler(messageHandler_);
+      continuousSolver_->messageHandler()->setLogLevel(lpLogLevel);
+
+      nonlinearSolver_->extractLinearRelaxation(*continuousSolver_);
+      // say bound dubious, does cuts at solution
+      OsiBabSolver * extraStuff = new OsiBabSolver(3);
+      continuousSolver_->setAuxiliaryInfo(extraStuff);
+      delete extraStuff;
+    }
+  }
+  BonminSetup::BonminSetup(const BonminSetup &other,
+                           OsiTMINLPInterface &nlp,
+                           const std::string &prefix):
+    BabSetupBase(other, nlp, prefix),
+    algo_(Dummy)
+  {
+   algo_ = getAlgorithm();
+    if (algo_ == B_BB)
+      initializeBBB();
+    else
+      initializeBHyb(true);
+  }
+  void BonminSetup::registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    BabSetupBase::registerAllOptions(roptions);
+
+    /* Outer Approximation options.*/
+    OACutGenerator2::registerOptions(roptions);
+    OaFeasibilityChecker::registerOptions(roptions);
+    MinlpFeasPump::registerOptions(roptions);
+    EcpCuts::registerOptions(roptions);
+    OaNlpOptim::registerOptions(roptions);
+    SubMipSolver::registerOptions(roptions);
+
+
+    BonCbcFullNodeInfo::registerOptions(roptions);
+
+
+    registerMilpCutGenerators(roptions);
+
+
+    /** Heursitics.*/
+    LocalSolverBasedHeuristic::registerOptions(roptions);
+    FixAndSolveHeuristic::registerOptions(roptions);
+    DummyPump::registerOptions(roptions);
+    MilpRounding::registerOptions(roptions);
+    PumpForMinlp::registerOptions(roptions);
+    HeuristicRINS::registerOptions(roptions);
+    HeuristicLocalBranching::registerOptions(roptions);
+    HeuristicFPump::registerOptions(roptions);
+    HeuristicDiveFractional::registerOptions(roptions);
+    HeuristicDiveVectorLength::registerOptions(roptions);
+    HeuristicDiveMIPFractional::registerOptions(roptions);
+    HeuristicDiveMIPVectorLength::registerOptions(roptions);
+
+    roptions->SetRegisteringCategory("Algorithm choice", RegisteredOptions::BonminCategory);
+    roptions->AddStringOption6("algorithm",
+        "Choice of the algorithm.",
+        "B-BB",
+        "B-BB","simple branch-and-bound algorithm,",
+        "B-OA","OA Decomposition algorithm,",
+        "B-QG","Quesada and Grossmann branch-and-cut algorithm,",
+        "B-Hyb","hybrid outer approximation based branch-and-cut,",
+        "B-Ecp","ECP cuts based branch-and-cut a la FilMINT.",
+        "B-iFP","Iterated Feasibility Pump for MINLP.",
+        "This will preset some of the options of bonmin depending on the algorithm choice."
+                              );
+    roptions->setOptionExtraInfo("algorithm",127);
+
+
+  }
+
+  /** Register all the Bonmin options.*/
+  void
+  BonminSetup::registerOptions()
+  {
+    registerAllOptions(roptions_);
+  }
+
+  /** Initialize, read options and create appropriate bonmin setup using initialized tminlp.*/
+  void
+  BonminSetup::initialize(Ipopt::SmartPtr<TMINLP> tminlp, bool createContinuousSolver /*= false*/)
+  {
+
+    use(tminlp);
+    BabSetupBase::gatherParametersValues(options_);
+    algo_ = getAlgorithm();
+    if (algo_ == B_BB)
+      initializeBBB();
+    else
+      initializeBHyb(createContinuousSolver);
+  }
+
+  /** Initialize, read options and create appropriate bonmin setup using initialized tminlp.*/
+  void
+  BonminSetup::initialize(const OsiTMINLPInterface &nlpSi, bool createContinuousSolver /*= false*/)
+  {
+    use(nlpSi);
+    BabSetupBase::gatherParametersValues(options_);
+    Algorithm algo = getAlgorithm();
+    if (algo == B_BB)
+      initializeBBB();
+    else
+      initializeBHyb(createContinuousSolver);
+  }
+
+  /** Register standard MILP cut generators. */
+  void
+  BonminSetup::registerMilpCutGenerators(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("MILP cutting planes in hybrid algorithm", RegisteredOptions::BonminCategory);
+
+    roptions->AddLowerBoundedIntegerOption("Gomory_cuts",
+        "Frequency (in terms of nodes) for generating Gomory cuts in branch-and-cut.",
+        -100,-5,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("Gomory_cuts",119);
+#if 0
+    roptions->AddBoundedIntegerOption("probing_cuts",
+        "Frequency (in terms of nodes) for generating probing cuts in branch-and-cut",
+        0,0,0,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("probing_cuts",0);
+#endif
+    roptions->AddLowerBoundedIntegerOption("cover_cuts",
+        "Frequency (in terms of nodes) for generating cover cuts in branch-and-cut",
+        -100,0,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("cover_cuts",119);
+
+    roptions->AddLowerBoundedIntegerOption("mir_cuts",
+        "Frequency (in terms of nodes) for generating MIR cuts in branch-and-cut",
+        -100,-5,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("mir_cuts",119);
+    roptions->AddLowerBoundedIntegerOption("2mir_cuts",
+        "Frequency (in terms of nodes) for generating 2-MIR cuts in branch-and-cut",
+        -100,0,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("2mir_cuts",119);
+
+    roptions->AddLowerBoundedIntegerOption("flow_cover_cuts",
+        "Frequency (in terms of nodes) for generating flow cover cuts in branch-and-cut",
+        -100,-5,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("flow_cover_cuts",119);
+    roptions->AddLowerBoundedIntegerOption("lift_and_project_cuts",
+        "Frequency (in terms of nodes) for generating lift-and-project cuts in branch-and-cut",
+        -100,0,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("lift_and_project_cuts", 119);
+    roptions->AddLowerBoundedIntegerOption("reduce_and_split_cuts",
+        "Frequency (in terms of nodes) for generating reduce-and-split cuts in branch-and-cut",
+        -100,0,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("reduce_and_split_cuts", 119);
+
+
+    roptions->AddLowerBoundedIntegerOption("clique_cuts",
+        "Frequency (in terms of nodes) for generating clique cuts in branch-and-cut",
+        -100,-5,
+        "If $k > 0$, cuts are generated every $k$ nodes, if $-99 < k < 0$ cuts are generated every $-k$ nodes but "
+        "Cbc may decide to stop generating cuts, if not enough are generated at the root node, "
+        "if $k=-99$ generate cuts only at the root node, if $k=0$ or $100$ do not generate cuts.");
+    roptions->setOptionExtraInfo("clique_cuts", 119);
+
+  }
+
+
+  /** Add milp cut generators according to options.*/
+  void
+  BonminSetup::addMilpCutGenerators()
+  {
+
+    int freq;
+
+    options_->GetIntegerValue("Gomory_cuts", freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglGomory * gom = new CglGomory;
+      cg.cgl = gom;
+      gom->setLimitAtRoot(5000);
+      gom->setLimit(500);
+      gom->setLargestFactorMultiplier(1e-08);
+      cg.id = "Mixed Integer Gomory";
+      cutGenerators_.push_back(cg);
+    }
+
+#if 0
+    options_->GetIntegerValue("probing_cuts",freq,prefix_.c_str());
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglProbing * probe = new CglProbing;
+      cg.cgl = probe;
+      probe->setUsingObjective(1);
+      probe->setMaxPass(3);
+      probe->setMaxPassRoot(3);
+      // Number of unsatisfied variables to look at
+      probe->setMaxProbe(10);
+      probe->setMaxProbeRoot(50);
+      // How far to follow the consequences
+      probe->setMaxLook(10);
+      probe->setMaxLookRoot(50);
+      probe->setMaxLookRoot(10);
+      // Only look at rows with fewer than this number of elements
+      probe->setMaxElements(200);
+      probe->setRowCuts(3);
+      cg.id = "Probing";
+      cutGenerators_.push_back(cg);
+    }
+#endif
+
+    options_->GetIntegerValue("mir_cuts",freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglMixedIntegerRounding2 * mir = new CglMixedIntegerRounding2;
+      //CglMixedIntegerRounding2 * mir = new CglMixedIntegerRounding2(1, true, 1);
+      cg.cgl = mir;
+      cg.id = "Mixed Integer Rounding";
+      cutGenerators_.push_back(cg);
+    }
+
+    options_->GetIntegerValue("2mir_cuts",freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglTwomir * mir2 = new CglTwomir;
+      cg.cgl = mir2;
+      cg.id = "2-MIR";
+      cutGenerators_.push_back(cg);
+    }
+
+    options_->GetIntegerValue("cover_cuts",freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglKnapsackCover * cover = new CglKnapsackCover;
+      cg.cgl = cover;
+      cg.id = "Cover";
+      cutGenerators_.push_back(cg);
+    }
+
+    options_->GetIntegerValue("clique_cuts",freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglClique * clique = new CglClique;
+      clique->setStarCliqueReport(false);
+      clique->setRowCliqueReport(false);
+      clique->setMinViolation(0.1);
+
+      cg.cgl = clique;
+      cg.id = "Clique";
+      cutGenerators_.push_back(cg);
+    }
+
+    options_->GetIntegerValue("flow_cover_cuts",freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglFlowCover * flow = new CglFlowCover;
+      cg.cgl = flow;
+      cg.id = "Flow Covers";
+      cutGenerators_.push_back(cg);
+    }
+
+    options_->GetIntegerValue("lift_and_project_cuts",freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglLandP * landp = new CglLandP;
+      cg.cgl = landp;
+      cg.id = "Lift-and-Project";
+      cutGenerators_.push_back(cg);
+    }
+
+    options_->GetIntegerValue("reduce_and_split_cuts",freq,prefix_.c_str());
+
+    if (freq) {
+      CuttingMethod cg;
+      cg.frequency = freq;
+      CglRedSplit * rands = new CglRedSplit;
+      cg.cgl = rands;
+      cg.id = "Reduce-and-Split";
+      cutGenerators_.push_back(cg);
+    }
+  }
+
+
+  void
+  BonminSetup::initializeBBB()
+  {
+    continuousSolver_ = nonlinearSolver_;
+    nonlinearSolver_->ignoreFailures();
+    OsiBabSolver extraStuff(2);
+    continuousSolver_->setAuxiliaryInfo(&extraStuff);
+
+    intParam_[BabSetupBase::SpecialOption] = 16;
+    if (!options_->GetIntegerValue("number_before_trust",intParam_[BabSetupBase::MinReliability],prefix_.c_str())) {
+      intParam_[BabSetupBase::MinReliability] = 1;
+      std::string o_name = prefix_ + "number_before_trust";
+      options_->SetIntegerValue(o_name.c_str(),intParam_[BabSetupBase::MinReliability],true,true);
+    }
+    if (!options_->GetIntegerValue("number_strong_branch",intParam_[BabSetupBase::NumberStrong],prefix_.c_str())) {
+      intParam_[BabSetupBase::NumberStrong] = 1000;
+      std::string o_name = prefix_ + "number_strong_branch";
+      options_->SetIntegerValue(o_name.c_str(),intParam_[BabSetupBase::NumberStrong],true,true);
+    }
+    int varSelection;
+    bool val = options_->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
+    if (!val){// || varSelection == STRONG_BRANCHING || varSelection == RELIABILITY_BRANCHING ) {
+      std::string o_name = prefix_ + "variable_selection";
+      options_->SetStringValue(o_name.c_str(), "nlp-strong-branching",true,true);
+      varSelection = NLP_STRONG_BRANCHING;
+    }
+
+    switch (varSelection) {
+#ifdef BONMIN_CURVATURE_BRANCHING
+    case CURVATURE_ESTIMATOR:
+#endif
+    case QP_STRONG_BRANCHING:
+    case LP_STRONG_BRANCHING:
+    case NLP_STRONG_BRANCHING: {
+        continuousSolver_->findIntegersAndSOS(false);
+        setPriorities();
+        addSos();
+        Ipopt::SmartPtr<StrongBranchingSolver> strong_solver = NULL;
+        BonChooseVariable * chooseVariable = new BonChooseVariable(*this, nonlinearSolver_);
+        chooseVariable->passInMessageHandler(nonlinearSolver_->messageHandler());
+        switch (varSelection) {
+#ifdef BONMIN_CURVATURE_BRANCHING
+        case CURVATURE_ESTIMATOR:
+          strong_solver = new CurvBranchingSolver(nonlinearSolver_);
+          chooseVariable->setTrustStrongForSolution(false);
+          chooseVariable->setTrustStrongForBound(false);
+          //chooseVariable->setOnlyPseudoWhenTrusted(true);
+          chooseVariable->setOnlyPseudoWhenTrusted(false);
+          break;
+#endif
+        case QP_STRONG_BRANCHING:
+          chooseVariable->setTrustStrongForSolution(false);
+          strong_solver = new QpBranchingSolver(nonlinearSolver_);
+          // The bound returned from the QP can be wrong, since the
+          // objective is not guaranteed to be an underestimator:
+          chooseVariable->setTrustStrongForBound(false);
+          //chooseVariable->setOnlyPseudoWhenTrusted(true);
+          chooseVariable->setOnlyPseudoWhenTrusted(false);
+          break;
+        case LP_STRONG_BRANCHING:
+          chooseVariable->setTrustStrongForSolution(false);
+          strong_solver = new LpBranchingSolver(this);
+          //chooseVariable->setOnlyPseudoWhenTrusted(true);
+          chooseVariable->setOnlyPseudoWhenTrusted(false);
+          break;
+         case NLP_STRONG_BRANCHING:
+          chooseVariable->setTrustStrongForSolution(false);
+          chooseVariable->setTrustStrongForBound(true);
+          chooseVariable->setOnlyPseudoWhenTrusted(false);
+          break;
+        }
+        nonlinearSolver_->SetStrongBrachingSolver(strong_solver);
+        branchingMethod_ = chooseVariable;
+      }
+      break;
+    case OSI_SIMPLE:
+      continuousSolver_->findIntegersAndSOS(false);
+      setPriorities();
+      addSos();
+      branchingMethod_ = new OsiChooseVariable(nonlinearSolver_);
+
+      break;
+    case OSI_STRONG:
+      continuousSolver_->findIntegersAndSOS(false);
+      setPriorities();
+      addSos();
+      branchingMethod_ = new OsiChooseStrong(nonlinearSolver_);
+      break;
+    case RANDOM:
+      continuousSolver_->findIntegersAndSOS(false);
+      setPriorities();
+      addSos();
+      branchingMethod_ = new BonRandomChoice(nonlinearSolver_);
+      break;
+      //default:
+      //abort();
+    }
+    if (branchingMethod_ != NULL) {
+      branchingMethod_->setNumberStrong(intParam_[NumberStrong]);
+    }
+
+
+    Ipopt::Index doHeuristicDiveFractional = false;
+    options()->GetEnumValue("heuristic_dive_fractional",doHeuristicDiveFractional,prefix_.c_str());
+    if(doHeuristicDiveFractional){
+      HeuristicDiveFractional* dive_fractional = new HeuristicDiveFractional(this);
+      HeuristicMethod h;
+      h.heuristic = dive_fractional;
+      h.id = "DiveFractional";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicDiveVectorLength = false;
+    options()->GetEnumValue("heuristic_dive_vectorLength",doHeuristicDiveVectorLength,prefix_.c_str());
+    if(doHeuristicDiveVectorLength){
+      HeuristicDiveVectorLength* dive_vectorLength = new HeuristicDiveVectorLength(this);
+      HeuristicMethod h;
+      h.heuristic = dive_vectorLength;
+      h.id = "DiveVectorLength";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicDiveMIPFractional = false;
+    if(!options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,prefix_.c_str())){
+      doHeuristicDiveMIPFractional = true;
+      std::string o_name = prefix_ + "heuristic_dive_MIP_fractional";
+      options_->SetStringValue(o_name.c_str(), "yes",true,true);
+    }
+    if(doHeuristicDiveMIPFractional){
+      HeuristicDiveMIPFractional* dive_MIP_fractional = new HeuristicDiveMIPFractional(this);
+      HeuristicMethod h;
+      h.heuristic = dive_MIP_fractional;
+      h.id = "DiveMIPFractional";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicDiveMIPVectorLength = false;
+    options()->GetEnumValue("heuristic_dive_MIP_vectorLength",doHeuristicDiveMIPVectorLength,prefix_.c_str());
+    if(doHeuristicDiveMIPVectorLength){
+      HeuristicDiveMIPVectorLength* dive_MIP_vectorLength = new HeuristicDiveMIPVectorLength(this);
+      HeuristicMethod h;
+      h.heuristic = dive_MIP_vectorLength;
+      h.id = "DiveMIPVectorLength";
+      heuristics_.push_back(h);
+    }
+    Ipopt::Index doHeuristicFPump = false;
+    if(!nonlinearSolver_->model()->hasGeneralInteger() && !options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,prefix_.c_str())){
+      doHeuristicFPump = true;
+      std::string o_name = prefix_ + "heuristic_feasibility_pump";
+      options_->SetStringValue(o_name.c_str(), "yes",true,true);
+    }
+    if(doHeuristicFPump){
+      HeuristicFPump* feasibility_pump = new HeuristicFPump(this);
+      HeuristicMethod h;
+      h.heuristic = feasibility_pump;
+      h.id = "FPump";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doFixAndSolve = false;
+    options()->GetEnumValue("fix_and_solve_heuristic",doFixAndSolve,prefix_.c_str());
+    if(doFixAndSolve){
+      FixAndSolveHeuristic* fix_and_solve = new FixAndSolveHeuristic(this);
+      HeuristicMethod h;
+      h.heuristic = fix_and_solve;
+      h.id = "Fix and Solve";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doDummyPump = false;
+    options()->GetEnumValue("dummy_pump_heuristic",doDummyPump,prefix_.c_str());
+    if(doDummyPump){
+      DummyPump* fix_and_solve = new DummyPump(this);
+      HeuristicMethod h;
+      h.heuristic = fix_and_solve;
+      h.id = "Dummy pump";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicRINS = false;
+    options()->GetEnumValue("heuristic_RINS",doHeuristicRINS,prefix_.c_str());
+    if(doHeuristicRINS){
+      HeuristicRINS* rins = new HeuristicRINS(this);
+      HeuristicMethod h;
+      h.heuristic = rins;
+      h.id = "RINS";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicLocalBranching = false;
+    options()->GetEnumValue("heuristic_local_branching",doHeuristicLocalBranching,prefix_.c_str());
+    if(doHeuristicLocalBranching){
+      HeuristicLocalBranching* local_branching = new HeuristicLocalBranching(this);
+      HeuristicMethod h;
+      h.heuristic = local_branching;
+      h.id = "LocalBranching";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicPumpForMinlp = false;
+    options()->GetEnumValue("pump_for_minlp",doHeuristicPumpForMinlp,prefix_.c_str());
+    if(doHeuristicPumpForMinlp){
+      PumpForMinlp * pump = new PumpForMinlp(this);
+      HeuristicMethod h;
+      h.heuristic = pump;
+      h.id = "Pump for MINLP";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicMilpRounding = false;
+    options()->GetEnumValue("MILP_rounding_heuristic",doHeuristicMilpRounding,prefix_.c_str());
+    if(doHeuristicMilpRounding){
+      MilpRounding * round = new MilpRounding(this);
+      HeuristicMethod h;
+      h.heuristic = round;
+      h.id = "MILP Rounding";
+      heuristics_.push_back(h);
+    }
+  }
+
+
+  void
+  BonminSetup::initializeBHyb(bool createContinuousSolver /*= false*/)
+  {
+    double setup_time = -CoinCpuTime();
+    if (createContinuousSolver) {
+      /* Create linear solver */
+      continuousSolver_ = new OsiClpSolverInterface;
+      int lpLogLevel;
+      options_->GetIntegerValue("lp_log_level",lpLogLevel,prefix_.c_str());
+      if(messageHandler_)
+        continuousSolver_->passInMessageHandler(messageHandler_);
+      continuousSolver_->messageHandler()->setLogLevel(lpLogLevel);
+      nonlinearSolver_->forceSolverOutput(intParam_[RootLogLevel]); 
+
+      if(IsValid(linearizer_))//Use user provided linearizer
+        nonlinearSolver_->set_linearizer(linearizer_);
+
+      nonlinearSolver_->extractLinearRelaxation(*continuousSolver_);
+      nonlinearSolver_->setSolverOutputToDefault(); 
+
+      // say bound dubious, does cuts at solution
+      OsiBabSolver * extraStuff = new OsiBabSolver(3);
+      continuousSolver_->setAuxiliaryInfo(extraStuff);
+      delete extraStuff;
+    }
+    Algorithm algo = getAlgorithm();
+    std::string prefix = (prefix_ == "bonmin.") ? "" : prefix_;
+    if (algo == B_Hyb) {
+      std::string o_name = prefix_ + "oa_decomposition";
+      options_->SetStringValue(o_name.c_str(),"no", true, true);
+      o_name = prefix_ + "pump_for_minlp";
+      options_->SetStringValue(o_name.c_str(),"yes", true, true);
+      o_name = prefix + "pump_for_minlp.time_limit";
+      options_->SetNumericValue(o_name.c_str(),10, true, true);
+      o_name = prefix + "pump_for_minlp.solution_limit";
+      options_->SetIntegerValue(o_name.c_str(),3, true, true);
+    }
+    else if (algo == B_OA) {
+      std::string o_name = prefix_ + "oa_decomposition";
+      options_->SetStringValue(o_name.c_str(),"yes", true, true);
+      o_name = prefix + "oa_decomposition.time_limit";
+      options_->SetNumericValue(o_name.c_str(),DBL_MAX, true, true);
+      o_name = prefix_ + "pump_for_minlp";
+      options_->SetStringValue(o_name.c_str(),"no", true, true);
+      o_name = prefix + "nlp_solve_frequency";
+      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
+      o_name = prefix + "bb_log_level";
+      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
+    }
+    else if (algo == B_IFP) {
+      std::string o_name = prefix_ + "oa_decomposition";
+      options_->SetStringValue(o_name.c_str(),"no", true, true);
+      o_name = prefix_ + "pump_for_minlp";
+      options_->SetStringValue(o_name.c_str(),"yes", true, true);
+      o_name = prefix + "pump_for_minlp.time_limit";
+      options_->SetNumericValue(o_name.c_str(),DBL_MAX, true, true);
+      o_name = prefix_ + "nlp_solve_frequency";
+      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
+      o_name = prefix_ + "fp_pass_infeasible";
+      options_->SetStringValue(o_name.c_str(), "yes", true, true);
+      //o_name = prefix_ + "cutoff_decr";
+      //options_->SetNumericValue(o_name.c_str(), 1e-02, true, true);
+      intParam_[BabLogLevel] = 0;
+    }
+    else if (algo==B_QG) {
+      std::string o_name = prefix_ + "oa_decomposition";
+      options_->SetStringValue(o_name.c_str(),"no", true, true);
+      o_name = prefix_ + "pump_for_minlp";
+      options_->SetStringValue(o_name.c_str(),"no", true, true);
+      o_name = prefix_ + "nlp_solve_frequency";
+      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
+    }
+    else if (algo==B_Ecp) {
+      std::string o_name = prefix_ + "oa_decomposition";
+      options_->SetStringValue(o_name.c_str(),"no", true, true);
+      o_name = prefix_ + "pump_for_minlp";
+      options_->SetStringValue(o_name.c_str(),"no", true, true);
+      o_name = prefix_ + "nlp_solve_frequency";
+      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
+      o_name = prefix_ + "filmint_ecp_cuts";
+      options_->SetIntegerValue(o_name.c_str(), 1, true, true);
+    }
+//#define GREAT_STUFF_FOR_ANDREAS
+#ifdef GREAT_STUFF_FOR_ANDREAS
+    printf("ToDo: Clean me up in Bab::branchAndBound\n");
+    OsiCuts cuts;
+    nonlinearSolver_->getOuterApproximation(cuts, true, NULL, true);
+    continuousSolver_->applyCuts(cuts);
+#endif
+
+
+    int varSelection;
+    options_->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
+    if (varSelection > RELIABILITY_BRANCHING) {
+      switch (varSelection){
+        case OSI_SIMPLE:
+          continuousSolver_->findIntegersAndSOS(false);
+          setPriorities();
+          addSos();
+          branchingMethod_ = new OsiChooseVariable(nonlinearSolver_);
+    
+          break;
+        case OSI_STRONG:
+          {
+          continuousSolver_->findIntegersAndSOS(false);
+          setPriorities();
+          addSos();
+          OsiChooseStrong * chooser = new OsiChooseStrong(nonlinearSolver_);
+          branchingMethod_ = chooser;
+          chooser->setNumberStrong(intParam_[NumberStrong]);
+          chooser->setTrustStrongForSolution(false);
+          chooser->setNumberBeforeTrusted(intParam_[MinReliability]);
+          }
+          break;
+        default:
+          std::cout<<"Variable selection stragey not available with oa branch-and-cut."<<std::endl;
+          break;
+     }
+    }
+    /* Populate cut generation and heuristic procedures.*/
+    int ival;
+    options_->GetIntegerValue("nlp_solve_frequency",ival,prefix_.c_str());
+    if (ival != 0) {
+      CuttingMethod cg;
+      cg.frequency = ival;
+      OaNlpOptim * nlpsol = new OaNlpOptim(*this);
+      nlpsol->passInMessageHandler(messageHandler_);
+      cg.cgl = nlpsol;
+      cg.id="NLP solution based oa cuts";
+      cutGenerators_.push_back(cg);
+    }
+
+    options_->GetIntegerValue("filmint_ecp_cuts",ival, prefix_.c_str());
+    if (ival != 0) {
+      CuttingMethod cg;
+      cg.frequency = ival;
+      EcpCuts * ecp = new EcpCuts(*this);
+      ecp->passInMessageHandler(messageHandler_);
+      cg.cgl = ecp;
+      cg.id = "Ecp cuts";
+      cutGenerators_.push_back(cg);
+    }
+
+    if (algo == B_Hyb || algo == B_Ecp)
+      addMilpCutGenerators();
+
+    int doFp;
+    options_->GetEnumValue("pump_for_minlp",doFp,prefix_.c_str());
+    if (doFp) {
+      CuttingMethod cg;
+      cg.frequency = -99;
+      MinlpFeasPump * oa = new MinlpFeasPump(*this);
+      oa->passInMessageHandler(messageHandler_);
+      cg.cgl = oa;
+      cg.id = "Feasibility Pump for MINLP.";
+      cutGenerators_.push_back(cg);
+
+    }
+    int doOa;
+    options_->GetEnumValue("oa_decomposition",doOa,prefix_.c_str());
+    if (doOa) {
+      CuttingMethod cg;
+      cg.frequency = -99;
+      OACutGenerator2 * oa = new OACutGenerator2(*this);
+      oa->passInMessageHandler(messageHandler_);
+      cg.cgl = oa;
+      cg.id = "Outer Approximation decomposition.";
+      cutGenerators_.push_back(cg);
+
+    }
+
+    {
+      CuttingMethod cg;
+      cg.frequency = 1;
+      OaFeasibilityChecker * oa = new OaFeasibilityChecker(*this);
+      oa->passInMessageHandler(messageHandler_);
+      oa->setReassignLpSolver(false);
+      cg.cgl = oa;
+      cg.id = "Outer Approximation feasibility check.";
+      cg.atSolution = false;
+      cg.normal = true;
+      cg.always = true;
+      cutGenerators_.push_back(cg);
+    }
+
+    {
+      CuttingMethod cg;
+      cg.frequency = 1;
+      OaFeasibilityChecker * oa = new OaFeasibilityChecker(*this);
+      oa->passInMessageHandler(messageHandler_);
+      oa->setReassignLpSolver(true);
+      cg.cgl = oa;
+      cg.id = "Outer Approximation strong branching solution check.";
+      cg.atSolution = true;
+      cg.normal = false;
+      cutGenerators_.push_back(cg);
+    }
+
+    DummyHeuristic * oaHeu = new DummyHeuristic;
+    oaHeu->setNlp(nonlinearSolver_);
+    HeuristicMethod h;
+    h.heuristic = oaHeu;
+    h.id = "nonlinear programm";
+    heuristics_.push_back(h);
+
+    Ipopt::Index doHeuristicRINS = false;
+    options()->GetEnumValue("heuristic_RINS",doHeuristicRINS,prefix_.c_str());
+    if(doHeuristicRINS){
+      HeuristicRINS* rins = new HeuristicRINS(this);
+      HeuristicMethod h;
+      h.heuristic = rins;
+      h.id = "RINS";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicLocalBranching = false;
+    options()->GetEnumValue("heuristic_local_branching",doHeuristicLocalBranching,prefix_.c_str());
+    if(doHeuristicLocalBranching){
+      HeuristicLocalBranching* local_branching = new HeuristicLocalBranching(this);
+      HeuristicMethod h;
+      h.heuristic = local_branching;
+      h.id = "LocalBranching";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicFPump = false;
+    options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,prefix_.c_str());
+    if(doHeuristicFPump){
+      HeuristicFPump* feasibility_pump = new HeuristicFPump(this);
+      HeuristicMethod h;
+      h.heuristic = feasibility_pump;
+      h.id = "FPump";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicDiveFractional = false;
+    options()->GetEnumValue("heuristic_dive_fractional",doHeuristicDiveFractional,prefix_.c_str());
+    if(doHeuristicDiveFractional){
+      HeuristicDiveFractional* dive_fractional = new HeuristicDiveFractional(this);
+      HeuristicMethod h;
+      h.heuristic = dive_fractional;
+      h.id = "DiveFractional";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicDiveVectorLength = false;
+    options()->GetEnumValue("heuristic_dive_vectorLength",doHeuristicDiveVectorLength,prefix_.c_str());
+    if(doHeuristicDiveVectorLength){
+      HeuristicDiveVectorLength* dive_vectorLength = new HeuristicDiveVectorLength(this);
+      HeuristicMethod h;
+      h.heuristic = dive_vectorLength;
+      h.id = "DiveVectorLength";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicDiveMIPFractional = false;
+    options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,prefix_.c_str());
+    if(doHeuristicDiveMIPFractional){
+      HeuristicDiveMIPFractional* dive_MIP_fractional = new HeuristicDiveMIPFractional(this);
+      HeuristicMethod h;
+      h.heuristic = dive_MIP_fractional;
+      h.id = "DiveMIPFractional";
+      heuristics_.push_back(h);
+    }
+
+    Ipopt::Index doHeuristicDiveMIPVectorLength = false;
+    options()->GetEnumValue("heuristic_dive_MIP_vectorLength",doHeuristicDiveMIPVectorLength,prefix_.c_str());
+    if(doHeuristicDiveMIPVectorLength){
+      HeuristicDiveMIPVectorLength* dive_MIP_vectorLength = new HeuristicDiveMIPVectorLength(this);
+      HeuristicMethod h;
+      h.heuristic = dive_MIP_vectorLength;
+      h.id = "DiveMIPVectorLength";
+      heuristics_.push_back(h);
+    }
+
+#if 0
+    if(true){
+      InnerApproximation * inner = new InnerApproximation(this);
+      HeuristicMethod h;
+      h.heuristic = inner;
+      h.id = "InnerApproximation";
+      heuristics_.push_back(h);
+    }
+#endif
+    setup_time += CoinCpuTime();
+    doubleParam_[MaxTime] -= setup_time;
+  }
+
+
+  Algorithm BonminSetup::getAlgorithm()
+  {
+    if (algo_ != Dummy)
+      return algo_;
+    if (IsValid(options_)) {
+      int ival;
+      options_->GetEnumValue("algorithm", ival,prefix_.c_str());
+      return Algorithm(ival);
+    }
+    else return Algorithm(3);
+  }
+
+}/* end namespace Bonmin*/
+
diff --git a/src/Algorithms/BonBonminSetup.hpp b/src/Algorithms/BonBonminSetup.hpp
new file mode 100644
index 0000000..cf48d62
--- /dev/null
+++ b/src/Algorithms/BonBonminSetup.hpp
@@ -0,0 +1,95 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/13/2007
+#ifndef BonminSetup_H
+#define BonminSetup_H
+#include "BonBabSetupBase.hpp"
+namespace Bonmin
+{
+  /** Type of algorithms which can be used.*/
+  enum Algorithm{
+    Dummy=-1/** Dummy value before initialization.*/,
+    B_BB=0/** Bonmin's Branch-and-bound.*/,
+    B_OA=1/** Bonmin's Outer Approximation Decomposition.*/,
+    B_QG=2/** Bonmin's Quesada & Grossmann branch-and-cut.*/,
+    B_Hyb=3/** Bonmin's hybrid outer approximation.*/,
+    B_Ecp=4/** Bonmin's implemantation of ecp cuts based branch-and-cut a la FilMINT.*/,
+    B_IFP=5/** Bonmin's implemantation of iterated feasibility pump for MINLP.*/
+  };
+  /* Bonmin algorithm setup. */
+  class BonminSetup : public BabSetupBase
+  {
+  public:
+    /** Default constructor. */
+    BonminSetup(const CoinMessageHandler * handler = NULL);
+    /** Copy constructor. */
+    BonminSetup(const BonminSetup & other);
+
+    /** Copy but uses an other nlp.*/
+    BonminSetup(const BonminSetup &setup,
+                OsiTMINLPInterface &nlp);
+
+    /** Copy but uses another nlp and algorithm.*/
+    BonminSetup(const BonminSetup &setup,
+                OsiTMINLPInterface &nlp,
+                const std::string & prefix);
+    /** virtual copy constructor. */
+    virtual BabSetupBase * clone() const
+    {
+      return new BonminSetup(*this);
+    }
+    /** Make a copy with solver replace by one passed .*/
+    //    virtual BabSetupBase *clone(OsiTMINLPInterface&nlp)const{
+    //      return new BonminSetup(*this, nlp);
+    //    }
+    /** Make a copy with solver replace by one passed .*/
+    BonminSetup *clone(OsiTMINLPInterface&nlp)const{
+      return new BonminSetup(*this, nlp);
+    }
+    /** Make a copy but take options with different prefix.*/
+    BonminSetup *clone(OsiTMINLPInterface &nlp, const std::string & prefix)const{
+      return new BonminSetup(*this, nlp, prefix);
+    }
+    virtual ~BonminSetup()
+    {}
+    /** @name Methods to instantiate: Registering and retrieving options and initializing everything. */
+    /** @{ */
+    /** Register all the options for this algorithm instance.*/
+    virtual void registerOptions();
+    /** Setup the defaults options for this algorithm. */
+    virtual void setBabDefaultOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+    {}
+    /** @} */
+    /** Register all bonmin type executable options.*/
+    static void registerAllOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    /** Initialize, read options and create appropriate bonmin setup.*/
+    void initialize(Ipopt::SmartPtr<TMINLP> tminlp, bool createContinuousSolver = true);
+    /** Initialize, read options and create appropriate bonmin setup.*/
+    void initialize(const OsiTMINLPInterface& nlpSi, bool createContinuousSolver = true);
+    /** Get the algorithm used.*/
+    Bonmin::Algorithm getAlgorithm();
+
+    void addCutGenerator(CuttingMethod & cg){
+      BabSetupBase::addCutGenerator(cg);
+    }
+  protected:
+    /** Register standard MILP cut generators. */
+    static void registerMilpCutGenerators(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    /** Add milp cut generators according to options.*/
+    void addMilpCutGenerators();
+    /** Initialize a plain branch-and-bound.*/
+    void initializeBBB();
+    /** Initialize a branch-and-cut with some OA.*/
+    void initializeBHyb(bool createContinuousSolver = false);
+  private:
+    Algorithm algo_;
+  };
+}/** end namespace Bonmin*/
+
+#endif
+
diff --git a/src/Algorithms/BonCbcLpStrategy.cpp b/src/Algorithms/BonCbcLpStrategy.cpp
new file mode 100644
index 0000000..5bee922
--- /dev/null
+++ b/src/Algorithms/BonCbcLpStrategy.cpp
@@ -0,0 +1,163 @@
+// (C) Copyright Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+
+#include "BonCbcLpStrategy.hpp"
+
+
+// Cut generators
+#include "CglGomory.hpp"
+#include "CglProbing.hpp"
+#include "CglKnapsackCover.hpp"
+#include "CglOddHole.hpp"
+#include "CglClique.hpp"
+#include "CglFlowCover.hpp"
+#include "CglMixedIntegerRounding2.hpp"
+#include "CglTwomir.hpp"
+#include "CglPreProcess.hpp"
+#include "CbcCutGenerator.hpp"
+
+// Node selection
+#include "CbcCompareActual.hpp"
+
+#include "CbcBranchActual.hpp"
+
+
+namespace Bonmin
+{
+
+  CbcStrategyChooseCuts::CbcStrategyChooseCuts():
+    CbcStrategyDefault(),
+    genFlag_(63)
+  {
+    CoinFillN(gen_freqs_,6,-99);
+  }
+
+  CbcStrategyChooseCuts::CbcStrategyChooseCuts(const CbcStrategyChooseCuts &other):
+    CbcStrategyDefault(other),
+    genFlag_(other.genFlag_)
+  {
+    CoinCopyN(other.gen_freqs_,6,gen_freqs_);
+  }
+
+  CbcStrategyChooseCuts::CbcStrategyChooseCuts(BabSetupBase &s,
+                                               const std::string &prefix):
+    CbcStrategyDefault(),
+    genFlag_(0)
+  {
+    setup(s, prefix);
+  }
+
+  void CbcStrategyChooseCuts::setup(BabSetupBase &s,
+                               const std::string &prefix){ 
+    s.options()->GetIntegerValue("number_strong_branch", numberStrong_, prefix);
+    s.options()->GetIntegerValue("number_before_trust", numberBeforeTrust_, prefix);
+
+    int k = 0;
+    
+    bool set = s.options()->GetIntegerValue("probing_cuts", gen_freqs_[k], prefix);
+    if(set==0) gen_freqs_[k] = -99;
+    k++;
+
+    set = s.options()->GetIntegerValue("Gomory_cuts", gen_freqs_[k], prefix);
+    if(set==0) gen_freqs_[k] = -99;
+    k++;
+    
+    set = s.options()->GetIntegerValue("cover_cuts", gen_freqs_[k], prefix);
+    if(set==0) gen_freqs_[k] = -99;
+    k++;
+    
+    set = s.options()->GetIntegerValue("clique_cuts", gen_freqs_[k], prefix);
+    if(set==0) gen_freqs_[k] = -99;
+    k++;
+    
+    set = s.options()->GetIntegerValue("flow_cover_cuts", gen_freqs_[k], prefix);
+    if(set==0) gen_freqs_[k] = -99;
+    k++;
+    
+    set = s.options()->GetIntegerValue("mir_cuts", gen_freqs_[k], prefix);
+    if(set==0) gen_freqs_[k] = -99;
+    k++;
+    
+  }
+
+template<class X>
+bool has_cg(CbcModel &model, const X& gen){
+  int numberGenerators = model.numberCutGenerators();
+  for (int iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
+    CglCutGenerator * generator = model.cutGenerator(iGenerator)->generator();
+    X * cgl = dynamic_cast<X *>(generator);
+    if (cgl) {
+      return true;
+    }
+  }
+  return false;
+}
+
+#define ADD_CG(model, gen, setting, name) model.addCutGenerator(&gen,setting, name)
+
+  void 
+  CbcStrategyChooseCuts::setupCutGenerators(CbcModel &model){
+    CglProbing probing;
+    probing.setUsingObjective(true);
+    probing.setMaxPass(1);
+    probing.setMaxPassRoot(1);
+    // Number of unsatisfied variables to look at
+    probing.setMaxProbe(10);
+    // How far to follow the consequences
+    probing.setMaxLook(10);
+    // Only look at rows with fewer than this number of elements
+    probing.setMaxElements(200);
+    probing.setMaxElementsRoot(300);
+    //generator1.setRowCuts(3);
+
+    CglGomory miG;
+    // try larger limit
+    miG.setLimit(300);
+
+    CglKnapsackCover cover;
+
+    CglClique clique;
+    clique.setStarCliqueReport(false);
+    clique.setRowCliqueReport(false);
+
+    CglMixedIntegerRounding2 mixedGen;
+    CglFlowCover flowGen;
+    int k = 0;
+
+    if(gen_freqs_[k]!= 0 && !has_cg(model, probing)){
+      ADD_CG(model, probing, gen_freqs_[k], "Probing"); 
+    }
+    k++;
+
+    if(gen_freqs_[k]!= 0 && !has_cg(model, miG)){
+      ADD_CG(model, miG, gen_freqs_[k], "Gomory"); 
+    }
+    k++;
+    
+    if(gen_freqs_[k] != 0 && !has_cg(model, cover)){
+      ADD_CG(model, cover, gen_freqs_[k], "Knapsack"); 
+    }
+    k++;
+
+    if(gen_freqs_[k] != 0 && !has_cg(model, clique)){
+      ADD_CG(model, clique, gen_freqs_[k], "Clique"); 
+    }
+    k++;
+
+    if(gen_freqs_[k] != 0 && !has_cg(model, flowGen)){
+      ADD_CG(model, flowGen, gen_freqs_[k], "FlowCover"); 
+    }
+    k++;
+
+    if(gen_freqs_[k] != 0 && !has_cg(model, mixedGen)){
+      ADD_CG(model, mixedGen, gen_freqs_[k], "MixedIntegerRounding2"); 
+    }
+  }
+
+}
diff --git a/src/Algorithms/BonCbcLpStrategy.hpp b/src/Algorithms/BonCbcLpStrategy.hpp
new file mode 100644
index 0000000..7797fbe
--- /dev/null
+++ b/src/Algorithms/BonCbcLpStrategy.hpp
@@ -0,0 +1,45 @@
+// (C) Copyright Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+
+
+#ifndef CbcOaStrategy_HPP
+#define CbcOaStrategy_HPP
+
+#include "CbcStrategy.hpp"
+#include <string>
+#include "BonBabSetupBase.hpp"
+namespace Bonmin
+{
+  /** A class to setup default strategy for Cbc specifying which cut generators to use.*/
+  class CbcStrategyChooseCuts : public CbcStrategyDefault {
+     public:
+     /** Default constructor.*/
+     CbcStrategyChooseCuts();
+     /** Constructor with a setup. */
+     CbcStrategyChooseCuts(BabSetupBase &s, const std::string & prefix);
+     /** Copy constructor.*/
+     CbcStrategyChooseCuts(const CbcStrategyChooseCuts &other);
+     /** Virtual copy constructor.*/
+     CbcStrategy * clone() const{
+       return new CbcStrategyChooseCuts(*this);
+     }
+     /** Setup strategy.*/
+     void setup(BabSetupBase &s, const std::string &prefix);
+    
+     /// Setup cut generators
+     virtual void setupCutGenerators(CbcModel & model);
+  
+     private:
+    /** Generators frequencies.*/
+    int gen_freqs_[6];
+       /** Flag to say which cut generators to use.*/
+       int genFlag_;
+  };
+}
+#endif
diff --git a/src/Algorithms/BonSolverHelp.cpp b/src/Algorithms/BonSolverHelp.cpp
new file mode 100644
index 0000000..babaf43
--- /dev/null
+++ b/src/Algorithms/BonSolverHelp.cpp
@@ -0,0 +1,216 @@
+// (C) Copyright International Business Machines (IBM) 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/07/2006
+
+
+// Code separated from BonOaDecBase to try to clarify OAs
+
+#include <sstream>
+#include "BonSolverHelp.hpp"
+#include "OsiSolverInterface.hpp"
+#include "OsiBranchingObject.hpp"
+#include "OsiCuts.hpp"
+#include "CoinWarmStartBasis.hpp"
+namespace Bonmin {
+/// Check for integer feasibility of a solution return 1 if it is
+bool integerFeasible(OsiSolverInterface & si, const OsiBranchingInformation & info, 
+                     double integer_tolerance,
+                     OsiObject ** objects, int nObjects) 
+{
+  if (objects) {
+    int dummy;
+    for (int i = 0 ; i < nObjects ; i++) {
+      double infeasibility = objects[i]->infeasibility(&info, dummy);
+      if (infeasibility > 1000*integer_tolerance) return false;
+    }
+  }
+  else {
+    const double * sol = info.solution_;
+    int numcols = si.getNumCols();
+    for (int i = 0 ; i < numcols ; i++) {
+      if (si.isInteger(i)) {
+        if (fabs(sol[i] - floor(sol[i] + 0.5)) >
+            integer_tolerance) {
+          return false;
+        }
+      }
+    }
+  }
+  return true;
+}
+
+/** Fix integer variables in si to their values in colsol.
+*/
+void fixIntegers(OsiSolverInterface & si, 
+                 const OsiBranchingInformation & info,
+                 double integer_tolerance,
+                 OsiObject ** objects, int nObjects)
+{
+  if (objects) {
+    for (int i = 0 ; i < nObjects ; i++) {
+      objects[i]->feasibleRegion(&si, &info);
+    }
+  }
+  else {
+    const double * colsol = info.solution_;
+    for (int i = 0; i < info.numberColumns_; i++) {
+      if (si.isInteger(i)) {
+        double  value =  colsol[i];
+#ifndef NDEBUG
+        if (fabs(value - floor(value+0.5)) > integer_tolerance) {
+          std::stringstream stream;
+          stream<<"Error not integer valued solution"<<std::endl;
+          stream<<"---------------- x["<<i<<"] = "<<value<<std::endl;
+          throw CoinError(stream.str(),"fixIntegers","OaDecompositionBase::solverManip");
+        }
+#endif
+        value = floor(value+0.5);
+        if (fabs(value) > 1e10) {
+          std::stringstream stream;
+          stream<<"Can not fix variable in nlp because it has too big a value ("<<value
+          <<") at optimium of LP relaxation. You should try running the problem with B-BB"<<std::endl;
+          throw CoinError(stream.str(),
+              "fixIntegers","OaDecompositionBase::solverManip") ;
+        }
+#ifdef OA_DEBUG
+        //         printf("xx %d at %g (bounds %g, %g)",i,value,nlp_->getColLower()[i],
+        //                nlp_->getColUpper()[i]);
+        std::cout<<(int)value;
+#endif
+        si.setColLower(i,value);
+        si.setColUpper(i,value);
+      }
+    }
+#ifdef OA_DEBUG
+    std::cout<<std::endl;
+#endif
+  }
+}
+
+/** Slightly relax integer variables in si.
+*/
+void relaxIntegers(OsiSolverInterface & si, 
+                 const OsiBranchingInformation & info,
+                 double integer_tolerance,
+                 OsiObject ** objects, int nObjects)
+{
+  if (objects) {
+    for (int i = 0 ; i < nObjects ; i++) {
+      OsiSimpleInteger * obj = dynamic_cast<OsiSimpleInteger *>(objects[i]);
+      int colNumber = obj->columnNumber();
+      si.setColLower(colNumber, si.getColLower()[colNumber] - integer_tolerance); 
+      si.setColUpper(colNumber, si.getColUpper()[colNumber] + integer_tolerance); 
+    }
+  }
+  else {
+    for (int i = 0; i < info.numberColumns_; i++) {
+      if (si.isInteger(i)) {
+        const int &colNumber = i;
+        si.setColLower(colNumber, si.getColLower()[colNumber] - integer_tolerance); 
+        si.setColUpper(colNumber, si.getColUpper()[colNumber] + integer_tolerance); 
+      }
+    }
+  }
+}
+
+bool refixIntegers(OsiSolverInterface & si, 
+                 const OsiBranchingInformation & info,
+                 double integer_tolerance,
+                 OsiObject ** objects, int nObjects)
+{
+  if(!si.isProvenOptimal()) return false;
+  if (objects) {
+    for (int i = 0 ; i < nObjects ; i++) {
+      OsiSimpleInteger * obj = dynamic_cast<OsiSimpleInteger *>(objects[i]);
+      int colNumber = obj->columnNumber();
+      si.setColLower(colNumber, si.getColLower()[colNumber] - integer_tolerance); 
+      si.setColUpper(colNumber, si.getColUpper()[colNumber] + integer_tolerance); 
+    }
+  }
+  else {
+    for (int i = 0; i < info.numberColumns_; i++) {
+      if (si.isInteger(i)) {
+        const int &colNumber = i;
+        si.setColLower(colNumber, si.getColLower()[colNumber] - integer_tolerance); 
+        si.setColUpper(colNumber, si.getColUpper()[colNumber] + integer_tolerance); 
+      }
+    }
+  }
+  return true;
+}
+
+/** Install cuts in solver. */
+void installCuts(OsiSolverInterface &si,
+                 const OsiCuts& cs, int numberCuts){
+  int numberCutsBefore = cs.sizeRowCuts() - numberCuts;
+
+  CoinWarmStartBasis * basis
+  = dynamic_cast<CoinWarmStartBasis*>(si.getWarmStart()) ;
+  assert(basis != NULL); // make sure not volume
+  int numrows = si.getNumRows();
+  basis->resize(numrows + numberCuts,si.getNumCols());
+  for (int i = 0 ; i < numberCuts ; i++) {
+    basis->setArtifStatus(numrows + i,
+        CoinWarmStartBasis::basic) ;
+  }
+
+  const OsiRowCut ** addCuts = new const OsiRowCut * [numberCuts] ;
+  for (int i = 0 ; i < numberCuts ; i++) {
+    addCuts[i] = &cs.rowCut(i + numberCutsBefore) ;
+  }
+  si.applyRowCuts(numberCuts,addCuts) ;
+  delete [] addCuts ;
+  if (si.setWarmStart(basis) == false) {
+    delete basis;
+    throw CoinError("Fail setWarmStart() after cut installation.",
+                    "generateCuts","OACutGenerator2") ;
+  }
+  delete basis;
+}
+
+
+/** Check if two solutions are the same on integer variables. */
+bool isDifferentOnIntegers(OsiSolverInterface &si,
+                           OsiObject ** objects, int nObjects,
+                           double integer_tolerance,
+                           const double * colsol, const double *otherSol)
+{
+  if (objects) {
+    for (int i = 0 ; i < nObjects ; i++) {
+      OsiObject * obj = objects[i];
+      int colnum = obj->columnNumber();
+      if (colnum >= 0) {//Variable branching object
+        if (fabs(otherSol[colnum] - colsol[colnum]) > integer_tolerance) {
+          return true;
+        }
+      }
+      else {//It is a sos branching object
+        OsiSOS * sos = dynamic_cast<OsiSOS *>(obj);
+        assert(sos);
+        const int * members = sos->members();
+        int end = sos->numberMembers();
+        for (int k = 0 ; k < end ; k++) {
+          if (fabs(otherSol[members[k]] - colsol[members[k]]) > integer_tolerance) {
+            return true;
+          }
+        }
+      }
+    }
+  }
+  else {
+    int numcols = si.getNumCols();
+    for (int i = 0; i < numcols ; i++) {
+      if (si.isInteger(i) && fabs(otherSol[i] - colsol[i])>integer_tolerance)
+        return true;
+    }
+  }
+  return false;
+}
+
+}
+
diff --git a/src/Algorithms/BonSolverHelp.hpp b/src/Algorithms/BonSolverHelp.hpp
new file mode 100644
index 0000000..9b8d04c
--- /dev/null
+++ b/src/Algorithms/BonSolverHelp.hpp
@@ -0,0 +1,50 @@
+// (C) Copyright International Business Machines (IBM) 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/07/2006
+
+
+// Code separated from BonOaDecBase to try to clarify OAs
+// A number of utility to manipulate models used in OA and FP
+#ifndef BonSolverHelp_H
+#define BonSolverHelp_H
+
+class OsiSolverInterface;
+class OsiBranchingInformation;
+class OsiObject;
+class OsiCuts;
+
+namespace Bonmin {
+   /** Check for integer feasibility of a solution return true if it is feasible.*/
+   bool integerFeasible(OsiSolverInterface & si, const OsiBranchingInformation & info,
+                        double integer_tolerance,
+                        OsiObject ** objects = 0, int nObjects = -1);
+
+   /** Fix integer variables in si to their values in colsol.
+       \remark colsol is assumed to be integer on the integer constrained variables.
+    */
+   void fixIntegers(OsiSolverInterface & si, const OsiBranchingInformation & info,
+                    double integer_tolerance,
+                    OsiObject ** objects = 0, int nObjects = -1);
+   /** Relax integer variables in si.
+    */
+   void relaxIntegers(OsiSolverInterface & si, const OsiBranchingInformation & info,
+                    double integer_tolerance,
+                    OsiObject ** objects = 0, int nObjects = -1);
+   /** Check if two solutions are the same on integer variables. */
+   bool isDifferentOnIntegers(OsiSolverInterface &si,
+                              OsiObject ** objects, int nObjects,
+                              double integer_tolerance,
+                              const double * colsol, const double * other);
+
+   /** Install cuts in solver. */
+   void installCuts(OsiSolverInterface &si,
+                    const OsiCuts& cs, int numberCuts);
+
+}
+#endif
+
diff --git a/src/Algorithms/BonSubMipSolver.cpp b/src/Algorithms/BonSubMipSolver.cpp
new file mode 100644
index 0000000..d31e10d
--- /dev/null
+++ b/src/Algorithms/BonSubMipSolver.cpp
@@ -0,0 +1,596 @@
+// (C) Copyright International Business Machines (IBM) 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/07/2006
+
+
+// Code separated from BonOaDecBase to try to clarify OAs
+#include "BonSubMipSolver.hpp"
+#include "BonminConfig.h"
+#include "CbcModel.hpp"
+#include "CbcStrategy.hpp"
+#include "OsiAuxInfo.hpp"
+#include "OsiClpSolverInterface.hpp"
+
+#include <climits>
+#ifdef COIN_HAS_CPX
+#include "OsiCpxSolverInterface.hpp"
+#include "cplex.h"
+void throw_error(const std::string &s, const std::string &f, const std::string &func){
+throw CoinError(s,f,func);
+}
+#define CHECK_CPX_STAT(a,b) if(b) throw_error("Error in CPLEX call",__FILE__,a);
+
+#endif
+
+#include "BonRegisteredOptions.hpp"
+#include "BonBabSetupBase.hpp"
+#include "BonCbcLpStrategy.hpp"
+
+
+namespace Bonmin {
+  /** Constructor */
+  SubMipSolver::SubMipSolver(BabSetupBase &b, const std::string &prefix):
+      clp_(NULL),
+      cpx_(NULL),
+      lowBound_(-DBL_MAX),
+      optimal_(false),
+      integerSolution_(NULL),
+      strategy_(NULL),
+      ownClp_(false)
+  {
+
+   int logLevel;
+   b.options()->GetIntegerValue("milp_log_level", logLevel, prefix);
+
+   int ivalue;
+   b.options()->GetEnumValue("milp_solver",ivalue,prefix);
+   if (ivalue <= 0) {//uses cbc
+     strategy_ = new CbcStrategyDefault;
+     clp_ = new OsiClpSolverInterface;
+     ownClp_ = true;
+     clp_->messageHandler()->setLogLevel(logLevel);
+   }
+   else if (ivalue == 1) {
+     CbcStrategyChooseCuts strategy(b, prefix);
+     strategy_  = new CbcStrategyChooseCuts(b, prefix);
+     clp_ = new OsiClpSolverInterface;
+     ownClp_ = true;
+     clp_->messageHandler()->setLogLevel(logLevel);
+   }
+   else if (ivalue == 2) {
+#ifdef COIN_HAS_CPX
+      OsiCpxSolverInterface * cpxSolver = new OsiCpxSolverInterface;
+#if 1
+      
+      b.options()->GetIntegerValue("number_cpx_threads",ivalue,prefix);
+      CPXsetintparam(cpxSolver->getEnvironmentPtr(), CPX_PARAM_THREADS, ivalue);
+      b.options()->GetIntegerValue("cpx_parallel_strategy",ivalue,prefix);
+      CPXsetintparam(cpxSolver->getEnvironmentPtr(), CPX_PARAM_PARALLELMODE, ivalue);
+#endif
+      cpx_ = cpxSolver;
+      cpx_->messageHandler()->setLogLevel(logLevel);
+#else
+      std::cerr	<< "You have set an option to use CPLEX as the milp\n"
+      << "subsolver in oa decomposition. However, apparently\n"
+      << "CPLEX is not configured to be used in bonmin.\n"
+      << "See the manual for configuring CPLEX\n";
+      throw -1;
+#endif
+    }
+
+      b.options()->GetEnumValue("milp_strategy",ivalue,prefix);
+      if(ivalue == 0){
+        milp_strat_ = FindGoodSolution;
+      }
+      else {
+        milp_strat_ = GetOptimum;
+      }
+
+      b.options()->GetNumericValue("allowable_fraction_gap", gap_tol_, prefix);
+
+
+  }
+  SubMipSolver::SubMipSolver(const SubMipSolver &copy):
+      clp_(NULL),
+      cpx_(NULL),
+      lowBound_(-DBL_MAX),
+      optimal_(false),
+      integerSolution_(NULL),
+      strategy_(NULL),
+      milp_strat_(copy.milp_strat_),
+      gap_tol_(copy.gap_tol_),
+      ownClp_(copy.ownClp_)
+  {
+#ifdef COIN_HAS_CPX
+     if(copy.cpx_ != NULL){
+       cpx_ = new OsiCpxSolverInterface(*copy.cpx_);
+      int ival;
+      CPXgetintparam(copy.cpx_->getEnvironmentPtr(), CPX_PARAM_THREADS, &ival);
+      CPXsetintparam(cpx_->getEnvironmentPtr(), CPX_PARAM_THREADS, ival);
+      CPXgetintparam(copy.cpx_->getEnvironmentPtr(), CPX_PARAM_PARALLELMODE, &ival);
+      CPXsetintparam(cpx_->getEnvironmentPtr(), CPX_PARAM_PARALLELMODE, ival);
+     }
+#endif
+     if(copy.clp_ != NULL){
+       if(ownClp_) clp_ = new OsiClpSolverInterface(*copy.clp_);
+       else clp_ = copy.clp_;
+     }
+     if(copy.strategy_){
+        strategy_ = dynamic_cast<CbcStrategyDefault *>(copy.strategy_->clone());
+        assert(strategy_);
+     }
+  }
+  SubMipSolver::~SubMipSolver()
+  {
+    if (strategy_) delete strategy_;
+    if (integerSolution_) delete [] integerSolution_;
+    #ifdef COIN_HAS_CPX
+    if(cpx_) delete cpx_;
+    #endif
+    if(ownClp_) delete clp_;
+  }
+
+  /** Assign lp solver. */
+  void
+  SubMipSolver::setLpSolver(OsiSolverInterface * lp)
+  {
+#ifdef COIN_HAS_CPX
+    if(cpx_){
+      clp_ = NULL;
+      cpx_->loadProblem(*lp->getMatrixByCol(), lp->getColLower(), lp->getColUpper(), lp->getObjCoefficients(), lp->getRowLower(), lp->getRowUpper());
+      int ncols = lp->getNumCols();
+      for(int i = 0 ; i < ncols ; i++){
+        if(lp->isInteger(i) || lp->isBinary(i))
+           cpx_->setInteger(i);
+        else
+           cpx_->setContinuous(i);
+      }
+    }
+    else {
+#endif
+      if(ownClp_) delete clp_;
+      ownClp_ = false;
+      clp_ = (lp == NULL) ? NULL :
+              dynamic_cast<OsiClpSolverInterface *>(lp);
+      assert(clp_);
+#ifdef COIN_HAS_CPX
+    }
+#endif
+    lowBound_ = -COIN_DBL_MAX;
+    optimal_ = false;
+    if (integerSolution_) {
+      delete [] integerSolution_;
+      integerSolution_ = NULL;
+    }
+  }
+
+  OsiSolverInterface * 
+  SubMipSolver::solver(){
+         if(clp_ != NULL)
+           return clp_;
+         else
+#ifdef COIN_HAS_CPX
+           return cpx_;
+#else
+         return NULL;
+#endif
+      }
+
+ void 
+ SubMipSolver::find_good_sol(double cutoff, int loglevel, double max_time){
+
+     if(clp_){
+      CbcStrategyDefault * strat_default = NULL;
+      if (!strategy_){
+        strat_default = new CbcStrategyDefault(1,5,5, loglevel);
+        strat_default->setupPreProcessing();
+        strategy_ = strat_default;
+      }
+      OsiBabSolver empty;
+      CbcModel cbc(*clp_);
+      cbc.solver()->setAuxiliaryInfo(&empty);
+
+      //Change Cbc messages prefixes
+      strcpy(cbc.messagesPointer()->source_,"OCbc");
+
+      cbc.setLogLevel(loglevel);
+      cbc.solver()->messageHandler()->setLogLevel(0);
+      clp_->resolve();
+      cbc.setStrategy(*strategy_);
+      cbc.setLogLevel(loglevel);
+      cbc.solver()->messageHandler()->setLogLevel(0);
+      cbc.setMaximumSeconds(max_time);
+      cbc.setMaximumSolutions(1);
+      cbc.setCutoff(cutoff);
+
+      
+      cbc.branchAndBound();
+      lowBound_ = cbc.getBestPossibleObjValue();
+
+      if (cbc.isProvenOptimal() || cbc.isProvenInfeasible())
+        optimal_ = true;
+      else optimal_ = false;
+
+      if (cbc.getSolutionCount()) {
+        if (!integerSolution_)
+          integerSolution_ = new double[clp_->getNumCols()];
+        CoinCopyN(cbc.bestSolution(), clp_->getNumCols(), integerSolution_);
+      }
+      else if (integerSolution_) {
+        delete [] integerSolution_;
+        integerSolution_ = NULL;
+      }
+      nodeCount_ = cbc.getNodeCount();
+      iterationCount_ = cbc.getIterationCount();
+
+      if(strat_default != NULL){
+        delete strat_default;
+        strategy_ = NULL;
+      }
+     }
+     else if (cpx_){
+#ifndef COIN_HAS_CPX
+        throw CoinError("Unsuported solver, for local searches you should use clp or cplex",
+            "performLocalSearch",
+            "OaDecompositionBase::SubMipSolver");
+#else
+        cpx_->messageHandler()->setLogLevel(loglevel);
+        cpx_->switchToMIP();
+        CPXENVptr env = cpx_->getEnvironmentPtr();
+        CPXLPptr cpxlp = cpx_->getLpPtr(OsiCpxSolverInterface::KEEPCACHED_ALL);
+        CPXsetdblparam(env, CPX_PARAM_TILIM, max_time);
+        CPXsetintparam(env, CPX_PARAM_CLOCKTYPE, 1);
+        CPXsetdblparam(env, CPX_PARAM_EPINT, 1e-08);
+        CPXsetdblparam(env, CPX_PARAM_CUTUP, cutoff);
+        CPXsetdblparam(env, CPX_PARAM_EPGAP, gap_tol_);
+
+        double start_time = CoinCpuTime();
+
+        CPXsetintparam(env,CPX_PARAM_INTSOLLIM, 10);
+        CPXsetintparam(env,CPX_PARAM_NODELIM, 1000);
+
+        nodeCount_ = 0;
+        iterationCount_ = 0;
+        int status = CPXmipopt(env,cpxlp);
+        CHECK_CPX_STAT("mipopt",status)
+       
+    
+        status = CPXgetbestobjval(env, cpxlp, &lowBound_);
+        CHECK_CPX_STAT("bestobjvalue",status)
+     
+        int stat = CPXgetstat( env, cpxlp);
+        optimal_ = (stat == CPXMIP_INFEASIBLE) || (stat == CPXMIP_OPTIMAL) || (stat == CPXMIP_OPTIMAL_TOL) || (stat == CPXMIP_INForUNBD) ; 
+        nodeCount_ = CPXgetnodecnt(env , cpxlp);
+        iterationCount_ = CPXgetmipitcnt(env , cpxlp);
+        
+        int type;
+        status = CPXsolninfo(env, cpxlp, NULL, &type, NULL, NULL);
+        CHECK_CPX_STAT("solninfo", status);
+        while(!optimal_ && type == CPX_NO_SOLN && stat != CPXMIP_SOL_LIM && stat != CPXMIP_TIME_LIM_INFEAS 
+              && stat != CPXMIP_TIME_LIM_FEAS && (CoinCpuTime() - start_time) <= max_time){
+          CPXsetintparam(env, CPX_PARAM_INTSOLLIM, 1);
+          CPXsetdblparam(env, CPX_PARAM_TILIM, max_time - CoinCpuTime() + start_time);
+          CPXsetintparam(env,CPX_PARAM_NODELIM, 2100000000);
+           status = CPXmipopt(env,cpxlp);
+           CHECK_CPX_STAT("mipopt",status)
+
+           stat = CPXgetstat( env, cpxlp);
+           optimal_ = (stat == CPXMIP_INFEASIBLE) || (stat == CPXMIP_OPTIMAL) || (stat == CPXMIP_OPTIMAL_TOL) || (stat == CPXMIP_INForUNBD) ; 
+           nodeCount_ = CPXgetnodecnt(env , cpxlp);
+           iterationCount_ = CPXgetmipitcnt(env , cpxlp);
+       }
+       bool infeasible = (stat == CPXMIP_INFEASIBLE) || (stat == CPXMIP_ABORT_INFEAS) || (stat == CPXMIP_TIME_LIM_INFEAS) 
+                          || (stat == CPXMIP_NODE_LIM_INFEAS) || (stat == CPXMIP_FAIL_INFEAS)  
+                          || (stat == CPXMIP_MEM_LIM_INFEAS) || (stat == CPXMIP_INForUNBD);
+       
+
+      status = CPXgetbestobjval(env, cpxlp, &lowBound_);
+      CHECK_CPX_STAT("getbestobjval",status)
+       if(!infeasible){
+          nodeCount_ += CPXgetnodecnt(env, cpxlp);
+          //iterationCount_ += CPXgetitcnt(env, cpxlp);
+          if(!integerSolution_){
+            integerSolution_ = new double[cpx_->getNumCols()];
+          }
+          CPXgetmipx(env, cpxlp, integerSolution_, 0, cpx_->getNumCols() -1);
+          CHECK_CPX_STAT("getmipx",status)
+       }
+       else {
+         if (integerSolution_) {
+           delete [] integerSolution_;
+           integerSolution_ = NULL;
+         }
+       }
+      cpx_->switchToLP();
+#endif
+    } 
+    else {
+        throw CoinError("Unsuported solver, for local searches you should use clp or cplex",
+            "performLocalSearch",
+            "OaDecompositionBase::SubMipSolver");
+   }
+  }
+
+  void
+  SubMipSolver::optimize(double cutoff, int loglevel, double maxTime)
+  {
+    if (clp_) {
+      assert(strategy_);
+      CbcStrategyDefault * strat_default = dynamic_cast<CbcStrategyDefault *>(strategy_->clone());
+      assert(strat_default);
+      strat_default->setupPreProcessing();
+
+      OsiBabSolver empty;
+      CbcModel cbc(*clp_);
+      cbc.solver()->setAuxiliaryInfo(&empty);
+
+      //Change Cbc messages prefixes
+      strcpy(cbc.messagesPointer()->source_,"OCbc");
+
+      cbc.setLogLevel(loglevel);
+      cbc.solver()->messageHandler()->setLogLevel(0);
+      clp_->resolve();
+      cbc.setStrategy(*strategy_);
+      cbc.setLogLevel(loglevel);
+      cbc.solver()->messageHandler()->setLogLevel(0);
+      cbc.setMaximumSeconds(maxTime);
+      cbc.setCutoff(cutoff);
+      cbc.setDblParam( CbcModel::CbcAllowableFractionGap, gap_tol_);
+
+      //cbc.solver()->writeMpsNative("FP.mps", NULL, NULL, 1);
+      cbc.branchAndBound();
+      lowBound_ = cbc.getBestPossibleObjValue();
+
+      if (cbc.isProvenOptimal() || cbc.isProvenInfeasible())
+        optimal_ = true;
+      else optimal_ = false;
+
+      if (cbc.getSolutionCount()) {
+        if (!integerSolution_)
+          integerSolution_ = new double[clp_->getNumCols()];
+        CoinCopyN(cbc.bestSolution(), clp_->getNumCols(), integerSolution_);
+      }
+      else if (integerSolution_) {
+        delete [] integerSolution_;
+        integerSolution_ = NULL;
+      }
+      nodeCount_ = cbc.getNodeCount();
+      iterationCount_ = cbc.getIterationCount();
+      delete strat_default;
+    }
+    else 
+#ifdef COIN_HAS_CPX
+    if (cpx_) {
+      cpx_->switchToMIP();
+      CPXENVptr env = cpx_->getEnvironmentPtr();
+      CPXLPptr orig_lp = cpx_->getLpPtr(OsiCpxSolverInterface::KEEPCACHED_ALL);
+
+      int s;
+      CPXLPptr cpxlp = CPXcloneprob(env, orig_lp, &s);
+      double gap_tol = std::max(0.,gap_tol_- gap_tol_*(1e-01));
+
+#ifdef SHIFT_CUTOFF
+      if(cutoff < 1e20){
+        cutoff = cutoff-fabs(cutoff)*gap_tol_*0.2;
+        gap_tol = gap_tol_*0.8;
+      }
+#endif
+
+      CPXsetdblparam(env, CPX_PARAM_TILIM, maxTime);
+      CPXsetintparam(env, CPX_PARAM_CLOCKTYPE, 1);
+      CPXsetdblparam(env, CPX_PARAM_CUTUP, cutoff);
+      CPXsetdblparam(env, CPX_PARAM_EPGAP, gap_tol);
+      CPXsetintparam( env, CPX_PARAM_PREIND, CPX_ON );
+
+      //CPXwriteprob(env, cpxlp, "OA_trunk","MPS");
+      //CPXwriteparam(env, "params.txt");
+      
+
+      cpx_->messageHandler()->setLogLevel(loglevel);
+
+      int status = CPXmipopt(env,cpxlp);
+      CHECK_CPX_STAT("mipopt",status)
+
+      int stat = CPXgetstat( env, cpxlp);
+      bool infeasible = (stat == CPXMIP_INFEASIBLE) || (stat == CPXMIP_ABORT_INFEAS) || (stat == CPXMIP_TIME_LIM_INFEAS) || (stat == CPXMIP_NODE_LIM_INFEAS) || (stat == CPXMIP_FAIL_INFEAS)
+                        || (stat == CPXMIP_MEM_LIM_INFEAS) || (stat == CPXMIP_INForUNBD);
+      optimal_ = (stat == CPXMIP_INFEASIBLE) || (stat == CPXMIP_OPTIMAL) || (stat == CPXMIP_OPTIMAL_TOL) || (stat == CPXMIP_INForUNBD); 
+      nodeCount_ = CPXgetnodecnt(env , cpxlp);
+      iterationCount_ = CPXgetmipitcnt(env , cpxlp);
+      status = CPXgetbestobjval(env, cpxlp, &lowBound_);
+      CHECK_CPX_STAT("getbestobjval",status)
+       
+      if(!infeasible){
+         if(!integerSolution_){
+           integerSolution_ = new double[cpx_->getNumCols()];
+         }
+         CPXgetmipx(env, cpxlp, integerSolution_, 0, cpx_->getNumCols() -1);
+         CHECK_CPX_STAT("getmipx",status)
+      }
+      else {
+        if (integerSolution_) {
+          delete [] integerSolution_;
+          integerSolution_ = NULL;
+        }
+      }
+      CPXfreeprob(env, &cpxlp);
+      cpx_->switchToLP();
+    }
+    else {
+#else
+     {
+#endif
+        throw CoinError("Unsuported solver, for local searches you should use clp or cplex",
+            "performLocalSearch",
+            "OaDecompositionBase::SubMipSolver");
+      }
+}
+
+  void
+  SubMipSolver::optimize_with_lazy_constraints(double cutoff, int loglevel, double maxTime, const OsiCuts &cs)
+  {
+    if (clp_) {
+      fprintf(stderr, "Function optimize_with_lazy_constraints can only be used with CPLEX\n");
+      optimize(cutoff,loglevel, maxTime);
+    }
+    else 
+#ifdef COIN_HAS_CPX
+    if (cpx_) {
+      cpx_->switchToMIP();
+      CPXENVptr env = cpx_->getEnvironmentPtr();
+      CPXLPptr cpxlp = cpx_->getLpPtr(OsiCpxSolverInterface::KEEPCACHED_ALL);
+
+// Remove all the cuts and declare them as lazy constraints
+
+      int orig_nrows = CPXgetnumrows(env, cpxlp) - cs.sizeRowCuts();
+      /* printf("Number of rows %i\n", cs.sizeRowCuts()); */
+      CPXdelrows(env, cpxlp, orig_nrows, CPXgetnumrows(env, cpxlp) - 1);
+      
+      int rcnt = cs.sizeRowCuts(), nzcnt = 0;
+      vector<double> rhs(rcnt);
+      vector<char> sense(rcnt);
+      vector<int> beg(rcnt);
+      vector<int> ind;
+      vector<double> val; 
+      double infty = cpx_->getInfinity();
+ 
+      for(int i =0 ; i < rcnt ; i++){
+        const OsiRowCut &r = cs.rowCut(i);
+        const double lb = r.lb(), ub=r.ub();
+        if(ub >= infty) {
+          sense[i] = 'G';
+          rhs[i] = lb;
+        }
+        else if (lb <= infty) {
+           sense[i] = 'L';
+           rhs[i] = ub;
+        }
+        else {
+          assert(lb == ub);
+          sense[i] = 'E';
+          rhs[i] = ub;
+        }
+        beg[i] = nzcnt;
+        nzcnt += r.row().getNumElements();
+      }
+
+      ind.resize(nzcnt);
+      val.resize(nzcnt);      
+      for(int i =0 ; i < rcnt ; i++){
+        const OsiRowCut &r = cs.rowCut(i);
+        const double * el = r.row().getElements();
+        const int * id = r.row().getIndices();
+        int nz = r.row().getNumElements();
+        std::copy(el, el + nz, val() + beg[i]);
+        std::copy(id, id + nz, ind() + beg[i]);
+      }
+
+      CPXaddlazyconstraints(env, cpxlp, rcnt, nzcnt, rhs(), sense(), beg(), ind(), val(), NULL);
+      CPXsetintparam(env, CPX_PARAM_REDUCE, CPX_PREREDUCE_PRIMALONLY);
+
+      CPXsetdblparam(env, CPX_PARAM_TILIM, maxTime);
+      CPXsetintparam(env, CPX_PARAM_CLOCKTYPE, 1);
+      CPXsetdblparam(env, CPX_PARAM_CUTUP, cutoff);
+      CPXsetdblparam(env, CPX_PARAM_EPGAP, gap_tol_);
+      cpx_->messageHandler()->setLogLevel(loglevel);
+      int status = CPXmipopt(env,cpxlp);
+      CHECK_CPX_STAT("mipopt",status)
+
+      int stat = CPXgetstat( env, cpxlp);
+      bool infeasible = (stat == CPXMIP_INFEASIBLE) || (stat == CPXMIP_ABORT_INFEAS) || (stat == CPXMIP_TIME_LIM_INFEAS) || (stat == CPXMIP_NODE_LIM_INFEAS) || (stat == CPXMIP_FAIL_INFEAS)
+                        || (stat == CPXMIP_MEM_LIM_INFEAS) || (stat == CPXMIP_INForUNBD);
+      optimal_ = (stat == CPXMIP_INFEASIBLE) || (stat == CPXMIP_OPTIMAL) || (stat == CPXMIP_OPTIMAL_TOL) || (stat == CPXMIP_INForUNBD);
+      nodeCount_ = CPXgetnodecnt(env , cpxlp);
+      iterationCount_ = CPXgetmipitcnt(env , cpxlp);
+      status = CPXgetbestobjval(env, cpxlp, &lowBound_);
+      CHECK_CPX_STAT("getbestobjval",status)
+       
+      if(!infeasible){
+         if(!integerSolution_){
+           integerSolution_ = new double[cpx_->getNumCols()];
+         }
+         CPXgetmipx(env, cpxlp, integerSolution_, 0, cpx_->getNumCols() -1);
+         CHECK_CPX_STAT("getmipx",status)
+      }
+      else {
+        if (integerSolution_) {
+          delete [] integerSolution_;
+          integerSolution_ = NULL;
+        }
+      }
+      cpx_->switchToLP();
+      CPXfreelazyconstraints(env, cpxlp);
+      CPXaddrows(env, cpxlp, 0, rcnt, nzcnt, rhs(), sense(), beg(), ind(), val(), NULL, NULL);
+    }
+    else {
+#else
+     {
+#endif
+        throw CoinError("Unsuported solver, for local searches you should use clp or cplex",
+            "performLocalSearch",
+            "OaDecompositionBase::SubMipSolver");
+      }
+}
+
+   /** Assign a strategy. */
+   void 
+   SubMipSolver::setStrategy(CbcStrategyDefault * strategy)
+   {
+     if (strategy_) delete strategy_;
+     strategy_ = dynamic_cast<CbcStrategyDefault *>(strategy->clone());
+     assert(strategy_);
+   }
+
+  /** Register options.*/
+  void
+  SubMipSolver::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("MILP Solver", RegisteredOptions::BonminCategory);
+    roptions->AddStringOption3("milp_solver",
+        "Choose the subsolver to solve MILP sub-problems in OA decompositions.",
+        "Cbc_D",
+        "Cbc_D","Coin Branch and Cut with its default",
+        "Cbc_Par", "Coin Branch and Cut with passed parameters",
+        "Cplex","IBM Cplex",
+        " To use Cplex, a valid license is required and you should have compiled OsiCpx in COIN-OR  (see Osi documentation).");
+    roptions->setOptionExtraInfo("milp_solver",64);
+
+    roptions->AddBoundedIntegerOption("cpx_parallel_strategy",
+                           "Strategy of parallel search mode in CPLEX.",
+                           -1, 1, 0,
+                           "-1 = opportunistic, 0 = automatic, 1 = deterministic (refer to CPLEX documentation)"
+                           );
+    roptions->setOptionExtraInfo("cpx_parallel_strategy",64);
+
+    roptions->AddLowerBoundedIntegerOption("number_cpx_threads",
+                           "Set number of threads to use with cplex.",
+                           0, 0,
+                           "(refer to CPLEX documentation)"
+                           );
+    roptions->setOptionExtraInfo("number_cpx_threads",64);
+
+    
+    roptions->AddStringOption2("milp_strategy",
+        "Choose a strategy for MILPs.",
+        "solve_to_optimality",
+        "find_good_sol","Stop sub milps when a solution improving the incumbent is found",
+        "solve_to_optimality", "Solve MILPs to optimality",
+        "");
+    roptions->setOptionExtraInfo("milp_strategy",64);
+
+    roptions->SetRegisteringCategory("Output and Loglevel", RegisteredOptions::BonminCategory);
+    roptions->AddBoundedIntegerOption("milp_log_level",
+        "specify MILP solver log level.",
+        0,4,0,
+        "Set the level of output of the MILP subsolver in OA : "
+        "0 - none, 1 - minimal, 2 - normal low, 3 - normal high"
+                                     );
+    roptions->setOptionExtraInfo("milp_log_level",64);
+
+  }
+}/* Ends Bonmin namespace.*/
diff --git a/src/Algorithms/BonSubMipSolver.hpp b/src/Algorithms/BonSubMipSolver.hpp
new file mode 100644
index 0000000..500c84f
--- /dev/null
+++ b/src/Algorithms/BonSubMipSolver.hpp
@@ -0,0 +1,143 @@
+// (C) Copyright International Business Machines (IBM) 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/07/2006
+
+
+// Code separated from BonOaDecBase to try to clarify OAs
+#ifndef BonSubMipSolver_HPP
+#define BonSubMipSolver_HPP
+#include "IpSmartPtr.hpp"
+#include <string>
+/* forward declarations.*/
+class OsiSolverInterface;
+class OsiClpSolverInterface;
+class OsiCpxSolverInterface;
+class CbcStrategy;
+class CbcStrategyDefault;
+
+#include "OsiCuts.hpp"
+
+namespace Bonmin {
+    class RegisteredOptions;
+    class BabSetupBase; 
+    /** A very simple class to provide a common interface for solving MIPs with Cplex and Cbc.*/
+    class SubMipSolver
+    {
+    public:
+      enum MILP_solve_strategy{
+         FindGoodSolution,
+         GetOptimum};
+      /** Constructor */
+      SubMipSolver(BabSetupBase &b, const std::string &prefix);
+
+      /** Copy Constructor */
+      SubMipSolver(const SubMipSolver &copy);
+
+      ~SubMipSolver();
+
+      /** Assign lp solver. */
+      void setLpSolver(OsiSolverInterface * lp);
+
+      /** Assign a strategy. */
+      void setStrategy(CbcStrategyDefault * strategy);
+
+      /** get the solution found in last local search (return NULL if no solution). */
+      const double * getLastSolution()
+      {
+        return integerSolution_;
+      }
+
+      double getLowerBound()
+      {
+        return lowBound_;
+      }
+
+      void solve(double cutoff,
+          int loglevel,
+          double maxTime){
+         if(milp_strat_ == FindGoodSolution){
+            find_good_sol(cutoff, loglevel, maxTime);
+         }
+         else
+            optimize(cutoff, loglevel, maxTime);
+      }
+ 
+
+      /** update cutoff and perform a local search to a good solution. */
+      void find_good_sol(double cutoff,
+          int loglevel,
+          double maxTime);
+
+      /** update cutoff and optimize MIP. */
+      void optimize(double cutoff,
+          int loglevel,
+          double maxTime);
+
+      /** update cutoff, put OA constraints in cs as lazy constraints and optimize MIP. */
+      void optimize_with_lazy_constraints(double cutoff,
+          int loglevel,
+          double maxTime, const OsiCuts & cs);
+
+      /** Returns lower bound. */
+      inline double lowBound()
+      {
+        return lowBound_;
+      }
+
+      /** returns optimality status. */
+      inline bool optimal()
+      {
+        return optimal_;
+      }
+
+      /** Returns number of nodes in last solve.*/
+      inline int nodeCount()
+      {
+        return nodeCount_;
+      }
+
+      /** Returns number of simplex iterations in last solve.*/
+      inline int iterationCount()
+      {
+        return iterationCount_;
+      }
+
+
+      OsiSolverInterface * solver();
+
+     /** Register options for that Oa based cut generation method. */
+     static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    private:
+      /** If lp solver is clp (then have to use Cbc) (not owned).*/
+      OsiClpSolverInterface *clp_;
+      /** If mip solver is cpx this is it (owned). */
+      OsiCpxSolverInterface * cpx_;
+      /** lower bound obtained */
+      double lowBound_;
+      /** Is optimality proven? */
+      bool optimal_;
+      /** Has an integer solution? then it is here*/
+      double * integerSolution_;
+      /** Strategy for solving sub mips with cbc. */
+      CbcStrategyDefault * strategy_;
+      /** number of nodes in last mip solved.*/
+      int nodeCount_;
+      /** number of simplex iteration in last mip solved.*/
+      int iterationCount_;
+      /** MILP search strategy.*/
+      MILP_solve_strategy milp_strat_;
+      /** setting for gap tolerance.*/
+      double gap_tol_;
+      /** say if owns copy of clp_.*/
+      bool ownClp_;
+    };
+
+}
+
+#endif
+
diff --git a/src/Algorithms/Branching/BonChooseVariable.cpp b/src/Algorithms/Branching/BonChooseVariable.cpp
new file mode 100644
index 0000000..02f0b9d
--- /dev/null
+++ b/src/Algorithms/Branching/BonChooseVariable.cpp
@@ -0,0 +1,1148 @@
+// Copyright (C) 2006, 2008 International Business Machines
+// Corporation and others.  All Rights Reserved.
+
+#include <climits>
+#include "CoinPragma.hpp"
+#include "BonChooseVariable.hpp"
+#include "CoinTime.hpp"
+#include "IpBlas.hpp"
+#include "BonMsgUtils.hpp"
+
+// This couples Cbc code into Bonmin code...
+#include "CbcModel.hpp"
+
+namespace Bonmin
+{
+
+  BonChooseVariable::Messages::Messages():
+      CoinMessages((int) BON_CHOOSE_MESSAGES_DUMMY_END)
+  {
+    strcpy(source_,"BON");
+    ADD_MSG(PS_COST_HISTORY,std_m,6,"%3d up %3d  %.8e  down %3d  %.8e");
+    ADD_MSG(PS_COST_MULT,std_m, 6, "upMultiplier = %e downMultiplier = %e");
+    ADD_MSG(PS_COST_ESTIMATES, std_m, 6, "%3d value = %e upEstimate = %e downEstimate = %e infeas = %e value2 = %e");
+    ADD_MSG(CANDIDATE_LIST,std_m,6,
+        "list_[%5d] = %5d, usefull_[%5d] = %.16e %.16e");
+    ADD_MSG(CANDIDATE_LIST2, std_m, 6,
+        "list_[%3d] = %3d useful_[%3d] = %e");
+    ADD_MSG(CANDIDATE_LIST3, std_m, 6,
+        "list2[%3d] = %3d useful2[%3d] = %e");
+    ADD_MSG(SB_START, std_m,5,
+        " Starting strong branching. Obj. val = %g\n");
+    ADD_MSG(SB_HEADER, std_m,5,
+        "           Var    Value            DownStat    DownChange     UpStat      UpChange");
+    ADD_MSG(SB_RES, std_m, 5,
+        "    %3d    %3d    %.6e      %6s    %.6e   %6s    %.6e");
+    ADD_MSG(BRANCH_VAR, std_m, 4, "Branched on variable %i, bestWhichWay: %i");
+    ADD_MSG(CHOSEN_VAR, std_m, 4,"           Choosing %d");
+    ADD_MSG(UPDATE_PS_COST, std_m, 4,"update %3d %3d %e %e %3d");
+  }
+  const std::string BonChooseVariable::CNAME = "BonChooseVariable";
+
+  BonChooseVariable::BonChooseVariable(BabSetupBase &b, const OsiSolverInterface* solver):
+      OsiChooseVariable(solver),
+      results_(),
+      cbc_model_(NULL),
+      only_pseudo_when_trusted_(false),
+      pseudoCosts_()
+  {
+    jnlst_ = b.journalist();
+    Ipopt::SmartPtr<Ipopt::OptionsList> options = b.options();
+
+    handler_ = new CoinMessageHandler;
+
+    options->GetIntegerValue("bb_log_level", bb_log_level_, b.prefix());
+    handler_->setLogLevel(bb_log_level_);
+    options->GetNumericValue("time_limit", time_limit_, b.prefix());
+    options->GetNumericValue("setup_pseudo_frac", setup_pseudo_frac_, b.prefix());
+    options->GetNumericValue("maxmin_crit_no_sol", maxmin_crit_no_sol_, b.prefix());
+    options->GetNumericValue("maxmin_crit_have_sol", maxmin_crit_have_sol_, b.prefix());
+    options->GetEnumValue("trust_strong_branching_for_pseudo_cost",trustStrongForPseudoCosts_ , b.prefix());
+    int sortCrit;
+    options->GetEnumValue("candidate_sort_criterion", sortCrit, b.prefix());
+#ifndef OLD_USEFULLNESS
+    sortCrit_ = (CandidateSortCriterion) sortCrit;
+#endif
+    /** Set values of standard branching options.*/
+    int numberObjects = solver_->numberObjects();
+    //std::cout<<"Number objects "<<numberObjects<<std::endl;
+    pseudoCosts_.initialize(numberObjects);
+    int numberBeforeTrusted = b.getIntParameter(BabSetupBase::MinReliability);
+    pseudoCosts_.setNumberBeforeTrusted(numberBeforeTrusted);
+
+    setNumberStrong(b.getIntParameter(BabSetupBase::NumberStrong));
+
+    /** Get values of options specific to BonChooseVariable.*/
+    if (!options->GetIntegerValue("number_before_trust_list", numberBeforeTrustedList_, b.prefix())) {
+      // default is to use the same value as for numberBeforeTrusted
+      numberBeforeTrustedList_ = numberBeforeTrusted;
+    }
+    options->GetIntegerValue("number_strong_branch_root", numberStrongRoot_, b.prefix());
+    options->GetIntegerValue("min_number_strong_branch", minNumberStrongBranch_, b.prefix());
+    options->GetIntegerValue("number_look_ahead", numberLookAhead_, b.prefix());
+
+    start_time_ = CoinCpuTime();
+  }
+
+  BonChooseVariable::BonChooseVariable(const BonChooseVariable & rhs) :
+      OsiChooseVariable(rhs),
+      results_(rhs.results_),
+      time_limit_(rhs.time_limit_),
+      start_time_(CoinCpuTime()),
+      cbc_model_(rhs.cbc_model_),
+      only_pseudo_when_trusted_(rhs.only_pseudo_when_trusted_),
+      maxmin_crit_no_sol_(rhs.maxmin_crit_no_sol_),
+      maxmin_crit_have_sol_(rhs.maxmin_crit_have_sol_),
+      setup_pseudo_frac_(rhs.setup_pseudo_frac_),
+      numberBeforeTrustedList_(rhs.numberBeforeTrustedList_),
+      numberStrongRoot_(rhs.numberStrongRoot_),
+#ifndef OLD_USEFULLNESS
+      sortCrit_(rhs.sortCrit_),
+#endif
+      numberLookAhead_(rhs.numberLookAhead_),
+      minNumberStrongBranch_(rhs.minNumberStrongBranch_),
+      pseudoCosts_(rhs.pseudoCosts_),
+      trustStrongForPseudoCosts_(rhs.trustStrongForPseudoCosts_)
+  {
+    jnlst_ = rhs.jnlst_;
+    handler_ = rhs.handler_->clone();
+    bb_log_level_ = rhs.bb_log_level_;
+    DBG_ASSERT(IsValid(jnlst_));
+  }
+
+  BonChooseVariable &
+  BonChooseVariable::operator=(const BonChooseVariable & rhs)
+  {
+    if (this != &rhs) {
+      OsiChooseVariable::operator=(rhs);
+      delete handler_;
+      handler_ = rhs.handler_->clone();
+      jnlst_ = rhs.jnlst_;
+      bb_log_level_ = rhs.bb_log_level_;
+      cbc_model_ = rhs.cbc_model_;
+      only_pseudo_when_trusted_ = rhs.only_pseudo_when_trusted_;
+      maxmin_crit_no_sol_ = rhs.maxmin_crit_no_sol_;
+      maxmin_crit_have_sol_ = rhs.maxmin_crit_have_sol_;
+      setup_pseudo_frac_ = rhs.setup_pseudo_frac_;
+      numberBeforeTrustedList_ = rhs.numberBeforeTrustedList_;
+      numberStrongRoot_ = rhs.numberStrongRoot_;
+#ifndef OLD_USEFULLNESS
+      sortCrit_ = rhs.sortCrit_;
+#endif
+      minNumberStrongBranch_ = rhs.minNumberStrongBranch_;
+      pseudoCosts_ = rhs.pseudoCosts_;
+      trustStrongForPseudoCosts_ = rhs.trustStrongForPseudoCosts_;
+      numberLookAhead_ = rhs.numberLookAhead_;
+      results_ = rhs.results_;
+    }
+    return *this;
+  }
+
+  OsiChooseVariable *
+  BonChooseVariable::clone() const
+  {
+    return new BonChooseVariable(*this);
+  }
+
+  BonChooseVariable::~BonChooseVariable ()
+  {
+    delete handler_;
+  }
+
+  void
+  BonChooseVariable::registerOptions(
+    Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("Strong branching setup", RegisteredOptions::BonminCategory);
+    roptions->AddStringOption4("candidate_sort_criterion",
+        "Choice of the criterion to choose candidates in strong-branching",
+        "best-ps-cost",
+        "best-ps-cost","Sort by decreasing pseudo-cost",
+        "worst-ps-cost", "Sort by increasing pseudo-cost",
+        "most-fractional", "Sort by decreasing integer infeasibility",
+        "least-fractional", "Sort by increasing integer infeasibility","");
+
+    roptions->setOptionExtraInfo("candidate_sort_criterion",63);
+
+    roptions->AddBoundedNumberOption("setup_pseudo_frac", "Proportion of strong branching list that has to be taken from most-integer-infeasible list.",
+        0., false, 1., false, 0.5);
+    roptions->setOptionExtraInfo("setup_pseudo_frac",63);
+    roptions->AddBoundedNumberOption("maxmin_crit_no_sol", "Weight towards minimum in of lower and upper branching estimates when no solution has been found yet.",
+        0., false, 1., false, 0.7);
+    roptions->setOptionExtraInfo("maxmin_crit_no_sol",63);
+    roptions->AddBoundedNumberOption("maxmin_crit_have_sol", "Weight towards minimum in of lower and upper branching estimates when a solution has been found.",
+        0., false, 1., false, 0.1);
+    roptions->setOptionExtraInfo("maxmin_crit_have_sol",63);
+    roptions->AddLowerBoundedIntegerOption("number_before_trust_list",
+        "Set the number of branches on a variable before its pseudo costs are to be believed during setup of strong branching candidate list.",
+        -1, 0, "The default value is that of \"number_before_trust\"");
+    roptions->setOptionExtraInfo("number_before_trust_list",63);
+    roptions->AddLowerBoundedIntegerOption("number_strong_branch_root",
+        "Maximum number of variables considered for strong branching in root node.",
+        0, COIN_INT_MAX, "");
+    roptions->setOptionExtraInfo("number_strong_branch_root",63);
+
+    roptions->AddLowerBoundedIntegerOption("min_number_strong_branch", "Sets minimum number of variables for strong branching (overriding trust)",
+        0, 0,"");
+    roptions->setOptionExtraInfo("min_number_strong_branch",63);
+    roptions->AddStringOption2("trust_strong_branching_for_pseudo_cost",
+                               "Whether or not to trust strong branching results for updating pseudo costs.",
+                               "yes",
+                               "no","",
+                               "yes","",
+                               ""
+                               );
+    roptions->setOptionExtraInfo("trust_strong_branching_for_pseudo_cost", 63);
+
+    roptions->AddLowerBoundedIntegerOption("number_look_ahead", "Sets limit of look-ahead strong-branching trials",
+        0, 0,"");
+    roptions->setOptionExtraInfo("number_look_ahead", 31);
+  }
+
+
+  void
+  BonChooseVariable::computeMultipliers(double& upMult, double& downMult) const
+  {
+    const double* upTotalChange = pseudoCosts_.upTotalChange();
+    const double* downTotalChange = pseudoCosts_.downTotalChange();
+    const int* upNumber = pseudoCosts_.upNumber();
+    const int* downNumber = pseudoCosts_.downNumber();
+    double sumUp=0.0;
+    double numberUp=0.0;
+    double sumDown=0.0;
+    double numberDown=0.0;
+    for (int i=pseudoCosts_.numberObjects() - 1; i >= 0; --i) {
+      sumUp += upTotalChange[i];
+      numberUp += upNumber[i];
+      sumDown += downTotalChange[i];
+      numberDown += downNumber[i];
+      message(PS_COST_HISTORY)
+      <<i<< upNumber[i]<< upTotalChange[i]
+      << downNumber[i]<< downTotalChange[i]<<CoinMessageEol;
+    }
+    upMult=(1.0+sumUp)/(1.0+numberUp);
+    downMult=(1.0+sumDown)/(1.0+numberDown);
+
+    message(PS_COST_MULT)
+    <<upMult<< downMult<<CoinMessageEol;
+  }
+
+  double
+  BonChooseVariable::computeUsefulness(const double MAXMIN_CRITERION,
+      const double upMult, const double downMult,
+      const double value,
+      const OsiObject* object, int i,
+      double& value2) const
+  {
+#ifdef OLD_USEFULLNESS
+  double sumUp = pseudoCosts_.upTotalChange()[i]+1.0e-30;
+  int numberUp = pseudoCosts_.upNumber()[i];
+  double sumDown = pseudoCosts_.downTotalChange()[i]+1.0e-30;
+  int numberDown = pseudoCosts_.downNumber()[i];
+  double upEst = object->upEstimate();
+  double downEst = object->downEstimate();
+  upEst = numberUp ? ((upEst*sumUp)/numberUp) : (upEst*upMult);
+  //if (numberUp<numberBeforeTrusted_)
+  //  upEst *= (numberBeforeTrusted_+1.0)/(numberUp+1.0);
+  downEst = numberDown ? ((downEst*sumDown)/numberDown) : (downEst*downMult);
+  //if (numberDown<numberBeforeTrusted_)
+  //  downEst *= (numberBeforeTrusted_+1.0)/(numberDown+1.0);
+  double useful = ( MAXMIN_CRITERION*CoinMin(upEst,downEst) +
+		    (1.0-MAXMIN_CRITERION)*CoinMax(upEst,downEst) );
+  value2 = -COIN_DBL_MAX;
+  if (numberUp   < numberBeforeTrustedList_ ||
+      numberDown < numberBeforeTrustedList_) {
+    value2 = value;
+  }
+#else
+   // FIXME: Hanlding initialization correctly
+    int numberUp = pseudoCosts_.upNumber()[i];
+    int numberDown = pseudoCosts_.downNumber()[i];
+    if (sortCrit_ >= DecrPs && sortCrit_ <= IncrPs) {//Using pseudo costs
+      double sumUp = pseudoCosts_.upTotalChange()[i]+1.0e-30;
+      double sumDown = pseudoCosts_.downTotalChange()[i]+1.0e-30;
+      double upEst = object->upEstimate();
+      double downEst = object->downEstimate();
+      upEst = numberUp ? ((upEst*sumUp)/numberUp) : (upEst*upMult);
+      //if (numberUp<numberBeforeTrusted_)
+      //  upEst *= (numberBeforeTrusted_+1.0)/(numberUp+1.0);
+      downEst = numberDown ? ((downEst*sumDown)/numberDown) : (downEst*downMult);
+      //if (numberDown<numberBeforeTrusted_)
+      //  downEst *= (numberBeforeTrusted_+1.0)/(numberDown+1.0);
+      double useful = ( MAXMIN_CRITERION*CoinMin(upEst,downEst) +
+          (1.0-MAXMIN_CRITERION)*CoinMax(upEst,downEst) );
+      if (numberUp == 0 || numberDown == 0) {
+        if (value == 0.) useful = 0;
+        else if (MAXMIN_CRITERION >= 0.5)//Sort on max infeasibility
+          useful =  CoinMin(upEst, downEst);
+        else {//Do min infeasibility
+          useful = CoinMax(upEst, downEst);
+        }
+      }
+      value2 = -COIN_DBL_MAX;
+      if (numberUp   < numberBeforeTrustedList_ ||
+          numberDown < numberBeforeTrustedList_) {
+        value2 = value;
+      }
+#endif
+      message(PS_COST_ESTIMATES)
+      <<i<< useful<< upEst<< downEst<< value<< value2<< CoinMessageEol;
+      return useful;
+    }
+#ifndef OLD_USEFULLNESS
+    else if (sortCrit_ >= DecrInfeas && sortCrit_ <= IncrInfeas) {//Just return infeasibility
+      double usefull = value;
+      value2 = value;
+      return usefull;
+    }
+    else {
+      throw CoinError("BonChooseVariable", "computeUsefullnee",
+          "Unknown criterion for soring candidates");
+      return COIN_DBL_MAX;
+    }
+  }
+#endif
+
+  int
+  BonChooseVariable::setupList ( OsiBranchingInformation *info, bool initialize)
+  {
+    if (numberBeforeTrustedList_ < 0) {
+      number_not_trusted_ = 1;
+      return OsiChooseVariable::setupList(info, initialize);
+    }
+    if (initialize) {
+      status_=-2;
+      delete [] goodSolution_;
+      bestObjectIndex_=-1;
+      numberStrongDone_=0;
+      numberStrongIterations_ = 0;
+      numberStrongFixed_ = 0;
+      goodSolution_ = NULL;
+      goodObjectiveValue_ = COIN_DBL_MAX;
+      number_not_trusted_=0;
+    }
+    else {
+      throw CoinError(CNAME,"setupList","Should not be called with initialize==false");
+    }
+    numberOnList_=0;
+    numberUnsatisfied_=0;
+    int numberObjects = solver_->numberObjects();
+    assert (numberObjects);
+    if (numberObjects>pseudoCosts_.numberObjects()) {
+      //std::cout<<"Number objects "<<numberObjects<<std::endl;
+      //AW : How could that ever happen?
+      //PB : It happens for instance when SOS constraints are added. They are added after the creation of this.
+      //   assert(false && "Right now, all old content is deleted!");
+      // redo useful arrays
+      int saveNumberBeforeTrusted = pseudoCosts_.numberBeforeTrusted();
+      pseudoCosts_.initialize(numberObjects);
+      pseudoCosts_.setNumberBeforeTrusted(saveNumberBeforeTrusted);
+    }
+    double check = -COIN_DBL_MAX;
+    int checkIndex=0;
+    int bestPriority=COIN_INT_MAX;
+    int maximumStrong= CoinMin(CoinMax(numberStrong_,numberStrongRoot_),
+        numberObjects) ;
+    int putOther = numberObjects;
+    int i;
+    for (i=0;i<numberObjects;i++) {
+      list_[i]=-1;
+      useful_[i]=0.0;
+    }
+    // We make a second list for most fractional variables
+    int* list2 = NULL;
+    double* useful2 = NULL;
+    double check2 = -COIN_DBL_MAX;
+    int checkIndex2=0;
+    int max_most_fra = setup_pseudo_frac_ > 0. ? (int)floor(setup_pseudo_frac_*(double)maximumStrong): 0;
+    if (setup_pseudo_frac_ > 0.) {
+      max_most_fra = CoinMax(1, max_most_fra);
+    }
+    if (max_most_fra) {
+      list2 = new int[max_most_fra];
+      useful2 = new double[max_most_fra];
+      for (i=0;i<max_most_fra;i++) {
+        list2[i]=-1;
+        useful2[i]=0.0;
+      }
+    }
+
+    OsiObject ** object = info->solver_->objects();
+    double upMultiplier, downMultiplier;
+    computeMultipliers(upMultiplier, downMultiplier);
+
+    // Say feasible
+    bool feasible = true;
+    const double MAXMIN_CRITERION = maxminCrit(info);
+    for ( i=0;i<numberObjects;i++) {
+      int way;
+      double value = object[i]->infeasibility(info,way);
+      if (value>0.0) {
+        numberUnsatisfied_++;
+        if (value>=1e50) {
+          // infeasible
+          feasible=false;
+          break;
+        }
+        int priorityLevel = object[i]->priority();
+        // Better priority? Flush choices.
+        if (priorityLevel<bestPriority) {
+          for (int j=maximumStrong-1;j>=0;j--) {
+            if (list_[j]>=0) {
+              int iObject = list_[j];
+              list_[j]=-1;
+              useful_[j]=0.0;
+              list_[--putOther]=iObject;
+            }
+          }
+          maximumStrong = CoinMin(maximumStrong,putOther);
+          bestPriority = priorityLevel;
+          check=-COIN_DBL_MAX;
+          checkIndex=0;
+          check2=-COIN_DBL_MAX;
+          checkIndex2=0;
+          number_not_trusted_=0;
+          if (max_most_fra>0) {
+            for (int j=0;j<max_most_fra;j++) {
+              list2[j]=-1;
+              useful2[j]=0.0;
+            }
+          }
+        }
+        if (priorityLevel==bestPriority) {
+          // Modify value
+          double value2;
+          value = computeUsefulness(MAXMIN_CRITERION,
+              upMultiplier, downMultiplier, value,
+              object[i], i, value2);
+          if (value>check) {
+            //add to list
+            int iObject = list_[checkIndex];
+            if (iObject>=0) {
+              assert (list_[putOther-1]<0);
+              list_[--putOther]=iObject;  // to end
+            }
+            list_[checkIndex]=i;
+            assert (checkIndex<putOther);
+            useful_[checkIndex]=value;
+            // find worst
+            check=COIN_DBL_MAX;
+            maximumStrong = CoinMin(maximumStrong,putOther);
+            for (int j=0;j<maximumStrong;j++) {
+              if (list_[j]>=0) {
+                if (useful_[j]<check) {
+                  check=useful_[j];
+                  checkIndex=j;
+                }
+              }
+              else {
+                check=0.0;
+                checkIndex = j;
+                break;
+              }
+            }
+          }
+          else {
+            // to end
+            assert (list_[putOther-1]<0);
+            list_[--putOther]=i;
+            maximumStrong = CoinMin(maximumStrong,putOther);
+          }
+          if (max_most_fra > 0 && value2>check2) {
+            // add to list of integer infeasibilities
+            number_not_trusted_++;
+            list2[checkIndex2]=i;
+            useful2[checkIndex2]=value2;
+            // find worst
+            check2=COIN_DBL_MAX;
+            for (int j=0;j<max_most_fra;j++) {
+              if (list2[j]>=0) {
+                if (useful2[j]<check2) {
+                  check2=useful2[j];
+                  checkIndex2=j;
+                }
+              }
+              else {
+                check2=0.0;
+                checkIndex2 = j;
+                break;
+              }
+            }
+          }
+        }
+        else {
+          // worse priority
+          // to end
+          assert (list_[putOther-1]<0);
+          list_[--putOther]=i;
+          maximumStrong = CoinMin(maximumStrong,putOther);
+        }
+      }
+    }
+#if 0
+    for (int i=0; i<maximumStrong; i++) {
+      int way;
+      message(CANDIDATE_LIST)<<i
+      <<list_[i]<<i<<useful_[i]<<object[list_[i]]->infeasibility(info,way)
+      <<CoinMessageEol;
+    }
+#endif
+    // Get list
+    numberOnList_=0;
+    if (feasible) {
+      maximumStrong = CoinMin(maximumStrong,putOther);
+      for (i=0;i<maximumStrong;i++) {
+      if (list_[i]>=0) {
+#ifdef OLD_USEFULLNESS
+	list_[numberOnList_]=list_[i];
+	useful_[numberOnList_++]=-useful_[i];
+      
+#else
+          list_[numberOnList_]=list_[i];
+          if ((sortCrit_ & 1) == 0) {
+            useful_[numberOnList_++]=-useful_[i];
+          }
+          else useful_[numberOnList_++] = useful_[i];
+#endif
+          message(CANDIDATE_LIST2)<<numberOnList_-1
+          <<list_[numberOnList_-1]<<numberOnList_-1<<useful_[numberOnList_-1]
+          <<CoinMessageEol;
+        }
+      }
+      if (numberOnList_) {
+        int tmp_on_list = 0;
+        if (max_most_fra > 0 && numberOnList_ >= maximumStrong) {
+          // If we want to force non-trusted in the list, give them huge
+          // weight here
+          number_not_trusted_=0;
+          for (i=0;i<max_most_fra;i++) {
+            if (list2[i]>=0) {
+              list2[number_not_trusted_] = list2[i];
+              useful2[number_not_trusted_++] = useful2[i];
+              message(CANDIDATE_LIST3)<<number_not_trusted_-1
+              <<list2[number_not_trusted_-1]<<number_not_trusted_-1
+              <<useful2[number_not_trusted_-1]<<CoinMessageEol;
+            }
+          }
+          if (number_not_trusted_) {
+            CoinSort_2(list_,list_+numberOnList_,useful_);
+            CoinSort_2(list2,list2+number_not_trusted_,useful2);
+            int i1=0;
+            int i2=0;
+            for (i=0; i<numberObjects; i++) {
+              bool found1 = (list_[i1]==i);
+              bool found2 = (list2[i2]==i);
+              if (found1 && found2) {
+                useful_[i1] = -1e150*(1.+useful2[i2]);
+                list2[i2] = -1;
+              }
+              if (found1) i1++;
+              if (found2) i2++;
+              if (i2==max_most_fra) break;
+            }
+            for (i=0; i<number_not_trusted_; i++) {
+              if (list2[i] >= 0) {
+                list_[numberOnList_+tmp_on_list] = list2[i];
+                useful_[numberOnList_+tmp_on_list] = -1e150*(1.+useful2[i]);
+                tmp_on_list++;
+              }
+            }
+          }
+        }
+        // Sort
+        CoinSort_2(useful_,useful_+numberOnList_+tmp_on_list,list_);
+        // move others
+        i = numberOnList_;
+        for (;putOther<numberObjects;putOther++)
+          list_[i++]=list_[putOther];
+        assert (i==numberUnsatisfied_);
+        if (!CoinMax(numberStrong_,numberStrongRoot_))
+          numberOnList_=0;
+      }
+    }
+    else {
+      // not feasible
+      numberUnsatisfied_=-1;
+    }
+    // Get rid of any shadow prices info
+    info->defaultDual_ = -1.0; // switch off
+    delete [] info->usefulRegion_;
+    delete [] info->indexRegion_;
+    delete [] list2;
+    delete [] useful2;
+    int way;
+    if (bb_log_level_>3) {
+      //for (int i=0; i<Min(numberUnsatisfied_,numberStrong_); i++)
+      for (int i=0; i<numberOnList_; i++){
+        message(CANDIDATE_LIST)<<i<< list_[i]<< i<< useful_[i]
+        <<object[list_[i]]->infeasibility(info,way)
+        <<CoinMessageEol;
+        }
+    }
+    return numberUnsatisfied_;
+
+  }
+
+  /* Choose a variable
+     Returns -
+     -1 Node is infeasible
+     0  Normal termination - we have a candidate
+     1  All looks satisfied - no candidate
+     2  We can change the bound on a variable - but we also have a strong branching candidate
+     3  We can change the bound on a variable - but we have a non-strong branching candidate
+     4  We can change the bound on a variable - no other candidates
+     We can pick up branch from whichObject() and whichWay()
+     We can pick up a forced branch (can change bound) from whichForcedObject() and whichForcedWay()
+     If we have a solution then we can pick up from goodObjectiveValue() and goodSolution()
+  */
+  int
+  BonChooseVariable::chooseVariable(
+    OsiSolverInterface * solver,
+    OsiBranchingInformation *info,
+    bool fixVariables)
+  {
+    // We assume here that chooseVariable is called once at the very
+    // beginning with fixVariables set to true.  This is then the root
+    // node.
+    bool isRoot = isRootNode(info);
+    int numberStrong = numberStrong_;
+    if (isRoot) {
+      numberStrong = CoinMax(numberStrong_, numberStrongRoot_);
+    }
+    std::vector<double> save_sol;
+    if (bb_log_level_>=3) {
+       save_sol.resize(info->numberColumns_);
+       std::copy(info->solution_, info->solution_ + info->numberColumns_ , save_sol.begin());
+    }
+    if (numberUnsatisfied_) {
+      const double* upTotalChange = pseudoCosts_.upTotalChange();
+      const double* downTotalChange = pseudoCosts_.downTotalChange();
+      const int* upNumber = pseudoCosts_.upNumber();
+      const int* downNumber = pseudoCosts_.downNumber();
+      int numberBeforeTrusted = pseudoCosts_.numberBeforeTrusted();
+      int numberLeft = CoinMin(numberStrong -numberStrongDone_,numberUnsatisfied_);
+      results_.clear();
+      int returnCode=0;
+      bestObjectIndex_ = -1;
+      bestWhichWay_ = -1;
+      firstForcedObjectIndex_ = -1;
+      firstForcedWhichWay_ =-1;
+      double bestTrusted=-COIN_DBL_MAX;
+      for (int i=0;i<numberLeft;i++) {
+        int iObject = list_[i];
+        if (numberBeforeTrusted == 0||
+            i < minNumberStrongBranch_ ||
+            (
+              only_pseudo_when_trusted_ && number_not_trusted_>0 ) ||
+              ( !isRoot && (upNumber[iObject]<numberBeforeTrusted ||
+                          downNumber[iObject]<numberBeforeTrusted ))||
+              ( isRoot && (!upNumber[iObject] && !downNumber[iObject])) ) {
+         
+             results_.push_back(HotInfo(solver, info,
+                                solver->objects(), iObject));
+        }
+        else {
+          const OsiObject * obj = solver->object(iObject);
+          double upEstimate = (upTotalChange[iObject]*obj->upEstimate())/upNumber[iObject];
+          double downEstimate = (downTotalChange[iObject]*obj->downEstimate())/downNumber[iObject];
+          double MAXMIN_CRITERION = maxminCrit(info);
+          double value = MAXMIN_CRITERION*CoinMin(upEstimate,downEstimate) + (1.0-MAXMIN_CRITERION)*CoinMax(upEstimate,downEstimate);
+          if (value > bestTrusted) {
+            bestObjectIndex_=iObject;
+            bestWhichWay_ = upEstimate>downEstimate ? 0 : 1;
+            bestTrusted = value;
+          }
+        }
+      }
+      int numberFixed=0;
+      if (results_.size() > 0) {
+        returnCode = doStrongBranching(solver, info, (int)results_.size(), 1);
+        if (bb_log_level_>=3) {
+          OsiObject ** obj = solver->objects();
+          const char* stat_msg[] = {"NOTDON", "FEAS", "INFEAS", "NOFINI"};
+          message(SB_START)<<info->objectiveValue_<<CoinMessageEol;
+          message(SB_HEADER)<<CoinMessageEol;
+          for (unsigned int i = 0; i< results_.size(); i++) {
+            double up_change = results_[i].upChange();
+            double down_change = results_[i].downChange();
+            int up_status = results_[i].upStatus();
+            int down_status = results_[i].downStatus();
+            int icol = obj[results_[i].whichObject()]->columnNumber();
+            double val = save_sol[icol];
+            message(SB_RES)<<(int) i<<icol<<val<<stat_msg[down_status+1]<<down_change
+            <<stat_msg[up_status+1]<< up_change<< CoinMessageEol;
+          }
+        }
+        if (returnCode>=0&&returnCode<=2) {
+          if (returnCode) {
+            returnCode=4;
+            if (bestObjectIndex_>=0)
+              returnCode=3;
+          }
+          for (unsigned int i=0;i < results_.size();i++) {
+            int iObject = results_[i].whichObject();
+            double upEstimate;
+            if (results_[i].downStatus()== 2 || results_[i].upStatus()==2) {
+              //continue;
+            }
+            if (results_[i].upStatus()!=1) {
+              assert (results_[i].upStatus()>=0);
+              upEstimate = results_[i].upChange();
+            }
+            else {
+              // infeasible - just say expensive
+              if (info->cutoff_<1.0e50)
+                upEstimate = 2.0*(info->cutoff_-info->objectiveValue_);
+              else
+                upEstimate = 2.0*fabs(info->objectiveValue_);
+              if (firstForcedObjectIndex_ <0) {
+                // first fixed variable
+                firstForcedObjectIndex_ = iObject;
+                firstForcedWhichWay_ =0;
+              }
+              numberFixed++;
+              if (fixVariables) {
+                const OsiObject * obj = solver->object(iObject);
+                OsiBranchingObject * branch = obj->createBranch(solver,info,0);
+                branch->branch(solver);
+                delete branch;
+              }
+            }
+            double downEstimate;
+            if (results_[i].downStatus()!=1) {
+              assert (results_[i].downStatus()>=0);
+              downEstimate = results_[i].downChange();
+            }
+            else {
+              // infeasible - just say expensive
+              if (info->cutoff_<1.0e50)
+                downEstimate = 2.0*(info->cutoff_-info->objectiveValue_);
+              else
+                downEstimate = 2.0*fabs(info->objectiveValue_);
+              if (firstForcedObjectIndex_ <0) {
+                firstForcedObjectIndex_ = iObject;
+                firstForcedWhichWay_ =1;
+              }
+              numberFixed++;
+              if (fixVariables) {
+                const OsiObject * obj = solver->object(iObject);
+                OsiBranchingObject * branch = obj->createBranch(solver,info,1);
+                branch->branch(solver);
+                delete branch;
+              }
+            }
+            double MAXMIN_CRITERION = maxminCrit(info);
+            double value = MAXMIN_CRITERION*CoinMin(upEstimate,downEstimate) + (1.0-MAXMIN_CRITERION)*CoinMax(upEstimate,downEstimate);
+            if (value>bestTrusted) {
+              bestTrusted = value;
+              bestObjectIndex_ = iObject;
+              bestWhichWay_ = upEstimate>downEstimate ? 0 : 1;
+              // but override if there is a preferred way
+              const OsiObject * obj = solver->object(iObject);
+              if (obj->preferredWay()>=0&&obj->infeasibility())
+                bestWhichWay_ = obj->preferredWay();
+              if (returnCode)
+                returnCode=2;
+            }
+          }
+        }
+        else if (returnCode==3) {
+          // max time - just choose one
+          bestObjectIndex_ = list_[0];
+          bestWhichWay_ = 0;
+          returnCode=0;
+        }
+      }
+      else {
+        bestObjectIndex_=list_[0];
+      }
+      if ( bestObjectIndex_ >=0 ) {
+        OsiObject * obj = solver->objects()[bestObjectIndex_];
+        obj->setWhichWay(bestWhichWay_);
+        message(BRANCH_VAR)<<obj->columnNumber()<< bestWhichWay_
+        <<CoinMessageEol;
+      }
+      message(CHOSEN_VAR)<<bestObjectIndex_<<CoinMessageEol;
+      if (numberFixed==numberUnsatisfied_&&numberFixed)
+        returnCode=4;
+      return returnCode;
+    }
+    else {
+      return 1;
+    }
+  }
+
+  /*  This is a utility function which does strong branching on
+      a list of objects and stores the results in OsiHotInfo.objects.
+      On entry the object sequence is stored in the OsiHotInfo object
+      and maybe more.
+      It returns -
+      -1 - one branch was infeasible both ways
+       0 - all inspected - nothing can be fixed
+       1 - all inspected - some can be fixed (returnCriterion==0)
+       2 - may be returning early - one can be fixed (last one done) (returnCriterion==1) 
+       3 - returning because max time
+  */
+  int 
+  BonChooseVariable::doStrongBranching( OsiSolverInterface * solver, 
+  				    OsiBranchingInformation *info,
+  				    int numberToDo, int returnCriterion)
+  {
+    // Prepare stuff for look-ahead heuristic
+    double bestLookAhead_ = -COIN_DBL_MAX;
+    int trialsSinceBest_ = 0;
+    bool isRoot = isRootNode(info);
+    // Might be faster to extend branch() to return bounds changed
+    double * saveLower = NULL;
+    double * saveUpper = NULL;
+    int numberColumns = solver->getNumCols();
+    solver->markHotStart();
+    const double * lower = info->lower_;
+    const double * upper = info->upper_;
+    saveLower = CoinCopyOfArray(info->lower_,numberColumns);
+    saveUpper = CoinCopyOfArray(info->upper_,numberColumns);
+    int returnCode=0;
+    double timeStart = CoinCpuTime();
+    int iDo = 0;
+    for (;iDo<numberToDo;iDo++) {
+      HotInfo * result = results_() + iDo;
+      // For now just 2 way
+      OsiBranchingObject * branch = result->branchingObject();
+      assert (branch->numberBranches()==2);
+      /*
+        Try the first direction.  Each subsequent call to branch() performs the
+        specified branch and advances the branch object state to the next branch
+        alternative.)
+      */
+      OsiSolverInterface * thisSolver = solver; 
+      if (branch->boundBranch()) {
+        // ordinary
+        branch->branch(solver);
+        // maybe we should check bounds for stupidities here?
+        solver->solveFromHotStart() ;
+
+
+      } else {
+        // adding cuts or something 
+        thisSolver = solver->clone();
+        branch->branch(thisSolver);
+        // set hot start iterations
+        int limit;
+        thisSolver->getIntParam(OsiMaxNumIterationHotStart,limit);
+        thisSolver->setIntParam(OsiMaxNumIteration,limit); 
+        thisSolver->resolve();
+      }
+      // can check if we got solution
+      // status is 0 finished, 1 infeasible and 2 unfinished and 3 is solution
+      int status0 = result->updateInformation(thisSolver,info,this);
+      if (status0==3) {
+        // new solution already saved
+        if (trustStrongForSolution_) {
+        info->cutoff_ = goodObjectiveValue_;
+        status0=0;
+        }
+      }
+      if(solver->getRowCutDebugger() && status0 == 1 ){
+           OsiTMINLPInterface * tminlp_solver = dynamic_cast<OsiTMINLPInterface *> (solver);
+           throw tminlp_solver->newUnsolvedError(1, tminlp_solver->problem(), "SB");
+      }
+      numberStrongIterations_ += thisSolver->getIterationCount();
+      if (solver!=thisSolver)
+        delete thisSolver;
+      // Restore bounds
+      for (int j=0;j<numberColumns;j++) {
+        if (saveLower[j] != lower[j])
+  	solver->setColLower(j,saveLower[j]);
+        if (saveUpper[j] != upper[j])
+  	solver->setColUpper(j,saveUpper[j]);
+      }
+      /*
+        Try the next direction
+      */
+      thisSolver = solver; 
+      if (branch->boundBranch()) {
+        // ordinary
+        branch->branch(solver);
+        // maybe we should check bounds for stupidities here?
+        fflush(stdout);
+        solver->solveFromHotStart() ;
+      } else {
+        // adding cuts or something 
+        thisSolver = solver->clone();
+        branch->branch(thisSolver);
+        // set hot start iterations
+        int limit;
+        thisSolver->getIntParam(OsiMaxNumIterationHotStart,limit);
+        thisSolver->setIntParam(OsiMaxNumIteration,limit); 
+
+
+        thisSolver->resolve();
+      }
+      // can check if we got solution
+      // status is 0 finished, 1 infeasible and 2 unfinished and 3 is solution
+      int status1 = result->updateInformation(thisSolver,info,this);
+      numberStrongDone_++;
+      if (status1==3) {
+        // new solution already saved
+        if (trustStrongForSolution_) {
+        info->cutoff_ = goodObjectiveValue_;
+        status1=0;
+        }
+      }
+      if(solver->getRowCutDebugger() && status1 == 1){
+           OsiTMINLPInterface * tminlp_solver = dynamic_cast<OsiTMINLPInterface *> (solver);
+           throw tminlp_solver->newUnsolvedError(1, tminlp_solver->problem(), "SB");
+      }
+      numberStrongIterations_ += thisSolver->getIterationCount();
+      if (solver!=thisSolver)
+        delete thisSolver;
+      // Restore bounds
+      for (int j=0;j<numberColumns;j++) {
+        if (saveLower[j] != lower[j])
+  	solver->setColLower(j,saveLower[j]);
+        if (saveUpper[j] != upper[j])
+  	solver->setColUpper(j,saveUpper[j]);
+      }
+      /*
+        End of evaluation for this candidate variable. Possibilities are:
+        * Both sides below cutoff; this variable is a candidate for branching.
+        * Both sides infeasible or above the objective cutoff: no further action
+        here. Break from the evaluation loop and assume the node will be purged
+        by the caller.
+        * One side below cutoff: Install the branch (i.e., fix the variable). Possibly break
+        from the evaluation loop and assume the node will be reoptimised by the
+        caller.
+      */
+      if (status0==1&&status1==1) {
+        // infeasible
+        returnCode=-1;
+        //break; // exit loop
+      } else if (status0==1||status1==1) {
+        numberStrongFixed_++;
+  	returnCode=1;
+      }
+      bool hitMaxTime = ( CoinCpuTime()-timeStart > info->timeRemaining_)
+                        || ( CoinCpuTime() - start_time_ > time_limit_);
+      if (hitMaxTime) {
+        returnCode=3;
+        break;
+      }
+      // stop if look ahead heuristic tells us so
+      if (!isRoot && numberLookAhead_) {
+	assert(status0==0 && status1==0);
+	double upEstimate = result->upChange();
+	double downEstimate = result->downChange();
+	double MAXMIN_CRITERION = maxminCrit(info);
+	double value = MAXMIN_CRITERION*CoinMin(upEstimate,downEstimate) + (1.0-MAXMIN_CRITERION)*CoinMax(upEstimate,downEstimate);
+	if (value > bestLookAhead_) {
+	  bestLookAhead_ = value;
+	  trialsSinceBest_ = 0;
+	}
+	else {
+	  trialsSinceBest_++;
+	  if (trialsSinceBest_ >= numberLookAhead_) {
+	    break;
+	  }
+	}
+      }
+    }
+    if(iDo < numberToDo) iDo++;
+    assert(iDo <= (int) results_.size());
+    results_.resize(iDo);
+    delete [] saveLower;
+    delete [] saveUpper;
+    // Delete the snapshot
+    solver->unmarkHotStart();
+    return returnCode;
+  }
+
+  bool BonChooseVariable::isRootNode(const OsiBranchingInformation *info) const
+  {
+    return info->depth_ == 0;
+  }
+
+  double
+  BonChooseVariable::maxminCrit(const OsiBranchingInformation *info) const
+  {
+    double retval = maxmin_crit_no_sol_;
+    if (cbc_model_) {
+      // FIXME: should be replaced by info->stateOfSearch_
+      const int stateOfSearch = cbc_model_->stateOfSearch();
+      const int depth = info->depth_;
+      if (stateOfSearch>1 && depth>10) {
+        retval = maxmin_crit_have_sol_;
+      }
+    }
+    return retval;
+  }
+
+// Given a candidate  fill in useful information e.g. estimates
+  void
+  BonChooseVariable::updateInformation(const OsiBranchingInformation *info,
+      int branch, OsiHotInfo * hotInfo)
+  {
+    if(!trustStrongForPseudoCosts_) return;
+    int index = hotInfo->whichObject();
+    assert (index<solver_->numberObjects());
+    const OsiObject * object = info->solver_->object(index);
+    assert (object->upEstimate()>0.0&&object->downEstimate()>0.0);
+    assert (branch<2);
+    double* upTotalChange = pseudoCosts_.upTotalChange();
+    double* downTotalChange = pseudoCosts_.downTotalChange();
+    int* upNumber = pseudoCosts_.upNumber();
+    int* downNumber = pseudoCosts_.downNumber();
+    if (branch) {
+      //if (hotInfo->upStatus()!=1) 
+      // AW: Let's update the pseudo costs only if the strong branching
+      // problem was marked as "solved"
+      if (hotInfo->upStatus()==0) {
+        assert (hotInfo->upStatus()>=0);
+        upTotalChange[index] += hotInfo->upChange()/object->upEstimate();
+        upNumber[index]++;
+      }
+      else if (hotInfo->upStatus()==1) {
+        // infeasible - just say expensive
+        upNumber[index]++;
+        if (info->cutoff_<1.0e50)
+          upTotalChange[index] += 2.0*(info->cutoff_-info->objectiveValue_)/object->upEstimate();
+        else
+          upTotalChange[index] += 2.0*fabs(info->objectiveValue_)/object->upEstimate();
+      }
+    }
+    else {
+      if (hotInfo->downStatus()==0) {
+        assert (hotInfo->downStatus()>=0);
+        downTotalChange[index] += hotInfo->downChange()/object->downEstimate();
+        downNumber[index]++;
+      }
+      else if (hotInfo->downStatus()==1) {
+        downNumber[index]++;
+        // infeasible - just say expensive
+        if (info->cutoff_<1.0e50)
+          downTotalChange[index] += 2.0*(info->cutoff_-info->objectiveValue_)/object->downEstimate();
+        else
+          downTotalChange[index] += 2.0*fabs(info->objectiveValue_)/object->downEstimate();
+      }
+    }
+  }
+
+// Given a branch fill in useful information e.g. estimates 
+void  
+BonChooseVariable::updateInformation( int index, int branch,  
+                                      double changeInObjective, double changeInValue, 
+                                      int status) 
+{ 
+  if(cbc_model_ == NULL) return;
+  assert (index<solver_->numberObjects()); 
+  assert (branch<2); 
+
+  if(fabs(changeInValue) < 1e-6) return;
+
+  double* upTotalChange = pseudoCosts_.upTotalChange(); 
+  double* downTotalChange = pseudoCosts_.downTotalChange(); 
+  int* upNumber = pseudoCosts_.upNumber(); 
+  int* downNumber = pseudoCosts_.downNumber(); 
+    message(UPDATE_PS_COST)<<index<< branch
+    <<changeInObjective<<changeInValue<<status
+    <<CoinMessageEol;
+
+  if (branch) { 
+    if (status!=1) { 
+      assert (status>=0); 
+      upTotalChange[index] += changeInObjective/changeInValue; 
+      upNumber[index]++; 
+    } else { 
+      // infeasible - just say expensive 
+      upNumber[index]++; 
+      assert(cbc_model_); // Later, we need to get this information in a different way... 
+      double cutoff = cbc_model_->getCutoff(); 
+      double objectiveValue = cbc_model_->getCurrentObjValue(); 
+      if (cutoff<1.0e50) 
+        upTotalChange[index] += 2.0*(cutoff-objectiveValue)/changeInValue; 
+      else 
+        upTotalChange[index] += 2.0*fabs(objectiveValue)/changeInValue; 
+    } 
+  } else { 
+    if (status!=1) { 
+      assert (status>=0); 
+      downTotalChange[index] += changeInObjective/changeInValue; 
+      downNumber[index]++; 
+    } else { 
+      assert(cbc_model_); 
+      // infeasible - just say expensive 
+      downNumber[index]++; 
+      double cutoff = cbc_model_->getCutoff(); 
+      double objectiveValue = cbc_model_->getCurrentObjValue(); 
+      if (cutoff<1.0e50) 
+        downTotalChange[index] += 2.0*(cutoff-objectiveValue)/changeInValue; 
+      else 
+        downTotalChange[index] += 2.0*fabs(objectiveValue)/changeInValue; 
+    } 
+  }   
+} 
+
+
+  HotInfo::HotInfo(): OsiHotInfo(), infeasibilities_(){
+  } 
+
+  HotInfo::HotInfo( OsiSolverInterface * solver,
+                    const OsiBranchingInformation *info,
+                    const OsiObject * const * objects,
+                    int whichObject): 
+  OsiHotInfo(solver, info, objects, whichObject),
+  infeasibilities_(){
+     infeasibilities_.resize(branchingObject_->numberBranches());
+  }
+
+  HotInfo::HotInfo(const HotInfo& other): OsiHotInfo(other),
+                                          infeasibilities_(other.infeasibilities_){
+  }
+
+  OsiHotInfo * 
+  HotInfo::clone() const {
+    return new HotInfo(*this);
+  }
+
+  HotInfo &
+  HotInfo::operator=(const HotInfo &rhs){
+    if(this != &rhs){
+      OsiHotInfo::operator=(rhs);
+      infeasibilities_ = rhs.infeasibilities_;
+    }
+    return (*this);
+  }
+
+  HotInfo::~HotInfo(){
+  }
+
+  int
+  HotInfo::updateInformation(const OsiSolverInterface * solver,
+                             const OsiBranchingInformation * info,
+                             OsiChooseVariable * choose){
+    //printf("in HotInfo::updateInformation\n");
+    int iBranch = branchingObject_->branchIndex()-1;
+    double & infeasibility = infeasibilities_[iBranch] = 0.;
+   
+    OsiObject ** objects = solver->objects();
+    int numObject = solver->numberObjects();
+    for(int i = 0 ; i < numObject ; i++){
+       infeasibility += objects[i]->checkInfeasibility(info);
+    }
+    int status = OsiHotInfo::updateInformation(solver, info, choose);
+#if 1
+    if(!solver->isProvenPrimalInfeasible() && !solver->isProvenOptimal()){
+      status = 2;
+      statuses_[iBranch] = status;
+    }
+    else if(solver->isProvenPrimalInfeasible() && fabs(solver->getObjValue()) < 1e-06) {
+      assert(solver->messageHandler() != NULL);
+      *solver->messageHandler() << "Very small infeasibility: " << solver->getObjValue() << CoinMessageEol;
+      status = 2;
+      statuses_[iBranch] = status;
+    }
+#endif
+    return status;
+  }
+  
+}/* Ends Bonmin's namespace.*/
+
diff --git a/src/Algorithms/Branching/BonChooseVariable.hpp b/src/Algorithms/Branching/BonChooseVariable.hpp
new file mode 100644
index 0000000..82e7575
--- /dev/null
+++ b/src/Algorithms/Branching/BonChooseVariable.hpp
@@ -0,0 +1,345 @@
+// Copyright (C) 2006, 2008 International Business Machines
+// Corporation and others.  All Rights Reserved.
+#ifndef BonChooseVariable_H
+#define BonChooseVariable_H
+
+#include "OsiChooseVariable.hpp"
+#ifdef BONMIN_CURVATURE_BRANCHING
+#include "BonCurvatureEstimator.hpp"
+#endif
+#include "BonOsiTMINLPInterface.hpp"
+#include "CoinMessageHandler.hpp"
+#include "BonBabSetupBase.hpp"
+// Forward declaration
+class CbcModel;
+
+#define OLD_USEFULLNESS
+
+namespace Bonmin
+{
+
+  class HotInfo : public OsiHotInfo {
+    public:
+    /// Default constructor
+    HotInfo();
+
+    /// Constructor from usefull information
+    HotInfo( OsiSolverInterface * solver,
+             const OsiBranchingInformation *info,
+             const OsiObject * const * objects, int whichObject);
+
+    /// Copy constructor
+    HotInfo(const HotInfo & other);
+
+    /// Assignment operator
+    HotInfo & operator=(const HotInfo & rhs);
+
+    /// Clone
+    virtual OsiHotInfo * clone() const;
+
+    /// Destructor
+    virtual ~HotInfo();
+
+    /// Fill in some usefull information after a strong branching is done:
+    int updateInformation( const OsiSolverInterface * solver, const OsiBranchingInformation * info,
+	                   OsiChooseVariable * choose);
+
+    /// up infeasibility
+    double upInfeasibility() const{
+     return infeasibilities_[1];
+    }
+
+    /// down infeasibility
+    double downInfeasibility() const{
+     return infeasibilities_[0];
+    }
+
+
+    /// Set the down infeasibility
+    void setUpInfeasibility(double x){
+      assert(branchingObject_->numberBranches()==2);
+      infeasibilities_[1] = x;
+    }
+
+    /// Set the down infeasibility
+    void setDownInfeasibility(double x){
+      assert(branchingObject_->numberBranches()==2);
+      infeasibilities_[0] = x;
+    }
+    private:
+    /// infeasibilities of children
+    vector<double> infeasibilities_; 
+  };
+
+  /** This class chooses a variable to branch on
+
+      This is the base class for the branching rules in Bonmin (inherits
+      from OsiChooseVariable). This class implements a simple strong branching algorithm where the changes in the objective
+      value induced by branching on a specific object are estimated with the pure virtual function fill_changes.
+  */
+
+  class BonChooseVariable : public OsiChooseVariable
+  {
+  protected:
+  /**  This is a utility function which does strong branching on
+       a list of objects and stores the results in OsiHotInfo.objects.
+       On entry the object sequence is stored in the OsiHotInfo object
+       and maybe more.
+       It returns -
+       -1 - one branch was infeasible both ways
+       0 - all inspected - nothing can be fixed
+       1 - all inspected - some can be fixed (returnCriterion==0)
+       2 - may be returning early - one can be fixed (last one done) (returnCriterion==1) 
+       3 - returning because max time
+       
+  */
+  virtual int doStrongBranching( OsiSolverInterface * solver, 
+				 OsiBranchingInformation *info,
+				 int numberToDo, int returnCriterion);
+#ifndef OLD_USEFULLNESS
+    /** Criterion applied to sort candidates.*/
+    enum CandidateSortCriterion {
+      DecrPs = 0,
+      IncrPs,
+      DecrInfeas,
+      IncrInfeas};
+#endif
+
+    /** Statuses for strong branching candidates.*/
+    enum StrongStatus{
+      NotDone=-1,
+      Feasible/** Child is proven feasible.*/,
+      Infeasible /** Child is proven infeasible.*/,
+      NotFinished /** Child is not finished.*/};
+  public:
+    /** \name Message handling.*/
+    /** @{ */
+    enum Messages_Types {
+      PS_COST_HISTORY = 0,
+      PS_COST_MULT,
+      PS_COST_ESTIMATES,
+      CANDIDATE_LIST,
+      CANDIDATE_LIST2,
+      CANDIDATE_LIST3,
+      SB_START,
+      SB_HEADER,
+      SB_RES,
+      BRANCH_VAR,
+      CHOSEN_VAR,
+      UPDATE_PS_COST,
+      BON_CHOOSE_MESSAGES_DUMMY_END
+    };
+
+  class Messages : public CoinMessages
+    {
+    public:
+      Messages();
+    };
+
+    void passInMessageHandler(CoinMessageHandler * handler) {
+      int logLevel = handler_->logLevel();
+      delete handler_;
+      handler_ = handler->clone();
+      handler_->setLogLevel(logLevel);
+    }
+
+    CoinMessageHandler& message(Messages_Types type) const {
+      return handler_->message(type, messages_);
+    }
+    /** @} */
+
+
+
+    enum DoStrongReturnStatuses{
+      provenInfeasible = -1 /** One branch has two infeasible children.*/,
+      doneNoFixing /** All done no variable can be fixed.*/,
+      doneCanFix /** Several variable can be fixed.*/,
+      interuptedCanFix /** Interupted and found a variable to fix.*/,
+      maxTime /** Interupted because of time limit.*/};
+
+    /** Return statuses for chooseVariable.*/
+    enum chooseVariableReturnStatuses{
+      infeasibleNode = -1/** Node has been proven infeasible.*/,
+      hasCandidate /** Normal termination, found a variable to branch on.*/,
+      feasibleNode /** All variable are feasible, the node is feasible.*/,
+      canFixAndStrongBranch /** Found variable to fix and also has remaining candidate for strong branching.*/,
+      canFixAndBranch/** Found variable to fix and also has a (non-strong) branching candidate.*/,
+      canFixNoCandidate /** Can fix variables but does not have strong branching candidates.*/
+    };
+    /// Constructor from solver (so we can set up arrays etc)
+    BonChooseVariable (BabSetupBase& b, const OsiSolverInterface* solver);
+
+    /// Copy constructor
+    BonChooseVariable (const BonChooseVariable &);
+
+    /// Assignment operator
+    BonChooseVariable & operator= (const BonChooseVariable& rhs);
+
+    /// Clone
+    virtual OsiChooseVariable * clone() const;
+
+    /// Destructor
+    virtual ~BonChooseVariable ();
+
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+    /** Helper functions for setupList and chooseVariable */
+    double maxminCrit(const OsiBranchingInformation* info) const;
+    void computeMultipliers(double& upMult, double& downMult) const;
+    double computeUsefulness(const double MAXMIN_CRITERION,
+        const double upMult, const double dowMult,
+        const double value,
+        const OsiObject* object, int i,
+        double& value2) const;
+
+    /** Sets up strong list and clears all if initialize is true.
+        Returns number of infeasibilities. */
+    virtual int setupList ( OsiBranchingInformation *info, bool initialize);
+
+    /** Choose a variable
+        Returns - 
+       -1 Node is infeasible
+       0  Normal termination - we have a candidate
+       1  All looks satisfied - no candidate
+       2  We can change the bound on a variable - but we also have a strong branching candidate
+       3  We can change the bound on a variable - but we have a non-strong branching candidate
+       4  We can change the bound on a variable - no other candidates
+       We can pick up branch from bestObjectIndex() and bestWhichWay()
+       We can pick up a forced branch (can change bound) from firstForcedObjectIndex() and firstForcedWhichWay()
+       If we have a solution then we can pick up from goodObjectiveValue() and goodSolution()
+       If fixVariables is true then 2,3,4 are all really same as problem changed
+    */
+    virtual int chooseVariable( OsiSolverInterface * solver, OsiBranchingInformation *info, bool fixVariables);
+    /**  This is a utility function which does strong branching on
+         a list of objects and stores the results in OsiHotInfo.objects.
+         On entry the object sequence is stored in the OsiHotInfo object
+         and maybe more.
+         It returns -
+         -1 - one branch was infeasible both ways
+         0 - all inspected - nothing can be fixed
+         1 - all inspected - some can be fixed (returnCriterion==0)
+         2 - may be returning early - one can be fixed (last one done) (returnCriterion==1) 
+         3 - returning because max time
+      
+    */
+
+    /// Given a candidate fill in useful information e.g. estimates
+    virtual void updateInformation(const OsiBranchingInformation *info,
+        int branch, OsiHotInfo * hotInfo);
+#if 1
+    /// Given a branch fill in useful information e.g. estimates
+    virtual void updateInformation( int whichObject, int branch,
+        double changeInObjective, double changeInValue,
+        int status);
+#endif
+
+    /** Method for setting CbcModel, which is used to get statusOfSearch */
+    void setCbcModel(CbcModel* cbc_model)
+    {
+      cbc_model_ = cbc_model;
+    }
+
+    void setOnlyPseudoWhenTrusted(bool only_pseudo_when_trusted)
+    {
+      only_pseudo_when_trusted_ = only_pseudo_when_trusted;
+    }
+
+
+    /** Access to pseudo costs storage.*/
+    const OsiPseudoCosts & pseudoCosts() const{
+      return pseudoCosts_;}
+
+    /** Access to pseudo costs storage.*/
+    OsiPseudoCosts & pseudoCosts() {
+      return pseudoCosts_;}
+  protected:
+
+    /// Holding on the a pointer to the journalist
+    Ipopt::SmartPtr<Ipopt::Journalist> jnlst_;
+
+    /// verbosity level
+    int bb_log_level_;
+
+    /** Stores strong branching results.*/
+    vector<HotInfo> results_;
+
+    /** Determine status of strong branching solution.*/
+    int determineStatus(OsiSolverInterface * solver) const {
+      if (solver->isProvenOptimal())
+        return 0; // optimal
+      else if (solver->isIterationLimitReached()
+               &&!solver->isDualObjectiveLimitReached())
+        return 2; // unknown 
+      else
+        return 1; // infeasible
+    }
+
+  private:
+    /** Default Constructor, forbiden for some reason.*/
+    BonChooseVariable ();
+
+    /** Global time limit for algorithm. */
+    double time_limit_;
+
+    /** Starting time of algorithm.*/
+    double start_time_;
+  protected:
+    /// CbcModel, used to get status of search
+    CbcModel* cbc_model_;
+
+    /** Flag indicating whether we don't want to mix strong branching
+     *  and pseudo costs during the decision which variable to branch
+     *  on */
+    bool only_pseudo_when_trusted_;
+
+    /** Number of variables put into the list because there were not
+     *  trusted */
+    int number_not_trusted_;
+
+    /** Message handler.*/
+    CoinMessageHandler * handler_;
+
+    /** Messages.*/
+    Messages messages_;
+    // ToDo: Make this options
+    /** @name Algoirithmic options */
+    //@{
+    /** maxmin weight in branching decision when no solution has been
+     *  found yet */
+    double maxmin_crit_no_sol_;
+    /** maxmin weight in branching decision when no solution has been
+     *  found yet */
+    double maxmin_crit_have_sol_;
+    /** fraction of branching candidates that are not trusted yet */
+    double setup_pseudo_frac_;
+    /** number of times a branch has to happen so that it is trusted in
+     *  setupList */
+    int numberBeforeTrustedList_;
+    /** number of strong branching points at root node */
+    int numberStrongRoot_;
+    /** backup of numberStrong_ before Root node solve */
+    int numberStrongBackup_;
+    /** number of look-ahead strong-branching steps */
+    int numberLookAhead_;
+#ifndef OLD_USEFULLNESS
+    /** Criterion to use in setup list.*/
+    CandidateSortCriterion sortCrit_;
+#endif
+    /** Always strong branch that many first candidate in the list regardless of numberTrusted.*/
+    int minNumberStrongBranch_;
+    /** Stores the pseudo costs. */
+    OsiPseudoCosts pseudoCosts_;
+    /** Wether or not to trust strong branching results for updating pseudo costs.*/
+    int trustStrongForPseudoCosts_;
+   
+    //@}
+
+    /** detecting if this is root node */
+    bool isRootNode(const OsiBranchingInformation *info) const;
+
+    /** Stores the class name for throwing errors.*/
+    static const std::string CNAME;
+  };
+
+}
+#endif
diff --git a/src/Algorithms/Branching/BonCurvBranchingSolver.cpp b/src/Algorithms/Branching/BonCurvBranchingSolver.cpp
new file mode 100644
index 0000000..88f9f61
--- /dev/null
+++ b/src/Algorithms/Branching/BonCurvBranchingSolver.cpp
@@ -0,0 +1,188 @@
+// Copyright (C) 2006, 2007 International Business Machines
+// Corporation and others.  All Rights Reserved.
+
+#include "CoinPragma.hpp"
+#include "BonCurvBranchingSolver.hpp"
+
+namespace Bonmin
+{
+
+  CurvBranchingSolver::CurvBranchingSolver(OsiTMINLPInterface * solver) :
+      StrongBranchingSolver(solver),
+      orig_d_(NULL),
+      projected_d_(NULL),
+      x_l_orig_(NULL),
+      x_u_orig_(NULL),
+      g_l_orig_(NULL),
+      g_u_orig_(NULL),
+      solution_(NULL),
+      duals_(NULL)
+  {}
+
+  CurvBranchingSolver::CurvBranchingSolver(const CurvBranchingSolver & rhs) :
+      StrongBranchingSolver(rhs),
+      orig_d_(NULL),
+      projected_d_(NULL),
+      x_l_orig_(NULL),
+      x_u_orig_(NULL),
+      g_l_orig_(NULL),
+      g_u_orig_(NULL),
+      solution_(NULL),
+      duals_(NULL)
+  {}
+
+  CurvBranchingSolver &
+  CurvBranchingSolver::operator=(const CurvBranchingSolver & rhs)
+  {
+    assert(!x_l_orig_);
+    if (this != &rhs) {
+      StrongBranchingSolver::operator=(rhs);
+    }
+    return *this;
+  }
+
+  CurvBranchingSolver::~CurvBranchingSolver ()
+  {
+    delete [] orig_d_;
+    delete [] projected_d_;
+    delete [] x_l_orig_;
+    delete [] x_u_orig_;
+    delete [] g_l_orig_;
+    delete [] g_u_orig_;
+    delete [] solution_;
+    delete [] duals_;
+  }
+
+  void CurvBranchingSolver::
+  markHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    if (IsNull(cur_estimator_)) {
+      // Get a curvature estimator
+      cur_estimator_ = new CurvatureEstimator(Jnlst(), Options(),
+          tminlp_interface->problem());
+    }
+
+    new_bounds_ = true;
+    new_x_ = true;
+    new_mults_ = true;
+
+    delete [] solution_;
+    delete [] duals_;
+    solution_ =  NULL;
+    duals_ =  NULL;
+
+    numCols_ = tminlp_interface->getNumCols();
+    numRows_ = tminlp_interface->getNumRows();
+    solution_ = CoinCopyOfArray(tminlp_interface->problem()->x_sol(), numCols_);
+    duals_ = CoinCopyOfArray(tminlp_interface->problem()->duals_sol(),
+        numRows_ + 2*numCols_);
+    obj_value_ = tminlp_interface->problem()->obj_value();
+
+    delete [] orig_d_;
+    delete [] projected_d_;
+    orig_d_ = NULL;
+    projected_d_ = NULL;
+    orig_d_ = new double[numCols_];
+    projected_d_ = new double[numCols_];
+
+    // Get a copy of the current bounds
+    delete [] x_l_orig_;
+    delete [] x_u_orig_;
+    delete [] g_l_orig_;
+    delete [] g_u_orig_;
+    x_l_orig_ = NULL;
+    x_u_orig_ = NULL;
+    g_l_orig_ = NULL;
+    g_u_orig_ = NULL;
+    x_l_orig_ = new Number[numCols_];
+    x_u_orig_ = new Number[numCols_];
+    g_l_orig_ = new Number[numRows_];
+    g_u_orig_ = new Number[numRows_];
+
+#ifndef NDEBUG
+    bool retval =
+#endif
+      tminlp_interface->problem()->
+      get_bounds_info(numCols_, x_l_orig_, x_u_orig_,
+          numRows_, g_l_orig_, g_u_orig_);
+    assert(retval);
+  }
+
+  void CurvBranchingSolver::
+  unmarkHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    // Free memory
+    delete [] solution_;
+    delete [] duals_;
+    solution_ =  NULL;
+    duals_ =  NULL;
+    delete [] orig_d_;
+    delete [] projected_d_;
+    orig_d_ = NULL;
+    projected_d_ = NULL;
+    delete [] x_l_orig_;
+    delete [] x_u_orig_;
+    delete [] g_l_orig_;
+    delete [] g_u_orig_;
+    x_l_orig_ = NULL;
+    x_u_orig_ = NULL;
+    g_l_orig_ = NULL;
+    g_u_orig_ = NULL;
+  }
+
+  TNLPSolver::ReturnStatus CurvBranchingSolver::
+  solveFromHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    // return iteration limit reached as status, so that it is
+    // clear we don't have a feasible point
+    TNLPSolver::ReturnStatus retstatus = TNLPSolver::iterationLimit;
+
+    const double* z_L = duals_;
+    const double* z_U = z_L + numCols_;
+    const double* lam = z_U + numCols_;
+
+    // get the current points
+    const double* b_L = tminlp_interface->getColLower();
+    const double* b_U = tminlp_interface->getColUpper();
+
+    // Compute the step from the current point to the solution
+    // ToDo: If we know what changes, we can be more efficient
+    for (int i=0; i<numCols_; i++) {
+      if (b_L[i]>solution_[i]) {
+        orig_d_[i] = solution_[i]-b_L[i];
+      }
+      else if (b_U[i]<solution_[i]) {
+        orig_d_[i] = solution_[i]-b_U[i];
+      }
+      else {
+        orig_d_[i] = 0.;
+      }
+    }
+
+    double gradLagTd;
+    double dTHLagd;
+    bool retval =
+      cur_estimator_->ComputeNullSpaceCurvature(
+        numCols_, solution_, new_x_, x_l_orig_, x_u_orig_,
+        g_l_orig_, g_u_orig_, new_bounds_, z_L, z_U,
+        numRows_, lam, new_mults_, orig_d_, projected_d_,
+        gradLagTd, dTHLagd);
+
+    if (!retval) {
+      retstatus = TNLPSolver::computationError;
+    }
+    else {
+      new_bounds_ = false;
+      new_x_ = false;
+      new_mults_ = false;
+      const double alpha = 1.0; // Think about this
+      double new_obj_value = obj_value_ +
+          alpha*gradLagTd + 0.5*alpha*alpha*dTHLagd;
+      tminlp_interface->problem()->set_obj_value(new_obj_value);
+    }
+
+    return retstatus;
+  }
+
+
+}
diff --git a/src/Algorithms/Branching/BonCurvBranchingSolver.hpp b/src/Algorithms/Branching/BonCurvBranchingSolver.hpp
new file mode 100644
index 0000000..83be1ac
--- /dev/null
+++ b/src/Algorithms/Branching/BonCurvBranchingSolver.hpp
@@ -0,0 +1,77 @@
+// Copyright (C) 2006, 2007 International Business Machines
+// Corporation and others.  All Rights Reserved.
+//
+//
+#error "BonCurvBranchingSolver not supported anymore"
+#ifndef BonCurvBranchingSolver_H
+#define BonCurvBranchingSolver_H
+
+#include "BonStrongBranchingSolver.hpp"
+#include "BonCurvatureEstimator.hpp"
+
+namespace Bonmin
+{
+
+  /** Implementation of BonChooseVariable for curvature-based braching.
+  */
+
+  class CurvBranchingSolver : public StrongBranchingSolver
+  {
+
+  public:
+
+    /// Constructor from solver (so we can set up arrays etc)
+    CurvBranchingSolver (OsiTMINLPInterface * solver);
+
+    /// Copy constructor
+    CurvBranchingSolver (const CurvBranchingSolver &);
+
+    /// Assignment operator
+    CurvBranchingSolver & operator= (const CurvBranchingSolver& rhs);
+
+    /// Destructor
+    virtual ~CurvBranchingSolver ();
+
+    /// Called to initialize solver before a bunch of strong branching
+    /// solves
+    virtual void markHotStart(OsiTMINLPInterface* tminlp_interface);
+
+    /// Called to solve the current TMINLP (with changed bound information)
+    virtual TNLPSolver::ReturnStatus solveFromHotStart(OsiTMINLPInterface* tminlp_interface);
+
+    /// Called after all strong branching solves in a node
+    virtual void unmarkHotStart(OsiTMINLPInterface* tminlp_interface);
+
+  private:
+    /// Default Constructor
+    CurvBranchingSolver ();
+
+    SmartPtr<CurvatureEstimator> cur_estimator_;
+
+    /** @name Stuff for the curvature estimator */
+    //@{
+    bool new_bounds_;
+    bool new_x_;
+    bool new_mults_;
+    double* orig_d_;
+    double* projected_d_;
+    Number* x_l_orig_;
+    Number* x_u_orig_;
+    Number* g_l_orig_;
+    Number* g_u_orig_;
+    //@}
+
+    /** @name Information about the problem */
+    //@{
+    int numCols_;
+    int numRows_;
+    const double* solution_;
+    const double* duals_;
+    double obj_value_;
+    //@}
+
+  };
+
+}
+
+#endif
diff --git a/src/Algorithms/Branching/BonLpBranchingSolver.cpp b/src/Algorithms/Branching/BonLpBranchingSolver.cpp
new file mode 100644
index 0000000..4faaa63
--- /dev/null
+++ b/src/Algorithms/Branching/BonLpBranchingSolver.cpp
@@ -0,0 +1,231 @@
+// Copyright (C) 2006, 2007 International Business Machines
+// Corporation and others.  All Rights Reserved.
+
+#include "CoinPragma.hpp"
+#include "BonLpBranchingSolver.hpp"
+#include "OsiClpSolverInterface.hpp"
+#include <vector>
+
+namespace Bonmin
+{
+
+  LpBranchingSolver::LpBranchingSolver(BabSetupBase * b) :
+      StrongBranchingSolver(b->nonlinearSolver()),
+      lin_(NULL),
+      warm_(NULL),
+      ecp_(NULL)
+  {
+    Ipopt::SmartPtr<TNLPSolver> tnlp_solver =
+       static_cast<TNLPSolver *> (b->nonlinearSolver()->solver());
+    Ipopt::SmartPtr<Ipopt::OptionsList> options = tnlp_solver->options();
+
+	    options->GetIntegerValue("ecp_max_rounds_strong",
+	                             maxCuttingPlaneIterations_,
+                                     b->nonlinearSolver()->prefix());
+	    options->GetNumericValue("ecp_abs_tol_strong",
+                                     abs_ecp_tol_,
+                                     b->nonlinearSolver()->prefix());
+	    options->GetNumericValue("ecp_rel_tol_strong",
+                                     rel_ecp_tol_,
+                                     b->nonlinearSolver()->prefix());
+	    int dummy;
+	    options->GetEnumValue("lp_strong_warmstart_method", 
+                                  dummy,
+                                  b->nonlinearSolver()->prefix());
+	    warm_start_mode_ = (WarmStartMethod) dummy;
+	  }
+
+  LpBranchingSolver::LpBranchingSolver(const LpBranchingSolver & rhs) :
+      StrongBranchingSolver(rhs),
+      lin_(NULL),
+      warm_(NULL),
+      ecp_(NULL),
+      maxCuttingPlaneIterations_(rhs.maxCuttingPlaneIterations_),
+      abs_ecp_tol_(rhs.abs_ecp_tol_),
+      rel_ecp_tol_(rhs.rel_ecp_tol_),
+      warm_start_mode_(rhs.warm_start_mode_)
+  {}
+
+  LpBranchingSolver &
+  LpBranchingSolver::operator=(const LpBranchingSolver & rhs)
+  {
+    if (this != &rhs) {
+      StrongBranchingSolver::operator=(rhs);
+    }
+    maxCuttingPlaneIterations_ = rhs.maxCuttingPlaneIterations_;
+    abs_ecp_tol_ = rhs.abs_ecp_tol_;
+    rel_ecp_tol_ = rhs.rel_ecp_tol_;
+    warm_start_mode_ = rhs.warm_start_mode_;
+    // I assume that no LP solver information is ever copied
+    delete lin_;
+    delete warm_;
+    delete ecp_;
+    lin_ = NULL;
+    warm_ = NULL;
+    ecp_ = NULL;
+    return *this;
+  }
+
+  LpBranchingSolver::~LpBranchingSolver ()
+  {
+    delete lin_;
+    delete warm_;
+    delete ecp_;
+  }
+
+  void LpBranchingSolver::
+  markHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    lin_ = new OsiClpSolverInterface();
+    tminlp_interface->extractLinearRelaxation(*lin_, tminlp_interface->getColSolution(),
+                                              true);
+    double cutoff = -DBL_MAX;
+    tminlp_interface->getDblParam(OsiDualObjectiveLimit, cutoff);
+    lin_->setDblParam(OsiDualObjectiveLimit, cutoff);
+    //printf("Cutoff %g # ecp iteration %i\n",cutoff, maxCuttingPlaneIterations_);
+    lin_->messageHandler()->setLogLevel(0);
+    lin_->resolve();
+    warm_ = lin_->getWarmStart();
+    //if (maxCuttingPlaneIterations_)
+    //  ecp_ = new EcpCuts(tminlp_interface, maxCuttingPlaneIterations_,
+    //      abs_ecp_tol_, rel_ecp_tol_, -1.);
+  }
+
+  void LpBranchingSolver::
+  unmarkHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    // Free memory
+    delete lin_;
+    delete warm_;
+    delete ecp_;
+    lin_ = NULL;
+    warm_ = NULL;
+    ecp_ = NULL;
+  }
+
+  TNLPSolver::ReturnStatus LpBranchingSolver::
+  solveFromHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    TNLPSolver::ReturnStatus retstatus = TNLPSolver::solvedOptimal;
+
+    // updated the bounds of the linear solver
+    std::vector<int> diff_low_bnd_index;
+    std::vector<double> diff_low_bnd_value;
+    std::vector<int> diff_up_bnd_index;
+    std::vector<double> diff_up_bnd_value;
+
+    // Get the bounds.  We assume that the bounds in the linear solver
+    // are always the original ones
+    const int numCols = tminlp_interface->getNumCols();
+    const double* colLow_orig = lin_->getColLower();
+    const double* colUp_orig = lin_->getColUpper();
+    const double* colLow = tminlp_interface->getColLower();
+    const double* colUp = tminlp_interface->getColUpper();
+
+    OsiSolverInterface * lin = lin_;
+    // eventualy clone lin_
+    if(warm_start_mode_ == Clone){
+      lin = lin_->clone();
+//      std::cout<<"Cloning it"<<std::endl;
+    }
+    // Set the bounds on the LP solver according to the changes in
+    // tminlp_interface
+    for (int i=0; i<numCols; i++) {
+      const double& lo = colLow[i];
+      if (colLow_orig[i] < lo) {
+        if(warm_start_mode_ == Basis){
+          diff_low_bnd_value.push_back(colLow_orig[i]);
+          diff_low_bnd_index.push_back(i);
+        }
+        lin->setColLower(i,lo);
+      }
+      const double& up = colUp[i];
+      if (colUp_orig[i] > up) {
+        if(warm_start_mode_ == Basis){
+          diff_up_bnd_index.push_back(i);
+          diff_up_bnd_value.push_back(colUp_orig[i]);
+        }
+        lin->setColUpper(i,lo);
+      }
+    }
+
+    if(warm_start_mode_ == Basis){
+      lin->setWarmStart(warm_);
+    }
+
+    lin->resolve();
+
+    double obj = lin->getObjValue();
+    bool go_on = true;
+    if (lin->isProvenPrimalInfeasible() || 
+        lin->isDualObjectiveLimitReached()) {
+      retstatus = TNLPSolver::provenInfeasible;
+      go_on = false;
+    }
+    else if (lin->isIterationLimitReached()) {
+      retstatus = TNLPSolver::iterationLimit;
+      go_on = false;
+    }
+    else {
+      if (maxCuttingPlaneIterations_ > 0 && go_on) {
+        double violation;
+        obj = ecp_->doEcpRounds(*lin, true, &violation);
+        if (obj == COIN_DBL_MAX) {
+          retstatus = TNLPSolver::provenInfeasible;
+        }
+        else if (violation <= 1e-8) {
+          retstatus = TNLPSolver::solvedOptimal;
+        }
+      }
+    }
+    tminlp_interface->problem()->set_obj_value(obj);
+    tminlp_interface->problem()->Set_x_sol(numCols, lin_->getColSolution());
+
+    //restore the original bounds
+    if(warm_start_mode_ == Basis){
+      for (unsigned int i = 0; i < diff_low_bnd_index.size(); i++) {
+        lin_->setColLower(diff_low_bnd_index[i],diff_low_bnd_value[i]);
+      }
+      for (unsigned int i = 0; i < diff_up_bnd_index.size(); i++) {
+        lin_->setColUpper(diff_up_bnd_index[i],diff_up_bnd_value[i]);
+      }
+    }
+    else {
+      delete lin;
+    }
+    return retstatus;
+  }
+
+  void
+  LpBranchingSolver::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("ECP based strong branching",RegisteredOptions::UndocumentedCategory);
+    roptions->AddLowerBoundedIntegerOption
+    ("ecp_max_rounds_strong",
+     "Set the maximal number of rounds of ECP cuts in strong branching.",
+     0,0,
+     "");
+    roptions->setOptionExtraInfo("ecp_max_rounds_strong",63);
+    roptions->AddLowerBoundedNumberOption
+    ("ecp_abs_tol_strong",
+     "Set the absolute termination tolerance for ECP rounds in strong branching.",
+     0,false,1e-6,
+     "");
+    roptions->setOptionExtraInfo("ecp_abs_tol_strong",63);
+    roptions->AddLowerBoundedNumberOption
+    ("ecp_rel_tol_strong",
+     "Set the relative termination tolerance for ECP rounds in strong branching.",
+     0,false,1e-1,
+     "");
+    roptions->setOptionExtraInfo("ecp_rel_tol_strong",63);
+    roptions->AddStringOption2
+    ("lp_strong_warmstart_method",
+     "Choose method to use for warm starting lp in strong branching",
+     "Basis",
+     "Basis", "Use optimal basis of node",
+     "Clone", "Clone optimal problem of node",
+     "(Advanced stuff)");
+    roptions->setOptionExtraInfo("lp_strong_warmstart_method",63);
+  }
+
+}
diff --git a/src/Algorithms/Branching/BonLpBranchingSolver.hpp b/src/Algorithms/Branching/BonLpBranchingSolver.hpp
new file mode 100644
index 0000000..9e10172
--- /dev/null
+++ b/src/Algorithms/Branching/BonLpBranchingSolver.hpp
@@ -0,0 +1,80 @@
+// Copyright (C) 2006, 2007 International Business Machines
+// Corporation and others.  All Rights Reserved.
+#ifndef BonLpBranchingSolver_H
+#define BonLpBranchingSolver_H
+
+#include "BonStrongBranchingSolver.hpp"
+#include "BonEcpCuts.hpp"
+
+namespace Bonmin
+{
+
+  /** Implementation of BonChooseVariable for curvature-based braching.
+  */
+
+  class LpBranchingSolver : public StrongBranchingSolver
+  {
+
+  public:
+
+    /// Constructor from setup 
+    LpBranchingSolver (BabSetupBase *b);
+    /// Copy constructor
+    LpBranchingSolver (const LpBranchingSolver &);
+
+    /// Assignment operator
+    LpBranchingSolver & operator= (const LpBranchingSolver& rhs);
+
+    /// Destructor
+    virtual ~LpBranchingSolver ();
+
+    /// Called to initialize solver before a bunch of strong branching
+    /// solves
+    virtual void markHotStart(OsiTMINLPInterface* tminlp_interface);
+
+    /// Called to solve the current TMINLP (with changed bound information)
+    virtual TNLPSolver::ReturnStatus solveFromHotStart(OsiTMINLPInterface* tminlp_interface);
+
+    /// Called after all strong branching solves in a node
+    virtual void unmarkHotStart(OsiTMINLPInterface* tminlp_interface);
+
+    void setMaxCuttingPlaneIter(int num)
+    {
+      maxCuttingPlaneIterations_ = num;
+    }
+
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+  private:
+    /// Default Constructor
+    LpBranchingSolver ();
+
+    /// Linear solver
+    OsiSolverInterface* lin_;
+
+    /// Warm start object for linear solver
+    CoinWarmStart* warm_;
+
+    /// Ecp cut generate
+    EcpCuts* ecp_;
+
+    /// Number of maximal ECP cuts
+    int maxCuttingPlaneIterations_;
+
+    /// absolute tolerance for ECP cuts
+    double abs_ecp_tol_;
+
+    /// relative tolerance for ECP cuts
+    double rel_ecp_tol_;
+
+
+   enum WarmStartMethod {
+     Basis=0 /** Use basis*/,
+     Clone /** clone problem*/
+   };
+   /// Way problems are warm started
+   WarmStartMethod warm_start_mode_;
+  };
+
+}
+#endif
diff --git a/src/Algorithms/Branching/BonPseudoCosts.cpp b/src/Algorithms/Branching/BonPseudoCosts.cpp
new file mode 100644
index 0000000..cf8be7c
--- /dev/null
+++ b/src/Algorithms/Branching/BonPseudoCosts.cpp
@@ -0,0 +1,39 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/12/2007
+
+#include "BonPseudoCosts.hpp"
+
+
+namespace Bonmin
+{
+
+  PseudoCosts::PseudoCosts():
+    OsiPseudoCosts()
+  {
+  }
+
+  /** Copy constructor.*/
+  PseudoCosts::PseudoCosts(const PseudoCosts & rhs):
+   OsiPseudoCosts(rhs)
+  {
+  }
+
+
+  /** Assignment operator const version.*/
+  PseudoCosts &
+  PseudoCosts::operator=(const PseudoCosts&rhs)
+  {
+    if (this != &rhs) {
+        OsiPseudoCosts::operator=(rhs);
+    }
+    return *this;
+  }
+
+}/* End Bonmin namespace.*/
+
diff --git a/src/Algorithms/Branching/BonPseudoCosts.hpp b/src/Algorithms/Branching/BonPseudoCosts.hpp
new file mode 100644
index 0000000..dc8471d
--- /dev/null
+++ b/src/Algorithms/Branching/BonPseudoCosts.hpp
@@ -0,0 +1,91 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/12/2007
+
+#ifndef BonPseudoCosts_H
+#define BonPseudoCosts_H
+
+#include "OsiChooseVariable.hpp"
+namespace Bonmin
+{
+
+  class PseudoCosts: public OsiPseudoCosts
+  {
+  public:
+    /** Default constructor.*/
+    PseudoCosts();
+
+    /** Copy constructor.*/
+    PseudoCosts(const PseudoCosts & rhs);
+
+    /** Assignment operator const version.*/
+    PseudoCosts & operator=(const PseudoCosts&rhs);
+#if 0
+    /** Acces upTotalChange.*/
+    inline double * upTotalChange()
+    {
+      return upTotalChange_;
+    }
+
+    /** Acces downTotalChange.*/
+    inline double * downTotalChange()
+    {
+      return downTotalChange_;
+    }
+
+    /** Acces upNumber.*/
+    inline int * upNumber()
+    {
+      return upNumber_;
+    }
+
+    /** Acces downNumber.*/
+    inline int * downNumber()
+    {
+      return downNumber_;
+    }
+
+    /** Acces upTotalChange.*/
+    inline const double * upTotalChange() const
+    {
+      return upTotalChange_;
+    }
+
+    /** Acces downTotalChange.*/
+    inline const double * downTotalChange() const
+    {
+      return downTotalChange_;
+    }
+
+    /** Acces upNumber.*/
+    inline const int * upNumber() const
+    {
+      return upNumber_;
+    }
+
+    /** Acces downNumber.*/
+    inline const int * downNumber() const
+    {
+      return downNumber_;
+    }
+
+    /** Access number objects.*/
+    inline int numberObjects() const
+    {
+      return numberObjects_;
+    }
+#endif
+    /** Add a pseudo cost information.*/
+    void addInfo(int way, double originalObj, double originalInfeas,
+        double newObj, double newInfeas, int status);
+
+  };
+
+}/* End Bonmin namespace.*/
+
+#endif
diff --git a/src/Algorithms/Branching/BonQpBranchingSolver.cpp b/src/Algorithms/Branching/BonQpBranchingSolver.cpp
new file mode 100644
index 0000000..09ea19c
--- /dev/null
+++ b/src/Algorithms/Branching/BonQpBranchingSolver.cpp
@@ -0,0 +1,118 @@
+// Copyright (C) 2006, 2008 International Business Machines
+// Corporation and others.  All Rights Reserved.
+// Authors: Andreas Waechter, Pierre Bonami
+
+#include "BonminConfig.h"
+
+#include "CoinPragma.hpp"
+
+#define Verbose
+#include "BonQpBranchingSolver.hpp"
+
+#ifdef COIN_HAS_FILTERSQP
+#include "BonFilterSolver.hpp"
+#include "BonBqpdSolver.hpp"
+#endif
+
+namespace Bonmin
+{
+
+  QpBranchingSolver::QpBranchingSolver(OsiTMINLPInterface * solver)
+      :
+      StrongBranchingSolver(solver)
+  {}
+
+  QpBranchingSolver::QpBranchingSolver(const QpBranchingSolver & rhs) :
+      StrongBranchingSolver(rhs)
+  {}
+
+  QpBranchingSolver &
+  QpBranchingSolver::operator=(const QpBranchingSolver & rhs)
+  {
+    if (this != &rhs) {
+      StrongBranchingSolver::operator=(rhs);
+    }
+    return *this;
+  }
+
+  QpBranchingSolver::~QpBranchingSolver ()
+  {
+#ifdef TIME_BQPD
+     printf("QPBRANCH Timings for %i sbs\n", times_.numsolve);
+     printf("QPBRANCH %i pivots\n", times_.pivots);
+     printf("QPBRANCH Creating  : %g\n", times_.create);
+     printf("QPBRANCH Solving : %g\n", times_.solve);
+     printf("QPBRANCH Warming  : %g\n", times_.warm_start);
+     printf("QPBRANCH Resolving : %g\n", times_.resolve);
+#endif
+  }
+
+  void QpBranchingSolver::
+  markHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    TMINLP2TNLP* tminlp2tnlp = tminlp_interface->problem();
+    branching_tqp_ = new BranchingTQP(tminlp2tnlp);
+
+    first_solve_ = true;
+#ifdef COIN_HAS_FILTERSQP
+    FilterSolver* filter_solver =
+      dynamic_cast<FilterSolver*> (tminlp_interface->solver());
+    if (filter_solver) {
+      Ipopt::SmartPtr<BqpdSolver> qp_solver =
+	new BqpdSolver(RegOptions(), Options(), Jnlst(), tminlp_interface->prefix());
+#if 1
+      // Solve the QP with the original bounds and set the hot start
+      // information
+      TNLPSolver::ReturnStatus retstatus;
+      retstatus = qp_solver->OptimizeTNLP(GetRawPtr(branching_tqp_));
+      if (retstatus == TNLPSolver::solvedOptimal ||
+	  retstatus == TNLPSolver::solvedOptimalTol) {
+	first_solve_ = false;
+	qp_solver->markHotStart();
+      }
+#endif
+      tqp_solver_ = GetRawPtr(qp_solver);
+      //tqp_solver_ = new FilterSolver(RegOptions(), Options(), Jnlst());
+    }
+#endif
+    if (IsNull(tqp_solver_)) {
+      tqp_solver_ = tminlp_interface->solver()->clone();
+    }
+    tqp_solver_->enableWarmStart();
+  }
+
+  void QpBranchingSolver::
+  unmarkHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    // Free memory
+#ifdef TIME_BQPD
+    BqpdSolver * qp_solver = dynamic_cast<BqpdSolver *>(GetRawPtr(tqp_solver_));
+    if(qp_solver) times_ += qp_solver->times();
+#endif
+    branching_tqp_ = NULL;
+    tqp_solver_ = NULL;
+  }
+
+  TNLPSolver::ReturnStatus QpBranchingSolver::
+  solveFromHotStart(OsiTMINLPInterface* tminlp_interface)
+  {
+    TNLPSolver::ReturnStatus retstatus;
+    if (first_solve_) {
+      retstatus = tqp_solver_->OptimizeTNLP(GetRawPtr(branching_tqp_));
+    }
+    else {
+      retstatus = tqp_solver_->ReOptimizeTNLP(GetRawPtr(branching_tqp_));
+    }
+
+    if (retstatus == TNLPSolver::solvedOptimal ||
+        retstatus == TNLPSolver::solvedOptimalTol) {
+      // don't way we solve the problem, since otherwise the pseudo costs
+      // are updated and that is maybe not so good???
+      //retstatus = TNLPSolver::iterationLimit;
+      first_solve_ = false;
+    }
+    //retstatus = TNLPSolver::iterationLimit;
+    return retstatus;
+  }
+
+}
diff --git a/src/Algorithms/Branching/BonQpBranchingSolver.hpp b/src/Algorithms/Branching/BonQpBranchingSolver.hpp
new file mode 100644
index 0000000..39c4c86
--- /dev/null
+++ b/src/Algorithms/Branching/BonQpBranchingSolver.hpp
@@ -0,0 +1,68 @@
+// Copyright (C) 2007, International Business Machines
+// Corporation and others.  All Rights Reserved.
+#ifndef BonQpBranchingSolver_H
+#define BonQpBranchingSolver_H
+
+#include "BonminConfig.h"
+#include "BonStrongBranchingSolver.hpp"
+#include "BonBranchingTQP.hpp"
+
+#ifdef COIN_HAS_FILTERSQP
+#include "BonFilterSolver.hpp"
+#include "BonBqpdSolver.hpp"
+#endif
+
+namespace Bonmin
+{
+
+  /** This class chooses a variable to branch on
+
+      This implementation solves the Qp model for different branches
+      (strong branching).
+  */
+
+  class QpBranchingSolver : public StrongBranchingSolver
+  {
+
+  public:
+
+    /// Constructor from solver (so we can set up arrays etc)
+    QpBranchingSolver (OsiTMINLPInterface * solver);
+
+    /// Copy constructor
+    QpBranchingSolver (const QpBranchingSolver &);
+
+    /// Assignment operator
+    QpBranchingSolver & operator= (const QpBranchingSolver& rhs);
+
+    /// Destructor
+    virtual ~QpBranchingSolver ();
+
+    /// Called to initialize solver before a bunch of strong branching
+    /// solves
+    virtual void markHotStart(OsiTMINLPInterface* tminlp_interface);
+
+    /// Called to solve the current TMINLP (with changed bound information)
+    virtual TNLPSolver::ReturnStatus solveFromHotStart(OsiTMINLPInterface* tminlp_interface);
+
+    /// Called after all strong branching solves in a node
+    virtual void unmarkHotStart(OsiTMINLPInterface* tminlp_interface);
+
+  private:
+    /// Default Constructor
+    QpBranchingSolver ();
+
+    Ipopt::SmartPtr<BranchingTQP> branching_tqp_;
+
+    Ipopt::SmartPtr<TNLPSolver> tqp_solver_;
+
+#ifdef TIME_BQPD
+    BqpdSolver::Times times_;
+#endif
+
+    bool first_solve_;
+  };
+
+}
+
+#endif
diff --git a/src/Algorithms/Branching/BonRandomChoice.cpp b/src/Algorithms/Branching/BonRandomChoice.cpp
new file mode 100644
index 0000000..ddd2d42
--- /dev/null
+++ b/src/Algorithms/Branching/BonRandomChoice.cpp
@@ -0,0 +1,56 @@
+// (C) Copyright CNRS 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF, CNRS-Marseille Universites.
+//
+// Date : 03/17/2008
+#include "BonRandomChoice.hpp"
+#include "BonminConfig.h"
+#include "CoinFinite.hpp"
+
+int BonRandomChoice::setupList(OsiBranchingInformation * info, bool initialize){
+  if (initialize) {
+    status_=-2;
+    delete [] goodSolution_;
+    bestObjectIndex_=-1;
+    numberStrongDone_=0;
+    numberStrongIterations_ = 0;
+    numberStrongFixed_ = 0;
+    goodSolution_ = NULL;
+    goodObjectiveValue_ = COIN_DBL_MAX;
+    numberOnList_=0;
+    }
+    numberUnsatisfied_=0;
+    int numberObjects = solver_->numberObjects();
+    assert (numberObjects);
+    int bestPriority=COIN_INT_MAX;
+    std::fill(list_, list_+numberObjects, -1);
+    OsiObject ** object = info->solver_->objects();
+    // Say feasible
+    //bool feasible = true;
+    for (int i=0;i<numberObjects;i++) {
+    int way;
+    double value = object[i]->infeasibility(info,way);
+    if (value>0.0) {
+      if (value==COIN_DBL_MAX) {
+  // infeasible
+  //feasible=false;
+  break;
+      }
+      int priorityLevel = object[i]->priority();
+      // Better priority? Flush choices.
+      if (priorityLevel<bestPriority) {
+        numberUnsatisfied_ = 0;
+        std::fill(list_, list_+numberObjects, -1);
+      }
+      bestPriority = priorityLevel;
+      if (priorityLevel==bestPriority) {
+        list_[numberUnsatisfied_]=i;
+        numberUnsatisfied_++;
+        }
+      }
+    }
+    return numberUnsatisfied_;
+ }
diff --git a/src/Algorithms/Branching/BonRandomChoice.hpp b/src/Algorithms/Branching/BonRandomChoice.hpp
new file mode 100644
index 0000000..aff05f4
--- /dev/null
+++ b/src/Algorithms/Branching/BonRandomChoice.hpp
@@ -0,0 +1,68 @@
+// (C) Copyright CNRS 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF, CNRS-Marseille Universites.
+//
+// Date : 03/17/2008
+#ifndef BonRandomChoice_H
+#define BonRandomChoice_H
+
+#include "OsiChooseVariable.hpp"
+#include "OsiSolverInterface.hpp"
+#include <list>
+#include <cmath>
+
+class BonRandomChoice : public OsiChooseVariable {
+  public:
+  ///Default constructor
+  BonRandomChoice(): OsiChooseVariable(){
+  }
+
+  //Constructor from solver
+  BonRandomChoice(const OsiSolverInterface * solver):
+    OsiChooseVariable(solver){
+  }
+
+  // Copy constructor
+  BonRandomChoice(const BonRandomChoice &other):
+    OsiChooseVariable(other){
+  }
+
+  // Assignment operator
+  BonRandomChoice & operator=(const BonRandomChoice &rhs){
+    OsiChooseVariable::operator=(rhs);
+    return (*this);
+  }
+
+  // Virtual copy
+  virtual OsiChooseVariable * clone() const{
+     return new BonRandomChoice(*this);
+  }
+
+  /// Destructor
+  virtual ~BonRandomChoice(){
+  }
+
+/** Own version of setupList since Osi version is broken and what we want to do here is anyway much simpler.*/
+
+  virtual int setupList(OsiBranchingInformation * info, bool initialize);
+
+  virtual int chooseVariable( OsiSolverInterface * solver,
+                              OsiBranchingInformation * info,
+                              bool fixVariables){
+    if(numberUnsatisfied_){
+      int chosen = (int) (floor(CoinDrand48() * (numberUnsatisfied_)));
+      bestObjectIndex_ = list_[chosen];
+      bestWhichWay_ = solver->object(bestObjectIndex_)->whichWay();
+      firstForcedObjectIndex_ = -1;
+      firstForcedWhichWay_ =-1;
+      return 0;
+    }
+    else {
+      return 1;
+    }
+  }
+};
+#endif
diff --git a/src/Algorithms/Branching/Makefile.am b/src/Algorithms/Branching/Makefile.am
new file mode 100644
index 0000000..7afa5af
--- /dev/null
+++ b/src/Algorithms/Branching/Makefile.am
@@ -0,0 +1,91 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 433 2007-03-28 05:01:22Z andreasw $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonbranching.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonbranching_la_SOURCES = \
+	BonChooseVariable.cpp BonChooseVariable.hpp \
+        BonRandomChoice.cpp BonRandomChoice.hpp \
+        BonPseudoCosts.cpp BonPseudoCosts.hpp \
+        BonLpBranchingSolver.cpp BonLpBranchingSolver.hpp \
+	BonQpBranchingSolver.cpp BonQpBranchingSolver.hpp
+
+# This is for libtool
+libbonbranching_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+# Currently, the following has to be included for BonChooseVariable.hpp, but
+# we should try to unmangle the connection to Cbc
+
+#AM_CPPFLAGS += -I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin`
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+	BonChooseVariable.hpp \
+	BonPseudoCosts.hpp \
+	BonCurvBranchingSolver.hpp \
+        BonLpBranchingSolver.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonChooseVariable.cppbak BonChooseVariable.hppbak \
+        BonPseudoCosts.cppbak BonPseudoCosts.hppbak \
+	BonQpBranchingSolver.cppbak BonQpBranchingSolver.hppbak \
+	BonCurvBranchingSolver.cppbak BonCurvBranchingSolver.hppbak \
+        BonLpBranchingSolver.hppbak BonLpBranchingSolver.cppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Algorithms/Branching/Makefile.in b/src/Algorithms/Branching/Makefile.in
new file mode 100644
index 0000000..ad907bc
--- /dev/null
+++ b/src/Algorithms/Branching/Makefile.in
@@ -0,0 +1,661 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/Algorithms/Branching
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libbonbranching_la_LIBADD =
+am_libbonbranching_la_OBJECTS = BonChooseVariable.lo \
+	BonRandomChoice.lo BonPseudoCosts.lo BonLpBranchingSolver.lo \
+	BonQpBranchingSolver.lo
+libbonbranching_la_OBJECTS = $(am_libbonbranching_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonbranching_la_SOURCES)
+DIST_SOURCES = $(libbonbranching_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonbranching.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonbranching_la_SOURCES = \
+	BonChooseVariable.cpp BonChooseVariable.hpp \
+        BonRandomChoice.cpp BonRandomChoice.hpp \
+        BonPseudoCosts.cpp BonPseudoCosts.hpp \
+        BonLpBranchingSolver.cpp BonLpBranchingSolver.hpp \
+	BonQpBranchingSolver.cpp BonQpBranchingSolver.hpp
+
+
+# This is for libtool
+libbonbranching_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+
+# Currently, the following has to be included for BonChooseVariable.hpp, but
+# we should try to unmangle the connection to Cbc
+
+#AM_CPPFLAGS += -I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin`
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+	BonChooseVariable.hpp \
+	BonPseudoCosts.hpp \
+	BonCurvBranchingSolver.hpp \
+        BonLpBranchingSolver.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonChooseVariable.cppbak BonChooseVariable.hppbak \
+        BonPseudoCosts.cppbak BonPseudoCosts.hppbak \
+	BonQpBranchingSolver.cppbak BonQpBranchingSolver.hppbak \
+	BonCurvBranchingSolver.cppbak BonCurvBranchingSolver.hppbak \
+        BonLpBranchingSolver.hppbak BonLpBranchingSolver.cppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Algorithms/Branching/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Algorithms/Branching/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonbranching.la: $(libbonbranching_la_OBJECTS) $(libbonbranching_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonbranching_la_LDFLAGS) $(libbonbranching_la_OBJECTS) $(libbonbranching_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonChooseVariable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonLpBranchingSolver.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonPseudoCosts.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonQpBranchingSolver.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonRandomChoice.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Algorithms/Makefile.am b/src/Algorithms/Makefile.am
new file mode 100644
index 0000000..b5bdb44
--- /dev/null
+++ b/src/Algorithms/Makefile.am
@@ -0,0 +1,109 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 433 2007-03-28 05:01:22Z andreasw $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+
+SUBDIRS = \
+       OaGenerators \
+       Branching \
+       QuadCuts
+
+if COIN_HAS_ASL
+SUBDIRS += Ampl
+endif
+
+noinst_LTLIBRARIES = libbonalgorithms.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonalgorithms_la_SOURCES = \
+         BonBabSetupBase.cpp BonBabSetupBase.hpp \
+         BonBonminSetup.cpp BonBonminSetup.hpp \
+         BonSubMipSolver.cpp BonSubMipSolver.hpp \
+         BonCbcLpStrategy.cpp BonCbcLpStrategy.hpp \
+         BonSolverHelp.cpp BonSolverHelp.hpp
+
+libbonalgorithms_la_LIBADD = Branching/libbonbranching.la
+libbonalgorithms_la_LIBADD += OaGenerators/libbonoagenerators.la 
+libbonalgorithms_la_LIBADD += QuadCuts/libbonquadcuts.la 
+
+libbonalgorithms_la_DEPENDENCIES = $(libbonalgorithms_la_LIBADD)
+
+# This is for libtool
+libbonalgorithms_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/QuadCuts` \
+	-I`$(CYGPATH_W) $(srcdir)/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin/Heuristics` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+# BonSubMipSolver.cpp needs to include cplex.h
+if COIN_HAS_CPX
+  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)`
+endif
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+          BonBabSetupBase.hpp \
+          BonSubMipSolver.hpp \
+          BonCbcLpStrategy.hpp \
+          BonBonminSetup.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+               BonBabSetupBase.cppbak \
+               BonBabSetupBase.hppbak \
+               BonBonminSetup.cppbak \
+               BonCbcLpStrategy.cppbak BonCbcLpStrategy.hppbak \
+               BonBonminSetup.hppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Algorithms/Makefile.in b/src/Algorithms/Makefile.in
new file mode 100644
index 0000000..830db58
--- /dev/null
+++ b/src/Algorithms/Makefile.in
@@ -0,0 +1,773 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at COIN_HAS_ASL_TRUE@am__append_1 = Ampl
+
+# BonSubMipSolver.cpp needs to include cplex.h
+ at COIN_HAS_CPX_TRUE@am__append_2 = -I`$(CYGPATH_W) $(CPXINCDIR)`
+subdir = src/Algorithms
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+am_libbonalgorithms_la_OBJECTS = BonBabSetupBase.lo BonBonminSetup.lo \
+	BonSubMipSolver.lo BonCbcLpStrategy.lo BonSolverHelp.lo
+libbonalgorithms_la_OBJECTS = $(am_libbonalgorithms_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonalgorithms_la_SOURCES)
+DIST_SOURCES = $(libbonalgorithms_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = OaGenerators Branching QuadCuts Ampl
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+SUBDIRS = OaGenerators Branching QuadCuts $(am__append_1)
+noinst_LTLIBRARIES = libbonalgorithms.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonalgorithms_la_SOURCES = \
+         BonBabSetupBase.cpp BonBabSetupBase.hpp \
+         BonBonminSetup.cpp BonBonminSetup.hpp \
+         BonSubMipSolver.cpp BonSubMipSolver.hpp \
+         BonCbcLpStrategy.cpp BonCbcLpStrategy.hpp \
+         BonSolverHelp.cpp BonSolverHelp.hpp
+
+libbonalgorithms_la_LIBADD = Branching/libbonbranching.la \
+	OaGenerators/libbonoagenerators.la QuadCuts/libbonquadcuts.la
+libbonalgorithms_la_DEPENDENCIES = $(libbonalgorithms_la_LIBADD)
+
+# This is for libtool
+libbonalgorithms_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/Branching` -I`$(CYGPATH_W) \
+	$(srcdir)/QuadCuts` -I`$(CYGPATH_W) $(srcdir)/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin` -I`$(CYGPATH_W) \
+	$(srcdir)/../CbcBonmin/Heuristics` -I`$(CYGPATH_W) \
+	$(srcdir)/../Interfaces` -I`$(CYGPATH_W) \
+	$(srcdir)/../Interfaces/Ipopt` -I`$(CYGPATH_W) \
+	$(srcdir)/../Interfaces/Filter` $(BONMINLIB_CFLAGS) \
+	$(am__append_2)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+          BonBabSetupBase.hpp \
+          BonSubMipSolver.hpp \
+          BonCbcLpStrategy.hpp \
+          BonBonminSetup.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+               BonBabSetupBase.cppbak \
+               BonBabSetupBase.hppbak \
+               BonBonminSetup.cppbak \
+               BonCbcLpStrategy.cppbak BonCbcLpStrategy.hppbak \
+               BonBonminSetup.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Algorithms/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Algorithms/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonalgorithms.la: $(libbonalgorithms_la_OBJECTS) $(libbonalgorithms_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonalgorithms_la_LDFLAGS) $(libbonalgorithms_la_OBJECTS) $(libbonalgorithms_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonBabSetupBase.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonBonminSetup.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonCbcLpStrategy.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonSolverHelp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonSubMipSolver.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	clean-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am \
+	install-includecoinHEADERS install-info install-info-am \
+	install-man install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-includecoinHEADERS uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Algorithms/OaGenerators/BonDummyHeuristic.cpp b/src/Algorithms/OaGenerators/BonDummyHeuristic.cpp
new file mode 100644
index 0000000..b78a49e
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonDummyHeuristic.cpp
@@ -0,0 +1,50 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date : 05/26/2005
+
+#include "BonDummyHeuristic.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+
+#include "OsiAuxInfo.hpp"
+namespace Bonmin
+{
+/// Default constructor
+  DummyHeuristic::DummyHeuristic(CbcModel &model,
+      OsiTMINLPInterface * si)
+      :
+      CbcHeuristic(model),
+      nlp_(si)
+  {}
+
+  DummyHeuristic::DummyHeuristic(OsiTMINLPInterface * si)
+      :
+      CbcHeuristic(),
+      nlp_(si)
+  {}
+/// Assign an OsiTMINLPInterface
+  void
+  DummyHeuristic::setNlp(OsiTMINLPInterface * si)
+  {
+    nlp_ = si;
+  }
+/// heuristic method
+  int
+  DummyHeuristic::solution(double &solutionValue, double *betterSolution)
+  {
+    OsiBabSolver * babSolver = dynamic_cast<OsiBabSolver *>
+        (model_->solver()->getAuxiliaryInfo());
+    //  double bestKnown = getObjValue();
+    if (babSolver) {
+      return babSolver->solution(solutionValue, betterSolution,
+          model_->getNumCols());
+    }
+    return 0;
+  }
+
+}
diff --git a/src/Algorithms/OaGenerators/BonDummyHeuristic.hpp b/src/Algorithms/OaGenerators/BonDummyHeuristic.hpp
new file mode 100644
index 0000000..f9f91de
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonDummyHeuristic.hpp
@@ -0,0 +1,53 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  05/26/2005
+
+#ifndef BonDummyHeuristic_HPP
+#define BonDummyHeuristic_HPP
+#include "BonOsiTMINLPInterface.hpp"
+
+#include "CbcHeuristic.hpp"
+namespace Bonmin
+{
+  class  DummyHeuristic : public CbcHeuristic
+  {
+  public:
+    /// Default constructor
+    DummyHeuristic(OsiTMINLPInterface * si = NULL);
+    /// Usefull constructor
+    DummyHeuristic(CbcModel &model, OsiTMINLPInterface * si = NULL);
+    ///Copy constructor
+    DummyHeuristic( const DummyHeuristic &copy):
+        CbcHeuristic(copy),
+        nlp_(copy.nlp_),
+        knowsSolution(copy.knowsSolution)
+    {}
+    /// Set nlp_
+    void setNlp(OsiTMINLPInterface * si);
+    /// heuristic method
+    virtual int solution(double &solutionValue, double *betterSolution);
+    virtual int solution(double &solutionValue, double *betterSolution, OsiCuts & cs)
+    {
+      return solution(solutionValue, betterSolution);
+    }
+    virtual CbcHeuristic * clone()const
+    {
+      return new DummyHeuristic(*this);
+    }
+    virtual void resetModel(CbcModel*)
+    {}
+  virtual bool shouldHeurRun(int whereFrom){
+     return true;}
+  private:
+    /// Pointer to the Ipopt interface
+    OsiTMINLPInterface * nlp_;
+    /// Do I have a solution?
+    bool knowsSolution;
+  };
+}
+#endif
diff --git a/src/Algorithms/OaGenerators/BonEcpCuts.cpp b/src/Algorithms/OaGenerators/BonEcpCuts.cpp
new file mode 100644
index 0000000..7c83fd7
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonEcpCuts.cpp
@@ -0,0 +1,179 @@
+// (C) Copyright International Business Machines (IBM) 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/20/2006
+//#define ECP_DEBUG
+#include "BonEcpCuts.hpp"
+#include "BonSolverHelp.hpp"
+#include "BonBabInfos.hpp"
+#include "BonCbc.hpp"
+namespace Bonmin
+{
+
+
+  EcpCuts::EcpCuts(BabSetupBase & b):
+      OaDecompositionBase(b,false, false)
+  {
+    assignLpInterface(NULL);
+    b.options()->GetIntegerValue("ecp_max_rounds", numRounds_,b.prefix());
+    b.options()->GetNumericValue("ecp_abs_tol", abs_violation_tol_,b.prefix());
+    b.options()->GetNumericValue("ecp_rel_tol", rel_violation_tol_,b.prefix());
+    b.options()->GetNumericValue("ecp_probability_factor", beta_,b.prefix());
+  }
+
+  double
+  EcpCuts::doEcpRounds(OsiSolverInterface &si,
+      bool leaveSiUnchanged,
+      double* violation)
+  {
+    OsiSolverInterface * saveLp = lp_;
+    lp_ = &si;
+    OsiCuts cs;
+    bool saveLeaveSi = leaveSiUnchanged_;
+    leaveSiUnchanged_ = leaveSiUnchanged;
+    generateCuts(si, cs);
+    lp_ = saveLp;
+    leaveSiUnchanged_ = saveLeaveSi;
+    if (violation) *violation = violation_;
+    return objValue_;
+  }
+
+  void
+  EcpCuts::generateCuts(const OsiSolverInterface &si,
+      OsiCuts & cs,
+      const CglTreeInfo info) const
+  {
+    if (beta_ >=0) {
+      BabInfo * babInfo = dynamic_cast<BabInfo *> (si.getAuxiliaryInfo());
+      assert(babInfo);
+      assert(babInfo->babPtr());
+      const CbcNode * node = babInfo->babPtr()->model().currentNode();
+      int level = (node == NULL) ? 0 : babInfo->babPtr()->model().currentNode()->depth();
+      double rand = CoinDrand48();
+      double score = pow(2.,-level)*beta_;
+      //printf("depth %i, score %g , rand %g\n", level, score, rand);
+      if (score <= rand)
+        return;
+    }
+    double orig_violation = nlp_->getNonLinearitiesViolation(
+          si.getColSolution(), si.getObjValue());
+//#define ECP_DEBUG
+#ifdef ECP_DEBUG
+    std::cout<<"Initial Constraint violation: "<<orig_violation<<std::endl;
+    std::cout<<"Initial objectvie value"<<si.getObjValue()<<std::endl;
+#endif
+    if (orig_violation <= abs_violation_tol_)
+      return;
+#ifdef ECP_DEBUG
+    std::cout<<"Generating ECP cuts"<<std::endl;
+#endif
+    solverManip * lpManip = NULL;
+    bool infeasible = false;
+    violation_ = orig_violation;
+    for (int i = 0 ; i < numRounds_ ; i++) {
+      if ( violation_ > abs_violation_tol_ &&
+          violation_ > rel_violation_tol_*orig_violation) {
+        int numberCuts =  - cs.sizeRowCuts();
+        const double * toCut = parameter().addOnlyViolated_ ?
+            si.getColSolution():NULL;
+        const OsiSolverInterface &localSi = (lpManip == NULL) ?
+            si : *(lpManip->si());
+        nlp_->getOuterApproximation(cs, localSi.getColSolution(), 1, toCut, parameter().global_);
+        numberCuts += cs.sizeRowCuts();
+        if (numberCuts > 0 && i + 1 < numRounds_ ) {
+          if (lpManip==NULL) {
+            assert(lp_ == NULL);
+            if (lp_ == NULL)
+              lpManip = new solverManip(si);
+            else
+              lpManip = new solverManip(lp_, true,true,
+                  false,false);
+          }
+          installCuts(*lpManip->si(), cs,numberCuts);
+#ifdef ECP_DEBUG
+          std::cerr<<"Installed "<<numberCuts<<"cuts in lp"<<std::endl;
+#endif
+          lpManip->si()->resolve();
+#ifdef ECP_DEBUG
+          std::cerr<<"New objective "<<lpManip->si()->getObjValue()<<std::endl;
+#endif
+          if (lpManip->si()->isProvenPrimalInfeasible()) {
+            infeasible = true;
+#ifdef ECP_DEBUG
+            std::cout<<"Stopping Ecp generation because problem became infeasible"<<std::endl;
+#endif
+            break;
+          }
+          violation_ =  nlp_->getNonLinearitiesViolation(
+                lpManip->si()->getColSolution(),
+                lpManip->si()->getObjValue());
+#ifdef ECP_DEBUG
+          std::cout<<"Constraint violation: "<<violation_<<std::endl;
+#endif
+        }
+        else break;
+      }
+      else break;
+    }
+    if (!infeasible) {
+      if (lpManip != NULL) {
+        lpManip->si()->resolve();
+        if (lpManip->si()->isProvenPrimalInfeasible())
+          objValue_ = COIN_DBL_MAX;
+        else
+          objValue_ = lpManip->si()->getObjValue();
+      }
+    }
+    else objValue_ = COIN_DBL_MAX;
+    if (lpManip) {
+      if (lp_ != NULL && lpManip != NULL) {
+        lpManip->restore();
+      }
+
+      delete lpManip;
+    }
+#ifdef ECP_DEBUG
+    std::cout<<"End ecp cut generation"<<std::endl;
+#endif
+    return;
+  }
+
+  void
+  EcpCuts::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("ECP cuts generation", RegisteredOptions::BonminCategory);
+    roptions->AddLowerBoundedIntegerOption("filmint_ecp_cuts",
+        "Specify the frequency (in terms of nodes) at which some a la filmint ecp cuts are generated.",
+        0,0,
+        "A frequency of 0 amounts to to never solve the NLP relaxation.");
+    roptions->setOptionExtraInfo("filmint_ecp_cuts",3);
+    roptions->AddLowerBoundedIntegerOption
+    ("ecp_max_rounds",
+     "Set the maximal number of rounds of ECP cuts.",
+     0,5,
+     "");
+    roptions->setOptionExtraInfo("ecp_max_rounds",3);
+    roptions->AddLowerBoundedNumberOption
+    ("ecp_abs_tol",
+     "Set the absolute termination tolerance for ECP rounds.",
+     0,false,1e-6,
+     "");
+    roptions->setOptionExtraInfo("ecp_abs_tol",3);
+    roptions->AddLowerBoundedNumberOption
+    ("ecp_rel_tol",
+     "Set the relative termination tolerance for ECP rounds.",
+     0,false,0.,
+     "");
+    roptions->setOptionExtraInfo("ecp_rel_tol",3);
+    roptions->AddNumberOption
+    ("ecp_probability_factor",
+     "Factor appearing in formula for skipping ECP cuts.",
+     10.,
+     "Choosing -1 disables the skipping.");
+    roptions->setOptionExtraInfo("ecp_probability_factor",3);
+  }
+} // end namespace bonmin.
diff --git a/src/Algorithms/OaGenerators/BonEcpCuts.hpp b/src/Algorithms/OaGenerators/BonEcpCuts.hpp
new file mode 100644
index 0000000..0a300d3
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonEcpCuts.hpp
@@ -0,0 +1,97 @@
+// (C) Copyright International Business Machines (IBM) 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/20/2006
+
+#ifndef BonECPCuts_HPP
+#define BonECPCuts_HPP
+
+#include "BonOaDecBase.hpp"
+#include "CglCutGenerator.hpp"
+namespace Bonmin
+{
+  class EcpCuts: public OaDecompositionBase
+  {
+  public:
+    EcpCuts(BabSetupBase & b);
+
+    /// Copy constructor
+    EcpCuts(const EcpCuts & copy):
+        OaDecompositionBase(copy),
+        objValue_(copy.objValue_),
+        numRounds_(copy.numRounds_),
+        abs_violation_tol_(copy.abs_violation_tol_),
+        rel_violation_tol_(copy.rel_violation_tol_),
+        beta_(copy.beta_)
+    {}
+
+    /// clone
+    CglCutGenerator * clone() const
+    {
+      return new EcpCuts(*this);
+    }
+
+    /// Destructor
+    virtual ~EcpCuts()
+    {}
+    /** Standard cut generation methods. */
+    virtual void generateCuts(const OsiSolverInterface &si,  OsiCuts & cs,
+        const CglTreeInfo info = CglTreeInfo()) const;
+    double doEcpRounds(OsiSolverInterface &si,
+        bool leaveSiUnchanged,
+        double* violation = NULL);
+
+    void setNumRounds(int value)
+    {
+      numRounds_ = value;
+    }
+
+    void setPropabilityFactor(double value)
+    {
+      beta_ = value;
+    }
+
+    void setAbsViolationTolerance(double value)
+    {
+      abs_violation_tol_ = value;
+    }
+    void setRelViolationTolerance(double value)
+    {
+      rel_violation_tol_ = value;
+    }
+
+    /** Register ecp cuts options.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+  protected:
+    /// virtual method which performs the OA algorithm by modifying lp and nlp.
+    virtual double performOa(OsiCuts & cs, solverManip &lpManip,
+                   BabInfo * babInfo, double &cutoff, const CglTreeInfo &info) const
+    {
+      throw -1;
+    }
+    /// virutal method to decide if local search is performed
+    virtual bool doLocalSearch(BabInfo * babInfo) const
+    {
+      return 0;
+    }
+  private:
+    /** Record obj value at final point of Ecp. */
+    mutable double objValue_;
+    /** Record NLP infeasibility at final point of Ecp */
+    mutable double violation_;
+    /** maximum number of iterations of generation. */
+    int numRounds_;
+    /** absolute tolerance for NLP constraint violation to stop ECP rounds */
+    double abs_violation_tol_;
+    /** relative tolerance for NLP constraint violation to stop ECP rounds */
+    double rel_violation_tol_;
+    /** Factor for probability for skipping cuts */
+    double beta_;
+  };
+} /* end namespace Bonmin.*/
+#endif
diff --git a/src/Algorithms/OaGenerators/BonFpForMinlp.cpp b/src/Algorithms/OaGenerators/BonFpForMinlp.cpp
new file mode 100644
index 0000000..06c4268
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonFpForMinlp.cpp
@@ -0,0 +1,303 @@
+// (C) Copyright CNRS 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, CNRS
+//
+// Date : 02/13/2009
+
+#include "BonFpForMinlp.hpp"
+#include "BonminConfig.h"
+
+#include "OsiClpSolverInterface.hpp"
+
+#include "CbcModel.hpp"
+#include "BonCbcLpStrategy.hpp"
+#ifdef COIN_HAS_CPX
+#include "OsiCpxSolverInterface.hpp"
+#endif
+#include "OsiAuxInfo.hpp"
+#include "BonSolverHelp.hpp"
+
+#include <climits>
+
+namespace Bonmin
+{
+   static const char * txt_id = "FP for MINLP";
+/// Constructor with basic setup
+  MinlpFeasPump::MinlpFeasPump(BabSetupBase & b):
+      OaDecompositionBase(b, true, false),
+      subMip_(NULL)
+  {
+    std::string bonmin="bonmin.";
+    std::string prefix = (b.prefix() == bonmin) ? "" : b.prefix();
+    prefix += "pump_for_minlp.";
+    subMip_ = new SubMipSolver(b, prefix);
+    double oaTime;
+    b.options()->GetNumericValue("time_limit",oaTime,prefix);
+    parameter().maxLocalSearch_ = INT_MAX;
+    b.options()->GetIntegerValue("solution_limit", parameter().maxSols_,prefix);
+    parameter().maxLocalSearchTime_ =
+    std::min(b.getDoubleParameter(BabSetupBase::MaxTime), oaTime);
+    if(parameter().maxSols_ > b.getIntParameter(BabSetupBase::MaxSolutions))
+      parameter().maxSols_ = b.getIntParameter(BabSetupBase::MaxSolutions);
+    b.options()->GetEnumValue("fp_pass_infeasible", passBound_, prefix);
+ }
+
+  MinlpFeasPump::~MinlpFeasPump()
+  {
+    delete subMip_;
+  }
+
+  /// virutal method to decide if local search is performed
+  bool
+  MinlpFeasPump::doLocalSearch(BabInfo * babInfo) const
+  {
+    return (nLocalSearch_<parameters_.maxLocalSearch_ &&
+        CoinCpuTime() - timeBegin_ < parameters_.maxLocalSearchTime_ &&
+        numSols_ < parameters_.maxSols_);
+  }
+  /// virtual method which performs the OA algorithm by modifying lp and nlp.
+  double
+  MinlpFeasPump::performOa(OsiCuts &cs,
+      solverManip &lpManip,
+      BabInfo * babInfo,
+      double & cutoff,const CglTreeInfo &info) const
+  {
+
+    //bool interuptOnLimit = false;
+    //double lastPeriodicLog = CoinCpuTime();
+
+    const int numcols = nlp_->getNumCols();
+    vector<double> savedColLower(nlp_->getNumCols());
+    CoinCopyN(nlp_->getColLower(), nlp_->getNumCols(), savedColLower());
+    vector<double> savedColUpper(nlp_->getNumCols());
+    CoinCopyN(nlp_->getColUpper(), nlp_->getNumCols(), savedColUpper());
+
+
+    subMip_->setLpSolver(lpManip.si());
+    OsiSolverInterface * lp = subMip_->solver();
+
+    assert(lp);
+    vector<int> indices;
+    for(int i = 0; i < numcols ; i++) {
+      lp->setObjCoeff(i,0);
+      if(!lp->isInteger(i)) {
+      }
+      else { indices.push_back(i);}
+    }
+
+    // If objective is linear need to add to lp constraint for objective
+    const double * colsol = NULL;
+    lp->resolve();
+    OsiBranchingInformation branch_info(lp, false);
+    branch_info.lower_ = savedColLower();
+    branch_info.upper_ = savedColUpper();
+    if(lp->getNumCols() == nlp_->getNumCols())
+      nlp_->addObjectiveFunction(*lp, nlp_->getColSolution());
+    lp->setObjCoeff(numcols,0);
+
+    bool milpOptimal = false;
+    nlp_->resolve(txt_id);
+    set_fp_objective(*lp, nlp_->getColSolution());
+    lp->initialSolve();
+    lp->setColUpper(numcols, cutoff);
+    subMip_->solve(DBL_MAX, parameters_.subMilpLogLevel_,
+    //subMip_->optimize(DBL_MAX, parameters_.subMilpLogLevel_,
+        (parameters_.maxLocalSearchTime_ + timeBegin_ - CoinCpuTime()) /* time limit */);
+
+    milpOptimal = subMip_ -> optimal(); 
+    colsol = subMip_->getLastSolution();
+    nLocalSearch_++;
+    if(milpOptimal)
+      handler_->message(SOLVED_LOCAL_SEARCH, messages_)
+      <<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+    else
+      handler_->message(LOCAL_SEARCH_ABORT, messages_)
+      <<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+    int numberPasses = 0;
+
+#ifdef OA_DEBUG
+    bool foundSolution = 0;
+#endif
+    double * nlpSol = NULL;
+    int major_iteration = 0;
+    double ub = cutoff;
+    while (colsol) {
+      numberPasses++;
+
+      //setup the nlp
+      int numberCutsBefore = cs.sizeRowCuts();
+
+      //Fix the variable which have to be fixed, after having saved the bounds
+      branch_info.solution_ = colsol;
+
+      vector<double> x_bar(indices.size());
+      for(unsigned int i = 0 ; i < indices.size() ; i++){
+         assert(fabs(colsol[indices[i]] - floor(colsol[indices[i]] + 0.5)) < 1e-5);
+         x_bar[i] = colsol[indices[i]];
+      }
+
+      double dist = nlp_->solveFeasibilityProblem(indices.size(), x_bar(), indices(), 1, 0, 2);
+
+      handler_->message(FP_DISTANCE, messages_) 
+      <<dist<<CoinMessageEol;
+
+      if(dist < 1e-06){
+         fixIntegers(*nlp_,branch_info, parameters_.cbcIntegerTolerance_, objects_, nObjects_);
+
+         nlp_->resolve(txt_id);
+         if(!nlp_->isProvenOptimal()){
+           relaxIntegers(*nlp_,branch_info, parameters_.cbcIntegerTolerance_, objects_, nObjects_);
+           nlp_->resolve(txt_id);
+         }
+         bool restart = false;
+         if (post_nlp_solve(babInfo, cutoff)) {
+           restart = true;
+           //nlp is solved and feasible
+           // Update the cutoff
+           ub = std::min(ub, nlp_->getObjValue());
+           cutoff = ub * (1 - parameters_.cbcCutoffIncrement_);
+           
+           numSols_++;
+         }
+         else{
+           //nlp_->setColLower(savedColLower());
+           //nlp_->setColUpper(savedColUpper());
+           //dist = nlp_->solveFeasibilityProblem(indices.size(), x_bar(), indices(), 1, 0, 2);
+         }
+         nlpSol = const_cast<double *>(nlp_->getColSolution());
+         nlp_->getOuterApproximation(cs, nlpSol, 1, NULL,
+                                  parameter().global_);
+         //if(restart){
+           nlp_->setColLower(savedColLower());
+           nlp_->setColUpper(savedColUpper());
+        if(restart){
+          major_iteration++;
+          handler_->message(FP_MAJOR_ITERATION, messages_) 
+          <<major_iteration<<cutoff<<CoinMessageEol;
+          nlp_->resolve(txt_id);
+        }
+
+         //}
+      }
+      else {
+         nlpSol = const_cast<double *>(nlp_->getColSolution());
+         nlp_->getOuterApproximation(cs, nlpSol, 1, NULL,
+                                  parameter().global_);
+      }
+
+
+#if 0
+      handler_->message(FP_MINOR_ITERATION, messages_) 
+      <<nLocalSearch_<<cutoff<<CoinMessageEol;
+#endif
+      
+      int numberCuts = cs.sizeRowCuts() - numberCutsBefore;
+      assert(numberCuts);
+      installCuts(*lp, cs, numberCuts);
+      numberCutsBefore = cs.sizeRowCuts();
+     
+      //check time
+      if (CoinCpuTime() - timeBegin_ > parameters_.maxLocalSearchTime_){
+        colsol = NULL;
+        break;
+      }
+      //do we perform a new local search ?
+      if (nLocalSearch_ < parameters_.maxLocalSearch_ &&
+          numSols_ < parameters_.maxSols_) {
+
+        nLocalSearch_++;
+        set_fp_objective(*lp, nlp_->getColSolution());
+
+        lp->setColUpper(numcols, cutoff); 
+     
+        subMip_->solve(DBL_MAX, parameters_.subMilpLogLevel_,
+        // subMip_->optimize(DBL_MAX, parameters_.subMilpLogLevel_,
+                         parameters_.maxLocalSearchTime_ + timeBegin_ - CoinCpuTime());
+        milpOptimal = subMip_ -> optimal(); 
+        colsol = subMip_->getLastSolution();
+      if(milpOptimal)
+        handler_->message(SOLVED_LOCAL_SEARCH, messages_)<<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+      else
+        handler_->message(LOCAL_SEARCH_ABORT, messages_)<<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+      if(colsol)
+        handler_->message(FP_MILP_VAL, messages_) 
+        <<colsol[nlp_->getNumCols()]<<CoinMessageEol;
+         
+      }/** endif localSearch*/
+      else {
+        colsol = NULL;
+      }
+    }
+     //return -DBL_MAX;
+    if(!passBound_ || colsol || ! milpOptimal)
+      return -DBL_MAX;
+    else{
+      handler_->message(OASUCCESS, messages_)<<"FP"<<CoinCpuTime() - timeBegin_ 
+      <<ub<<CoinMessageEol;
+      return DBL_MAX;
+    }
+  }
+
+  /** Register OA options.*/
+  void
+  MinlpFeasPump::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+
+    roptions->AddStringOption2("fp_pass_infeasible", "Say whether feasibility pump should claim to converge or not",
+                               "no",
+                               "no", "When master MILP is infeasible just bail out (don't stop all algorithm). This is the option for using in B-Hyb.",
+                               "yes", "Claim convergence, numerically dangerous.","");
+                               
+    roptions->SetRegisteringCategory("Output and Loglevel", RegisteredOptions::BonminCategory);
+    roptions->AddBoundedIntegerOption("fp_log_level",
+        "specify FP iterations log level.",
+        0,2,1,
+        "Set the level of output of OA decomposition solver : "
+        "0 - none, 1 - normal, 2 - verbose"
+                                     );
+    roptions->setOptionExtraInfo("fp_log_level",3);
+
+    roptions->AddLowerBoundedNumberOption("fp_log_frequency",
+        "display an update on lower and upper bounds in FP every n seconds",
+        0.,1.,100.,
+        "");
+    roptions->setOptionExtraInfo("fp_log_frequency",3);
+  }
+
+/** Put objective of MIP according to FP scheme. */
+void
+MinlpFeasPump::set_fp_objective(OsiSolverInterface &si, const double * colsol) const{
+  if (objects_) {
+    for (int i = 0 ; i < nObjects_ ; i++) {
+      OsiObject * obj = objects_[i];
+      int colnum = obj->columnNumber();
+      if (colnum >= 0) {//Variable branching object
+        double round = floor(colsol[colnum] + 0.5);
+        double coeff = (colsol[colnum] - round ) < 0;
+        si.setObjCoeff(colnum, 1 - 2 * coeff);
+      }
+      else {
+        throw CoinError("OaDecompositionBase::solverManip",
+                        "setFpObjective",
+                        "Can not use FP on problem with SOS constraints");
+      }
+    }
+  }
+  else {
+    int numcols = nlp_->getNumCols();
+    for (int i = 0; i < numcols ; i++) {
+      if (nlp_->isInteger(i)){
+         double round = floor(colsol[i] + 0.5);
+         double coeff = (colsol[i] - round ) < 0;
+         si.setObjCoeff(i, 1 - 2*coeff);
+      }
+    }
+  }
+  si.initialSolve();
+}
+
+}/* End namespace Bonmin. */
diff --git a/src/Algorithms/OaGenerators/BonFpForMinlp.hpp b/src/Algorithms/OaGenerators/BonFpForMinlp.hpp
new file mode 100644
index 0000000..f21220b
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonFpForMinlp.hpp
@@ -0,0 +1,61 @@
+// (C) Copyright CNRS 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, CNRS
+//
+// Date : 02/13/2009
+
+#ifndef BonFpForMinlp_H
+#define BonFpForMinlp_H
+#include "BonOaDecBase.hpp"
+
+namespace Bonmin{
+  class MinlpFeasPump : public OaDecompositionBase{
+   public:
+    /// Constructor with basic setup
+    MinlpFeasPump(BabSetupBase & b);
+
+    /// Copy constructor
+    MinlpFeasPump(const MinlpFeasPump &copy)
+        :
+        OaDecompositionBase(copy),
+        subMip_(new SubMipSolver(*copy.subMip_)),
+        passBound_(copy.passBound_)
+    {}
+    /// Destructor
+    ~MinlpFeasPump();
+
+    void setStrategy(const CbcStrategy & strategy)
+    {
+      parameters_.setStrategy(strategy);
+    }
+
+    virtual CglCutGenerator * clone() const
+    {
+      return new MinlpFeasPump(*this);
+    }
+    /** Register OA options.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+  protected:
+    /// virtual method which performs the OA algorithm by modifying lp and nlp.
+    virtual double performOa(OsiCuts & cs, solverManip &lpManip,
+                   BabInfo * babInfo, double &cutoff, const CglTreeInfo & info) const;
+    /// virutal method to decide if local search is performed
+    virtual bool doLocalSearch(BabInfo * babInfo) const;
+    /** Put objective of MIP according to FP scheme. */
+    void set_fp_objective(OsiSolverInterface &si, const double * colsol) const;
+    
+  private:
+    SubMipSolver * subMip_;
+    /** Wether or not to pass bound to master algorithm.*/
+    int passBound_;
+  };
+
+}/* End Namespace.*/
+
+#endif
+
+
diff --git a/src/Algorithms/OaGenerators/BonOACutGenerator2.cpp b/src/Algorithms/OaGenerators/BonOACutGenerator2.cpp
new file mode 100644
index 0000000..c4e992f
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOACutGenerator2.cpp
@@ -0,0 +1,314 @@
+// (C) Copyright Carnegie Mellon University 2005, 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date : 05/26/2005
+
+#include "BonOACutGenerator2.hpp"
+#include "BonminConfig.h"
+
+#include "OsiClpSolverInterface.hpp"
+
+#include "CbcModel.hpp"
+#include "BonCbcLpStrategy.hpp"
+#ifdef COIN_HAS_CPX
+#include "OsiCpxSolverInterface.hpp"
+#endif
+#include "OsiAuxInfo.hpp"
+#include "BonSolverHelp.hpp"
+
+#include <climits>
+
+namespace Bonmin
+{
+   static const char * txt_id = "OA decomposition";
+
+
+/// Constructor with basic setup
+  OACutGenerator2::OACutGenerator2(BabSetupBase & b):
+      OaDecompositionBase(b, true, false)
+  {
+    std::string bonmin="bonmin.";
+    std::string prefix = (b.prefix() == bonmin) ? "" : b.prefix();
+    prefix += "oa_decomposition.";
+    subMip_ = new SubMipSolver(b, prefix);
+    double oaTime;
+    b.options()->GetNumericValue("time_limit",oaTime,prefix);
+    parameter().maxLocalSearch_ = INT_MAX;
+    b.options()->GetIntegerValue("solution_limit", parameter().maxSols_,prefix);
+    parameter().maxLocalSearchTime_ =
+    std::min(b.getDoubleParameter(BabSetupBase::MaxTime), oaTime);
+    if(parameter().maxSols_ > b.getIntParameter(BabSetupBase::MaxSolutions))
+      parameter().maxSols_ = b.getIntParameter(BabSetupBase::MaxSolutions);
+  }
+  OACutGenerator2::~OACutGenerator2()
+  {
+     delete subMip_;
+  }
+
+  /// virutal method to decide if local search is performed
+  bool
+  OACutGenerator2::doLocalSearch(BabInfo * babInfo) const
+  {
+    return (nLocalSearch_<parameters_.maxLocalSearch_ &&
+            numSols_ < parameters_.maxSols_ &&
+	    CoinCpuTime() - timeBegin_ < parameters_.maxLocalSearchTime_);
+  }
+  /// virtual method which performs the OA algorithm by modifying lp and nlp.
+  double
+  OACutGenerator2::performOa(OsiCuts &cs,
+      solverManip &lpManip,
+      BabInfo * babInfo,
+      double & cutoff, const CglTreeInfo & info) const
+  {
+
+    double lastPeriodicLog = CoinCpuTime();
+
+    //const int numcols = nlp_->getNumCols();
+    double gap_tol = this->parameter().gap_tol_;
+
+    bool isInteger = false;
+
+    subMip_->setLpSolver(lpManip.si());
+    OsiSolverInterface * lp = subMip_->solver();
+    lp->resolve();
+
+    if(IsValid(nlp_->linearizer())){
+      nlp_->linearizer()->get_refined_oa(cs);
+      installCuts(*lp, cs, cs.sizeRowCuts());
+    }
+    lp->resolve();
+
+    OsiBranchingInformation branch_info(lp, false);
+    bool milpOptimal = 1;
+
+
+    double milpBound = -COIN_DBL_MAX;
+    //bool milpFeasible = 1;
+    bool feasible = 1;
+
+    subMip_->solve(cutoff, parameters_.subMilpLogLevel_,
+                   parameters_.maxLocalSearchTime_ + timeBegin_ - CoinCpuTime());
+
+    milpBound = std::max(milpBound, subMip_->lowBound());
+    milpOptimal = subMip_->optimal();
+
+    feasible = milpBound < cutoff;
+    //milpFeasible = feasible;
+    isInteger = (subMip_->getLastSolution() != NULL);
+    nLocalSearch_++;
+
+    if (milpOptimal)
+      handler_->message(SOLVED_LOCAL_SEARCH, messages_)<<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+    else
+    {
+      handler_->message(LOCAL_SEARCH_ABORT, messages_)<<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+    }
+
+    int nodeCount = subMip_->nodeCount();
+
+    int numberPasses = 0;
+
+#ifdef OA_DEBUG
+    bool foundSolution = 0;
+#endif
+    double * nlpSol = NULL;
+    double ub = cutoff;
+    double gap = 1;
+    while (isInteger && feasible) {
+      numberPasses++;
+      //after a prescribed elapsed time give some information to user
+      double time = CoinCpuTime();
+      if (time - lastPeriodicLog > parameters_.logFrequency_) {
+        handler_->message(PERIODIC_MSG,messages_)
+        <<time - timeBegin_<<numberPasses<<cutoff
+        <<milpBound
+        <<CoinMessageEol;
+        lastPeriodicLog = CoinCpuTime();
+      }
+
+
+      //setup the nlp
+      int numberCutsBefore = cs.sizeRowCuts();
+
+      //Fix the variable which have to be fixed, after having saved the bounds
+      const double * colsol = 
+          subMip_->getLastSolution();
+      branch_info.solution_ = colsol;
+
+      fixIntegers(*nlp_,branch_info, parameters_.cbcIntegerTolerance_,objects_, nObjects_);
+
+      nlp_->resolve(txt_id);
+      if (post_nlp_solve(babInfo, cutoff)) {
+        //nlp solved and feasible
+        // Update the cutoff
+        ub = std::min(nlp_->getObjValue(), ub);
+        cutoff = ub > 0 ? ub *(1 - parameters_.cbcCutoffIncrement_) : ub*(1 + parameters_.cbcCutoffIncrement_);
+        assert(cutoff < ub);
+        // Update the lp solver cutoff
+        lp->setDblParam(OsiDualObjectiveLimit, cutoff);
+        numSols_++;
+      }
+
+      nlpSol = const_cast<double *>(nlp_->getColSolution());
+
+      // Get the cuts outer approximation at the current point
+      if(parameter().addOnlyViolated_){
+        nlp_->getOuterApproximation(cs, nlpSol, 1, colsol,
+                                     parameter().global_);
+      }
+      else {
+        nlp_->getOuterApproximation(cs, nlpSol, 1, NULL,
+                                     parameter().global_);
+      }
+
+      int numberCuts = cs.sizeRowCuts() - numberCutsBefore;
+      assert(numberCuts);
+      installCuts(*lp, cs, numberCuts);
+
+      lp->resolve();
+
+      double objvalue = lp->getObjValue();
+      //milpBound = max(milpBound, lp->getObjValue());
+      feasible = (lp->isProvenOptimal() &&
+          !lp->isDualObjectiveLimitReached() && (objvalue<cutoff)) ;
+      //if value of integers are unchanged then we have to get out
+      bool changed = !feasible;//if lp is infeasible we don't have to check anything
+      branch_info.solution_ = lp->getColSolution();
+      if (!changed)
+        changed = isDifferentOnIntegers(*nlp_, objects_, nObjects_,
+                                        parameters_.cbcIntegerTolerance_,
+                                        nlp_->getColSolution(), lp->getColSolution());
+      if (changed) {
+
+        isInteger = integerFeasible(*lp, branch_info, parameters_.cbcIntegerTolerance_,
+                                     objects_, nObjects_);
+      }
+      else {
+        isInteger = 0;
+        //	  if(!fixed)//fathom on bounds
+        milpBound = 1e200;
+      }
+#ifdef OA_DEBUG
+      printf("Obj value after cuts %g %d rows\n",lp->getObjValue(),
+          numberCuts) ;
+#endif
+      //check time
+      if (CoinCpuTime() - timeBegin_ > parameters_.maxLocalSearchTime_)
+        break;
+      
+      if(ub!=0)
+    	  gap = (ub - milpBound)/fabs(ub);
+      else
+		  gap = -milpBound/(1e-10);
+      if (gap < gap_tol){
+		 milpBound = 1e50;
+		 feasible = 0;
+	   }
+      //do we perform a new local search ?
+      if (feasible && 
+          nLocalSearch_ < parameters_.maxLocalSearch_ &&
+	  numSols_ < parameters_.maxSols_) {
+
+	  if(ub!=0)
+		  gap = (ub - milpBound)/fabs(ub);
+	  else
+		  gap = -milpBound/(1e-10);
+	  if (gap < gap_tol){
+		 milpBound = 1e50;
+		 feasible = 0;
+	   }
+        nLocalSearch_++;
+
+        subMip_->solve(cutoff, parameters_.subMilpLogLevel_,
+            parameters_.maxLocalSearchTime_ + timeBegin_ - CoinCpuTime());
+
+        milpBound = std::max(milpBound, subMip_->lowBound());
+
+        if (subMip_->optimal())
+          handler_->message(SOLVED_LOCAL_SEARCH, messages_)<<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+        else
+          handler_->message(LOCAL_SEARCH_ABORT, messages_)<<subMip_->nodeCount()<<subMip_->iterationCount()<<CoinMessageEol;
+
+        nodeCount += subMip_->nodeCount();
+
+        colsol = const_cast<double *> (subMip_->getLastSolution());
+        isInteger = (colsol != 0);
+
+        feasible =  (milpBound < cutoff);
+
+        if (feasible && isInteger) {
+          bool changed = false;
+          changed = isDifferentOnIntegers(*nlp_, objects_, nObjects_,
+                                          0.1,
+                                          nlp_->getColSolution(), colsol);
+          //solution problem is solved
+          if (!changed) {
+            feasible = 0;
+            milpBound = 1e50;
+          }
+          //milpFeasible = feasible;
+        }
+        if (subMip_->optimal())
+          milpOptimal = 1;
+        else {
+          milpOptimal = 0;
+        }
+        if (milpBound < cutoff)
+		  handler_->message(UPDATE_LB, messages_)<<milpBound<<CoinCpuTime() - timeBegin_<<CoinMessageEol;
+		else {
+		  milpBound = 1e50;
+		  feasible = 0;
+		}
+      }
+      
+    }
+
+   if(milpBound >= cutoff){
+      handler_->message(OASUCCESS, messages_)<<"OA "<<CoinCpuTime() - timeBegin_ 
+                                             <<ub<<milpBound<<CoinMessageEol;
+   }
+   else {
+      handler_->message(OAABORT, messages_)<<"OA "<<CoinCpuTime() - timeBegin_           
+                                             <<ub<<milpBound<<CoinMessageEol;
+   }
+   handler_->message(OA_STATS, messages_)<<numberPasses<<nodeCount
+                                         <<CoinMessageEol;
+#ifdef OA_DEBUG
+    debug_.printEndOfProcedureDebugMessage(cs, foundSolution, cutoff, milpBound, isInteger, feasible, std::cout);
+#endif
+    return milpBound;
+  }
+
+  /** Register OA options.*/
+  void
+  OACutGenerator2::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("Outer Approximation Decomposition (B-OA)", RegisteredOptions::BonminCategory);
+    roptions->AddStringOption2("oa_decomposition", "If yes do initial OA decomposition",
+                               "no",
+                               "no","",
+                               "yes","",
+                               "");
+    roptions->setOptionExtraInfo("oa_decomposition",19);
+
+    roptions->SetRegisteringCategory("Output and Loglevel", RegisteredOptions::BonminCategory);
+    roptions->AddBoundedIntegerOption("oa_log_level",
+        "specify OA iterations log level.",
+        0,2,1,
+        "Set the level of output of OA decomposition solver : "
+        "0 - none, 1 - normal, 2 - verbose"
+                                     );
+    roptions->setOptionExtraInfo("oa_log_level", 25);
+
+    roptions->AddLowerBoundedNumberOption("oa_log_frequency",
+        "display an update on lower and upper bounds in OA every n seconds",
+        0.,1.,100.,
+        "");
+    roptions->setOptionExtraInfo("oa_log_frequency", 25);
+  }
+}/* End namespace Bonmin. */
+
diff --git a/src/Algorithms/OaGenerators/BonOACutGenerator2.hpp b/src/Algorithms/OaGenerators/BonOACutGenerator2.hpp
new file mode 100644
index 0000000..e024127
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOACutGenerator2.hpp
@@ -0,0 +1,56 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  05/26/2005
+
+
+#ifndef BonOACutGenerator2_HPP
+#define BonOACutGenerator2_HPP
+#include "BonOaDecBase.hpp"
+
+namespace Bonmin
+{
+  /** Class to perform OA in its classical form.*/
+  class OACutGenerator2 : public OaDecompositionBase
+  {
+  public:
+    /// Constructor with basic setup
+    OACutGenerator2(BabSetupBase & b);
+
+    /// Copy constructor
+    OACutGenerator2(const OACutGenerator2 &copy)
+        :
+        OaDecompositionBase(copy),
+        subMip_(new SubMipSolver (*copy.subMip_))
+    {}
+    /// Destructor
+    ~OACutGenerator2();
+
+    void setStrategy(const CbcStrategy & strategy)
+    {
+      parameters_.setStrategy(strategy);
+    }
+
+    virtual CglCutGenerator * clone() const
+    {
+      return new OACutGenerator2(*this);
+    }
+    /** Register OA options.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+  protected:
+    /// virtual method which performs the OA algorithm by modifying lp and nlp.
+    virtual double performOa(OsiCuts & cs, solverManip &lpManip,
+               BabInfo * babInfo, double &cutoff, const CglTreeInfo & info) const;
+    /// virutal method to decide if local search is performed
+    virtual bool doLocalSearch(BabInfo * babInfo) const;
+
+  private:
+    SubMipSolver * subMip_;
+  };
+}
+#endif
diff --git a/src/Algorithms/OaGenerators/BonOAMessages.cpp b/src/Algorithms/OaGenerators/BonOAMessages.cpp
new file mode 100644
index 0000000..0311952
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOAMessages.cpp
@@ -0,0 +1,40 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  05/26/2005
+
+
+#include "BonOAMessages.hpp"
+#include <cstring>
+#include "BonMsgUtils.hpp"
+
+namespace Bonmin
+{
+
+  OaMessages::OaMessages():
+      CoinMessages(DUMMY_END)
+  {
+    strcpy(source_,"OA");
+    ADD_MSG(FEASIBLE_NLP, std_m, 2,"Solved NLP in %d iterations, found a feasible solution of value %f.");
+    ADD_MSG(INFEASIBLE_NLP, std_m,2,"Solved NLP in %d iterations, problem is infeasible in subspace.");
+    ADD_MSG(UPDATE_UB, std_m,1,"New best feasible of %g found after %g sec and %i iterations.");
+    ADD_MSG(SOLVED_LOCAL_SEARCH, std_m,2,"Local search solved to optimality in %d nodes and %d lp iterations.");
+    ADD_MSG(LOCAL_SEARCH_ABORT, std_m,2,"Local search aborted : %d nodes and %d lp iterations.");
+    ADD_MSG(UPDATE_LB, std_m ,2,"Updating lower bound to %g elapsed time %g sec");
+    ADD_MSG(ABORT,std_m,1,"%s aborted on %s limit, time spent %g has solution of value %g");
+    ADD_MSG(OASUCCESS, std_m,1,"%s converged in %g seconds found solution of value %g (lower bound %g ).");
+    ADD_MSG(OAABORT, std_m,1,"%s interupted after %g seconds found solution of value %g (lower bound %g ).");
+    ADD_MSG(OA_STATS, std_m,1,"Performed %i iterations, explored %i branch-and-bound nodes in total");
+    ADD_MSG(LP_ERROR,std_m,2,"Error of LP approximation %g");
+    ADD_MSG(PERIODIC_MSG, std_m,1,"After %7.1f seconds, %i iterations upper bound %10g, lower bound %10g");
+    ADD_MSG(FP_DISTANCE, std_m,2,"NLP solution is %g from MILP sol");
+    ADD_MSG(FP_MILP_VAL, std_m,2,"MILP solution has value w.r.t original objective: %10g");
+    ADD_MSG(FP_MAJOR_ITERATION, std_m,1,"Major iteration %i ub: %g");
+    ADD_MSG(FP_MINOR_ITERATION, std_m,1,"Minor iteration %i ub: %g");
+  }
+
+}//end namespace Bonmin
diff --git a/src/Algorithms/OaGenerators/BonOAMessages.hpp b/src/Algorithms/OaGenerators/BonOAMessages.hpp
new file mode 100644
index 0000000..e1a5d5a
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOAMessages.hpp
@@ -0,0 +1,44 @@
+// (C) Copyright Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  07/15/2005
+
+#ifndef OaMessages_H
+#define OaMessages_H
+#include "CoinMessage.hpp"
+
+namespace Bonmin
+{
+  enum OA_Message{
+    FEASIBLE_NLP,
+    INFEASIBLE_NLP,
+    UPDATE_UB,
+    SOLVED_LOCAL_SEARCH,
+    LOCAL_SEARCH_ABORT,
+    UPDATE_LB,
+    ABORT,
+    OASUCCESS,
+    OAABORT,
+    OA_STATS,
+    LP_ERROR,
+    PERIODIC_MSG,
+    FP_DISTANCE,
+    FP_MILP_VAL,
+    FP_MAJOR_ITERATION,
+    FP_MINOR_ITERATION,
+    DUMMY_END
+  };
+
+  /** Output messages for Outer approximation cutting planes */
+  class OaMessages : public CoinMessages
+  {
+  public:
+    OaMessages();
+  };
+
+} //end namespace Bonmin
+#endif
diff --git a/src/Algorithms/OaGenerators/BonOaDecBase.cpp b/src/Algorithms/OaGenerators/BonOaDecBase.cpp
new file mode 100644
index 0000000..6cf9954
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOaDecBase.cpp
@@ -0,0 +1,457 @@
+// (C) Copyright International Business Machines (IBM) 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/07/2006
+
+#include <sstream>
+#include <climits>
+
+#include <algorithm>
+#include "BonOaDecBase.hpp"
+
+
+#include "BonminConfig.h"
+
+#include "OsiClpSolverInterface.hpp"
+
+#include "CbcModel.hpp"
+#include "CbcStrategy.hpp"
+#include "BonCbcLpStrategy.hpp"
+#ifdef COIN_HAS_CPX
+#include "OsiCpxSolverInterface.hpp"
+#include "cplex.h"
+#define CHECK_CPX_STAT(a,b) if(b) throw CoinError("Error in CPLEX call",__FILE__,a);
+
+#endif
+#include "BonCbc.hpp"
+#include "BonSolverHelp.hpp"
+//The following two are to interupt the solution of sub-mip through CTRL-C
+extern CbcModel * OAModel;
+
+namespace Bonmin {
+
+
+  OaDecompositionBase::OaDecompositionBase(BabSetupBase &b, bool leaveSiUnchanged,
+      bool reassignLpsolver):
+      CglCutGenerator(),
+      nlp_(b.nonlinearSolver()),
+      s_(&b),
+      lp_(NULL),
+      objects_(NULL),
+      nObjects_(0),
+      nLocalSearch_(0),
+      handler_(NULL),
+      leaveSiUnchanged_(leaveSiUnchanged),
+      reassignLpsolver_(reassignLpsolver),
+      timeBegin_(0),
+      numSols_(0),
+      parameters_(),
+      currentNodeNumber_(-1)
+  {
+    handler_ = new CoinMessageHandler();
+    int logLevel;
+    b.options()->GetIntegerValue("oa_log_level",logLevel,b.prefix());
+    b.options()->GetNumericValue("oa_log_frequency",parameters_.logFrequency_,b.prefix());
+    b.options()->GetNumericValue("allowable_fraction_gap", parameters_.gap_tol_, b.prefix());
+    handler_ -> setLogLevel(logLevel);
+    b.options()->GetIntegerValue("solution_limit", parameters_.maxSols_,b.prefix());
+
+    messages_ = OaMessages();
+    timeBegin_ = CoinCpuTime();
+    b.options()->GetIntegerValue("milp_log_level",parameters_.subMilpLogLevel_,b.prefix());
+    b.options()->GetNumericValue("cutoff_decr",parameters_.cbcCutoffIncrement_,b.prefix());
+    b.options()->GetNumericValue("integer_tolerance",parameters_.cbcIntegerTolerance_,b.prefix());
+    int ivalue;
+    b.options()->GetEnumValue("add_only_violated_oa", ivalue,b.prefix());
+    parameters_.addOnlyViolated_ = ivalue;
+    b.options()->GetEnumValue("oa_cuts_scope", ivalue,b.prefix());
+    parameters_.global_ = ivalue;
+}
+
+  OaDecompositionBase::OaDecompositionBase
+  (const OaDecompositionBase & other)
+      :
+      CglCutGenerator(other),
+      nlp_(other.nlp_),
+      s_(other.s_),
+      lp_(other.lp_),
+      objects_(other.objects_),
+      nObjects_(other.nObjects_),
+      nLocalSearch_(0),
+      messages_(other.messages_),
+      leaveSiUnchanged_(other.leaveSiUnchanged_),
+      reassignLpsolver_(other.reassignLpsolver_),
+      timeBegin_(0),
+      numSols_(other.numSols_),
+      parameters_(other.parameters_),
+      currentNodeNumber_(other.currentNodeNumber_)
+  {
+    timeBegin_ = CoinCpuTime();
+    handler_ = other.handler_->clone();
+  }
+/// Constructor with default values for parameters
+  OaDecompositionBase::Parameters::Parameters():
+      global_(true),
+      addOnlyViolated_(false),
+      cbcCutoffIncrement_(1e-06),
+      cbcIntegerTolerance_(1e-05),
+      gap_tol_(1e-05),
+      maxLocalSearch_(0),
+      maxLocalSearchTime_(3600),
+      subMilpLogLevel_(0),
+      maxSols_(INT_MAX),
+      logFrequency_(1000.),
+      strategy_(NULL)
+  {}
+
+  /** Destructor.*/
+  OaDecompositionBase::~OaDecompositionBase()
+  {
+    delete handler_;
+  }
+
+
+/// Constructor with default values for parameters
+  OaDecompositionBase::Parameters::Parameters(const Parameters & other):
+      global_(other.global_),
+      addOnlyViolated_(other.addOnlyViolated_),
+      cbcCutoffIncrement_(other.cbcCutoffIncrement_),
+      cbcIntegerTolerance_(other.cbcIntegerTolerance_),
+      gap_tol_(other.gap_tol_),
+      maxLocalSearch_(other.maxLocalSearch_),
+      maxLocalSearchTime_(other.maxLocalSearchTime_),
+      subMilpLogLevel_(other.subMilpLogLevel_),
+      maxSols_(other.maxSols_),
+      logFrequency_(other.logFrequency_),
+      strategy_(NULL)
+  {
+    if (other.strategy_)
+      strategy_ = other.strategy_->clone();
+  }
+
+
+
+OaDecompositionBase::solverManip::solverManip
+(OsiSolverInterface * si,
+ bool saveNumRows,
+ bool saveBasis,
+ bool saveBounds,
+ bool saveCutoff,
+ bool resolve):
+    si_(si),
+    initialNumberRows_(-1),
+    colLower_(NULL),
+    colUpper_(NULL),
+    warm_(NULL),
+    cutoff_(DBL_MAX),
+    deleteSolver_(false),
+    objects_(NULL),
+    nObjects_(0)
+{
+  getCached();
+  if (saveNumRows)
+    initialNumberRows_ = numrows_;
+  if (saveBasis)
+    warm_ = si->getWarmStart();
+  if (saveBounds) {
+    colLower_ = new double[numcols_];
+    colUpper_ = new double[numcols_];
+    CoinCopyN(si->getColLower(), numcols_ , colLower_);
+    CoinCopyN(si->getColUpper(), numcols_ , colUpper_);
+  }
+  if (saveCutoff)
+    si->getDblParam(OsiDualObjectiveLimit, cutoff_);
+  si->messageHandler()->setLogLevel(0);
+  if (resolve) si->resolve();
+}
+
+
+OaDecompositionBase::solverManip::solverManip
+(const OsiSolverInterface & si):
+    si_(NULL),
+    initialNumberRows_(-1),
+    colLower_(NULL),
+    colUpper_(NULL),
+    warm_(NULL),
+    cutoff_(DBL_MAX),
+    deleteSolver_(true),
+    objects_(NULL),
+    nObjects_(0)
+{
+  si_ = si.clone();
+  getCached();
+}
+
+OaDecompositionBase::solverManip::~solverManip()
+{
+  if (warm_) delete warm_;
+  if (colLower_) delete [] colLower_;
+  if (colUpper_) delete [] colUpper_;
+  if (deleteSolver_) delete si_;
+}
+
+void
+OaDecompositionBase::solverManip::restore()
+{
+  if (initialNumberRows_ >= 0) {
+    int nRowsToDelete = si_->getNumRows() - initialNumberRows_;
+    int * rowsToDelete = new int[nRowsToDelete];
+    for (int i = 0 ; i < nRowsToDelete ; i++) {
+      rowsToDelete[i] = i + initialNumberRows_;
+    }
+    si_->deleteRows(nRowsToDelete, rowsToDelete);
+    delete [] rowsToDelete;
+    numrows_ = si_->getNumRows() ;
+  }
+
+  if (colLower_) {
+    si_->setColLower(colLower_);
+  }
+
+  if (colUpper_) {
+    si_->setColUpper(colUpper_);
+  }
+
+  if (cutoff_<COIN_DBL_MAX) {
+    si_->setDblParam(OsiDualObjectiveLimit, cutoff_);
+  }
+
+  if (warm_) {
+    if (si_->setWarmStart(warm_)==false) {
+      throw CoinError("Fail restoring the warm start at the end of procedure",
+          "restore","OaDecompositionBase::SaveSolverState") ;
+    }
+  }
+  getCached();
+}
+
+void
+OaDecompositionBase::passInMessageHandler(CoinMessageHandler * handler)
+{
+  int logLevel = handler_->logLevel();
+  delete handler_;
+  handler_=handler->clone();
+  handler_->setLogLevel(logLevel);
+}
+
+/** Standard cut generation methods. */
+void
+OaDecompositionBase::generateCuts(const OsiSolverInterface &si,  OsiCuts & cs,
+    const CglTreeInfo info) {
+  if (nlp_ == NULL) {
+    throw CoinError("Error in cut generator for outer approximation no NLP ipopt assigned", "generateCuts", "OaDecompositionBase");
+  }
+
+  // babInfo is used to communicate with the b-and-b solver (Cbc or Bcp).
+  BabInfo * babInfo = dynamic_cast<BabInfo *> (si.getAuxiliaryInfo());
+  assert(babInfo);
+  assert(babInfo->babPtr());
+  numSols_ = babInfo->babPtr()->model().getSolutionCount ();
+  CglTreeInfo info_copy = info;
+  const CbcNode * node = babInfo->babPtr()->model().currentNode();
+  info_copy.level = (node == NULL) ? 0 : babInfo->babPtr()->model().currentNode()->depth();
+  if(babInfo->hasSolution()) numSols_ ++;
+  if (babInfo)
+    if (!babInfo->mipFeasible())
+      return;
+
+  //Get the continuous solution
+  const double *colsol = si.getColSolution();
+
+
+  vector<double> savedColLower(nlp_->getNumCols());
+  CoinCopyN(nlp_->getColLower(), nlp_->getNumCols(), savedColLower());
+  vector<double> savedColUpper(nlp_->getNumCols());
+  CoinCopyN(nlp_->getColUpper(), nlp_->getNumCols(), savedColUpper());
+
+
+  OsiBranchingInformation brInfo(nlp_, false);
+  brInfo.solution_ = colsol;
+  //Check integer infeasibility
+  bool isInteger = integerFeasible(*nlp_, brInfo, parameters_.cbcIntegerTolerance_,
+                              objects_, nObjects_);
+
+
+  //Check nodeNumber if it did not change scan savedCuts_ if one is violated force it and exit
+  int nodeNumber = babInfo->babPtr()->model().getNodeCount();
+  if(nodeNumber == currentNodeNumber_){
+#ifdef OA_DEBUG
+    printf("OA decomposition recalled from the same node!\n");
+#endif
+    int numCuts = savedCuts_.sizeRowCuts();
+    for(int i = 0 ; i < numCuts ; i++){
+       //Check if cuts off solution
+       if(savedCuts_.rowCut(i).violated(colsol) > 0.){
+#ifdef OA_DEBUG
+         printf("A violated saved cut has been found\n");
+#endif
+         savedCuts_.rowCut(i).setEffectiveness(9.99e99);
+         cs.insert(savedCuts_.rowCut(i));
+         savedCuts_.eraseRowCut(i);
+         return;
+         i--; numCuts--;
+       }
+    }
+  }
+  else {
+    currentNodeNumber_ = nodeNumber;
+    savedCuts_.dumpCuts();
+  } 
+         
+  if (!isInteger) {
+    if (!doLocalSearch(babInfo))//create sub mip solver.
+      return;
+  }
+
+  //get the current cutoff
+  double cutoff;
+  si.getDblParam(OsiDualObjectiveLimit, cutoff);
+
+  // Save solvers state if needed
+
+  solverManip * lpManip = NULL;
+  if (lp_ != NULL) {
+      assert(lp_ == &si);
+      lpManip = new solverManip(lp_, true, leaveSiUnchanged_, true, true);
+  }
+  else {
+    lpManip = new solverManip(si);
+  }
+  lpManip->setObjects(objects_, nObjects_);
+
+  double milpBound = performOa(cs, *lpManip, babInfo, cutoff, info_copy);
+
+  if(babInfo->hasSolution()){
+     babInfo->babPtr()->model().setSolutionCount (numSols_ - 1);
+  }
+
+  //Transmit the bound found by the milp
+  {
+    if (milpBound>-1e100)
+    {
+      // Also store into solver
+      if (babInfo)
+        babInfo->setMipBound(milpBound);
+    }
+  }  //Clean everything :
+
+  //  Reset the two solvers
+  if (leaveSiUnchanged_)
+    lpManip->restore();
+  delete lpManip;
+
+  nlp_->setColLower(savedColLower());
+  nlp_->setColUpper(savedColUpper());
+
+  return;
+}
+
+void
+OaDecompositionBase::solverManip::getCached(){
+  numrows_ = si_->getNumRows();
+  numcols_ = si_->getNumCols();
+  siColLower_ = si_->getColLower();
+  siColUpper_ = si_->getColUpper();
+}
+
+
+/** Do update after an nlp has been solved*/
+bool
+OaDecompositionBase::post_nlp_solve(BabInfo * babInfo, double cutoff) const{
+  nSolve_++;
+  bool return_value = false;
+  if (nlp_->isProvenOptimal()) {
+    handler_->message(FEASIBLE_NLP, messages_)
+    <<nlp_->getIterationCount()
+    <<nlp_->getObjValue()<<CoinMessageEol;
+
+#ifdef OA_DEBUG
+    const double * colsol2 = nlp_->getColSolution();
+    debug_.checkInteger(*nlp_,std::cerr);
+#endif
+
+    if ((nlp_->getObjValue() < cutoff) ) {
+      handler_->message(UPDATE_UB, messages_)
+      <<nlp_->getObjValue()
+      <<CoinCpuTime()-timeBegin_
+      <<CoinMessageEol;
+
+      return_value = true;
+      // Also pass it to solver
+      assert(babInfo);
+      if (babInfo) {
+        int numcols = nlp_->getNumCols();
+        double * lpSolution = new double[numcols + 1];
+        CoinCopyN(nlp_->getColSolution(), numcols, lpSolution);
+        lpSolution[numcols] = nlp_->getObjValue();
+        babInfo->setSolution(lpSolution,
+            numcols + 1, lpSolution[numcols]);
+        delete [] lpSolution;
+      }
+    }
+  }
+  else if (nlp_->isAbandoned() || nlp_->isIterationLimitReached()) {
+    (*handler_)<<"Unsolved NLP... exit"<<CoinMessageEol;
+  }
+  else {
+    handler_->message(INFEASIBLE_NLP, messages_)
+    <<nlp_->getIterationCount()
+    <<CoinMessageEol;
+  }
+  return return_value;
+}
+
+void 
+OaDecompositionBase::setupMipSolver(BabSetupBase &b, const std::string & prefix){
+
+
+}
+
+#ifdef OA_DEBUG
+bool
+OaDecompositionBase::OaDebug::checkInteger(const OsiSolverInterface &nlp, 
+                                           std::ostream & os) const {
+   const double * colsol = nlp.getColSolution();
+   int numcols = nlp.getNumCols();
+  for (int i = 0 ; i < numcols ; i++) {
+    if (nlp.isInteger(i)) {
+      if (fabs(colsol[i]) - floor(colsol[i] + 0.5) >
+          1e-07) {
+        std::cerr<<"Integer infeasible point (should not be), integer infeasibility for variable "<<i
+        <<" is, "<<fabs(colsol[i] - floor(colsol[i] + 0.5))<<std::endl;
+      }
+    }
+    return true;
+  }
+
+}
+
+void
+OaDecompositionBase::OaDebug::printEndOfProcedureDebugMessage(const OsiCuts &cs,
+    bool foundSolution,
+    double solValue,
+    double milpBound,
+    bool isInteger,
+    bool feasible,
+    std::ostream & os) const{
+  std::cout<<"------------------------------------------------------------------"
+  <<std::endl;
+  std::cout<<"OA procedure finished"<<std::endl;
+  std::cout<<"Generated "<<cs.sizeRowCuts()<<std::endl;
+  if (foundSolution)
+    std::cout <<"Found NLP-integer feasible solution of  value : "<<solValue<<std::endl;
+  std::cout<<"Current MILP lower bound is : "<<milpBound<<std::endl;
+  std::cout<<"-------------------------------------------------------------------"<<std::endl;
+  std::cout<<"Stopped because : isInteger "<<isInteger<<", feasible "<<feasible<<std::endl<<std::endl;
+
+}
+
+
+
+#endif
+}/* End namespace Bonmin. */
+
diff --git a/src/Algorithms/OaGenerators/BonOaDecBase.hpp b/src/Algorithms/OaGenerators/BonOaDecBase.hpp
new file mode 100644
index 0000000..de449c1
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOaDecBase.hpp
@@ -0,0 +1,297 @@
+// (C) Copyright International Business Machines (IBM) 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, International Business Machines
+//
+// Date :  12/07/2006
+#ifndef BonOaDecBase_HPP
+#define BonOaDecBase_HPP
+#include "BonSubMipSolver.hpp"
+#include "CglCutGenerator.hpp"
+#include "BonBabSetupBase.hpp"
+#include "BonOAMessages.hpp"
+#include "CbcModel.hpp"
+
+#include "CbcStrategy.hpp"
+
+#include "CoinTime.hpp"
+#include "OsiAuxInfo.hpp"
+#include "OsiBranchingObject.hpp"
+#include <iostream>
+#include "BonBabInfos.hpp"
+namespace Bonmin
+{
+  /** Base class for OA algorithms.*/
+  class OaDecompositionBase : public CglCutGenerator
+  {
+  public:
+
+
+    /** Small class to manipulatee various things in an OsiSolverInterface and restore them.
+        The OsiSolverInterface manipulated may already exist or may be cloned from another one.*/
+    class solverManip
+    {
+    public:
+      /** Constructor. */
+      solverManip(OsiSolverInterface *si , bool saveNumRows=true,
+          bool saveBasis=true, bool saveBounds=false,
+          bool saveCutoff = false, bool resolve=true);
+
+      /** Constructor which clone an other interface. */
+      solverManip(const OsiSolverInterface & si);
+      /** Destructor. */
+      ~solverManip();
+      /** Restore solver. */
+      void restore();
+      
+      /** Get pointer to solver interface. */
+      OsiSolverInterface * si()
+      {
+        return si_;
+      }
+
+      /** Set objects.*/
+      void setObjects(OsiObject ** objects, int nObjects)
+      {
+        objects_ = objects;
+        nObjects_ = nObjects;
+      }
+
+    private:
+      /** Interface saved. */
+      OsiSolverInterface * si_;
+      /** Initial number of rows (-1 if don't save). */
+      int initialNumberRows_;
+
+      /** Initial lower bounds. */
+      double * colLower_;
+
+      /** Initial Upper bounds.*/
+      double * colUpper_;
+
+      /** Inital basis. */
+      CoinWarmStart * warm_;
+
+      /** Initial cutoff. */
+      double cutoff_;
+
+      /** delete si_ ? */
+      bool deleteSolver_;
+
+      /// Some objects the feasiblitiy of which to verify.
+      OsiObject * * objects_;
+      /// Number of objects.*/
+      int nObjects_;
+      /** \name Cached info from solver interface.*/
+      /** @{ */
+      /** Number of columns. */
+      int numcols_;
+      /** Number of rows. */
+      int numrows_;
+      /** Lower bounds on variables.*/
+      const double * siColLower_;
+      /** Upper bounds on variables. */
+      const double * siColUpper_;
+
+      void getCached();
+      /** @} */
+    };
+
+    /// New usefull constructor
+    OaDecompositionBase(BabSetupBase &b, bool leaveSiUnchanged,
+        bool reassignLpsolver);
+
+    /// Copy constructor
+    OaDecompositionBase(const OaDecompositionBase & copy);
+
+
+    /// Destructor
+    virtual ~OaDecompositionBase();
+
+    /** Standard cut generation methods. */
+    virtual void generateCuts(const OsiSolverInterface &si,  OsiCuts & cs,
+        const CglTreeInfo info = CglTreeInfo());
+
+    /// Assign an OsiTMINLPInterface
+    void assignNlpInterface(OsiTMINLPInterface * nlp)
+    {
+      nlp_ = nlp;
+    }
+
+    /// Assign an OsiTMINLPInterface
+    void assignLpInterface(OsiSolverInterface * si)
+    {
+      lp_ = si;
+    }
+
+    bool reassignLpsolver()
+    {
+      return reassignLpsolver_;
+    }
+    /** Set objects.*/
+    void setObjects(OsiObject ** objects, int nObjects)
+    {
+      objects_ = objects;
+      nObjects_ = nObjects;
+    }
+    /// Set whether to leave the solverinterface unchanged
+    inline void setLeaveSiUnchanged(bool yesno)
+    {
+      leaveSiUnchanged_ = yesno;
+    }
+
+    /** Parameters for algorithm. */
+    struct Parameters
+    {
+      /// Add cuts as global
+      bool global_;
+      /// Add only violated OA inequalities
+      bool addOnlyViolated_;
+      /// cutoff min increase (has to be intialized trhough Cbc)
+      double cbcCutoffIncrement_;
+      /// integer tolerance (has to be the same as Cbc's)
+      double cbcIntegerTolerance_; 
+      /** setting for gap tolerance.*/
+      double gap_tol_;
+      ///Total max number of local searches
+      int maxLocalSearch_;
+      /// maximum time for local searches
+      double maxLocalSearchTime_;
+      /** sub milp log level.*/
+      int subMilpLogLevel_;
+      /** maximum number of solutions*/
+      int maxSols_;
+      /** Frequency of log. */
+      double logFrequency_;
+     
+      
+      /** Constructor with default values */
+      Parameters();
+
+      /** Copy constructor */
+      Parameters(const Parameters & other);
+
+      /** Destructor */
+      ~Parameters()
+      {
+        if (strategy_) delete strategy_;
+      }
+
+      /** Strategy to apply when using Cbc as MILP sub-solver.*/
+      void setStrategy(const CbcStrategy & strategy)
+      {
+        if (strategy_) delete strategy_;
+        strategy_ = strategy.clone();
+      }
+
+      const CbcStrategy * strategy() const
+      {
+        return strategy_;
+      }
+
+private:
+      /** Strategy to apply when using Cbc as MILP sub-solver.*/
+      CbcStrategy * strategy_;
+
+    };
+
+    Parameters& parameter()
+    {
+      return parameters_;
+    }
+
+    const Parameters& parameter()const
+    {
+      return parameters_;
+    }
+
+    void setLogLevel(int level)
+    {
+      handler_->setLogLevel(level);
+    }
+
+    void setReassignLpSolver(bool v){
+      reassignLpsolver_ = v;
+    }
+    void passInMessageHandler(CoinMessageHandler * handler);
+  protected:
+      void setupMipSolver(BabSetupBase &b, const std::string &prefix);
+    /// \name Protected helper functions
+    /**@{ */
+
+    /** Solve the nlp and do output.
+        \return true if feasible*/
+    bool post_nlp_solve(BabInfo * babInfo, double cutoff) const;
+    /** @} */
+
+    /// virtual method which performs the OA algorithm by modifying lp and nlp.
+    virtual double performOa(OsiCuts &cs, solverManip &lpManip,
+                             BabInfo * babInfo, double &, const CglTreeInfo & info) const = 0;
+    /// virutal method to decide if local search is performed
+    virtual bool doLocalSearch(BabInfo * babInfo) const = 0;
+
+    /// \name Protected members
+    /** @{ */
+    /// Pointer to nlp interface
+    mutable OsiTMINLPInterface * nlp_;
+    /// Pointer to setup
+    BabSetupBase * s_;
+    ///Number of nlp solved done
+    mutable int nSolve_;
+    /// A linear solver
+    mutable OsiSolverInterface * lp_;
+    /// Some objects the feasiblitiy of which to verify.
+    OsiObject * * objects_;
+    /// Number of objects.*/
+    int nObjects_;
+    ///number of local searches performed
+    mutable int nLocalSearch_;
+    /** messages handler. */
+    CoinMessageHandler * handler_;
+    /** Messages for OA */
+    CoinMessages messages_;
+    /** Wether or not we should remove cuts at the end of the procedure */
+    bool leaveSiUnchanged_;
+    /** Do we need to reassign the lp solver with Cbc.*/
+    bool reassignLpsolver_;
+    /** time of construction*/
+    double timeBegin_;
+    /** number of solutions found by OA_decomposition.*/
+    mutable int numSols_;
+    
+    /** Parameters.*/
+    Parameters parameters_;
+
+      /** Saved cuts: in some cases when using OA to check feasible solution algorithm may loop because Cbc removes inactive cuts.
+          To overcome this we can impose that no OA cut can be discarded by Cbc but this consumes too much memory in some cases.
+          Here we do it another way: cuts generated at current node are saved if algorithm seems to enter a loop we impose the needed cuts to be kept.*/
+    mutable OsiCuts savedCuts_;
+      /** Store the current node number.*/
+    mutable int currentNodeNumber_;
+    /** @} */
+
+#ifdef OA_DEBUG
+    class OaDebug
+    {
+      public:
+      bool checkInteger(const OsiSolverInterface&nlp, std::ostream & os) const;
+
+      void printEndOfProcedureDebugMessage(const OsiCuts &cs,
+          bool foundSolution,
+          double solValue,
+          double milpBound,
+          bool isInteger,
+          bool feasible,
+          std::ostream & os) const;
+    };
+
+    /** debug object. */
+    OaDebug debug_;
+
+#endif
+  };
+}
+#endif
+
diff --git a/src/Algorithms/OaGenerators/BonOaFeasChecker.cpp b/src/Algorithms/OaGenerators/BonOaFeasChecker.cpp
new file mode 100644
index 0000000..20a7fff
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOaFeasChecker.cpp
@@ -0,0 +1,170 @@
+// (C) Copyright International Business Machines 2006-2011
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date : 12/26/2006
+
+#include "BonOaFeasChecker.hpp"
+#include "BonminConfig.h"
+
+#include "OsiAuxInfo.hpp"
+#include "BonSolverHelp.hpp"
+
+namespace Bonmin
+{
+   static const char * txt_id = "check integer sol.";
+
+  /// New usefull constructor
+  OaFeasibilityChecker::OaFeasibilityChecker(BabSetupBase &b):
+      OaDecompositionBase(b, false, true),
+      cut_count_(0)
+  {
+    int ival;
+    b.options()->GetEnumValue("feas_check_cut_types", ival, b.prefix()); 
+    type_ = CutsTypes(ival);
+    b.options()->GetEnumValue("feas_check_discard_policy", ival, b.prefix()); 
+    pol_ = CutsPolicies(ival);
+    b.options()->GetIntegerValue("generate_benders_after_so_many_oa", ival, b.prefix());
+    maximum_oa_cuts_ = static_cast<unsigned int>(ival);
+  }
+  OaFeasibilityChecker ::~OaFeasibilityChecker ()
+  {}
+
+  /// OaDecomposition method
+  double
+  OaFeasibilityChecker::performOa(OsiCuts & cs, solverManip &lpManip,
+      BabInfo * babInfo, double &cutoff,const CglTreeInfo & info) const
+  {
+    bool isInteger = true;
+    bool feasible = 1;
+
+    OsiSolverInterface * lp = lpManip.si();
+    OsiBranchingInformation branch_info(lp,false);
+    //int numcols = lp->getNumCols();
+    double milpBound = -COIN_DBL_MAX;
+    int numberPasses = 0;
+    double * nlpSol =  NULL;
+    int numberCutsBefore = cs.sizeRowCuts();
+   
+    while (isInteger && feasible ) {
+      numberPasses++;
+
+      //setup the nlp
+
+      //Fix the variable which have to be fixed, after having saved the bounds
+      double * colsol = const_cast<double *>(lp->getColSolution());
+      branch_info.solution_ = colsol;
+      fixIntegers(*nlp_,branch_info, parameters_.cbcIntegerTolerance_,objects_, nObjects_);
+
+
+      //Now solve the NLP get the cuts, and intall them in the local LP
+      nlp_->resolve(txt_id);
+      if (post_nlp_solve(babInfo, cutoff)) {
+        //nlp solved and feasible
+        // Update the cutoff
+        double ub = nlp_->getObjValue();
+        cutoff = ub > 0 ? ub *(1 - parameters_.cbcCutoffIncrement_) : ub*(1 + parameters_.cbcCutoffIncrement_);
+        // Update the lp solver cutoff
+        lp->setDblParam(OsiDualObjectiveLimit, cutoff);
+      }
+      // Get the cuts outer approximation at the current point
+
+      nlpSol = const_cast<double *>(nlp_->getColSolution());
+
+      const double * toCut = (parameter().addOnlyViolated_)?
+                             colsol:NULL;
+      if(cut_count_ <= maximum_oa_cuts_ && type_ == OA)
+        nlp_->getOuterApproximation(cs, nlpSol, 1, toCut,
+                                    true);
+      else {//if (type_ == Benders)
+        nlp_->getBendersCut(cs, parameter().global_);
+      }
+      if(pol_ == DetectCycles)
+        nlp_->getBendersCut(savedCuts_, parameter().global_);
+
+      int numberCuts = cs.sizeRowCuts() - numberCutsBefore;
+      cut_count_ += numberCuts;
+      if (numberCuts > 0)
+        installCuts(*lp, cs, numberCuts);
+
+      lp->resolve();
+      double objvalue = lp->getObjValue();
+      //milpBound = max(milpBound, lp->getObjValue());
+      feasible = (lp->isProvenOptimal() &&
+          !lp->isDualObjectiveLimitReached() && (objvalue<cutoff)) ;
+      //if value of integers are unchanged then we have to get out
+      bool changed = true;//if lp is infeasible we don't have to check anything
+      isInteger = 0;
+      //	  if(!fixed)//fathom on bounds
+      //           milpBound = 1e200;
+      if (feasible) {
+        changed = isDifferentOnIntegers(*nlp_, objects_, nObjects_,
+                                        0.1,
+                                        nlp_->getColSolution(), lp->getColSolution());
+      }
+      if (changed) {
+       branch_info.solution_ = lp->getColSolution();
+       isInteger = integerFeasible(*lp,branch_info, parameters_.cbcIntegerTolerance_,
+                                     objects_, nObjects_);
+      }
+      else {
+        isInteger = 0;
+        //	  if(!fixed)//fathom on bounds
+         milpBound = 1e200;
+      }
+#ifdef OA_DEBUG
+      printf("Obj value after cuts %g, %d rows\n",lp->getObjValue(),
+          numberCuts) ;
+#endif
+    }
+    int num_cuts_now = cs.sizeRowCuts();
+    if(pol_ == KeepAll){
+      for(int i = numberCutsBefore ; i < num_cuts_now ; i++){
+        cs.rowCut(i).setEffectiveness(99.9e99);
+      }
+    }
+
+#ifdef OA_DEBUG
+    debug_.printEndOfProcedureDebugMessage(cs, true, cutoff, milpBound, isInteger, feasible, std::cout);
+    std::cout<<"milpBound found: "<<milpBound<<std::endl;
+#endif
+    return milpBound;
+  }
+
+
+  /** Register OA feasibility checker  options.*/
+  void
+  OaFeasibilityChecker::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("Feasibility checker using OA cuts", RegisteredOptions::BonminCategory);
+    roptions->AddStringOption2("feas_check_cut_types", "Choose the type of cuts generated when an integer feasible solution is found",
+                               "outer-approx",
+                               "outer-approx", "Generate a set of Outer Approximations cuts.",
+                               "Benders", "Generate a single Benders cut.",
+                               "If it seems too much memory is used should try Benders to use less");
+    roptions->setOptionExtraInfo("feas_check_cut_types", 19);
+    
+
+    roptions->AddStringOption3("feas_check_discard_policy", "How cuts from feasibility checker are discarded",
+                               "detect-cycles",
+                               "detect-cycles", "Detect if a cycle occurs and only in this case force not to discard.",
+                               "keep-all", "Force cuts from feasibility checker not to be discarded (memory hungry but sometimes better).",
+                               "treated-as-normal", "Cuts from memory checker can be discarded as any other cuts (code may cycle then)",
+                               "Normally to avoid cycle cuts from feasibility checker should not be discarded in the node where they are generated. "
+                               "However Cbc sometimes does it if no care is taken which can lead to an infinite loop in Bonmin (usually on simple problems). "
+                               "To avoid this one can instruct Cbc to never discard a cut but if we do that for all cuts it can lead to memory problems. "
+                               "The default policy here is to detect cycles and only then impose to Cbc to keep the cut. "
+                               "The two other alternative are to instruct Cbc to keep all cuts or to just ignore the problem and hope for the best");
+    roptions->setOptionExtraInfo("feas_check_discard_policy", 19);
+
+    roptions->AddLowerBoundedIntegerOption("generate_benders_after_so_many_oa", "Specify that after so many oa cuts have been generated Benders cuts should be generated instead.",
+                                           0, 5000,
+                                           "It seems that sometimes generating too many oa cuts slows down the optimization compared to Benders due to the size of the LP. "
+                                           "With this option we specify that after so many OA cuts have been generated we should switch to Benders cuts.");
+    roptions->setOptionExtraInfo("generate_benders_after_so_many_oa", 19);
+  }
+
+}/* End namespace Bonmin. */
diff --git a/src/Algorithms/OaGenerators/BonOaFeasChecker.hpp b/src/Algorithms/OaGenerators/BonOaFeasChecker.hpp
new file mode 100644
index 0000000..8aef3e9
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOaFeasChecker.hpp
@@ -0,0 +1,73 @@
+// (C) Copyright International Business Machines 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  12/26/2006
+
+
+#ifndef BonOaFeasibilityChecker_HPP
+#define BonOaFeasibilityChecker_HPP
+#include "BonOaDecBase.hpp"
+
+namespace Bonmin
+{
+  /** Class to perform OA in its classical form.*/
+  class OaFeasibilityChecker : public OaDecompositionBase
+  {
+  public:
+    /// New usefull constructor
+    OaFeasibilityChecker(BabSetupBase &b);
+    /// Copy constructor
+    OaFeasibilityChecker(const OaFeasibilityChecker &copy)
+        :
+        OaDecompositionBase(copy),
+        pol_(copy.pol_),
+        type_(copy.type_),
+        cut_count_(copy.cut_count_),
+        maximum_oa_cuts_(copy.maximum_oa_cuts_)
+    {}
+    /// Destructor
+    ~OaFeasibilityChecker();
+
+    /** Register OA options.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+    virtual CglCutGenerator * clone() const
+    {
+      return new OaFeasibilityChecker(*this);
+    }
+  protected:
+    /// virtual method which performs the OA algorithm by modifying lp and nlp.
+    virtual double performOa(OsiCuts & cs, solverManip &lpManip,
+        BabInfo * babInfo, double &cutoff, const CglTreeInfo & info) const;
+    /// virutal method to decide if local search is performed
+    virtual bool doLocalSearch(BabInfo * babInfo) const
+    {
+      return 0;
+    }
+
+    /** See documentation for feas_check_discard_policy option.*/
+    enum CutsPolicies {
+      DetectCycles = 0,
+      KeepAll,
+      TreatAsNormal};
+    /** Policy for keeping cuts.*/
+    CutsPolicies pol_;
+ 
+    /** See documentation for feas_check_cut_types option.*/
+    enum CutsTypes {
+      OA = 0,
+      Benders};
+    /** Type of cuts.*/
+    CutsTypes type_;
+
+    /** Count the total number of cuts generated.*/
+    mutable unsigned int cut_count_;
+    /** maximum number of OA cuts.*/
+    unsigned int maximum_oa_cuts_;
+  };
+}
+#endif
diff --git a/src/Algorithms/OaGenerators/BonOaNlpOptim.cpp b/src/Algorithms/OaGenerators/BonOaNlpOptim.cpp
new file mode 100644
index 0000000..4443d8b
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOaNlpOptim.cpp
@@ -0,0 +1,196 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  05/26/2005
+
+#include "BonOaNlpOptim.hpp"
+#include "OsiAuxInfo.hpp"
+#include "CbcModel.hpp"
+#include "BonBabInfos.hpp"
+#include "BonCbc.hpp"
+
+namespace Bonmin
+{
+   static const char * txt_id = "NLP relax. for OA";
+
+/// Default constructor
+  OaNlpOptim::OaNlpOptim(OsiTMINLPInterface * si,
+      int maxDepth, bool addOnlyViolated, bool global)
+      :
+      CglCutGenerator(),
+      nlp_(si),
+      maxDepth_(maxDepth),
+      nSolve_(0),
+      addOnlyViolated_(addOnlyViolated),
+      global_(global)
+  {
+    handler_ = new CoinMessageHandler();
+    handler_ -> setLogLevel(1);
+    messages_ = OaMessages();
+  }
+
+  OaNlpOptim::OaNlpOptim(BabSetupBase &b):
+      CglCutGenerator(),
+      nlp_(b.nonlinearSolver()),
+      maxDepth_(1000),
+      nSolve_(0)
+  {
+    int ivalue;
+    b.options()->GetEnumValue("add_only_violated_oa", ivalue,b.prefix());
+    addOnlyViolated_ = ivalue;
+    b.options()->GetEnumValue("oa_cuts_scope", ivalue,b.prefix());
+    global_ = ivalue;
+
+    b.options()->GetIntegerValue("nlp_solve_max_depth", maxDepth_,b.prefix());
+    b.options()->GetNumericValue("nlp_solves_per_depth", solves_per_level_,b.prefix());
+    handler_ = new CoinMessageHandler();
+    handler_ -> setLogLevel(1);
+    messages_ = OaMessages();
+  }
+/// Assign an OsiTMINLPInterface
+  void
+  OaNlpOptim::assignInterface(OsiTMINLPInterface * si)
+
+  {
+    nlp_ = si;
+  }
+/// cut generation method
+  void
+  OaNlpOptim::generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
+      const CglTreeInfo info) {
+    if (nlp_ == NULL) {
+      CoinError("Error in cut generator for outer approximation no ipopt NLP assigned", "generateCuts", "OaNlpOptim");
+    }
+
+    int numcols = nlp_->getNumCols();
+
+    //Get the continuous solution
+    //const double *colsol = si.getColSolution();
+    //Check for integer feasibility
+   if(!info.inTree || info.pass > 0) return;
+#if 1
+    BabInfo * babInfo = dynamic_cast<BabInfo *> (si.getAuxiliaryInfo());
+    assert(babInfo);
+    assert(babInfo->babPtr());
+    const CbcNode * node = babInfo->babPtr()->model().currentNode();
+    int level = (node == NULL) ? 0 : babInfo->babPtr()->model().currentNode()->depth();
+    if (info.level > maxDepth_)
+      return;
+    if(solves_per_level_ < 1e10){
+      double rand = CoinDrand48();
+      double score = pow(2.,-level)*solves_per_level_;
+      //printf("depth %i, score %g , rand %g\n", level, score, rand);
+      if (score <= rand)
+        return;
+    }
+#endif
+    //Fix the variable which have to be fixed, after having saved the bounds
+    double * saveColLb = new double[numcols];
+    double * saveColUb = new double[numcols];
+    CoinCopyN(nlp_->getColLower(), numcols , saveColLb);
+    CoinCopyN(nlp_->getColUpper(), numcols , saveColUb);
+    for (int i = 0; i < numcols ; i++) {
+      if (nlp_->isInteger(i)) {
+        nlp_->setColBounds(i,si.getColLower()[i],si.getColUpper()[i]);
+      }
+    }
+
+    //Now solve the NLP get the cuts, reset bounds and get out
+
+    //  nlp_->turnOnIpoptOutput();
+    nSolve_++;
+    nlp_->resolve(txt_id);
+    const double * violatedPoint = (addOnlyViolated_)? si.getColSolution():
+        NULL;
+    nlp_->getOuterApproximation(cs, 1, violatedPoint,global_);
+    if (nlp_->isProvenOptimal()) {
+      handler_->message(LP_ERROR,messages_)
+      <<nlp_->getObjValue()-si.getObjValue()<<CoinMessageEol;
+      bool feasible = 1;
+      const double * colsol2 = nlp_->getColSolution();
+      for (int i = 0 ; i < numcols && feasible; i++) {
+        if (nlp_->isInteger(i)) {
+          if (fabs(colsol2[i] - floor(colsol2[i] + 0.5) ) > 1e-07)
+            feasible = 0;
+        }
+      }
+      if (feasible ) {
+#if 1
+        // Also store into solver
+        OsiAuxInfo * auxInfo = si.getAuxiliaryInfo();
+        OsiBabSolver * auxiliaryInfo = dynamic_cast<OsiBabSolver *> (auxInfo);
+        if (auxiliaryInfo) {
+          double * lpSolution = new double[numcols + 1];
+          CoinCopyN(colsol2, numcols, lpSolution);
+          lpSolution[numcols] = nlp_->getObjValue();
+          auxiliaryInfo->setSolution(lpSolution, numcols + 1, lpSolution[numcols]);
+          delete [] lpSolution;
+        }
+        else
+          fprintf(stderr,"No auxiliary info in nlp solve!\n");
+#endif
+
+      }
+    }
+    else if (nlp_->isAbandoned() || nlp_->isIterationLimitReached()) {
+      throw CoinError("Unsolved NLP ... exit", "generateCuts", "OaNlpOptim");
+    }
+    else {
+      //       //Add an infeasibility local constraint
+      //       CoinPackedVector v;
+      //       double rhs = 1.;
+      //       for(int i = 0; i < numcols ; i++)
+      // 	{
+      // 	  if(nlp_->isInteger(i) && (si.getColUpper()[i] - si.getColLower()[i] < 0.9))
+      // 	    {
+      // 	      double value = floor(colsol[i] + 0.5);
+      // 	      assert(fabs(colsol[i]-value)<1e-8 && value >= -1e-08 && value <= 1+ 1e08);
+      // 	      v.insert(i, -(2*value - 1));
+      // 	      rhs -= value;
+      // 	    }
+      // 	}
+      //       OsiRowCut cut;
+      //       cut.setRow(v);
+      //       cut.setLb(rhs);
+      //       cut.setUb(1e300);
+      //       cut.setGloballyValid();
+      //       cs.insert(cut);
+    }
+    for (int i = 0; i < numcols ; i++) {
+      if (nlp_->isInteger(i)) {
+        nlp_->setColBounds(i,saveColLb[i],saveColUb[i]);
+      }
+    }
+#if 0
+    nlp_->deleteLastRows(numberCuts);
+#endif
+    delete [] saveColLb;
+    delete [] saveColUb;
+  }
+
+  void
+  OaNlpOptim::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("NLP solves in hybrid algorithm (B-Hyb)", RegisteredOptions::BonminCategory);
+    roptions->AddLowerBoundedIntegerOption("nlp_solve_frequency",
+        "Specify the frequency (in terms of nodes) at which NLP relaxations are solved in B-Hyb.",
+        0,10,
+        "A frequency of 0 amounts to to never solve the NLP relaxation.");
+    roptions->setOptionExtraInfo("nlp_solve_frequency",1);
+    roptions->AddLowerBoundedIntegerOption("nlp_solve_max_depth",
+        "Set maximum depth in the tree at which NLP relaxations are solved in B-Hyb.",
+        0,10,
+        "A depth of 0 amounts to to never solve the NLP relaxation.");
+    roptions->setOptionExtraInfo("nlp_solve_max_depth",1);
+    roptions->AddLowerBoundedNumberOption("nlp_solves_per_depth",
+        "Set average number of nodes in the tree at which NLP relaxations are solved in B-Hyb for each depth.",
+        0.,false,1e100);
+    roptions->setOptionExtraInfo("nlp_solves_per_depth",1);
+  }
+
+
+}/* End namespace Bonmin. */
diff --git a/src/Algorithms/OaGenerators/BonOaNlpOptim.hpp b/src/Algorithms/OaGenerators/BonOaNlpOptim.hpp
new file mode 100644
index 0000000..fd30365
--- /dev/null
+++ b/src/Algorithms/OaGenerators/BonOaNlpOptim.hpp
@@ -0,0 +1,116 @@
+// (C) Copyright Carnegie Mellon University 2005, 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  05/26/2005
+
+#ifndef BonOaNlpOptim_HPP
+#define BonOaNlpOptim_HPP
+#include "CglCutGenerator.hpp"
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonOAMessages.hpp"
+#include "BonBabSetupBase.hpp"
+namespace Bonmin
+{
+  /** Generate cuts for the nlp corresponding to continuous relaxation at a node.*/
+  class OaNlpOptim : public CglCutGenerator
+  {
+  public:
+    /// Default constructor
+    OaNlpOptim(OsiTMINLPInterface * si = NULL,
+        int maxDepth = 10, bool addOnlyViolated = false,
+        bool globalCuts = true);
+
+    /// Constructor with basic setup
+    OaNlpOptim(BabSetupBase &b);
+    /// Copy constructor
+    OaNlpOptim(const OaNlpOptim &copy)
+        :
+        CglCutGenerator(copy),
+        nlp_(copy.nlp_),
+        maxDepth_(copy.maxDepth_),
+        nSolve_(0),
+        addOnlyViolated_(copy.addOnlyViolated_),
+        global_(copy.global_),
+	solves_per_level_(copy.solves_per_level_)
+    {
+      handler_ = new CoinMessageHandler();
+      handler_ -> setLogLevel(copy.handler_->logLevel());
+      messages_ = OaMessages();
+    }
+    void passInMessageHandler(const CoinMessageHandler * handler)
+    {
+      delete handler_;
+      handler_ = handler->clone();
+    }
+    ///Abstract constructor
+    virtual CglCutGenerator * clone() const
+    {
+      return new OaNlpOptim(*this);
+    }
+
+    /** Desctructor */
+    virtual ~OaNlpOptim()
+    {
+      if (handler_)
+        delete handler_;
+    }
+
+    /// Assign an OsiTMINLPInterface
+    void assignInterface(OsiTMINLPInterface * si);
+    /// cut generation method
+    virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
+        const CglTreeInfo info);
+
+
+
+    inline void setMaxDepth(int value)
+    {
+      maxDepth_ = value;
+    }
+    inline void setAddOnlyViolated(bool yesno)
+    {
+      addOnlyViolated_ = yesno;
+    }
+    inline void setGlobalCuts(bool yesno)
+    {
+      global_ = yesno;
+    }
+    inline int getNSolve()
+    {
+      return nSolve_;
+    }
+    /**set log level */
+    void setLogLevel(int value)
+    {
+      handler_->setLogLevel(value);
+    }
+
+    /** Register OaNlpOptim options.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+  private:
+    /// Pointer to the Ipopt interface
+    OsiTMINLPInterface * nlp_;
+
+    /** maximum depth at which generate cuts*/
+    int maxDepth_;
+
+    ///Number of NLP resolution done
+    mutable int nSolve_;
+    /** messages handler. */
+    CoinMessageHandler * handler_;
+    /** handler */
+    CoinMessages messages_;
+    /** Add only violated cuts?*/
+    bool addOnlyViolated_;
+    /** Add cuts as global?*/
+    bool global_;
+    /** Average number of nodes per level in tree */
+    double solves_per_level_;
+  };
+}
+#endif
diff --git a/src/Algorithms/OaGenerators/Makefile.am b/src/Algorithms/OaGenerators/Makefile.am
new file mode 100644
index 0000000..f1e6100
--- /dev/null
+++ b/src/Algorithms/OaGenerators/Makefile.am
@@ -0,0 +1,95 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 204 2006-12-28 18:57:46Z pbonami $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                            liboainterface                            #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonoagenerators.la
+
+# List all source files, including headers
+libbonoagenerators_la_SOURCES = \
+	BonDummyHeuristic.cpp BonDummyHeuristic.hpp \
+	BonOaNlpOptim.cpp BonOaNlpOptim.hpp \
+	BonOACutGenerator2.cpp BonOACutGenerator2.hpp \
+        BonOaFeasChecker.cpp BonOaFeasChecker.hpp \
+	BonOaDecBase.cpp BonOaDecBase.hpp \
+        BonEcpCuts.cpp BonEcpCuts.hpp \
+        BonFpForMinlp.cpp BonFpForMinlp.hpp \
+	BonOAMessages.cpp BonOAMessages.hpp
+
+# This is for libtool
+libbonoagenerators_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	$(BONMINLIB_CFLAGS)
+
+# BonOaDecBase.cpp needs to include cplex.h
+if COIN_HAS_CPX
+  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)`
+endif
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+        BonDummyHeuristic.hpp \
+	BonOaNlpOptim.hpp \
+	BonOACutGenerator2.hpp \
+        BonOaFeasChecker.hpp \
+	BonOaDecBase.hpp \
+        BonEcpCuts.hpp \
+	BonOAMessages.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonDummyHeuristic.cppbak BonDummyHeuristic.hppbak \
+	BonOaNlpOptim.cppbak BonOaNlpOptim.hppbak \
+	BonOACutGenerator2.cppbak BonOACutGenerator2.hppbak \
+        BonOaFeasChecker.cppbak BonOaFeasChecker.hppbak \
+	BonOaDecBase.cppbak BonOaDecBase.hppbak \
+        BonEcpCuts.cppbak BonEcpCuts.hppbak \
+	BonOAMessages.cppbak BonOAMessages.hppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Algorithms/OaGenerators/Makefile.in b/src/Algorithms/OaGenerators/Makefile.in
new file mode 100644
index 0000000..f57541e
--- /dev/null
+++ b/src/Algorithms/OaGenerators/Makefile.in
@@ -0,0 +1,665 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+
+# BonOaDecBase.cpp needs to include cplex.h
+ at COIN_HAS_CPX_TRUE@am__append_1 = -I`$(CYGPATH_W) $(CPXINCDIR)`
+subdir = src/Algorithms/OaGenerators
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libbonoagenerators_la_LIBADD =
+am_libbonoagenerators_la_OBJECTS = BonDummyHeuristic.lo \
+	BonOaNlpOptim.lo BonOACutGenerator2.lo BonOaFeasChecker.lo \
+	BonOaDecBase.lo BonEcpCuts.lo BonFpForMinlp.lo \
+	BonOAMessages.lo
+libbonoagenerators_la_OBJECTS = $(am_libbonoagenerators_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonoagenerators_la_SOURCES)
+DIST_SOURCES = $(libbonoagenerators_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                            liboainterface                            #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonoagenerators.la
+
+# List all source files, including headers
+libbonoagenerators_la_SOURCES = \
+	BonDummyHeuristic.cpp BonDummyHeuristic.hpp \
+	BonOaNlpOptim.cpp BonOaNlpOptim.hpp \
+	BonOACutGenerator2.cpp BonOACutGenerator2.hpp \
+        BonOaFeasChecker.cpp BonOaFeasChecker.hpp \
+	BonOaDecBase.cpp BonOaDecBase.hpp \
+        BonEcpCuts.cpp BonEcpCuts.hpp \
+        BonFpForMinlp.cpp BonFpForMinlp.hpp \
+	BonOAMessages.cpp BonOAMessages.hpp
+
+
+# This is for libtool
+libbonoagenerators_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin` -I`$(CYGPATH_W) \
+	$(srcdir)/..` $(BONMINLIB_CFLAGS) $(am__append_1)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+        BonDummyHeuristic.hpp \
+	BonOaNlpOptim.hpp \
+	BonOACutGenerator2.hpp \
+        BonOaFeasChecker.hpp \
+	BonOaDecBase.hpp \
+        BonEcpCuts.hpp \
+	BonOAMessages.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonDummyHeuristic.cppbak BonDummyHeuristic.hppbak \
+	BonOaNlpOptim.cppbak BonOaNlpOptim.hppbak \
+	BonOACutGenerator2.cppbak BonOACutGenerator2.hppbak \
+        BonOaFeasChecker.cppbak BonOaFeasChecker.hppbak \
+	BonOaDecBase.cppbak BonOaDecBase.hppbak \
+        BonEcpCuts.cppbak BonEcpCuts.hppbak \
+	BonOAMessages.cppbak BonOAMessages.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Algorithms/OaGenerators/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Algorithms/OaGenerators/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonoagenerators.la: $(libbonoagenerators_la_OBJECTS) $(libbonoagenerators_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonoagenerators_la_LDFLAGS) $(libbonoagenerators_la_OBJECTS) $(libbonoagenerators_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonDummyHeuristic.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonEcpCuts.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonFpForMinlp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOACutGenerator2.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOAMessages.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOaDecBase.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOaFeasChecker.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOaNlpOptim.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Algorithms/QuadCuts/BonArraysHelpers.hpp b/src/Algorithms/QuadCuts/BonArraysHelpers.hpp
new file mode 100644
index 0000000..0efef25
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonArraysHelpers.hpp
@@ -0,0 +1,52 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#include "CoinHelperFunctions.hpp"
+#ifndef BonArraysHelpers_H
+#define BonArraysHelpers_H
+
+namespace Bonmin {
+template <class X> void
+resizeAndCopyArray(X *& array, unsigned int oldSize, unsigned int newSize){
+ if(newSize == 0){
+   if(oldSize > 0){
+     delete [] array;
+     array = NULL;
+   }
+   return;
+ }
+ X * buffy = new X[newSize];
+ if(oldSize > 0){
+   if(oldSize < newSize)
+     CoinCopyN(array, oldSize, buffy);
+   else
+     CoinCopyN(array, newSize, buffy);
+   delete [] array;
+ }
+ array = buffy;
+}
+
+template <class X> void
+resizeAndCopyArray(X *& array, unsigned int oldSize, unsigned int newSize,
+                   unsigned int& capacity){
+ if(newSize > capacity){
+   X * buffy = new X[newSize];
+   if(oldSize > 0){
+     CoinCopyN(array, oldSize, buffy);
+     delete [] array;
+    }
+   array = buffy;
+  }
+  else {
+    newSize = oldSize;
+  }
+}
+}// Ends Bonmin namespace
+#endif
+
diff --git a/src/Algorithms/QuadCuts/BonLinearCutsGenerator.cpp b/src/Algorithms/QuadCuts/BonLinearCutsGenerator.cpp
new file mode 100644
index 0000000..407c5aa
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonLinearCutsGenerator.cpp
@@ -0,0 +1,154 @@
+
+#include "BonLinearCutsGenerator.hpp"
+#include "BonTMINLP2Quad.hpp"
+#include "OsiClpSolverInterface.hpp"
+
+//MILP cuts
+#include "CglGomory.hpp"
+#include "CglProbing.hpp"
+#include "CglKnapsackCover.hpp"
+#include "CglOddHole.hpp"
+#include "CglClique.hpp"
+#include "CglFlowCover.hpp"
+#include "CglMixedIntegerRounding2.hpp"
+#include "CglTwomir.hpp"
+#include "CglPreProcess.hpp"
+#include "CglLandP.hpp"
+#include "CglRedSplit.hpp"
+
+namespace Bonmin {
+
+  void LinearCutsGenerator::initialize(BabSetupBase & s){
+    assert(dynamic_cast<TMINLP2TNLPQuadCuts *> (s.nonlinearSolver()->problem()));
+    int freq;
+    s.options()->GetIntegerValue("Gomory_cuts", freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglGomory * gom = new CglGomory;
+      cg->cgl = gom;
+      gom->setLimitAtRoot(512);
+      gom->setLimit(50);
+      cg->id = "Mixed Integer Gomory";
+      methods_.push_back(cg);
+    }
+
+    s.options()->GetIntegerValue("mir_cuts",freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglMixedIntegerRounding2 * mir = new CglMixedIntegerRounding2;
+      cg->cgl = mir;
+      cg->id = "Mixed Integer Rounding";
+      methods_.push_back(cg);
+
+
+    }
+    s.options()->GetIntegerValue("2mir_cuts",freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglTwomir * mir2 = new CglTwomir;
+      cg->cgl = mir2;
+      cg->id = "2-MIR";
+      methods_.push_back(cg);
+    }
+    s.options()->GetIntegerValue("cover_cuts",freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglKnapsackCover * cover = new CglKnapsackCover;
+      cg->cgl = cover;
+      cg->id = "Cover";
+      methods_.push_back(cg);
+    }
+
+    s.options()->GetIntegerValue("clique_cuts",freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglClique * clique = new CglClique;
+      clique->setStarCliqueReport(false);
+      clique->setRowCliqueReport(false);
+      clique->setMinViolation(0.1);
+
+      cg->cgl = clique;
+      cg->id = "Clique";
+      methods_.push_back(cg);
+    }
+    s.options()->GetIntegerValue("flow_cover_cuts",freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglFlowCover * flow = new CglFlowCover;
+      cg->cgl = flow;
+      cg->id = "Flow Covers";
+      methods_.push_back(cg);
+    }
+    s.options()->GetIntegerValue("lift_and_project_cuts",freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglLandP * landp = new CglLandP;
+      cg->cgl = landp;
+      cg->id = "Lift-and-Project";
+      methods_.push_back(cg);
+    }
+    s.options()->GetIntegerValue("reduce_and_split_cuts",freq,"bonmin.");
+    if (freq) {
+      Coin::SmartPtr<CuttingMethod> cg = new CuttingMethod;
+      cg->frequency = freq;
+      CglRedSplit * rands = new CglRedSplit;
+      cg->cgl = rands;
+      cg->id = "Reduce-and-Split";
+      methods_.push_back(cg);
+    }
+  }
+
+  void 
+  LinearCutsGenerator::generateCuts(const OsiSolverInterface &solver, OsiCuts &cs,
+                     const CglTreeInfo info) {
+
+    //const OsiTMINLPInterface * tmp = dynamic_cast<const OsiTMINLPInterface *>(&solver);
+    OsiTMINLPInterface * nlp = dynamic_cast<OsiTMINLPInterface *>(solver.clone());//const_cast<OsiTMINLPInterface *>(tmp);
+    assert(nlp);
+    OuterApprox oa;
+    //si.writeMps("toto");
+    int numberRows = nlp->getNumRows();
+    for(int i = 0 ; i < 5 ; i++){
+      nlp->resolve();
+      OsiClpSolverInterface si;
+      oa(*nlp, &si, solver.getColSolution(), true); 
+      si.resolve();
+      OsiCuts cuts;
+      for(std::list<Coin::SmartPtr<CuttingMethod> >::const_iterator i = methods_.begin() ;
+          i != methods_.end() ; i++){
+         (*i)->cgl->generateCuts(si, cuts, info);
+      }
+      std::vector<OsiRowCut *> mycuts(cuts.sizeRowCuts());
+      for(int i = 0 ; i < cuts.sizeRowCuts() ; i++){
+        mycuts[i] = cuts.rowCutPtr(i);
+        cs.insert(*mycuts[i]);
+      }
+      nlp->applyRowCuts((int)mycuts.size(), const_cast<const OsiRowCut **> (&mycuts[0]));
+    }
+
+    // Take off slack cuts
+    std::vector<int> kept;
+    int numberRowsNow = nlp->getNumRows();
+    int * del = new int [numberRowsNow-numberRows];
+    nlp->resolve();
+    
+    const double * activity = nlp->getRowActivity();
+    const double * lb = nlp->getRowLower();
+    const double * ub = nlp->getRowUpper();
+    CoinRelFltEq eq(1e-06);
+    //int nDelete=0;
+    for (int i=numberRowsNow -1;i>=numberRows;i--) {
+      if ( !(eq(activity[i], lb[i]) || eq(activity[i], ub[i])) )
+        cs.eraseRowCut(i - numberRows);
+    }
+    delete [] del;
+    delete nlp;
+  }
+}/* Ends Bonmin namespace.*/
diff --git a/src/Algorithms/QuadCuts/BonLinearCutsGenerator.hpp b/src/Algorithms/QuadCuts/BonLinearCutsGenerator.hpp
new file mode 100644
index 0000000..2f9c686
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonLinearCutsGenerator.hpp
@@ -0,0 +1,75 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#ifndef BonLinearCutsGenerator_H
+#define BonLinearCutsGenerator_H
+
+#include "CglCutGenerator.hpp"
+#include "CoinSmartPtr.hpp"
+#include "BonOuterApprox.hpp"
+#include "BonBonminSetup.hpp"
+#include <list>
+
+namespace Bonmin {
+class LinearCutsGenerator : public CglCutGenerator {
+   public:
+    /** Type for cut generation method with its frequency and string identification. */
+    struct CuttingMethod : public Coin::ReferencedObject 
+    {
+      int frequency;
+      std::string id;
+      CglCutGenerator * cgl;
+      bool atSolution;
+      bool normal;
+      CuttingMethod():
+          atSolution(false),
+          normal(true)
+      {}
+
+      CuttingMethod(const CuttingMethod & other):
+          frequency(other.frequency),
+          id(other.id),
+          cgl(other.cgl),
+          atSolution(other.atSolution),
+          normal(other.normal)
+      {}
+    };
+   LinearCutsGenerator():
+     CglCutGenerator(),
+     methods_(){
+   }
+
+
+   LinearCutsGenerator(const LinearCutsGenerator & other):
+    CglCutGenerator(other),
+     methods_(other.methods_){
+   }
+
+   CglCutGenerator * clone() const {
+     return new LinearCutsGenerator(*this);
+   }
+
+   virtual ~LinearCutsGenerator(){
+   }
+
+   bool needsOptimalBasis() { return false;}
+
+   void initialize(BabSetupBase& s);
+
+   void generateCuts(const OsiSolverInterface &solver, OsiCuts &cs,
+		     const CglTreeInfo info = CglTreeInfo());
+
+   private:
+     std::list<Coin::SmartPtr<CuttingMethod> > methods_; 
+};
+
+}/* Ends Bonmin namespace.*/
+
+#endif
+
diff --git a/src/Algorithms/QuadCuts/BonOuterApprox.cpp b/src/Algorithms/QuadCuts/BonOuterApprox.cpp
new file mode 100644
index 0000000..f5cd454
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonOuterApprox.cpp
@@ -0,0 +1,177 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/16/2007
+#include "BonOuterApprox.hpp"
+#include "BonBabSetupBase.hpp"
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonTypes.hpp"
+#include <vector>
+#include <sstream>
+namespace Bonmin {
+
+int OuterApprox::nTimesCalled = 0;
+
+void 
+OuterApprox::initialize(Bonmin::BabSetupBase & b){
+   b.options()->GetNumericValue("tiny_element", tiny_, "bonmin.");
+   b.options()->GetNumericValue("very_tiny_element", veryTiny_, "bonmin.");
+}
+void
+OuterApprox::extractLinearRelaxation(Bonmin::OsiTMINLPInterface &minlp,
+                        OsiSolverInterface *si, 
+                        const double * x, bool getObj)
+  {
+  
+    int n;
+    int m;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+
+    Bonmin::TMINLP2TNLP * model = minlp.problem();
+    
+    //Get problem information
+    model->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+  
+    vector<int> iRow(nnz_jac_g);
+    vector<int> jCol(nnz_jac_g);
+    vector<double> vals(nnz_jac_g);
+  
+    //get Jacobian
+    model->eval_jac_g(n, x, 1, m, nnz_jac_g, &iRow[0], &jCol[0], NULL);
+    model->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL, &vals[0]);
+ 
+    //Put jacobian arrays in c style 
+    if(index_style == Ipopt::TNLP::FORTRAN_STYLE){
+      for(int k = 0 ; k < nnz_jac_g ; k++){
+       iRow[k]--;
+       jCol[k]--;
+      }
+    }
+    vector<double> g(m);
+    model->eval_g(n, x, 1, m, &g[0]);
+  
+    vector<double> rowLow(m);
+    vector<double> rowUp(m);
+    vector<double> colUp(n);
+    vector<double> colLow(n);
+
+    model->get_bounds_info(n, &colLow[0], &colUp[0], m, &rowLow[0], &rowUp[0]);
+
+    double infty = si->getInfinity();
+    double nlp_infty = infty;
+    
+   vector<Ipopt::TNLP::LinearityType> const_types(m); 
+   model->get_constraints_linearity(m, &const_types[0]);
+    for(int i = 0 ; i < m ; i++) {
+       if(rowLow[i] > - nlp_infty){
+         rowLow[i] = (rowLow[i] - g[i]);
+         if(1 || const_types[i] != Ipopt::TNLP::LINEAR) rowLow[i] -= 1e-07;
+       }
+        if(rowUp[i] < nlp_infty){
+          rowUp[i] =  (rowUp[i] - g[i]);
+         if(1 || const_types[i] != Ipopt::TNLP::LINEAR) rowUp[i] += 1e-07;
+        }
+    }
+    
+    //Then convert everything to a CoinPackedMatrix
+    //Go through values, clean coefficients and fix bounds
+    for(int i = 0 ; i < nnz_jac_g ; i++) {
+      if(const_types[iRow[i]] != Ipopt::TNLP::LINEAR || //For linear just copy is fine.
+         cleanNnz(vals[i],colLow[jCol[i]], colUp[jCol[i]],
+                  rowLow[iRow[i]], rowUp[iRow[i]],
+                  x[jCol[i]],
+                  rowLow[iRow[i]],
+                  rowUp[iRow[i]], tiny_, veryTiny_)) {      
+            rowLow[iRow[i]] += vals[i] * x[jCol[i]];
+            rowUp[iRow[i]] += vals[i] *x[jCol[i]];
+         }
+    }
+    CoinPackedMatrix mat(true, &iRow[0], &jCol[0], &vals[0], nnz_jac_g);
+    mat.setDimensions(m,n); // In case matrix was empty, this should be enough
+    
+    vector<double> obj(n,0.);
+    
+    si->loadProblem(mat, &colLow[0], &colUp[0], &obj[0], &rowLow[0], &rowUp[0]);
+
+    for(int i = 0 ; i < n ; i++) {
+      if(minlp.isInteger(i))
+        si->setInteger(i);
+    }
+    if(getObj) {
+       if(model->hasLinearObjective()){
+         std::cout<<"Linear stuff"<<std::endl;
+         double zero;
+         model->eval_f(n, &obj[0], 1, zero);
+         si->setDblParam(OsiObjOffset, -zero);
+         //if(fabs(zero - 0) > 1e-10)
+           //addObjVar = true;
+         //else { 
+           //Copy the linear objective and don't create a dummy variable.
+           model->eval_grad_f(n, x, 1,&obj[0]);
+           si->setObjective(&obj[0]);
+         //}
+      }
+     else {
+        //add variable alpha
+        //(alpha should be empty in the matrix with a coefficient of -1 and unbounded)
+        CoinPackedVector a;
+        si->addCol(a,-si->getInfinity(), si->getInfinity(), 1.);
+    
+        // Now get the objective cuts
+        // get the gradient, pack it and add the cut
+        model->eval_grad_f(n, x, 1,&obj[0]);
+        double ub;
+        model->eval_f(n, x, 1, ub);
+        ub*=-1;
+        double lb = -1e300;
+        CoinPackedVector objCut;
+        CoinPackedVector * v = &objCut;
+        v->reserve(n);
+        for(int i = 0; i<n ; i++) {
+         if(nnz_jac_g)
+         {
+          if(cleanNnz(obj[i],colLow[i], colUp[i],
+              -si->getInfinity(), 0,
+              x[i],
+              lb,
+              ub, tiny_, veryTiny_)) {
+            v->insert(i,obj[i]);
+            lb += obj[i] * x[i];
+            ub += obj[i] * x[i];
+          }
+         }
+         else //Unconstrained problem can not put clean coefficient
+         {
+             if(cleanNnz(obj[i],colLow[i], colUp[i],
+              -si->getInfinity(), 0,
+              x[i],
+              lb,
+              ub, 1e-03, 1e-08)) {
+            v->insert(i,obj[i]);
+            lb += obj[i] * x[i];
+            ub += obj[i] * x[i];
+             }
+         }
+        }
+      v->insert(n,-1);
+      si->addRow(objCut, lb, ub);
+      }
+    }
+
+#if 0
+    std::ostringstream os;
+    os<<"OA_"<<nTimesCalled;
+    nTimesCalled++;
+    std::string f_name = os.str();
+    si->writeMps(f_name.c_str());
+#endif
+  }
+  
+}
+
diff --git a/src/Algorithms/QuadCuts/BonOuterApprox.hpp b/src/Algorithms/QuadCuts/BonOuterApprox.hpp
new file mode 100644
index 0000000..6c0e36b
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonOuterApprox.hpp
@@ -0,0 +1,123 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/16/2007
+#ifndef BonminOuterApprox_H
+#define BonminOuterApprox_H
+
+#include <cmath>
+
+namespace Bonmin{
+   class OsiTMINLPInterface;
+   class BabSetupBase;
+}
+class OsiSolverInterface;
+namespace Bonmin {
+  /** A class to build outer approximations.*/
+  class OuterApprox{
+
+  public:
+
+   /** Default constructor.*/
+   OuterApprox():
+    tiny_(-0.),
+    veryTiny_(-0.)
+   {}
+
+   /** Copy constructor.*/
+   OuterApprox(const OuterApprox & other):
+    tiny_(other.tiny_),
+    veryTiny_(other.veryTiny_){
+    }
+
+
+   /** Assignment operator.*/
+   OuterApprox & operator=(const OuterApprox& rhs){
+    if(this != & rhs){
+      tiny_ = rhs.tiny_;
+      veryTiny_ = rhs.veryTiny_;}
+    return (*this);
+   }
+
+   /** Destructor.*/
+   ~OuterApprox(){}
+
+   /** Initialize using options.*/
+   void initialize(Bonmin::BabSetupBase &b);
+
+   /** Build the Outer approximation in minlp and put it in si.*/
+   void extractLinearRelaxation(Bonmin::OsiTMINLPInterface &minlp,
+                                OsiSolverInterface *si, 
+                                const double * x, bool getObj);
+   /** Operator() calls extractLinearRelaxation*/
+   void operator()(Bonmin::OsiTMINLPInterface &minlp,
+                   OsiSolverInterface *si,
+                   const double * x, bool getObj){
+       extractLinearRelaxation(minlp, si, x, getObj);}
+
+   private:
+   /** Facilitator to clean up coefficient.*/
+  inline bool cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny);
+   /** If constraint coefficient is below this, we try to remove it.*/
+   double tiny_;
+   /** If constraint coefficient is below this, we neglect it.*/
+   double veryTiny_;
+   /** Count the number of linear outer approximations taken.*/
+   static int nTimesCalled;
+  };
+
+//A procedure to try to remove small coefficients in OA cuts (or make it non small
+inline
+bool 
+OuterApprox::cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny)
+{
+  if(fabs(value)>= tiny) return 1;
+
+  if(fabs(value)<veryTiny) return 0;//Take the risk?
+
+  //try and remove
+  double infty = 1e20;
+  bool colUpBounded = colUpper < 10000;
+  bool colLoBounded = colLower > -10000;
+  bool rowNotLoBounded =  rowLower <= - infty;
+  bool rowNotUpBounded = rowUpper >= infty;
+  bool pos =  value > 0;
+
+  if(colLoBounded && pos && rowNotUpBounded) {
+    lb += value * (colsol - colLower);
+    return 0;
+  }
+  else
+    if(colLoBounded && !pos && rowNotLoBounded) {
+      ub += value * (colsol - colLower);
+      return 0;
+    }
+    else
+      if(colUpBounded && !pos && rowNotUpBounded) {
+        lb += value * (colsol - colUpper);
+        return 0;
+      }
+      else
+        if(colUpBounded && pos && rowNotLoBounded) {
+          ub += value * (colsol - colUpper);
+          return 0;
+        }
+  //can not remove coefficient increase it to smallest non zero
+  if(pos) value = tiny;
+  else
+    value = - tiny;
+  return 1;
+}
+
+}
+
+#endif
+
diff --git a/src/Algorithms/QuadCuts/BonQuadCut.cpp b/src/Algorithms/QuadCuts/BonQuadCut.cpp
new file mode 100644
index 0000000..361dadc
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonQuadCut.cpp
@@ -0,0 +1,150 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#include "BonQuadCut.hpp"
+
+namespace Bonmin {
+
+  QuadCut::QuadCut():
+    OsiRowCut(),
+    c_(0),
+    Q_(),
+    type_(Upper)
+    {}
+
+  QuadCut::QuadCut(const QuadCut & other):
+    OsiRowCut(other),
+    c_(other.c_),
+    Q_(other.Q_),
+    type_(other.type_){
+    }
+
+  QuadCut &
+  QuadCut::operator=(const QuadCut & rhs){
+    if(this != &rhs){
+       OsiRowCut::operator=(rhs);
+       c_ = rhs.c_;
+       Q_ = rhs.Q_;
+       type_ = rhs.type_;
+    }
+   return *this;
+  }
+
+  OsiRowCut *
+  QuadCut::clone() const {
+    return new QuadCut(*this);
+   }
+
+  QuadCut::~QuadCut(){
+  }
+
+  /// Compute cut violation
+  double 
+  QuadCut::violated(const double * solution) const{
+    double rhs = c_;
+    rhs += row().dotProduct(solution);
+    const int * indice = Q_.getIndices();
+    const double * val = Q_.getElements();
+    const int * start = Q_.getVectorStarts();
+    const int * length = Q_.getVectorLengths();
+    int n = Q_.getMajorDim();
+
+    for(int i = 0 ; i < n ; i++){
+    	int s=start[i];
+	int l=length[i];
+      for(int k = s ; k < s+l ; k++){
+        if(i == indice[k]) rhs += solution[i] * solution[indice[k]] * val[k];
+        else rhs += 2*solution[i] * solution[indice[k]] * val[k];
+      }
+    }
+
+#if 0
+    for(int i = 0 ; i < n ; i++){
+      for(int k = 0 ; k < length[i] ; k++){
+        if(i == indice[k]) rhs += solution[i] * solution[indice[k]] * val[k];
+        else rhs += 2*solution[i] * solution[indice[k]] * val[k];
+      }
+      start += length[i];
+    }
+#endif
+    return std::max(lb() - rhs, rhs - ub());
+  }
+    
+
+
+  void
+  QuadCut::print() const{
+    std::cout<<"Quadratic cut has lower bound "<<lb()<<" and upper bound "<<ub()
+             <<std::endl;
+    
+    std::cout<<"Linear part has "<<row().getNumElements()<<" non zeroes:"
+             <<std::endl;  
+
+    const int& nElem = row().getNumElements();
+    const int * indices = row().getIndices();
+    const double * elements = row().getElements();
+
+    for(int i = 0 ; i < nElem ; i++){
+      if(i > 0 && elements[i] > 0.)
+         std::cout<<"+ ";
+        std::cout<< elements[i] <<" x["<<indices[i]<<"]\t";
+       if(i > 0 && i % 5 == 0) std::cout<<std::endl;
+    }
+    std::cout<<std::endl;
+    if(Q_.getNumElements()){
+      std::cout<<"Quadratic part is given by the matrix:"<<std::endl;
+      Q_.dumpMatrix();
+    }
+   }
+  Cuts::Cuts():
+    OsiCuts(),
+    quadCuts_(0){
+   } 
+
+  Cuts::Cuts(const Cuts & other):
+    OsiCuts(other),
+    quadCuts_(other.quadCuts_.size()){
+    for(unsigned int i = 0 ; i < quadCuts_.size() ; i++){
+      quadCuts_[i] = new QuadCut(*other.quadCuts_[i]);
+    }
+  }
+
+  Cuts &
+  Cuts::operator=(const Cuts & rhs){
+    if(this != &rhs){
+      OsiCuts::operator=(rhs);
+      for(unsigned int i = 0 ; i < quadCuts_.size() ; i++)
+      {
+         delete quadCuts_[i];
+      }
+      quadCuts_.resize(rhs.quadCuts_.size());
+      for(unsigned int i = 0 ; i < quadCuts_.size() ; i++){
+        quadCuts_[i] = new QuadCut(*rhs.quadCuts_[i]);
+      }
+    }
+    return *this;
+  }
+
+  Cuts::~Cuts(){
+          for(unsigned int i = 0 ; i < quadCuts_.size() ; i++)
+      {
+         delete quadCuts_[i];
+      }
+   }
+      
+void
+Cuts::printCuts() const {
+  OsiCuts::printCuts();
+  std::cout<<quadCuts_.size()<<" quadratic cuts."<<std::endl;
+  for(unsigned int i = 0 ; i < quadCuts_.size() ; i++){
+    quadCuts_[i]->print();
+  }
+}
+
+} /* Ends Bonmin namespace.*/
diff --git a/src/Algorithms/QuadCuts/BonQuadCut.hpp b/src/Algorithms/QuadCuts/BonQuadCut.hpp
new file mode 100644
index 0000000..8e56e8a
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonQuadCut.hpp
@@ -0,0 +1,217 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#ifndef BonQuadCut_H
+#define BonQuadCut_H
+
+#include "CoinPackedMatrix.hpp"
+#include "OsiRowCut.hpp"
+#include "OsiCuts.hpp"
+#include "BonTypes.hpp"
+#include <list>
+
+
+namespace Bonmin {
+
+  enum MatrixStorageType {
+   Upper /** Stores only the upper triangle of a symetric Q.*/,
+   Lower /** Stores the lower triangle of a symetric Q.*/,
+   Full /** Stores the whole matrix of a non-symetric Q.*/};
+
+class QuadCut : public OsiRowCut {
+ public:
+
+  /// Default constructor
+  QuadCut();
+
+  /// Copy constructor
+  QuadCut(const QuadCut & other);
+
+  /// Assignment operator
+  QuadCut& operator=(const QuadCut & rhs);
+
+  /// Virtual copy
+  virtual OsiRowCut * clone() const;
+
+  /// Destructor
+  ~QuadCut(); 
+
+  /// Print
+  void print() const; 
+
+  ///Return the matrix stored
+  CoinPackedMatrix& Q(){
+   return Q_;
+  }
+
+  ///Return the matrix stored
+  const CoinPackedMatrix& Q() const{
+   return Q_;
+  }
+
+  /// Acces storage type
+  /// Acces storage type
+  MatrixStorageType& type(){
+    return type_;}
+
+  const MatrixStorageType& type() const{
+    return type_;}
+
+  /// Acces the constant
+  double & c(){return c_;}
+
+  /// Acces the constant
+  const double & c() const {return c_;}
+
+  /// Compute cut violation
+  double violated(const double * solution) const;
+
+ private:
+   /// Stores the constant part of the cut
+   double c_;
+   ///Stores quadratic part of cut
+   CoinPackedMatrix Q_;
+   ///Storage type
+   MatrixStorageType type_;
+
+   /** \name Arithmetic operators not implemented.*/
+  //@{
+    /// add <code>value</code> to every vector entry
+    void operator+=(double value);
+
+    /// subtract <code>value</code> from every vector entry
+    void operator-=(double value);
+
+    /// multiply every vector entry by <code>value</code>
+    void operator*=(double value);
+
+    /// divide every vector entry by <code>value</code>
+    void operator/=(double value);
+  //@}
+
+};
+
+/** Generalizes OsiCuts to handle quadratic cuts.*/
+class Cuts : public OsiCuts {
+ public:
+  typedef vector<QuadCut *> QuadCutPtrStorage;
+  /** Default constructor.*/
+  Cuts();
+
+  /** Copy constructor.*/
+  Cuts(const Cuts& other);
+
+  /** Assignment operator.*/
+  Cuts& operator=(const Cuts & rhs);
+
+ /** Destructor */
+ ~Cuts();
+
+ /** insert a quadratic cut into the collection. */
+ inline void insert(const QuadCut& c);
+
+ /** insert a quadratic cut into the collection (take control of the pointer and
+     put a NULL on return).
+     \warning c has to have been created with new (no malloc).
+   */
+  inline void insert(QuadCut* &c);
+
+ /** insert a set of Cuts.*/
+  inline void insert(const Cuts &cs);
+
+ /** Number of quadratic cuts in the collection.*/
+  inline int sizeQuadCuts() const;
+
+ /** Total number of cuts in the collection. */
+ inline int sizeCuts() const;
+
+ /** Print all cuts in the collection.*/
+ void printCuts() const;
+
+
+ /** Access to a quadratic cut by pointer.*/
+ inline QuadCut * quadCutPtr(int i);
+
+ /** Access to a quadratic cut by const pointer.*/
+ inline const QuadCut * quadCutPtr(int i) const;
+
+ /** Access to a quadratic cut by reference.*/
+ inline QuadCut& quadCut(int i);
+
+
+ /** Access to a quadratic cut by reference.*/
+ inline const QuadCut& quadCut(int i) const;
+
+ /** Erase quadratic cut from the collection.*/
+ inline void eraseQuadCut(int i);
+
+ private:
+   QuadCutPtrStorage quadCuts_;
+};
+
+void
+Cuts::insert(const QuadCut &c){
+  quadCuts_.push_back(new QuadCut(c));
+}
+
+void
+Cuts::insert(QuadCut * &c){
+  quadCuts_.push_back(c);
+  c = NULL;
+}
+
+void 
+Cuts::insert(const Cuts & cs){
+  OsiCuts::insert(cs);
+  for(unsigned int i = 0 ; i < cs.quadCuts_.size() ; i++){
+    quadCuts_.push_back(new QuadCut(*cs.quadCuts_[i]));
+  }
+}
+
+int 
+Cuts::sizeQuadCuts() const {
+  return static_cast<int>(quadCuts_.size());
+}
+
+int
+Cuts::sizeCuts() const {
+  return static_cast<int>(quadCuts_.size()) + OsiCuts::sizeCuts();
+}
+
+QuadCut *
+Cuts::quadCutPtr(int i) {
+  return quadCuts_[i];
+}
+
+const QuadCut *
+Cuts::quadCutPtr(int i) const {
+  return quadCuts_[i];
+}
+
+QuadCut &
+Cuts::quadCut(int i) {
+  return *quadCuts_[i];
+}
+
+const QuadCut &
+Cuts::quadCut(int i) const {
+  return *quadCuts_[i];
+}
+
+void
+Cuts::eraseQuadCut(int i){
+  delete quadCuts_[i];
+  quadCuts_.erase(quadCuts_.begin() + i);
+}
+typedef std::list<QuadCut*> list_QuadCut; 
+
+}// Ends Bonmin namespace
+#endif
+
+
diff --git a/src/Algorithms/QuadCuts/BonQuadRow.cpp b/src/Algorithms/QuadCuts/BonQuadRow.cpp
new file mode 100644
index 0000000..17fafef
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonQuadRow.cpp
@@ -0,0 +1,310 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#include "BonQuadRow.hpp"
+#include <cfloat>
+//#define DEBUG
+namespace Bonmin{
+
+QuadRow::QuadRow():
+  c_(0),
+  a_(),
+  Q_(),
+  grad_evaled_(false)
+{
+}    
+
+QuadRow::QuadRow(const QuadRow &other):
+  c_(other.c_),
+  a_(other.a_),
+  Q_(other.Q_),
+  g_(),
+  a_grad_idx_(),
+  Q_row_grad_idx_(),
+  Q_col_grad_idx_(),
+  Q_hessian_idx_(),
+  grad_evaled_(false)
+{
+  initialize();
+}
+
+QuadRow & QuadRow::operator=(const QuadRow &rhs){
+  if(this != &rhs){
+    c_ = rhs.c_;
+    a_ = rhs.a_;
+    Q_ = rhs.Q_;
+    Q_hessian_idx_.clear();
+    g_.clear();
+    a_grad_idx_.clear();
+    Q_row_grad_idx_.clear();
+    Q_col_grad_idx_.clear();
+    initialize();
+    //H_Hes_idx_ = rhs.H_Hes_idx_;
+   grad_evaled_ = false;
+  }
+  return (*this);
+}
+
+QuadRow::QuadRow(const QuadCut &cut):
+  c_(0),
+  a_(cut.row()),
+  Q_(cut.Q(), cut.type())
+  {
+    initialize(); 
+  }
+
+QuadRow& 
+QuadRow::operator=(const QuadCut &cut){
+    c_ = cut.c();
+    a_ = cut.row();
+    Q_ = cut.Q();
+    Q_.make_upper_triangular(cut.type());
+    g_.clear();
+    a_grad_idx_.clear();
+    Q_row_grad_idx_.clear();
+    Q_col_grad_idx_.clear();
+    //Q_hessian_idx.empty();
+    //H_Hes_idx_.empty()
+    initialize();
+    return (*this);
+}
+
+
+QuadRow::QuadRow(const OsiRowCut &cut):
+  c_(0),
+  a_(cut.row()),
+  Q_()
+  {
+    initialize(); 
+  }
+
+QuadRow& 
+QuadRow::operator=(const OsiRowCut &cut){
+    c_ = 0;
+    a_ = cut.row();
+    Q_ = TMat();
+    g_.empty();
+    a_grad_idx_.empty();
+    Q_row_grad_idx_.clear();
+    Q_col_grad_idx_.clear();
+    //Q_hessian_idx.empty();
+    //H_Hes_idx_.empty()
+    initialize();
+    return (*this);
+}
+
+void
+QuadRow::initialize(){
+    //Check that Q_ is upper triangular
+    for(int i = 0 ; i < Q_.nnz_ ; i++){
+      assert(Q_.jCol_[i] >= Q_.iRow_[i]);}
+    grad_evaled_ = false;
+
+   int n;
+    // Construct a map to store the non-zero elements of the gradient.
+   n = a_.getNumElements();
+   a_grad_idx_.reserve(n);
+
+   // Put the linear elements
+   const int * indices = a_.getIndices();
+   const double * elems = a_.getElements();
+
+   for(int i = 0 ; i < n ; i++){
+    std::pair<gStore::iterator, bool> res = g_.insert(std::make_pair(indices[i], std::make_pair(elems[i],0.)));
+    a_grad_idx_.push_back(res.first);
+    }
+   // Put the quadratics first rows
+   n = Q_.numNonEmptyRows();
+   const TMat::RowS& nonEmptyRows = Q_.nonEmptyRows();
+   Q_row_grad_idx_.reserve(n);
+
+   for(TMat::RowS::const_iterator i = nonEmptyRows.begin() ; i != nonEmptyRows.end() ; i++){
+    std::pair<gStore::iterator, bool> res = g_.insert(std::make_pair(i->first, std::make_pair(0.,0.)));
+    Q_row_grad_idx_.push_back(res.first);
+   }
+
+   //Now columns
+   n = Q_.numNonEmptyCols();
+   const TMat::RowS& nonEmptyCols = Q_.nonEmptyCols();
+   Q_col_grad_idx_.reserve(n);
+
+   for(TMat::RowS::const_iterator i = nonEmptyCols.begin() ; i != nonEmptyCols.end() ; i++){
+    std::pair<gStore::iterator, bool> res = g_.insert(std::make_pair(i->first, std::make_pair(0.,0.)));
+    Q_col_grad_idx_.push_back(res.first);
+   }
+
+}
+
+/** Print quadratic constraint.*/
+void
+QuadRow::print(){
+  std::cout<<"constant term "<<c_<<std::endl;
+  int * a_ind = a_.getIndices();
+  const double * a_el = a_.getElements();
+  int n = a_.getNumElements();
+  std::cout<<"Linear term (size "<<n<<"): ";
+  for(int i = 0 ; i < n ; i++)
+  {
+    std::cout<<a_el[i]<<" * x["<<a_ind[i]<<"]\t";
+    if(i && ( (i % 5) == 0 ) ) std::cout<<std::endl<<"\t\t";
+  }
+}
+/** Evaluate quadratic form.*/
+double 
+QuadRow::eval_f(const double *x, bool new_x){
+  //if(new_x){
+    internal_eval_grad(x);//}
+  double value = c_;// Constant
+
+  //Linear part
+  int * a_ind = a_.getIndices();
+  const double * a_el = a_.getElements();
+  int n = a_.getNumElements();
+  for(int i = 0 ; i < n ; i++)
+  {
+    value += a_el[i] * x[a_ind[i]];
+    
+  }
+
+  //Quadratic part
+  for(gStore::iterator i = g_.begin() ; i != g_.end() ; i++){
+    value += i->second.second * x[i->first];
+  }
+  return value;
+}
+
+/** Get number of non-zeroes in the gradiant.*/
+int 
+QuadRow::nnz_grad(){
+  return static_cast<int>(g_.size());}
+/** Get structure of gradiant */
+void 
+QuadRow::gradiant_struct(const int nnz, int * indices, bool offset){
+  int n = 0;
+  for(gStore::iterator i = g_.begin() ; i != g_.end() ; i++){
+    indices[n++] = i->first + offset;
+  }
+  assert(n == nnz);
+  assert(nnz == (int) g_.size());
+}
+
+/** Evaluate gradiant of quadratic form.*/
+void 
+QuadRow::eval_grad(const int nnz, const double * x, bool new_x, double * values){
+
+#ifdef DEBUG
+   // Output relevant components of x
+   for(gStore::iterator i = g_.begin() ; i != g_.end() ; i++){
+     printf("x[%i] = %g,  ",i->first, x[i->first]);
+   }
+#endif
+  //if(new_x){
+    internal_eval_grad(x);//}
+  int n = 0;
+#ifdef DEBUG
+  std::cout<<"Computing gradient"<<std::endl;
+#endif
+  for(gStore::iterator i = g_.begin() ; i != g_.end() ; i++){
+#ifdef DEBUG
+    printf("%i: %g, %g\n", i->first, i->second.second, i->second.first);
+#endif
+    values[n++] = 2*i->second.second + i->second.first;
+  }
+  assert (nnz == (int) g_.size());
+}
+
+void
+QuadRow::internal_eval_grad(const double *x){
+   // Zero out gradiant storage
+   for(gStore::iterator i = g_.begin() ; i != g_.end() ; i++){
+     i->second.second = 0;
+   }
+
+
+   const TMat::RowS & nonEmptyRows = Q_.nonEmptyRows();
+   int k = 0;//Iterates on Q_grad_idx_;
+   for(TMat::RowS::const_iterator ii = nonEmptyRows.begin() ; ii != nonEmptyRows.end();
+       ii++, k++){
+    double value = 0;
+    assert(ii->first == Q_.iRow_[Q_.rowOrdering_[ii->second]]);
+    for(int i = ii->second ; i < Q_.nnz_ && ii->first == Q_.iRow_[Q_.rowOrdering_[i]] ; i++)
+    {
+        value += x[Q_.jCol_[Q_.rowOrdering_[i]]] * Q_.value_[Q_.rowOrdering_[i]];
+    }
+    Q_row_grad_idx_[k]->second.second += value;
+    assert(Q_row_grad_idx_[k]->first == ii->first);
+   }
+   const TMat::RowS & nonEmptyCols = Q_.nonEmptyCols();
+   k = 0;//Iterates on Q_grad_idx_;
+   for(TMat::RowS::const_iterator ii = nonEmptyCols.begin() ; ii != nonEmptyCols.end();
+       ii++, k++){
+    double value = 0;
+    assert(ii->first == Q_.jCol_[Q_.columnOrdering_[ii->second]]);
+    for(int i = ii->second ; i < Q_.nnz_ && ii->first == Q_.jCol_[Q_.columnOrdering_[i]] ; i++)
+    {
+      if(Q_.iRow_[Q_.columnOrdering_[i]] != Q_.jCol_[Q_.columnOrdering_[i]])
+        value += x[Q_.iRow_[Q_.columnOrdering_[i]]] * Q_.value_[Q_.columnOrdering_[i]];
+    }
+    Q_col_grad_idx_[k]->second.second += value;
+    assert(Q_col_grad_idx_[k]->first == ii->first);
+   }
+
+   grad_evaled_ = true;
+}
+
+void
+QuadRow::add_to_hessian(AdjustableMat &H, bool offset){
+  assert(Q_hessian_idx_.empty());
+  for(int i = 0 ; i < Q_.nnz_ ; i++){
+     std::pair<int, int> e;
+     e = std::make_pair(Q_.jCol_[i] + offset, Q_.iRow_[i] + offset);
+     AdjustableMat::iterator pos = H.find(e);
+     if(pos != H.end()){//Already exists
+       if(pos->second.second != -1)
+          pos->second.second++;
+        Q_hessian_idx_.push_back(pos); 
+     }
+     else {
+        std::pair<AdjustableMat::iterator, bool> res = 
+            H.insert(std::make_pair(e, std::make_pair(H.size(), 1)));
+        assert(res.second == true);
+        Q_hessian_idx_.push_back(res.first);
+     }
+  } 
+}
+
+void
+QuadRow::remove_from_hessian(AdjustableMat &H){
+  for(int i = 0 ; i < Q_.nnz_ ; i++){
+     if(Q_hessian_idx_[i]->second.second != -1)
+        Q_hessian_idx_[i]->second.second--;
+     if(Q_hessian_idx_[i]->second.second == 0){
+        H.erase(Q_hessian_idx_[i]);
+     }
+  }
+  Q_hessian_idx_.clear();
+}
+
+/** Return hessian values (i.e. Q_) in values.*/
+ void 
+ QuadRow::eval_hessian(double lambda, double * values){
+  for(int i = 0 ; i < Q_.nnz_ ; i++){
+#ifdef DEBUG
+     printf("iRow %i, jCol %i, value %g , nnz %i\n",
+            Q_hessian_idx_[i]->first.second,
+            Q_hessian_idx_[i]->first.first,
+            Q_.value_[i],
+            Q_hessian_idx_[i]->second.first);
+#endif
+     values[Q_hessian_idx_[i]->second.first] += (lambda * 2 * Q_.value_[i]);
+  }
+}
+
+}// Ends Bonmin namespace
+
diff --git a/src/Algorithms/QuadCuts/BonQuadRow.hpp b/src/Algorithms/QuadCuts/BonQuadRow.hpp
new file mode 100644
index 0000000..4e45448
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonQuadRow.hpp
@@ -0,0 +1,122 @@
+/// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#ifndef BonQuadRow_H
+#define BonQuadRow_H
+
+#include "CoinPackedVector.hpp"
+#include "BonTMatrix.hpp"
+#include "BonQuadCut.hpp"
+
+namespace Bonmin{
+
+  /** Store column and row of the entry.*/
+  typedef std::pair<int, int> matEntry;
+  /** Store the number of times entry is used and its index in the matrix.*/
+  typedef std::pair<int, int> matIdx;
+#if HAS_HASH_MAP
+  typedef std::has_map<matEntry, matIdx, std::hash< matEntry> > AdjustableMat;
+#else
+  typedef std::map<matEntry, matIdx> AdjustableMat;
+#endif
+
+/** Stores a quadratic row of the form l < c + ax + x^T Q x < u. 
+    Does computation usefull for nlp-solver.
+    It can only be initialized from a QuadCut.*/
+class QuadRow {
+ public:
+ /** Default constructor.*/
+ QuadRow();
+
+ /** Copy constructor.*/
+ QuadRow(const QuadRow & other);
+
+ /** Assignment operator.*/
+ QuadRow& operator=(const QuadRow& rhs);
+
+ /** Constructor from a quadratic cut.*/
+ QuadRow(const QuadCut &cut);
+
+ /** Assignment form a quadrattic &cut.*/
+ QuadRow& operator=(const QuadCut & rhs);
+
+ /** Constructor from a linear cut.*/
+ QuadRow(const OsiRowCut &cut);
+
+ /** Assignment form a linear &cut.*/
+ QuadRow& operator=(const OsiRowCut & rhs);
+
+ /** Evaluate quadratic form.*/
+ double eval_f(const double *x, bool new_x);
+
+ /** Get number of non-zeroes in the gradiant.*/
+ int nnz_grad();
+ /** Get structure of gradiant */
+  void gradiant_struct(const int nnz, int * indices, bool offset);
+ /** Evaluate gradiant of quadratic form.*/
+ void eval_grad(const int nnz, const double * x, bool new_x, double * values);
+
+ /** number of non-zeroes in hessian. */
+ int nnz_hessian(){
+   return Q_.nnz_;}
+
+ /** Says if the constraint is linear.*/
+ bool isLinear(){
+   return Q_.nnz_ == 0;}
+
+ /** Return hessian value (i.e. Q_).*/
+ void eval_hessian(double lambda, double * values);
+
+ /** Add row to a bigger hessian.*/
+  void add_to_hessian(AdjustableMat &H, bool offset); 
+
+ /** Remove row from a bigger hessian.*/ 
+  void remove_from_hessian(AdjustableMat &H);
+/** Print quadratic constraint.*/
+void print();
+
+ private:
+ /** Initialize once quadratic form is know.*/
+ void initialize();
+
+ /** Does internal work to evaluate gradiant of this in x.*/
+ void internal_eval_grad(const double *x);
+
+ /** lower bound.*/
+ double lb_;
+ /** upper bound.*/
+ double ub_;
+ /** Constant term.*/
+ double c_;
+ /** linear term in sparse storage.*/
+ CoinPackedVector a_;
+ /** Quadratic term.*/
+ TMat Q_;
+
+
+#if HAS_HASH_MAP
+  typedef  std::has_map<int, std::pair<double, double >, std::hash<int> > gStore;
+#else
+  typedef std::map<int, std::pair<double, double> > gStore;
+#endif
+
+ gStore g_;
+ /** To have fast access to gradiant entries for a_.*/
+ std::vector<gStore::iterator> a_grad_idx_;
+ /** To have fast access to gradient entries for rows Q_*/
+ std::vector<gStore::iterator> Q_row_grad_idx_;
+ /** To have fast access to gradient entries for cols Q_*/
+ std::vector<gStore::iterator> Q_col_grad_idx_;
+ /** To have fast access to entries in full hessian of Q_*/
+ std::vector<AdjustableMat::iterator> Q_hessian_idx_;
+ /** Flag indicating if gradiant has been evaluated.*/
+ bool grad_evaled_;
+};
+}//End Bonmin namespace
+#endif
diff --git a/src/Algorithms/QuadCuts/BonTMINLP2Quad.cpp b/src/Algorithms/QuadCuts/BonTMINLP2Quad.cpp
new file mode 100644
index 0000000..2a3e38d
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonTMINLP2Quad.cpp
@@ -0,0 +1,504 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#include "BonTMINLP2Quad.hpp"
+#include <climits>
+
+using namespace Ipopt;
+
+//#define DEBUG
+namespace Bonmin {
+
+    TMINLP2TNLPQuadCuts::TMINLP2TNLPQuadCuts(const SmartPtr<Bonmin::TMINLP> tminlp):
+      TMINLP2TNLP(tminlp)
+     {
+       // Fill the locally stored hessian matrix
+       
+       // Get the number of nonzoeroes in the matrix
+       const int nnz_h = TMINLP2TNLP::nnz_h_lag();
+       curr_nnz_jac_ = TMINLP2TNLP::nnz_jac_g();
+       if(nnz_h > 0){
+         int * jCol = new int [nnz_h];
+         int * iRow = new int [nnz_h];
+         
+         TMINLP2TNLP::eval_h(num_variables(), NULL, false, 
+                             0., TMINLP2TNLP::num_constraints(), NULL, false, 
+                             nnz_h, jCol, iRow, NULL);
+  
+         for(int i = 0 ; i < nnz_h ; i++){
+#ifndef NDEBUG
+           bool inserted = 
+#endif
+                    H_.insert(std::make_pair( std::make_pair(jCol[i], iRow[i]), 
+                              std::make_pair(i, -1))).second;
+           assert(inserted == true);
+         }
+         delete [] jCol;
+         delete [] iRow;
+       }
+       assert(nnz_h == (int) H_.size());
+       obj_.reserve(TMINLP2TNLP::num_variables());
+     }
+
+
+    /** Copy Constructor 
+      * \warning source and copy point to the same tminlp_.
+      */
+    TMINLP2TNLPQuadCuts::TMINLP2TNLPQuadCuts(const TMINLP2TNLPQuadCuts &other):
+      TMINLP2TNLP(other),
+      quadRows_(other.quadRows_),
+      H_(),
+      curr_nnz_jac_(other.curr_nnz_jac_),
+      obj_(other.obj_)
+      {
+       // Get the number of nonzoeroes in the matrix
+       const size_t nnz_h = TMINLP2TNLP::nnz_h_lag();
+
+       if(nnz_h > 0){
+         int * jCol = new int [nnz_h];
+         int * iRow = new int [nnz_h];
+         int m = TMINLP2TNLP::num_constraints() - (int)quadRows_.size(); 
+         TMINLP2TNLP::eval_h(num_variables(), NULL, false, 
+                             0., m, NULL, false, 
+                             (int)nnz_h, jCol, iRow, NULL);
+
+         for(size_t i = 0 ; i < nnz_h ; i++){
+#ifndef NDEBUG
+           bool inserted = 
+#endif
+                    H_.insert(std::make_pair( std::make_pair(jCol[i], iRow[i]), 
+                              std::make_pair(i, -1))).second;
+           assert(inserted == true);
+         }
+         delete [] jCol;
+         delete [] iRow;
+        }
+         assert(nnz_h == H_.size());
+
+        //Properly create quadRows_
+       for(size_t i = 0 ; i < quadRows_.size() ; i++){
+         quadRows_[i] = new QuadRow(*quadRows_[i]);
+        }
+
+	int offset = TMINLP2TNLP::index_style() == Ipopt::TNLP::FORTRAN_STYLE;
+        for(unsigned int i = 0 ; i < quadRows_.size() ; i++){
+         quadRows_[i]->add_to_hessian(H_, offset);
+        }
+      }
+
+    
+    /** Destructor */
+    TMINLP2TNLPQuadCuts::~TMINLP2TNLPQuadCuts(){
+      for(unsigned int i = 0 ; i < quadRows_.size() ; i++){
+         delete quadRows_[i];
+      }
+    }
+
+    
+     bool TMINLP2TNLPQuadCuts::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
+        Index& nnz_h_lag,
+        TNLP::IndexStyleEnum& index_style){
+        bool ret_val = TMINLP2TNLP::get_nlp_info(n,m,nnz_jac_g, nnz_h_lag, index_style);
+        nnz_h_lag = (int)H_.size();
+        nnz_jac_g = curr_nnz_jac_;
+        //printf("Dinmension in TMINLP2Quad are %i\n", curr_nnz_jac_);
+        return ret_val;
+      }
+
+    /** This call is just passed onto parent class and add bounds of quadratic
+        cuts*/
+     bool TMINLP2TNLPQuadCuts::get_bounds_info(Index n, Number* x_l, Number* x_u,
+        Index m, Number* g_l, Number* g_u){
+        bool ret_val = TMINLP2TNLP::get_bounds_info(n, x_l, x_u, 
+                     m, g_l, g_u);
+        return ret_val;
+      }
+
+    bool 
+    TMINLP2TNLPQuadCuts::get_constraints_linearity(Index m, LinearityType* const_types)
+    {
+      bool ret_val = TMINLP2TNLP::get_constraints_linearity(m - (int)quadRows_.size(), const_types);
+      const_types += m - (int)quadRows_.size();
+      for(unsigned int i = 0 ; i < quadRows_.size() ; i++){
+        if(quadRows_[i]->isLinear())
+          const_types[i] = TNLP::LINEAR;
+        else
+          const_types[i] = TNLP::NON_LINEAR;
+      }
+      return ret_val;
+    }
+
+    /** This call is just passed onto parent class and add 
+        lambda for quadratic cuts*/
+     bool TMINLP2TNLPQuadCuts::get_starting_point(Index n, bool init_x, Number* x,
+        bool init_z, Number* z_L, Number* z_U,
+        Index m, bool init_lambda,
+        Number* lambda){
+         return TMINLP2TNLP::get_starting_point(n, init_x, x, init_z, z_L, z_U, m, init_lambda, lambda);
+    }
+
+    /** Method that returns scaling parameters (passed to parent all quadratic
+        not scaled). 
+     */
+     bool TMINLP2TNLPQuadCuts::get_scaling_parameters(Number& obj_scaling,
+                                        bool& use_x_scaling, Index n,
+                                        Number* x_scaling,
+                                        bool& use_g_scaling, Index m,
+                                        Number* g_scaling){
+           assert(num_constraints() == m);
+           bool retval = get_scaling_parameters(obj_scaling, use_x_scaling, n, x_scaling, use_g_scaling, m - (int)quadRows_.size(), g_scaling);
+           if(use_g_scaling){
+             g_scaling += m - (int)quadRows_.size();
+             CoinFillN(g_scaling, (int)quadRows_.size(), 1.);}
+           return retval;
+      }
+
+  /** Returns the value of the objective function in x*/
+  bool 
+  TMINLP2TNLPQuadCuts::eval_f(Index n, const Number* x, bool new_x,
+        Number& obj_value){
+    if(obj_.empty()){
+       return TMINLP2TNLP::eval_f(n, x, new_x, obj_value);
+    }
+    if(new_x){
+       TMINLP2TNLP::eval_f(n,x, new_x, obj_value);
+    }
+    obj_value = c_;
+    assert(n == (int) obj_.size());
+    for(int i = 0 ; i < n ; i++){
+      obj_value += obj_[i] * x[i];
+    }
+    return true;
+  }
+
+  /** Returns the vector of the gradient of
+    *  the objective w.r.t. x */
+  bool 
+  TMINLP2TNLPQuadCuts::eval_grad_f(Index n, const Number* x, bool new_x,
+        Number* grad_f){
+    if(obj_.empty()){
+      return TMINLP2TNLP::eval_grad_f(n, x, new_x, grad_f);}
+    if(new_x){
+      TMINLP2TNLP::eval_grad_f(n, x, new_x, grad_f);}
+    assert(n == (int) obj_.size());
+    for(int i = 0 ; i < n ; i++){
+      grad_f[i] = obj_[i];
+    }
+   return true;
+  }
+
+  bool TMINLP2TNLPQuadCuts::eval_gi(Index n, const Number* x, bool new_x,
+                           Index i, Number& gi)
+  {
+    int m_orig = num_constraints() - (int)quadRows_.size();
+    if(i < m_orig){
+       return TMINLP2TNLP::eval_gi(n, x, new_x, i, gi);
+    }
+    i -= m_orig;
+     gi = quadRows_[i]->eval_f(x, new_x);
+     return false;
+  }
+
+
+    /** Returns the vector of constraint values in x (appends constraint values for quadratics).*/
+     bool TMINLP2TNLPQuadCuts::eval_g(Index n, const Number* x, bool new_x,
+        Index m, Number* g){
+       int m_tminlp = m - (int)quadRows_.size();
+       bool retval = TMINLP2TNLP::eval_g(n, x, new_x, m_tminlp, g);
+       g+= (m_tminlp);
+       for(unsigned int i = 0 ; i < quadRows_.size() ; i++){
+         g[i] = quadRows_[i]->eval_f(x, new_x);
+       }
+      return retval;
+    }
+
+    /** Returns the jacobian of the
+     *  constraints. The vectors iRow and jCol only need to be set
+     *  once. The first call is used to set the structure only (iRow
+     *  and jCol will be non-NULL, and values will be NULL) For
+     *  subsequent calls, iRow and jCol will be NULL. */
+     bool TMINLP2TNLPQuadCuts::eval_jac_g(Index n, const Number* x, bool new_x,
+        Index m, Index nele_jac, Index* iRow,
+        Index *jCol, Number* values){
+        int n_ele_orig =  TMINLP2TNLP::nnz_jac_g();
+        int m_orig = m - (int)quadRows_.size();
+	int offset = TMINLP2TNLP::index_style() == Ipopt::TNLP::FORTRAN_STYLE;
+
+        bool retval = TMINLP2TNLP::eval_jac_g(n, x, new_x, m_orig ,
+                                n_ele_orig, iRow, jCol, values);
+        if(values == NULL){
+           assert(iRow != NULL);
+           assert(jCol != NULL);
+           iRow += n_ele_orig;
+           jCol += n_ele_orig;
+           for(unsigned int i = 0 ; i < quadRows_.size() ; i++){
+             const int & nnz = quadRows_[i]->nnz_grad();
+             Ipopt::Index mi = m_orig + i + offset;
+             CoinFillN(iRow, nnz, mi);
+             quadRows_[i]->gradiant_struct(nnz, jCol, offset);
+             iRow += nnz;
+             jCol += nnz;
+           }
+         }
+         else {
+           assert(iRow == NULL);
+           assert(jCol == NULL);
+           values += n_ele_orig;
+           for(unsigned int i = 0 ; i < quadRows_.size() ; i++){
+             const int & nnz = quadRows_[i]->nnz_grad();
+             quadRows_[i]->eval_grad(nnz, x, new_x, values);
+             values+=nnz;
+            }
+          }
+       return retval;
+    }
+
+  bool TMINLP2TNLPQuadCuts::eval_grad_gi(Index n, const Number* x, bool new_x,
+                                Index i, Index& nele_grad_gi, Index* jCol,
+                                Number* values)
+  {
+    int m_orig = num_constraints() - (int)quadRows_.size();
+    if(i < m_orig){
+       return TMINLP2TNLP::eval_grad_gi(n, x, new_x, i, nele_grad_gi, jCol, values);
+    }
+    i -= m_orig;
+    int offset = TMINLP2TNLP::index_style() == Ipopt::TNLP::FORTRAN_STYLE;
+    if(values == NULL){
+      assert(jCol != NULL);
+      nele_grad_gi = quadRows_[i]->nnz_grad();
+      quadRows_[i]->gradiant_struct(nele_grad_gi, jCol, offset);
+    }
+    else{
+      assert(jCol == NULL);
+      quadRows_[i]->eval_grad(nele_grad_gi, x, new_x, values);
+    }
+    return false;
+  }
+    /** Return the hessian of the
+     *  lagrangian. The vectors iRow and jCol only need to be set once
+     *  (during the first call). The first call is used to set the
+     *  structure only (iRow and jCol will be non-NULL, and values
+     *  will be NULL) For subsequent calls, iRow and jCol will be
+     *  NULL. This matrix is symmetric - specify the lower diagonal
+     *  only */
+     bool TMINLP2TNLPQuadCuts::eval_h(Index n, const Number* x, bool new_x,
+        Number obj_factor, Index m, const Number* lambda,
+        bool new_lambda, Index nele_hess,
+        Index* iRow, Index* jCol, Number* values){
+        if(!obj_.empty()) obj_factor = 0;
+        if(values == NULL){
+           assert(iRow != NULL);
+           assert(jCol != NULL);
+#ifdef DEBUG
+           std::cout<<"Hessian structure"<<std::endl;
+#endif
+	   int nnz = 0;
+           int nnz_h_lag_orig = TMINLP2TNLP::nnz_h_lag();
+           int nnz_sup = nnz_h_lag_orig;
+           for(AdjustableMat::iterator i = H_.begin() ; i != H_.end() ; i++){
+              if(i->second.second == -1){
+                 assert(i->second.first < nnz_h_lag_orig);
+               }
+               else {
+                 assert(i->second.second > 0);
+                 assert(i->second.first >= nnz_h_lag_orig);
+                 i->second.first = nnz_sup;
+                 nnz_sup++;
+               }
+              iRow[i->second.first] = i->first.first;
+              jCol[i->second.first] = i->first.second;
+#ifdef DEBUG
+              printf("iRow %i, jCol %i : nnz %i\n",
+                     i->first.second, i->first.first, 
+                     i->second.first);
+#endif
+              //assert(*jCol >= *iRow);
+              nnz++;
+           }
+	   assert(nnz == (int) H_.size());
+           return true;
+         }
+         else {
+#ifdef DEBUG
+           std::cout<<"Computing hessian"<<std::endl;
+#endif
+           assert(iRow == NULL);
+           assert(jCol == NULL);
+           int nnz_h_lag_orig = TMINLP2TNLP::nnz_h_lag();
+           int m_orig = m - (int)quadRows_.size();
+           bool ret_val = TMINLP2TNLP::eval_h(n, x, new_x, obj_factor, m_orig, lambda, new_lambda,
+                            nnz_h_lag_orig, iRow, jCol, values);
+	   CoinZeroN(values + nnz_h_lag_orig, (int)H_.size() - nnz_h_lag_orig);
+           for(unsigned int i = 0 ; i < quadRows_.size() ; i++){
+             quadRows_[i]->eval_hessian(lambda[i + m_orig], values);
+            }
+            return ret_val;
+          }
+      }
+    //@}
+
+  /** Method to add quadratic cuts .*/
+  void 
+  TMINLP2TNLPQuadCuts::addCuts(const Cuts & cuts, bool safe){
+     assert(cuts.sizeColCuts() == 0);
+#ifdef DEBUG
+     printf("Adding %i cuts\n", cuts.sizeRowCuts());
+#endif
+     int offset = TMINLP2TNLP::index_style() == Ipopt::TNLP::FORTRAN_STYLE;
+     
+     g_l_.reserve(g_l_.size() + cuts.sizeQuadCuts() + cuts.sizeRowCuts());
+     g_u_.reserve(g_u_.size() + cuts.sizeQuadCuts() + cuts.sizeRowCuts());
+     quadRows_.reserve(quadRows_.size() + cuts.sizeQuadCuts() + cuts.sizeRowCuts());
+
+     int n = cuts.sizeQuadCuts();
+     for(int i = 0 ; i < n ; i++){
+       g_l_.push_back(cuts.quadCut(i).lb());
+       g_u_.push_back(cuts.quadCut(i).ub());
+       quadRows_.push_back(new QuadRow(cuts.quadCut(i)));
+       quadRows_.back()->add_to_hessian(H_, offset);
+       curr_nnz_jac_ += quadRows_.back()->nnz_grad();
+     }
+     addRowCuts((OsiCuts) cuts, safe); 
+     duals_sol_.resize(g_l_.size() + 2*x_l_.size(), 0.);
+     x_init_.resize(g_l_.size() + 3*x_l_.size(), 0.);
+     duals_init_ = x_init_() + x_l_.size();
+  }
+
+  /** Method to add array of OsiRowCut figuring out which is quadratic (slow!)..*/
+  void TMINLP2TNLPQuadCuts::addCuts(unsigned int numcuts, 
+                                    const OsiRowCut ** cuts){
+#ifdef DEBUG
+     printf("Adding %i cuts\n", numcuts);
+#endif
+     int offset = TMINLP2TNLP::index_style() == Ipopt::TNLP::FORTRAN_STYLE;
+     g_l_.reserve(g_l_.size() + numcuts);
+     g_u_.reserve(g_u_.size() + numcuts);
+     quadRows_.reserve(quadRows_.size() + numcuts);
+     for(unsigned int i = 0 ; i < numcuts ; i++){
+       g_l_.push_back(cuts[i]->lb());
+       g_u_.push_back(cuts[i]->ub());
+
+       const QuadCut * quadCut = dynamic_cast<const QuadCut *> (cuts[i]); 
+       if(quadCut){
+         quadRows_.push_back(new QuadRow(*quadCut));
+         quadRows_.back()->add_to_hessian(H_, offset);
+       }
+       else 
+        quadRows_.push_back(new QuadRow(*cuts[i]));
+       curr_nnz_jac_ += quadRows_.back()->nnz_grad();
+     }
+     duals_sol_.resize(g_l_.size() + 2*x_l_.size(), 0.);
+     x_init_.resize(g_l_.size() + 3*x_l_.size(), 0.);
+     duals_init_ = x_init_() + x_l_.size();
+  } 
+  /** Method to add OsiCuts figuring out which is quadratic (slow!)..*/
+  void TMINLP2TNLPQuadCuts::addCuts(const OsiCuts& cuts){
+     assert(cuts.sizeColCuts() == 0);
+#ifdef DEBUG
+     printf("Adding %i cuts\n", cuts.sizeRowCuts());
+#endif
+
+     const Cuts * quadCuts = dynamic_cast<const Cuts *>(&cuts);
+     if(quadCuts) {
+        addCuts(*quadCuts, true);
+        return;}
+
+     addRowCuts(cuts, true);
+  } 
+  /** Method to add OsiCuts eventualy figuring out which is quadratic.*/
+  void TMINLP2TNLPQuadCuts::addRowCuts(const OsiCuts& cuts, bool safe){
+    // Check with rowCuts are quadratics and move them to quadratic cuts.
+    int n = cuts.sizeRowCuts(); 
+     g_l_.reserve(g_l_.size() + n);
+     g_u_.reserve(g_u_.size() + n);
+     quadRows_.reserve(quadRows_.size() + n);
+
+    int offset = TMINLP2TNLP::index_style() == Ipopt::TNLP::FORTRAN_STYLE;
+
+    for(int i = 0 ; i < n ; i++){
+      g_l_.push_back(cuts.rowCut(i).lb());
+      g_u_.push_back(cuts.rowCut(i).ub());
+      if(safe == false){
+      assert(dynamic_cast<const QuadCut *> (cuts.rowCutPtr(i)) == NULL);
+      }
+      else {
+       const QuadCut * cut = dynamic_cast<const QuadCut *> (cuts.rowCutPtr(i)); 
+       if(cut){
+         quadRows_.push_back(new QuadRow(*cut));
+         quadRows_.back()->add_to_hessian(H_, offset);
+         curr_nnz_jac_ += quadRows_.back()->nnz_grad();
+         continue;
+      } 
+    } 
+    quadRows_.push_back(new QuadRow(cuts.rowCut(i)));
+    curr_nnz_jac_ += quadRows_.back()->nnz_grad();
+  }
+     duals_sol_.resize(g_l_.size() + 2*x_l_.size(), 0.);
+     x_init_.resize(g_l_.size() + 3*x_l_.size(), 0.);
+     duals_init_ = x_init_() + x_l_.size();
+ }
+
+  /** Method which removes a set of cuts.*/
+  void TMINLP2TNLPQuadCuts::removeCuts(unsigned int n,const int * idxs){
+     if(n == 0) return;
+     vector< int > order(quadRows_.size());
+     int m_tminlp = num_constraints() - (int)quadRows_.size();
+      //delete the pointers
+       for(unsigned int k = 0; k < n ; k++){//Erase
+       int idx = idxs[k] - m_tminlp ;
+       quadRows_[idx]->remove_from_hessian(H_);
+       curr_nnz_jac_ -= quadRows_[idx]->nnz_grad();
+       delete quadRows_[idx];
+       quadRows_[idx] = NULL;}
+
+     for(unsigned int i = 0 ; i < order.size() ; i++){
+        order[i] = i;
+     }
+     for(unsigned int i = 0 ; i < n ; i++){
+        assert(idxs[i] - m_tminlp >= 0);
+        order[ idxs[i] - m_tminlp ] = INT_MAX;
+    } 
+
+    std::sort(order.begin(), order.end());
+
+
+    int i;
+    double * g_l = g_l_() + m_tminlp;
+    double * g_u = g_u_() + m_tminlp;
+    for(i = 0 ; order[i] < INT_MAX ; i++){
+      assert(order[i] >= i);
+      quadRows_[i] = quadRows_[order[i]]; 
+      g_l[i] = g_l[order[i]];
+      g_u[i] = g_u[order[i]];
+    }
+    quadRows_.erase(quadRows_.begin() + i, quadRows_.end());
+    g_l_.erase(g_l_.begin() + m_tminlp + i, g_l_.end());
+    g_u_.erase(g_u_.begin() + m_tminlp + i, g_u_.end());
+ }
+
+void
+TMINLP2TNLPQuadCuts::printH(){
+  int nnz = 0;
+  for(AdjustableMat::iterator i = H_.begin() ; i != H_.end() ; i++){
+     std::cout<<"nnz: "<<nnz
+	     <<"jCol: "<<i->first.first
+	     <<", iRow "<<i->first.second<<std::endl;
+    nnz++;
+  }
+}
+
+void
+TMINLP2TNLPQuadCuts::set_linear_objective(int n_var, const double * obj, double c_0){
+  assert(n_var == TMINLP2TNLP::num_variables());
+  obj_.resize(n_var);
+  CoinCopyN(obj, n_var, obj_());
+  c_ = c_0;
+}
+}//Ends Bonmin namespace
+ 
diff --git a/src/Algorithms/QuadCuts/BonTMINLP2Quad.hpp b/src/Algorithms/QuadCuts/BonTMINLP2Quad.hpp
new file mode 100644
index 0000000..021e161
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonTMINLP2Quad.hpp
@@ -0,0 +1,191 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#ifndef __TMINLPQuad_HPP__
+#define __TMINLPQuad_HPP__
+
+#include "BonTMINLP2TNLP.hpp"
+#include "BonQuadRow.hpp"
+
+namespace Bonmin
+{
+
+
+  /** This is a derived class fro TMINLP2TNLP to handle adding quadratic cuts.
+   */
+  class TMINLP2TNLPQuadCuts : public Bonmin::TMINLP2TNLP
+  {
+  public:
+    /**@name Constructors/Destructors */
+    //@{
+    TMINLP2TNLPQuadCuts(const Ipopt::SmartPtr<Bonmin::TMINLP> tminlp
+#ifdef WARM_STARTER
+        ,
+        const OptionsList& options
+#endif
+        );
+
+
+    /** Copy Constructor 
+      * \warning source and copy point to the same tminlp_.
+      */
+    TMINLP2TNLPQuadCuts(const TMINLP2TNLPQuadCuts&);
+
+    /** Virtual copy.*/
+    virtual Bonmin::TMINLP2TNLP * clone() const{
+      printf("Cloning TMINLP2TNLPQuadCuts.\n");
+      return new TMINLP2TNLPQuadCuts(*this);}
+
+    /** Destructor */
+    virtual ~TMINLP2TNLPQuadCuts();
+    //@}
+    /**@name methods to gather information about the NLP */
+    //@{
+    /** This call is just passed onto parent class and add number of quadratic
+        cuts*/
+    virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+        Ipopt::Index& nnz_h_lag,
+        Ipopt::TNLP::IndexStyleEnum& index_style);
+
+    /** This call is just passed onto parent class and add bounds of quadratic
+        cuts*/
+    virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+        Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
+
+    virtual bool get_constraints_linearity(Ipopt::Index m, Ipopt::TNLP::LinearityType* const_types);
+
+    /** This call is just passed onto parent class and add 
+        lambda for quadratic cuts*/
+    virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+        bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+        Ipopt::Index m, bool init_lambda,
+        Ipopt::Number* lambda);
+
+    /** Method that returns scaling parameters (passed to parent all quadratic
+        not scaled). 
+     */
+    virtual bool get_scaling_parameters(Ipopt::Number& obj_scaling,
+                                        bool& use_x_scaling, Ipopt::Index n,
+                                        Ipopt::Number* x_scaling,
+                                        bool& use_g_scaling, Ipopt::Index m,
+                                        Ipopt::Number* g_scaling);
+
+
+    /** Returns the value of the objective function in x*/
+    virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number& obj_value);
+
+    /** Returns the vector of the gradient of
+     *  the objective w.r.t. x */
+    virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number* grad_f);
+
+    /** Returns the vector of constraint values in x (appends constraint values for quadratics).*/
+    virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Number* g);
+
+    /** Returns the jacobian of the
+     *  constraints. The vectors iRow and jCol only need to be set
+     *  once. The first call is used to set the structure only (iRow
+     *  and jCol will be non-NULL, and values will be NULL) For
+     *  subsequent calls, iRow and jCol will be NULL. */
+    virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
+        Ipopt::Index *jCol, Ipopt::Number* values);
+    /** compute the value of a single constraint */
+    virtual bool eval_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+                         Ipopt::Index i, Ipopt::Number& gi);
+    /** compute the structure or values of the gradient for one
+        constraint */
+    virtual bool eval_grad_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+                              Ipopt::Index i, Ipopt::Index& nele_grad_gi, Ipopt::Index* jCol,
+                              Ipopt::Number* values);
+    /** Return the hessian of the
+     *  lagrangian. The vectors iRow and jCol only need to be set once
+     *  (during the first call). The first call is used to set the
+     *  structure only (iRow and jCol will be non-NULL, and values
+     *  will be NULL) For subsequent calls, iRow and jCol will be
+     *  NULL. This matrix is symmetric - specify the lower diagonal
+     *  only */
+    virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+        bool new_lambda, Ipopt::Index nele_hess,
+        Ipopt::Index* iRow, Ipopt::Index* jCol, Ipopt::Number* values);
+    //@}
+
+
+    /** \name Cuts management. */
+    //@{
+
+
+    /** Add some linear or quadratic cuts to the problem formulation
+        if some of the OsiRowCuts are quadratic they will be well understood as long as safe is true.*/
+    void addCuts(const Cuts& cuts, bool safe);
+
+
+    /** Add some cuts to the problem formulaiton (handles Quadratics).*/
+    void addCuts(const OsiCuts &cuts);
+ 
+    /** Add some linear cuts to the problem formulation.*/
+   virtual void addCuts(unsigned int numberCuts, const OsiRowCut ** cuts);
+
+ 
+    /** Remove some cuts from the formulation */
+    void removeCuts(unsigned int number ,const int * toRemove);
+
+    //@}
+    //
+    /** Change objective to a linear one whith given objective function.*/
+    void set_linear_objective(int n_var, const double * obj, double c_0);
+
+    /** Reset objective to original one */
+    void reset_objective(){
+      obj_.clear();
+    }
+
+  protected:
+    /** Add some cuts to the problem formulaiton (handles Quadratics).*/
+    void addRowCuts(const OsiCuts &cuts, bool safe);
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+    /** Default Constructor */
+    TMINLP2TNLPQuadCuts();
+
+    /** Overloaded Equals Operator */
+    TMINLP2TNLPQuadCuts& operator=(const TMINLP2TNLP&);
+    //@}
+
+  private:
+  /** Some storage for quadratic cuts.*/
+  vector<QuadRow *> quadRows_;
+
+  /** Storage for the original hessian of the problem.*/
+  AdjustableMat H_;
+
+    /** print H_ for debug.*/
+    void printH();
+  /** Current umber of entries in the jacobian.*/
+  int curr_nnz_jac_;
+
+  /** Store user passed linear objective.*/
+  vector<double> obj_;
+  /** constant term in objective function.*/
+  double c_;
+  };
+
+} // namespace Ipopt
+
+#endif
+
diff --git a/src/Algorithms/QuadCuts/BonTMINLPLinObj.cpp b/src/Algorithms/QuadCuts/BonTMINLPLinObj.cpp
new file mode 100644
index 0000000..2dd7729
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonTMINLPLinObj.cpp
@@ -0,0 +1,211 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 08/16/2007
+
+#include "BonTMINLPLinObj.hpp"
+
+using namespace Ipopt;
+
+namespace Bonmin{
+   /** Default constructor*/
+   TMINLPLinObj::TMINLPLinObj():
+   tminlp_(NULL), m_(0), n_(0), 
+   nnz_jac_(0)
+   {}
+
+   void 
+   TMINLPLinObj::gutsOfDestructor(){
+     tminlp_ = NULL;
+   }
+ 
+   
+   TMINLPLinObj::~TMINLPLinObj(){
+   gutsOfDestructor();}
+
+
+  void
+   TMINLPLinObj::setTminlp(SmartPtr<TMINLP> tminlp){
+      gutsOfDestructor();
+      tminlp_ = tminlp;
+      int n,m, nnz_jac, nnz_h;
+      Ipopt::TNLP::IndexStyleEnum index_style;
+      tminlp_->get_nlp_info(n, m , nnz_jac, nnz_h, index_style);
+      offset_ = index_style == Ipopt::TNLP::FORTRAN_STYLE;
+      n_ = n+1;
+      m_ = m+1;
+      nnz_jac_ = nnz_jac + n + 1;
+  }
+
+   bool 
+   TMINLPLinObj::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
+                                         Index& nnz_h_lag, 
+                                         Ipopt::TNLP::IndexStyleEnum& index_style){
+     assert(IsValid(tminlp_));
+
+     bool return_value = 
+          tminlp_->get_nlp_info(n,m,nnz_jac_g, nnz_h_lag,index_style);
+     m = m_;
+     n = n_;
+     nnz_jac_g = nnz_jac_;
+     return return_value;
+   }
+   
+
+   bool 
+   TMINLPLinObj::get_scaling_parameters(Number& obj_scaling,
+                                                   bool& use_x_scaling, Index n,
+                                                   Number* x_scaling,
+                                                   bool& use_g_scaling, Index m,
+                                                   Number* g_scaling){
+     assert(IsValid(tminlp_));
+     assert(m == m_);
+
+
+     if(g_scaling && use_g_scaling)
+       g_scaling[0] = 1.;
+     if(x_scaling && use_x_scaling)
+       x_scaling[n - 1] = 1.;
+     obj_scaling = 1.;
+     double dummy = 1.;
+     double * mod_obj_scaling = &dummy;
+     if(use_g_scaling && g_scaling){
+       mod_obj_scaling = g_scaling;}
+     return tminlp_->get_scaling_parameters(*mod_obj_scaling, use_x_scaling, n - 1, x_scaling,
+                                                         use_g_scaling, m - 1, g_scaling + 1);
+   }
+
+
+
+
+
+   bool
+   TMINLPLinObj::get_constraints_linearity(Index m, 
+					   Ipopt::TNLP::LinearityType* const_types){
+      assert(IsValid(tminlp_));
+      assert(m == m_ );
+              const_types[0] = Ipopt::TNLP::NON_LINEAR;
+        return tminlp_->get_constraints_linearity(m-1, const_types +1);}
+
+   bool
+   TMINLPLinObj::get_bounds_info(Index n, Number* x_l, Number* x_u,
+        Index m, Number* g_l, Number* g_u){
+     assert(IsValid(tminlp_));
+     assert(m == m_);
+     assert(n == n_);
+
+     x_l[n-1] = -DBL_MAX;
+     x_u[n-1] = DBL_MAX;
+    
+     g_l[0] = -DBL_MAX;
+     g_u[0] = 0.;
+     return tminlp_->get_bounds_info(n - 1, x_l, x_u, m_ - 1,
+                                     g_l +1, g_u + 1);
+   }
+
+   bool
+   TMINLPLinObj::get_starting_point(Index n, bool init_x, Number* x,
+                                                bool init_z, Number* z_L, Number* z_U,
+                                                Index m, bool init_lambda,
+                                                Number* lambda){
+     assert(IsValid(tminlp_));
+     assert(m == m_);
+
+     bool return_value = tminlp_->get_starting_point(n - 1, init_x, x, init_z, z_L, z_U,
+                                            m - 1, init_lambda, lambda + 1);
+     tminlp_->eval_f(n-1, x, true, x[n-1]);
+     if(init_lambda && lambda != NULL)
+       lambda[0] = 0;
+     return return_value;
+   }
+   
+
+   bool
+   TMINLPLinObj::eval_g(Index n, const Number* x, bool new_x,
+                                   Index m, Number* g){
+     assert(IsValid(tminlp_));
+     assert(m == m_);
+     assert(n == n_);
+
+     bool ret_val =  tminlp_->eval_f(n - 1, x, new_x, g[0]);
+     g[0] -= x[n -1];
+     return ret_val && tminlp_->eval_g(n - 1, x, false, m - 1, g+1);
+   }
+
+   bool
+   TMINLPLinObj::eval_jac_g(Index n, const Number* x, bool new_x,
+        Index m, Index nele_jac, Index* iRow,
+        Index *jCol, Number* values){
+     assert(IsValid(tminlp_));
+     assert(m == m_);
+     assert(n == n_);
+     assert(nele_jac == nnz_jac_);
+     bool ret_val = true;
+     if(values == NULL)
+     {
+       for(int i = 0 ; i < n_ ; i++){
+         iRow[i] = offset_; jCol[i] = i + offset_;}
+       bool ret_val = tminlp_->eval_jac_g(n -1, x, new_x, m_ -1, nnz_jac_ - n_, iRow + n_, jCol + n_, NULL);
+       for(int i = n_ ; i < nnz_jac_ ; i++){//shift by 1
+         iRow[i]++;}
+       return ret_val;
+     }
+     else {
+       ret_val &= tminlp_->eval_grad_f(n-1, x, new_x, values);
+       values[n-1] = -1;
+       ret_val &= tminlp_->eval_jac_g(n - 1, x, false, m - 1, nele_jac - n_, NULL, NULL, values + n);
+     }
+     return ret_val;
+   }
+
+   bool
+   TMINLPLinObj::eval_h(Index n, const Number* x, bool new_x,
+        Number obj_factor, Index m, const Number* lambda,
+        bool new_lambda, Index nele_hess,
+        Index* iRow, Index* jCol, Number* values){
+     assert(IsValid(tminlp_));
+     assert(m == m_);
+     assert(n == n_);
+     return tminlp_->eval_h(n_ - 1, x, new_x, (lambda != NULL)? lambda[0]: 1., m_ - 1, (lambda != NULL)? lambda + 1: NULL, new_lambda,
+                                  nele_hess, iRow, jCol, values);
+    }
+
+
+   bool
+   TMINLPLinObj:: eval_gi(Index n, const Number* x, bool new_x,
+			 Index i, Number& gi){
+     assert(IsValid(tminlp_));
+     assert(i < m_);
+     assert(n == n_);
+     if(i == 0){
+      bool ret_val = tminlp_->eval_f(n-1, x, new_x, gi);
+      gi -= x[n -1];
+      return ret_val;}
+      else
+      return tminlp_->eval_gi(n-1, x, new_x, i - 1, gi);
+   }
+
+   bool
+   TMINLPLinObj::eval_grad_gi(Index n, const Number* x, bool new_x,
+			      Index i, Index& nele_grad_gi, Index* jCol,
+			      Number* values){
+     assert(IsValid(tminlp_));
+     assert(i < m_);
+     assert(n == n_);
+     if(i == 0){
+      if(jCol != NULL){
+        for(int i = 0 ; i < n ; i++) jCol[i] = i + offset_;
+      }
+      bool ret_val= tminlp_->eval_grad_f(n-1, x, new_x, values);
+      values[n-1] = -1;
+      return ret_val;}
+      else
+        return tminlp_->eval_grad_gi(n - 1, x, new_x, i - 1, nele_grad_gi,
+                        jCol, values);
+   }
+
+
+}/* Ends namespace Bonmin.*/
diff --git a/src/Algorithms/QuadCuts/BonTMINLPLinObj.hpp b/src/Algorithms/QuadCuts/BonTMINLPLinObj.hpp
new file mode 100644
index 0000000..819bc57
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonTMINLPLinObj.hpp
@@ -0,0 +1,216 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 08/16/2007
+
+
+#ifndef TMINLPLinObj_H
+#define TMINLPLinObj_H
+
+#include "BonTMINLP.hpp"
+
+namespace Bonmin {
+/** From a TMINLP, this class adapts to another TMINLP where the original objective is transformed into a constraint
+    by adding an extra variable which is minimized.
+
+    More precisely 
+    \f[
+    \begin{array}{l}
+    \min f(x)\\
+    s.t\\
+    g_l \leq g(x) \leq g_u\\
+    x_l \leq x \leq u
+    \end{array}
+    \f]
+    is transformed ino
+    \begin{array}{l}
+    \min \eta\\
+    s.t\\
+    -\infty \leq f(x) - \eta \leq 0\\
+    g_l \leq g(x) \leq g_u\\
+    x_l \leq x \leq u
+    \end{array}
+    \f]
+    The objective is put as first constraint of the problem and the extra variable is the last one.
+ .*/
+class TMINLPLinObj: public Bonmin::TMINLP {
+  public:
+   /** Default constructor*/
+   TMINLPLinObj();
+
+  /** destructor.*/
+  virtual ~TMINLPLinObj();
+
+  /** set reference TMINLP */
+  void setTminlp(Ipopt::SmartPtr<TMINLP> tminlp);
+  
+    /**@name methods to gather information about the MINLP */
+    //@{
+    /** Return the number of variables
+     *  and constraints, and the number of non-zeros in the jacobian and
+     *  the hessian. Call tminlp_ one  but number of constraints and non-zeroes in the jacobian is stored internally.*/
+        virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+                                  Ipopt::Index& nnz_h_lag, Ipopt::TNLP::IndexStyleEnum& index_style);
+    /** Return scaling parameters. If tminlp_ method returns true, translate
+      * constraint scaling (if asked).
+     */
+    virtual bool get_scaling_parameters(Ipopt::Number& obj_scaling,
+                                        bool& use_x_scaling, Ipopt::Index n,
+                                        Ipopt::Number* x_scaling,
+                                        bool& use_g_scaling, Ipopt::Index m,
+                                        Ipopt::Number* g_scaling);
+
+
+    /** Get the variable type. Just call tminlp_'s method;. */
+    virtual bool get_variables_types(Ipopt::Index n, VariableType* var_types){
+      assert(IsValid(tminlp_));
+      assert(n == n_);
+      var_types[n-1] = TMINLP::CONTINUOUS;
+      return tminlp_->get_variables_types(n - 1, var_types);
+    }
+
+    /** Return the constraints linearity. Call tminlp_'s method and translate.
+      */
+    virtual bool get_constraints_linearity(Ipopt::Index m, 
+					   Ipopt::TNLP::LinearityType* const_types);
+
+    /** Return the information about the bound
+     *  on the variables and constraints. Call tminlp_'s method and translate
+     *  constraints bounds.*/
+    virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+        Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
+
+    /** Return the starting point. 
+        Have to translate z_L and z_U.
+     */
+    virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+                                    bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+        Ipopt::Index m, bool init_lambda,
+        Ipopt::Number* lambda);
+
+    /** Return the value of the objective function.
+      * Just call tminlp_ method. */
+    virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number& obj_value){
+        assert(n == n_);
+        obj_value = x[n-1];
+       return true;}
+
+    /** Return the vector of the gradient of
+     *  the objective w.r.t. x. Just call tminlp_ method. */
+    virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number* grad_f){
+       assert(IsValid(tminlp_));
+       assert(n == n_);
+       n--;
+       for(int  i = 0 ; i < n ; i++){
+        grad_f[i] = 0;}
+       grad_f[n] = 1;
+       return true;}
+
+    /** Return the vector of constraint values.
+      * Use tminlp_ functions and use mapping to get the needed values. */
+    virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Number* g);
+
+    /** Return the jacobian of the constraints. 
+      * In first call nothing to change. In later just fix the values for the simple concaves
+      * and remove entries corresponding to nonConvex constraints. */
+    virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
+        Ipopt::Index *jCol, Ipopt::Number* values);
+
+    /** \brief Return the hessian of the lagrangian. 
+      * Here we just put lambda in the correct format and call
+      * tminlp_'s function.*/
+    virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+        bool new_lambda, Ipopt::Index nele_hess,
+        Ipopt::Index* iRow, Ipopt::Index* jCol, Ipopt::Number* values);
+    /** Compute the value of a single constraint. The constraint
+     *  number is i (starting counting from 0. */
+    virtual bool eval_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			 Ipopt::Index i, Ipopt::Number& gi);
+    /** Compute the structure or values of the gradient for one
+     *  constraint. The constraint * number is i (starting counting
+     *  from 0.  Other things are like with eval_jac_g. */
+    virtual bool eval_grad_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			      Ipopt::Index i, Ipopt::Index& nele_grad_gi, Ipopt::Index* jCol,
+			      Ipopt::Number* values);
+    //@}
+   
+    virtual bool get_variables_linearity(Ipopt::Index n, Ipopt::TNLP::LinearityType* c){
+      assert(IsValid(tminlp_));
+      assert(n == n_);
+      bool r_val = tminlp_->get_variables_linearity(n-1, c);
+      c[n - 1] = Ipopt::TNLP::LINEAR;
+      return r_val;
+    }
+
+
+    /** @name Solution Methods */
+    //@{
+     /**  Use tminlp_ function.*/
+    virtual void finalize_solution(TMINLP::SolverReturn status,
+                                   Ipopt::Index n, const Ipopt::Number* x, Ipopt::Number obj_value){
+       return tminlp_->finalize_solution(status, n - 1, x,
+                                  obj_value);
+    }
+    //@}
+    
+     /**  Use tminlp_ function.*/
+    virtual const BranchingInfo * branchingInfo() const{
+      return tminlp_->branchingInfo();
+    }
+
+     /**  Use tminlp_ function.
+          \bug Has to translate sos information.*/
+    virtual const SosInfo * sosConstraints() const{
+      return tminlp_->sosConstraints();
+    }
+     /**  Use tminlp_ function.*/
+    virtual const PerturbInfo* perturbInfo() const
+    {
+      return tminlp_->perturbInfo();
+    }
+
+    /**  Use tminlp_ function.*/
+    virtual bool hasUpperBoundingObjective(){
+      assert(IsValid(tminlp_));
+      return tminlp_->hasUpperBoundingObjective();}
+    
+    /** Use tminlp_ function.*/
+    virtual bool eval_upper_bound_f(Ipopt::Index n, const Ipopt::Number* x,
+                                    Ipopt::Number& obj_value){
+       assert(IsValid(tminlp_));
+       return tminlp_->eval_upper_bound_f(n - 1, x, obj_value); }
+
+  /** Say if problem has a linear objective (for OA) */
+  virtual bool hasLinearObjective(){return true;}
+  /** return pointer to tminlp_.*/
+  Ipopt::SmartPtr<TMINLP> tminlp(){return tminlp_;}
+  private:
+  /** Reset all data.*/
+   void gutsOfDestructor();
+
+  /** Reference TMINLP which is to be relaxed.*/
+  Ipopt::SmartPtr<TMINLP> tminlp_;
+  /** Ipopt::Number of constraints in the transformed MINLP.*/
+  int m_;
+  /** Ipopt::Number of variables in the transformed MINLP.*/
+  int n_;
+  /** number of non-zeroes in the jacobian of the transformed MINLP.*/
+  int nnz_jac_;
+  /** offset for jacobian.*/
+  int offset_;
+   
+};
+
+
+}/* Ends Bonmin namepsace.*/
+
+#endif
+
diff --git a/src/Algorithms/QuadCuts/BonTMatrix.cpp b/src/Algorithms/QuadCuts/BonTMatrix.cpp
new file mode 100644
index 0000000..854f663
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonTMatrix.cpp
@@ -0,0 +1,216 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#include "BonTMatrix.hpp"
+
+namespace Bonmin{
+
+/** Copy constructor.*/
+TMat::TMat(const TMat &other):
+  iRow_(NULL), jCol_(NULL), value_(NULL), nnz_(other.nnz_),
+  capacity_(other.nnz_), columnOrdering_(other.columnOrdering_),
+  rowOrdering_(other.rowOrdering_), nonEmptyRows_(), nonEmptyCols_(){
+   iRow_ = CoinCopyOfArray(other.iRow_, other.nnz_);
+   jCol_ = CoinCopyOfArray(other.jCol_, other.nnz_);
+   value_ = CoinCopyOfArray(other.value_, other.nnz_);
+  }
+
+/** Construct from a CoinPackedMatrix*/
+TMat::TMat(const CoinPackedMatrix &M, MatrixStorageType T):
+  iRow_(NULL), jCol_(NULL), value_(NULL), nnz_(M.getNumElements()),
+  capacity_(M.getNumElements()), columnOrdering_(), rowOrdering_(),
+  nonEmptyRows_(), nonEmptyCols_(){
+  create(M);
+  make_upper_triangular(T);
+}
+/** Assignment operator.*/
+TMat& 
+TMat::operator=(const TMat &rhs){
+  if(this != &rhs){
+    freeSpace();
+    nnz_ = rhs.nnz_;
+    capacity_ = rhs.capacity_;
+    iRow_ = CoinCopyOfArray(rhs.iRow_, rhs.nnz_);
+    jCol_ = CoinCopyOfArray(rhs.jCol_, rhs.nnz_);
+    value_ = CoinCopyOfArray(rhs.value_, rhs.nnz_);
+    columnOrdering_ = rhs.columnOrdering_;
+    rowOrdering_ = rhs.rowOrdering_; 
+    nonEmptyCols_.clear();
+    nonEmptyRows_.clear();
+  }
+  return (*this);
+}
+
+/** Assignment from a CoinPackedMatrix.*/
+TMat & 
+TMat::operator=(const CoinPackedMatrix &M){
+  freeSpace();
+  columnOrdering_.clear();
+  rowOrdering_.clear();
+  nnz_ = capacity_ = M.getNumElements();
+  create(M); 
+  return (*this);
+}
+
+void TMat::create(const CoinPackedMatrix &M){ 
+  // Allocate arrays;
+  iRow_ = new int[capacity_];
+  jCol_ = new int[capacity_];
+  value_ = new double[capacity_];
+
+  int * iRow = iRow_;
+  int * jCol = jCol_;
+  if(!M.isColOrdered()){// Have to swap
+    std::cout<<"Matrix is not col ordered"<<std::endl;
+    iRow = jCol_;
+    jCol = iRow_;
+  }
+  
+  // Now we can safely assume that M is colorderd.
+  int numcols = M.getMajorDim();
+  const int * start = M.getVectorStarts();
+  const int * length = M.getVectorLengths();
+  const int * indice = M.getIndices();
+  const double * value = M.getElements();
+  int nnz = 0;
+  for(int i = 0 ; i < numcols ; i++){
+    int begin = start[i];
+    int end = start[i] + length[i];
+    for(int k = begin ; k < end ; k++){
+      value_[nnz] = value[k];
+      iRow[nnz] = indice[k];
+      jCol[nnz++] = i;
+    }
+  }
+  assert(nnz==nnz_);
+}
+
+// Destructor
+TMat::~TMat(){
+   delete [] iRow_;
+   delete [] jCol_;
+   delete [] value_;
+}
+
+/** Put the non-empty rows of quadratic form currently stored into
+    indices. Allocate the array and returns its size.*/
+int 
+TMat::numNonEmptyRows(){
+  if(nnz_ == 0) return 0;
+  orderByRows();
+  nonEmptyRows_.clear();
+  nonEmptyRows_.push_back(std::pair<int, int>(iRow_[rowOrdering_[0]], 0));
+  int num = 1;
+  for(int i = 1 ; i < nnz_ ; i++){
+    if(iRow_[rowOrdering_[i]] > nonEmptyRows_.back().first){
+      nonEmptyRows_.push_back(std::pair<int, int>(iRow_[rowOrdering_[i]],i));
+      num++;
+    }
+  }
+  return num;
+}
+
+
+/** Put the non-empty rows of quadratic form currently stored into
+    indices. Allocate the array and returns its size.*/
+int 
+TMat::numNonEmptyCols(){
+  if(nnz_ == 0) return 0;
+  orderByColumns();
+  nonEmptyCols_.clear();
+  nonEmptyCols_.push_back(std::pair<int, int>(jCol_[columnOrdering_[0]], 0));
+  int num = 1;
+  for(int i = 1 ; i < nnz_ ; i++){
+    if(jCol_[columnOrdering_[i]] > nonEmptyCols_.back().first){
+      nonEmptyCols_.push_back(std::pair<int, int>(jCol_[columnOrdering_[i]],i));
+      num++;
+    }
+  }
+  return num;
+}
+/** Remove the duplicated entries.*/
+void 
+TMat::removeDuplicates(){
+  orderByRows();
+  int j = 0;
+  for(int i = 1; i < nnz_ ; i++){
+    if((jCol_[rowOrdering_[i]] == jCol_[rowOrdering_[j]]) && 
+       (iRow_[rowOrdering_[i]] == iRow_[rowOrdering_[j]])){
+       value_[rowOrdering_[j]] += value_[rowOrdering_[i]];
+    }
+    else{
+      jCol_[rowOrdering_[++j]] = jCol_[rowOrdering_[i]];
+      iRow_[rowOrdering_[j]] = iRow_[rowOrdering_[i]];
+      value_[rowOrdering_[j]] = value_[rowOrdering_[i]];
+    }
+  }
+  resizeAndCopyArray(jCol_, j, capacity_);
+  resizeAndCopyArray(iRow_, j, capacity_);
+  resizeAndCopyArray(value_, j, capacity_);
+  nnz_ = j;
+}
+
+void
+TMat::make_upper_triangular(const MatrixStorageType &T){
+   switch (T){
+     case Upper:
+       for(int i = 0 ; i < nnz_ ; i++){
+          assert(jCol_[i] >= iRow_[i]);
+       }
+       break;
+     case Lower:
+       for(int i = 0 ; i < nnz_ ; i++){
+          assert(jCol_[i] <= iRow_[i]);
+       }
+       make_lower_to_be_upper();
+       break;
+     case Full:
+       make_full_upper_triangular();
+       break;
+   }
+   for(int i = 0 ; i < nnz_ ; i++){
+      assert(jCol_[i] >= iRow_[i]);
+   }
+}
+
+/** Assuing that this is representing the lower triangle of a symetric matrix
+   makes it the upper triangle.*/
+void
+TMat::make_lower_to_be_upper(){
+  int * buff = iRow_;
+  iRow_ = jCol_;
+  jCol_ = buff;
+}
+
+/** Assuming that this is representing a quadratic form. Makes it upper diagonal.*/
+void
+TMat::make_full_upper_triangular(){
+  // Make it upper triangular
+  for(int i = 0 , j = 0; i < nnz_ && j < nnz_ ;){
+    if(iRow_[i] < jCol_[i]){//swap the two entries
+      int buf = iRow_[i];
+      iRow_[i] = jCol_[i];
+      jCol_[i] = buf;
+    }
+  }
+  // add up the duplicated entries
+  removeDuplicates();
+
+  //Now divide all non-diagonal entries by two;
+  for(int i = 0 ; i < nnz_ ; i++){
+    if(jCol_[i] == iRow_[i]){//skip
+      continue;
+    }
+    assert(iRow_[i] < jCol_[i]);
+    value_[i] /= 2.;
+  }
+}
+
+}//Ends Bonmin namepace
+
diff --git a/src/Algorithms/QuadCuts/BonTMatrix.hpp b/src/Algorithms/QuadCuts/BonTMatrix.hpp
new file mode 100644
index 0000000..97832a5
--- /dev/null
+++ b/src/Algorithms/QuadCuts/BonTMatrix.hpp
@@ -0,0 +1,167 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/06/2007
+
+#ifndef BonTMatrix_H
+#define BonTMatrix_H
+
+#include "CoinPackedMatrix.hpp"
+#include "BonArraysHelpers.hpp"
+#include <vector>
+#include <list>
+#include <algorithm> 
+#include "BonQuadCut.hpp"
+
+namespace Bonmin {
+
+struct TMat{
+  int * iRow_;
+  int * jCol_;
+  double * value_;
+  int nnz_;
+  int capacity_;
+
+
+ /** Storage for non empty rows.
+     first is row number and second is first element in row.*/
+ typedef vector< std::pair< int, int> > RowS;
+
+  /** Default constructor.*/
+  TMat(): iRow_(NULL), jCol_(NULL), value_(NULL), nnz_(0),
+               capacity_(0)
+  {}
+
+
+  void freeSpace(){
+     delete [] iRow_;
+     delete [] jCol_;
+     delete [] value_;
+  } 
+
+  /** Copy constructor.*/
+  TMat(const TMat &other);
+
+  /** Construct from a CoinPackedMatrix*/
+  TMat(const CoinPackedMatrix &M,  MatrixStorageType T);
+
+  /** Assignment operator.*/
+  TMat& operator=(const TMat &rhs);
+
+  /** Assignment from a CoinPackedMatrix.*/
+  TMat & operator=(const CoinPackedMatrix &M);
+
+  void resize(int nnz){
+    Bonmin::resizeAndCopyArray(iRow_, nnz_, nnz);
+    Bonmin::resizeAndCopyArray(jCol_, nnz_, nnz);
+    Bonmin::resizeAndCopyArray(value_, nnz_, nnz);
+    nnz_ = nnz;
+  }
+
+  ~TMat();
+
+ /** Get number of non empty rows.*/
+ int numNonEmptyRows();
+
+ /** Get the list of non empty row.*/
+ const RowS & nonEmptyRows() const {
+    return nonEmptyRows_;}
+
+ /** Get number of non empty cols.*/
+ int numNonEmptyCols();
+
+ /** Get the list of non empty row.*/
+ const RowS & nonEmptyCols() const {
+    return nonEmptyCols_;}
+
+ private:
+ /** Structure for ordering matrix.*/
+ struct TMatOrdering{
+   TMat * M_;
+   TMatOrdering(TMat *M):
+     M_(M){}
+ };
+
+ /** Structure for ordering matrix by columns.*/ 
+ struct ColumnOrder : public TMatOrdering {
+   ColumnOrder(TMat *M):
+     TMatOrdering(M){}
+
+   bool operator()(const int& i, const int& j){
+      if (M_->jCol_[i] < M_->jCol_[j])
+        return true;
+      if (M_->jCol_[i] == M_->jCol_[j] && M_->iRow_[i] < M_->iRow_[j])
+        return true;
+     return false;
+   }
+ };
+
+
+ /** Structure for ordering matrix by columns.*/ 
+ struct RowOrder : public TMatOrdering {
+   RowOrder(TMat *M):
+     TMatOrdering(M){}
+   bool operator()(const int& i, const int& j){
+      if (M_->iRow_[i]< M_->iRow_[j])
+        return true;
+      if (M_->iRow_[i] == M_->iRow_[j] && M_->jCol_[i] < M_->jCol_[j])
+        return true;
+     return false;
+   }
+ };
+ public:
+ /** Orders current matrix by columns. */
+ const vector<int>& orderByColumns(){
+    resizeOrdering(columnOrdering_, nnz_);
+    std::sort(columnOrdering_.begin(), columnOrdering_.end(),ColumnOrder(this));
+    return columnOrdering_;
+ }
+ /** Orders current matrix by rows.*/
+ const vector<int>& orderByRows(){
+    resizeOrdering(rowOrdering_, nnz_);
+    std::sort(rowOrdering_.begin(), rowOrdering_.end(), RowOrder(this));
+    return rowOrdering_;
+ }
+
+ /** Remove the duplicated entries.*/
+ void removeDuplicates();
+
+ /** Assuming that this is representing a quadratic form. Produce equivalent
+     quadratic form with only upper triange stored.*/
+ void makeQuadUpperDiag();
+
+ void resizeOrdering(vector<int> &ordering, unsigned int newSize){
+        size_t oldSize = ordering.size();
+        ordering.resize(newSize);
+        for(size_t i = oldSize ; i < newSize ; i++)
+           ordering[i] = static_cast<int>(i);
+   }
+
+   /** Create the TMat from M.*/
+   void create(const CoinPackedMatrix &M);
+ 
+   vector<int> columnOrdering_;
+ 
+   vector<int> rowOrdering_;
+
+   void make_upper_triangular(const MatrixStorageType &T);
+
+   void make_lower_to_be_upper();
+
+   void make_full_upper_triangular();
+
+   // Stores non empty rows for computing jacobian structure
+   RowS nonEmptyRows_;
+
+   // Stores non empty cols for computing jacobian structure
+   RowS nonEmptyCols_;
+ };
+
+}//Ends Bonmin namespace
+
+#endif
+
diff --git a/src/Algorithms/QuadCuts/Makefile.am b/src/Algorithms/QuadCuts/Makefile.am
new file mode 100644
index 0000000..f0e3525
--- /dev/null
+++ b/src/Algorithms/QuadCuts/Makefile.am
@@ -0,0 +1,114 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 433 2007-03-28 05:01:22Z andreasw $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+
+noinst_LTLIBRARIES = libbonquadcuts.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonquadcuts_la_SOURCES = \
+                  BonArraysHelpers.hpp \
+                  BonOuterApprox.cpp \
+                  BonOuterApprox.hpp \
+                  BonQuadCut.cpp \
+                  BonQuadCut.hpp \
+                  BonQuadRow.cpp \
+                  BonQuadRow.hpp \
+                  BonTMatrix.cpp \
+                  BonTMatrix.hpp \
+                  BonLinearCutsGenerator.hpp \
+                  BonLinearCutsGenerator.cpp \
+                  BonTMINLPLinObj.hpp \
+                  BonTMINLPLinObj.cpp \
+                  BonTMINLP2Quad.cpp \
+                  BonTMINLP2Quad.hpp
+
+
+libbonquadcuts_la_DEPENDENCIES = $(libbonquadcuts_la_LIBADD)
+
+# This is for libtool
+libbonquadcuts_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin/Heuristics` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+            BonArraysHelpers.hpp \
+            BonOuterApprox.hpp \
+            BonQuadCut.hpp \
+            BonQuadRow.hpp \
+            BonTMatrix.hpp \
+            BonTMINLPLinObj.hpp \
+            BonTMINLP2Quad.hpp \
+            BonLinearCutsGenerator.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+              BonArraysHelpers.hppbak \
+              BonOuterApprox.cppbak \
+              BonOuterApprox.hppbak \
+              BonQuadCut.cppbak \
+              BonQuadCut.hppbak \
+              BonQuadRow.cppbak \
+              BonQuadRow.hppbak \
+              BonTMatrix.cppbak \
+              BonTMatrix.hppbak \
+              BonTMINLPLinObj.hppbak \
+              BonTMINLPLinObj.cppbak \
+              BonTMINLP2Quad.cppbak \
+              BonTMINLP2Quad.hppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Algorithms/QuadCuts/Makefile.in b/src/Algorithms/QuadCuts/Makefile.in
new file mode 100644
index 0000000..8c3e740
--- /dev/null
+++ b/src/Algorithms/QuadCuts/Makefile.in
@@ -0,0 +1,683 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/Algorithms/QuadCuts
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libbonquadcuts_la_LIBADD =
+am_libbonquadcuts_la_OBJECTS = BonOuterApprox.lo BonQuadCut.lo \
+	BonQuadRow.lo BonTMatrix.lo BonLinearCutsGenerator.lo \
+	BonTMINLPLinObj.lo BonTMINLP2Quad.lo
+libbonquadcuts_la_OBJECTS = $(am_libbonquadcuts_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonquadcuts_la_SOURCES)
+DIST_SOURCES = $(libbonquadcuts_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonquadcuts.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonquadcuts_la_SOURCES = \
+                  BonArraysHelpers.hpp \
+                  BonOuterApprox.cpp \
+                  BonOuterApprox.hpp \
+                  BonQuadCut.cpp \
+                  BonQuadCut.hpp \
+                  BonQuadRow.cpp \
+                  BonQuadRow.hpp \
+                  BonTMatrix.cpp \
+                  BonTMatrix.hpp \
+                  BonLinearCutsGenerator.hpp \
+                  BonLinearCutsGenerator.cpp \
+                  BonTMINLPLinObj.hpp \
+                  BonTMINLPLinObj.cpp \
+                  BonTMINLP2Quad.cpp \
+                  BonTMINLP2Quad.hpp
+
+libbonquadcuts_la_DEPENDENCIES = $(libbonquadcuts_la_LIBADD)
+
+# This is for libtool
+libbonquadcuts_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin/Heuristics` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+            BonArraysHelpers.hpp \
+            BonOuterApprox.hpp \
+            BonQuadCut.hpp \
+            BonQuadRow.hpp \
+            BonTMatrix.hpp \
+            BonTMINLPLinObj.hpp \
+            BonTMINLP2Quad.hpp \
+            BonLinearCutsGenerator.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+              BonArraysHelpers.hppbak \
+              BonOuterApprox.cppbak \
+              BonOuterApprox.hppbak \
+              BonQuadCut.cppbak \
+              BonQuadCut.hppbak \
+              BonQuadRow.cppbak \
+              BonQuadRow.hppbak \
+              BonTMatrix.cppbak \
+              BonTMatrix.hppbak \
+              BonTMINLPLinObj.hppbak \
+              BonTMINLPLinObj.cppbak \
+              BonTMINLP2Quad.cppbak \
+              BonTMINLP2Quad.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Algorithms/QuadCuts/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Algorithms/QuadCuts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonquadcuts.la: $(libbonquadcuts_la_OBJECTS) $(libbonquadcuts_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonquadcuts_la_LDFLAGS) $(libbonquadcuts_la_OBJECTS) $(libbonquadcuts_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonLinearCutsGenerator.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOuterApprox.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonQuadCut.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonQuadRow.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTMINLP2Quad.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTMINLPLinObj.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTMatrix.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Algorithms/QuadCuts/next b/src/Algorithms/QuadCuts/next
new file mode 100644
index 0000000..6c0e36b
--- /dev/null
+++ b/src/Algorithms/QuadCuts/next
@@ -0,0 +1,123 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/16/2007
+#ifndef BonminOuterApprox_H
+#define BonminOuterApprox_H
+
+#include <cmath>
+
+namespace Bonmin{
+   class OsiTMINLPInterface;
+   class BabSetupBase;
+}
+class OsiSolverInterface;
+namespace Bonmin {
+  /** A class to build outer approximations.*/
+  class OuterApprox{
+
+  public:
+
+   /** Default constructor.*/
+   OuterApprox():
+    tiny_(-0.),
+    veryTiny_(-0.)
+   {}
+
+   /** Copy constructor.*/
+   OuterApprox(const OuterApprox & other):
+    tiny_(other.tiny_),
+    veryTiny_(other.veryTiny_){
+    }
+
+
+   /** Assignment operator.*/
+   OuterApprox & operator=(const OuterApprox& rhs){
+    if(this != & rhs){
+      tiny_ = rhs.tiny_;
+      veryTiny_ = rhs.veryTiny_;}
+    return (*this);
+   }
+
+   /** Destructor.*/
+   ~OuterApprox(){}
+
+   /** Initialize using options.*/
+   void initialize(Bonmin::BabSetupBase &b);
+
+   /** Build the Outer approximation in minlp and put it in si.*/
+   void extractLinearRelaxation(Bonmin::OsiTMINLPInterface &minlp,
+                                OsiSolverInterface *si, 
+                                const double * x, bool getObj);
+   /** Operator() calls extractLinearRelaxation*/
+   void operator()(Bonmin::OsiTMINLPInterface &minlp,
+                   OsiSolverInterface *si,
+                   const double * x, bool getObj){
+       extractLinearRelaxation(minlp, si, x, getObj);}
+
+   private:
+   /** Facilitator to clean up coefficient.*/
+  inline bool cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny);
+   /** If constraint coefficient is below this, we try to remove it.*/
+   double tiny_;
+   /** If constraint coefficient is below this, we neglect it.*/
+   double veryTiny_;
+   /** Count the number of linear outer approximations taken.*/
+   static int nTimesCalled;
+  };
+
+//A procedure to try to remove small coefficients in OA cuts (or make it non small
+inline
+bool 
+OuterApprox::cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny)
+{
+  if(fabs(value)>= tiny) return 1;
+
+  if(fabs(value)<veryTiny) return 0;//Take the risk?
+
+  //try and remove
+  double infty = 1e20;
+  bool colUpBounded = colUpper < 10000;
+  bool colLoBounded = colLower > -10000;
+  bool rowNotLoBounded =  rowLower <= - infty;
+  bool rowNotUpBounded = rowUpper >= infty;
+  bool pos =  value > 0;
+
+  if(colLoBounded && pos && rowNotUpBounded) {
+    lb += value * (colsol - colLower);
+    return 0;
+  }
+  else
+    if(colLoBounded && !pos && rowNotLoBounded) {
+      ub += value * (colsol - colLower);
+      return 0;
+    }
+    else
+      if(colUpBounded && !pos && rowNotUpBounded) {
+        lb += value * (colsol - colUpper);
+        return 0;
+      }
+      else
+        if(colUpBounded && pos && rowNotLoBounded) {
+          ub += value * (colsol - colUpper);
+          return 0;
+        }
+  //can not remove coefficient increase it to smallest non zero
+  if(pos) value = tiny;
+  else
+    value = - tiny;
+  return 1;
+}
+
+}
+
+#endif
+
diff --git a/src/Apps/BonMin.cpp b/src/Apps/BonMin.cpp
new file mode 100644
index 0000000..0a085a6
--- /dev/null
+++ b/src/Apps/BonMin.cpp
@@ -0,0 +1,98 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 02/15/2006
+
+
+#include <iomanip>
+#include <fstream>
+
+#include "CoinPragma.hpp"
+#include "BonminConfig.h"
+#include "IpoptConfig.h"
+#include "CbcConfig.h"
+#include "CoinTime.hpp"
+#include "BonAmplSetup.hpp"
+#include "BonCbc.hpp"
+
+#ifndef NDEBUG
+#define CATCH_ERRORS
+#endif
+
+using namespace Bonmin;
+int main (int argc, char *argv[])
+{
+  using namespace Ipopt;
+  char * pbName = NULL;
+  
+  std::cout<<"Bonmin "
+           <<BONMIN_VERSION; 
+  std::cout<<" using Cbc "
+         <<CBC_VERSION; 
+  std::cout<<" and Ipopt "
+         <<IPOPT_VERSION<<std::endl; 
+  if(argc > 1) {
+    pbName = new char[strlen(argv[1])+1];
+    strcpy(pbName, argv[1]);
+  }
+#define CATCH_ERRORS
+#ifdef CATCH_ERRORS
+  try
+#endif 
+  {
+
+    //FILE * fp = fopen("log","w");
+    BonminAmplSetup bonmin;
+    bonmin.initialize(argv);
+
+    {
+    Bab bb;
+
+    bb(bonmin);//do branch and bound
+    }
+  }
+#ifdef CATCH_ERRORS
+  catch(TNLPSolver::UnsolvedError *E) {
+    E->writeDiffFiles();
+    E->printError(std::cerr);
+    //There has been a failure to solve a problem with Ipopt.
+    //And we will output file with information on what has been changed in the problem to make it fail.
+    //Now depending on what algorithm has been called (B-BB or other) the failed problem may be at different place.
+    //    const OsiSolverInterface &si1 = (algo > 0) ? nlpSolver : *model.solver();
+  }
+  catch(OsiTMINLPInterface::SimpleError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+    <<std::endl
+    <<E.message()<<std::endl;
+  }
+  catch(CoinError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+    <<std::endl
+    <<E.message()<<std::endl;
+  }
+  catch (Ipopt::OPTION_INVALID &E)
+  {
+    std::cerr<<"Ipopt exception : "<<E.Message()<<std::endl;
+  }
+  catch (Ipopt::IpoptException &E)
+  {
+    std::cerr<<"Ipopt exception : "<<E.Message()<<std::endl;
+  }
+#ifndef NO_CATCH_ALL
+  catch(...) {
+    std::cerr<<pbName<<" unrecognized exception"<<std::endl;
+    std::cerr<<pbName<<"\t Finished \t exception"<<std::endl;
+    throw;
+  }
+#endif
+#endif
+  
+  delete [] pbName;
+  return 0;
+}
+
diff --git a/src/Apps/BonNodeSolver.cpp b/src/Apps/BonNodeSolver.cpp
new file mode 100644
index 0000000..8aa160c
--- /dev/null
+++ b/src/Apps/BonNodeSolver.cpp
@@ -0,0 +1,112 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 02/15/2006
+
+
+#include <cassert>
+#include <iomanip>
+
+#include "BonminConfig.h"
+
+#include "CoinPragma.hpp"
+#include "BonAmplInterface.hpp"
+#include "BonIpoptSolver.hpp"
+#include "BonBoundsReader.hpp"
+#include "BonStartPointReader.hpp"
+#include "CoinTime.hpp"
+
+#include "BonAmplSetup.hpp"
+
+
+/************************************************************************
+ 
+This mains is used for resolving the problem with fixed bounds and eventually a starting point
+ 
+************************************************************************/
+
+int main (int argc, char *argv[])
+{
+
+  using namespace Ipopt;
+  using namespace Bonmin;
+
+  // Read in model using argv[1]
+  char * pbName = new char[strlen(argv[1])+1];
+  strcpy(pbName, argv[1]);
+  std::string nodeFileName;
+  if(argc > 2)
+    nodeFileName=argv[2];
+  std::string startingPointFile ="";
+  if(argc>3)
+    startingPointFile = argv[3];
+
+  //Give ampl an argv which doesn't crash him.
+  char ** myArgv = new char *[3];
+  myArgv[0]=new char[strlen(argv[0])+1];
+  strcpy(myArgv[0],argv[0]);
+  myArgv[1]=new char[strlen(argv[1])+1];
+  strcpy(myArgv[1],argv[1]);
+  myArgv[2]= NULL;//new char[1];
+
+
+    BonminAmplSetup bonmin;
+    bonmin.initialize(myArgv);
+    Bonmin::OsiTMINLPInterface& nlpSolver = *bonmin.nonlinearSolver();
+  
+    Ipopt::SmartPtr<Ipopt::OptionsList> Options =
+      nlpSolver.options();
+
+    nlpSolver.messageHandler()->setLogLevel(2);
+
+  try
+    {
+      std::cout<<nodeFileName<<std::endl;
+      // Read the bounds and change them in Ipopt
+      if(argc>2) {
+	Bonmin::BoundsReader bounds(nodeFileName);
+	bounds.readAndApply(&nlpSolver);
+      }
+      if(argc>3) {
+	Bonmin::StartPointReader init(startingPointFile);
+	init.readAndApply(&nlpSolver);
+      }
+      
+      nlpSolver.solver()->forceSolverOutput(4);
+      nlpSolver.initialSolve();
+      
+      //Print out integer variable values
+      for(int i = 0 ; i <nlpSolver.getNumCols() ; i++) {
+	if (nlpSolver.isInteger(i)) {
+	  std::cout<<"x[ "<<i<<"] = "<<nlpSolver.getColSolution()[i]<<std::endl;
+	}
+      }
+    }
+  catch(Bonmin::OsiTMINLPInterface::SimpleError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+	     <<std::endl
+	     <<E.message()<<std::endl;
+  }
+  catch(CoinError &E) {
+    std::cerr<<E.className()<<"::"<<E.methodName()
+	     <<std::endl
+	     <<E.message()<<std::endl;
+  }
+  catch(...) {
+    std::cerr<<pbName<<" unrecognized excpetion"<<std::endl;
+    std::cerr<<pbName<<"\t Finished \t exception"<<std::endl;
+    throw;
+  }
+  
+  
+  delete [] pbName;
+  delete [] myArgv[0];
+  delete [] myArgv[1];
+  delete [] myArgv;
+  return 0;
+}
diff --git a/src/Apps/Makefile.am b/src/Apps/Makefile.am
new file mode 100644
index 0000000..6ddf62a
--- /dev/null
+++ b/src/Apps/Makefile.am
@@ -0,0 +1,108 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 2071 2013-07-25 15:16:10Z stefan $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# What is done in this directory:
+
+if COIN_HAS_ASL
+  bin_PROGRAMS = bonmin
+  noinst_PROGRAMS = BonNodeSolver
+endif
+
+########################################################################
+#                                bonmin                                #
+########################################################################
+
+bonmin_SOURCES = BonMin.cpp
+
+bonmin_LDADD = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_LIBS) \
+	$(ASL_LIBS)
+
+bonmin_DEPENDENCIES = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_DEPENDENCIES) \
+	$(ASL_DEPENDENCIES)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin` \
+	$(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                              nodeSolver                              #
+########################################################################
+
+BonNodeSolver_SOURCES = BonNodeSolver.cpp
+
+BonNodeSolver_LDADD = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_LIBS) \
+	$(ASL_LIBS)
+
+BonNodeSolver_DEPENDENCIES = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_DEPENDENCIES) \
+	$(ASL_DEPENDENCIES)
+
+########################################################################
+#                     Installing manifest (MSVC++)                     #
+########################################################################
+
+if COIN_HAS_ASL
+if COIN_CXX_IS_CL
+install-exec-hook:
+	test -s bonmin.exe.manifest && \
+	mt -manifest bonmin.exe.manifest -outputresource:bonmin.exe;\
+	cp bonmin.exe $(bindir)/bonmin.exe
+endif
+endif
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+             BonMin.cppbak \
+             BonNodeSolver.cppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+
+DISTCLEANFILES =
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Apps/Makefile.in b/src/Apps/Makefile.in
new file mode 100644
index 0000000..40a76dc
--- /dev/null
+++ b/src/Apps/Makefile.in
@@ -0,0 +1,666 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at COIN_HAS_ASL_TRUE@bin_PROGRAMS = bonmin$(EXEEXT)
+ at COIN_HAS_ASL_TRUE@noinst_PROGRAMS = BonNodeSolver$(EXEEXT)
+subdir = src/Apps
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_BonNodeSolver_OBJECTS = BonNodeSolver.$(OBJEXT)
+BonNodeSolver_OBJECTS = $(am_BonNodeSolver_OBJECTS)
+am__DEPENDENCIES_1 =
+am_bonmin_OBJECTS = BonMin.$(OBJEXT)
+bonmin_OBJECTS = $(am_bonmin_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(BonNodeSolver_SOURCES) $(bonmin_SOURCES)
+DIST_SOURCES = $(BonNodeSolver_SOURCES) $(bonmin_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                                bonmin                                #
+########################################################################
+bonmin_SOURCES = BonMin.cpp
+bonmin_LDADD = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_LIBS) \
+	$(ASL_LIBS)
+
+bonmin_DEPENDENCIES = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_DEPENDENCIES) \
+	$(ASL_DEPENDENCIES)
+
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin` \
+	$(BONMINLIB_CFLAGS)
+
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                              nodeSolver                              #
+########################################################################
+BonNodeSolver_SOURCES = BonNodeSolver.cpp
+BonNodeSolver_LDADD = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_LIBS) \
+	$(ASL_LIBS)
+
+BonNodeSolver_DEPENDENCIES = \
+	../CbcBonmin/libbonminampl.la \
+	../CbcBonmin/libbonmin.la \
+	$(BONMINLIB_DEPENDENCIES) \
+	$(ASL_DEPENDENCIES)
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+             BonMin.cppbak \
+             BonNodeSolver.cppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+DISTCLEANFILES = 
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Apps/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Apps/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+BonNodeSolver$(EXEEXT): $(BonNodeSolver_OBJECTS) $(BonNodeSolver_DEPENDENCIES) 
+	@rm -f BonNodeSolver$(EXEEXT)
+	$(CXXLINK) $(BonNodeSolver_LDFLAGS) $(BonNodeSolver_OBJECTS) $(BonNodeSolver_LDADD) $(LIBS)
+bonmin$(EXEEXT): $(bonmin_OBJECTS) $(bonmin_DEPENDENCIES) 
+	@rm -f bonmin$(EXEEXT)
+	$(CXXLINK) $(bonmin_LDFLAGS) $(bonmin_OBJECTS) $(bonmin_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonMin.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonNodeSolver.Po at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+ at COIN_CXX_IS_CL_FALSE@install-exec-hook:
+ at COIN_HAS_ASL_FALSE@install-exec-hook:
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool clean-noinstPROGRAMS ctags \
+	distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-exec-hook install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+
+########################################################################
+#                     Installing manifest (MSVC++)                     #
+########################################################################
+
+ at COIN_CXX_IS_CL_TRUE@@COIN_HAS_ASL_TRUE at install-exec-hook:
+ at COIN_CXX_IS_CL_TRUE@@COIN_HAS_ASL_TRUE@	test -s bonmin.exe.manifest && \
+ at COIN_CXX_IS_CL_TRUE@@COIN_HAS_ASL_TRUE@	mt -manifest bonmin.exe.manifest -outputresource:bonmin.exe;\
+ at COIN_CXX_IS_CL_TRUE@@COIN_HAS_ASL_TRUE@	cp bonmin.exe $(bindir)/bonmin.exe
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/CbcBonmin/BonBabInfos.cpp b/src/CbcBonmin/BonBabInfos.cpp
new file mode 100644
index 0000000..5b273de
--- /dev/null
+++ b/src/CbcBonmin/BonBabInfos.cpp
@@ -0,0 +1,43 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/23/2007
+
+#include "BonBabInfos.hpp"
+
+namespace Bonmin
+{
+  /** Default constructor.*/
+  BabInfo::BabInfo(int type):
+      AuxInfo(type),
+      babPtr_(NULL)
+  {}
+
+  /** Constructor from OsiBabSolver.*/
+  BabInfo::BabInfo(const OsiBabSolver &other):
+      AuxInfo(other),
+      babPtr_(NULL)
+  {}
+
+  /** Copy constructor.*/
+  BabInfo::BabInfo(const BabInfo &other):
+      AuxInfo(other),
+      babPtr_(other.babPtr_)
+  {}
+
+  /** Destructor.*/
+  BabInfo::~BabInfo()
+  {}
+
+  /** Virtual copy constructor.*/
+  OsiAuxInfo *
+  BabInfo::clone() const
+  {
+    return new BabInfo(*this);
+  }
+}/* end namespace Bonmin*/
+
diff --git a/src/CbcBonmin/BonBabInfos.hpp b/src/CbcBonmin/BonBabInfos.hpp
new file mode 100644
index 0000000..908895e
--- /dev/null
+++ b/src/CbcBonmin/BonBabInfos.hpp
@@ -0,0 +1,57 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/23/2007
+
+#ifndef BonBabInfos_H
+#define BonBabInfos_H
+#include <stdlib.h>
+#include "BonAuxInfos.hpp"
+
+namespace Bonmin
+{
+  class Bab;
+  /** Bonmin class for passing info between components of branch-and-cuts.*/
+  class BabInfo : public Bonmin::AuxInfo
+  {
+  public:
+    /** Default constructor.*/
+    BabInfo(int type);
+
+    /** Constructor from OsiBabSolver.*/
+    BabInfo(const OsiBabSolver &other);
+
+    /** Copy constructor.*/
+    BabInfo(const BabInfo &other);
+
+    /** Destructor.*/
+    virtual ~BabInfo();
+
+    /** Virtual copy constructor.*/
+    virtual OsiAuxInfo * clone() const;
+
+    /** Set pointer to the branch-and-bound algorithm (to access CbcModel).*/
+    void setBabPtr(Bab * babPtr)
+    {
+      babPtr_ = babPtr;
+    }
+
+    /** Pointer to the branch-and-bound algorithm (to access CbcModel).*/
+    Bab * babPtr()
+    {
+      return babPtr_;
+    }
+
+    bool hasSolution() const{
+      return bestSolution_ != NULL;}
+  protected:
+    /** Pointer to branch-and-bound algorithm.*/
+    Bab * babPtr_;
+  };
+}/* End namespace.*/
+
+#endif
diff --git a/src/CbcBonmin/BonCbc.cpp b/src/CbcBonmin/BonCbc.cpp
new file mode 100644
index 0000000..bcb96e1
--- /dev/null
+++ b/src/CbcBonmin/BonCbc.cpp
@@ -0,0 +1,700 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/19/2007
+
+
+#include "BonCbc.hpp"
+#include "BonOACutGenerator2.hpp"
+#include "BonCbcNlpStrategy.hpp"
+#include "BonBabInfos.hpp"
+#include "CbcModel.hpp"
+#include "CbcBranchActual.hpp"
+#include "CbcCutGenerator.hpp"
+#include "CbcCompareActual.hpp"
+#include "CbcCompareObjective.hpp"
+#include "CbcCompareEstimate.hpp"
+
+#include "BonExitCodes.hpp"
+
+#include "BonChooseVariable.hpp"
+#include "BonGuessHeuristic.hpp"
+
+#include "BonDiver.hpp"
+#include "BonLinearCutsGenerator.hpp"
+#include "BonTMINLPLinObj.hpp"
+// sets cutoff a bit above real one, to avoid single-point feasible sets
+#define CUTOFF_TOL 1e-6
+
+// Code to enable user interuption
+static CbcModel * currentBranchModel = NULL; //pointer to the main b&b
+Bonmin::OACutGenerator2 * currentOA = NULL; //pointer to the OA generator
+CbcModel * OAModel; // pointer to the submip if using Cbc
+bool BonminAbortAll;
+
+#define SIGNAL
+#ifdef SIGNAL
+#include "CoinSignal.hpp"
+
+extern "C"
+{
+
+  static bool BonminInteruptedOnce =false;
+  static void signal_handler(int whichSignal) {
+    if (BonminInteruptedOnce) {
+      std::cerr<<"User forced interuption"<<std::endl;
+      exit(0);
+    }
+    if (currentBranchModel!=NULL)
+      currentBranchModel->sayEventHappened(); // stop at next node
+    if (OAModel!=NULL)
+      OAModel->sayEventHappened(); // stop at next node
+    if (currentOA!=NULL)
+      currentOA->parameter().maxLocalSearchTime_ = 0.; // stop OA
+     
+    BonminAbortAll = true;
+    BonminInteruptedOnce = true;
+    return;
+  }
+}
+#endif
+
+namespace Bonmin
+{
+
+  /** Constructor.*/
+  Bab::Bab():
+      bestSolution_(NULL),
+      mipStatus_(),
+      bestObj_(1e200),
+      bestBound_(-1e200),
+      continuousRelaxation_(-COIN_DBL_MAX),
+      numNodes_(0),
+      mipIterationCount_(0),
+      model_(),
+      modelHandler_(NULL),
+      objects_(0),
+      nObjects_(0)
+  {}
+
+  /** Destructor.*/
+  Bab::~Bab()
+  {
+    if (bestSolution_) delete [] bestSolution_;
+    bestSolution_ = NULL;
+    for ( int i = 0 ; i < nObjects_ ; i++) {
+      delete objects_[i];
+    }
+    delete [] objects_;
+    delete modelHandler_;
+  }
+
+  /**operator() performs the branchAndBound*/
+  void
+  Bab::operator()(BabSetupBase & s)
+  {
+    branchAndBound(s);
+  }
+
+  /** Perform a branch-and-bound on given setup.*/
+  void
+  Bab::branchAndBound(BabSetupBase & s)
+  {
+
+    double remaining_time = s.getDoubleParameter(BabSetupBase::MaxTime) + CoinCpuTime();
+    /* Put a link to this into solver.*/
+    OsiBabSolver *  babInfo = dynamic_cast<OsiBabSolver *>(s.continuousSolver()->getAuxiliaryInfo());
+    assert(babInfo);
+    Bonmin::BabInfo *  bonBabInfoPtr = dynamic_cast<Bonmin::BabInfo*>(babInfo);
+    if (bonBabInfoPtr == NULL) {//Replace with a Bonmin::babInfo
+      bonBabInfoPtr = new Bonmin::BabInfo(*babInfo);
+      s.continuousSolver()->setAuxiliaryInfo(bonBabInfoPtr);
+      delete bonBabInfoPtr;
+      bonBabInfoPtr = dynamic_cast<Bonmin::BabInfo*>(s.continuousSolver()->getAuxiliaryInfo());
+    }
+    bonBabInfoPtr->setBabPtr(this);
+
+    s.nonlinearSolver()->solver()->setup_global_time_limit(s.getDoubleParameter(BabSetupBase::MaxTime));
+    OsiSolverInterface * solver = s.continuousSolver()->clone();
+    delete modelHandler_;
+    modelHandler_ = s.continuousSolver()->messageHandler()->clone();
+    model_.passInMessageHandler(modelHandler_);
+    model_.assignSolver(solver, true);
+
+
+    //  s.continuousSolver() = model_.solver();
+    //   if(s.continuousSolver()->objects()!=NULL){
+    //     model_.addObjects(s.continuousSolver()->numberObjects(),s.continuousSolver()->objects());
+    //   }
+
+    int specOpt = s.getIntParameter(BabSetupBase::SpecialOption);
+    if (specOpt) {
+      model_.setSpecialOptions(specOpt);
+      if (specOpt==16) {
+        CbcNlpStrategy strat(s.getIntParameter(BabSetupBase::MaxFailures), 
+			     s.getIntParameter(BabSetupBase::MaxInfeasible), 
+			     s.getIntParameter(BabSetupBase::FailureBehavior));
+        model_.setStrategy(strat);
+      }
+    }
+
+    model_.setMaximumCutPasses(s.getIntParameter(BabSetupBase::NumCutPasses));
+    model_.setMaximumCutPassesAtRoot(s.getIntParameter(BabSetupBase::NumCutPassesAtRoot));
+
+    //Setup cutting plane methods
+    for (BabSetupBase::CuttingMethods::iterator i = s.cutGenerators().begin() ;
+        i != s.cutGenerators().end() ; i++) {
+
+      OaDecompositionBase * oa = dynamic_cast<OaDecompositionBase *>(i->cgl);
+      if (oa && oa->reassignLpsolver())
+        oa->assignLpInterface(model_.solver());
+      model_.addCutGenerator(i->cgl,i->frequency,i->id.c_str(), i->normal,
+                               i->atSolution);
+      if(i->always){
+         model_.cutGenerators()[model_.numberCutGenerators()-1]
+                  ->setMustCallAgain(true);
+      }
+    }
+
+    for (BabSetupBase::HeuristicMethods::iterator i = s.heuristics().begin() ;
+        i != s.heuristics().end() ; i++) {
+      CbcHeuristic * heu = i->heuristic;
+      heu->setModel(&model_);
+      model_.addHeuristic(heu, i->id.c_str());
+    }
+
+
+    //need to record solver logLevel here
+    int logLevel = s.continuousSolver()->messageHandler()->logLevel();
+
+    //Set true branch-and-bound parameters
+    model_.setLogLevel(s.getIntParameter(BabSetupBase::BabLogLevel));
+
+    // Put back solver logLevel
+    model_.solver()->messageHandler()->setLogLevel(logLevel);
+
+    model_.setPrintFrequency(s.getIntParameter(BabSetupBase::BabLogInterval));
+
+    //Pass over user set branching priorities to Cbc
+    if (s.continuousSolver()->objects()==NULL) {
+      //assert (s.branchingMethod() == NULL);
+      const OsiTMINLPInterface * nlpSolver = s.nonlinearSolver();
+      //set priorities, prefered directions...
+      const int * priorities = nlpSolver->getPriorities();
+      const double * upPsCosts = nlpSolver->getUpPsCosts();
+      const double * downPsCosts = nlpSolver->getDownPsCosts();
+      const int * directions = nlpSolver->getBranchingDirections();
+      bool hasPseudo = (upPsCosts!=NULL);
+      model_.findIntegers(true,hasPseudo);
+      OsiObject ** simpleIntegerObjects = model_.objects();
+      int numberObjects = model_.numberObjects();
+      if (priorities != NULL || directions != NULL || hasPseudo) {
+        for (int i = 0 ; i < numberObjects ; i++) {
+          CbcObject * object = dynamic_cast<CbcObject *>
+              (simpleIntegerObjects[i]);
+          int iCol = object->columnNumber();
+          if (priorities)
+            object->setPriority(priorities[iCol]);
+          if (directions)
+            object->setPreferredWay(directions[iCol]);
+          if (upPsCosts) {
+            CbcSimpleIntegerPseudoCost * pscObject =
+              dynamic_cast<CbcSimpleIntegerPseudoCost*> (object);
+            pscObject->setUpPseudoCost(upPsCosts[iCol]);
+            pscObject->setDownPseudoCost(downPsCosts[iCol]);
+          }
+        }
+      }
+
+#if 1
+      // Now pass user set Sos constraints (code inspired from CoinSolve.cpp)
+      const TMINLP::SosInfo * sos = s.nonlinearSolver()->model()->sosConstraints();
+      if (!s.getIntParameter(BabSetupBase::DisableSos) && sos && sos->num > 0) 
+	//we have some sos constraints
+      {
+        const OsiTMINLPInterface * nlpSolver = s.nonlinearSolver();
+        const int & numSos = sos->num;
+       (*nlpSolver->messageHandler())<<"Adding "<<sos->num<<" sos constraints."
+                                     <<CoinMessageEol;
+
+        CbcObject ** objects = new CbcObject*[numSos];
+        const int * starts = sos->starts;
+        const int * indices = sos->indices;
+        const char * types = sos->types;
+        const double * weights = sos->weights;
+        //verify if model has user set priorities
+        bool hasPriorities = false;
+        const int * varPriorities = nlpSolver->getPriorities();
+        int numberObjects = model_.numberObjects();
+        if (varPriorities)
+        {
+          for (int i = 0 ; i < numberObjects ; i++) {
+            if (varPriorities[i]) {
+              hasPriorities = true;
+              break;
+            }
+          }
+        }
+        const int * sosPriorities = sos->priorities;
+        if (sosPriorities)
+        {
+          for (int i = 0 ; i < numSos ; i++) {
+            if (sosPriorities[i]) {
+              hasPriorities = true;
+              break;
+            }
+          }
+        }
+        for (int i = 0 ; i < numSos ; i++)
+        {
+          int start = starts[i];
+          int length = starts[i + 1] - start;
+#ifdef DO_IT_NWAY
+          printf("setting nway object\n"),
+          objects[i] = new CbcNWay(&model_, length, &indices[start],
+              i);
+          objects[i]->setPriority(1);
+#else
+          objects[i] = new CbcSOS(&model_, length, &indices[start],
+              &weights[start], i, types[i]);
+          objects[i]->setPriority(10);
+#endif
+          if (hasPriorities && sosPriorities && sosPriorities[i]) {
+            objects[i]->setPriority(sosPriorities[i]);
+          }
+        }
+        model_.addObjects(numSos, objects);
+        for (int i = 0 ; i < numSos ; i++)
+          delete objects[i];
+        delete [] objects;
+      }
+#endif
+      //If Setup contains more objects add them to Cbc
+      if (s.objects().size()) {
+        CbcObject ** objects = new CbcObject *[s.objects().size()];
+        for (unsigned int i = 0 ; i < s.objects().size() ; i++) {
+          objects[i] = dynamic_cast<CbcObject *> (s.objects()[i]);
+          assert(objects[i]);
+          objects[i]->setModel(&model_);
+        }
+	model_.addObjects((int)s.objects().size(), objects);
+        delete [] objects;
+      }
+
+      replaceIntegers(model_.objects(), model_.numberObjects());
+    }
+    else {//Pass in objects to Cbc
+    // Redundant definition of default branching (as Default == User)
+    assert (s.branchingMethod() != NULL);
+
+    model_.addObjects (s.continuousSolver()->numberObjects(),
+		       s.continuousSolver()->objects());
+
+    CbcBranchDefaultDecision branch;
+    s.branchingMethod()->setSolver(model_.solver());
+    BonChooseVariable * strong2 = dynamic_cast<BonChooseVariable *>(s.branchingMethod());
+    if (strong2)
+      strong2->setCbcModel(&model_);
+    branch.setChooseMethod(*s.branchingMethod());
+
+    model_.setBranchingMethod(&branch);
+	// prevent duplicating object when copying in CbcModel.cpp
+	model_.solver()->deleteObjects();
+    }
+
+    model_.setDblParam(CbcModel::CbcCutoffIncrement, s.getDoubleParameter(BabSetupBase::CutoffDecr));
+
+    model_.setCutoff(s.getDoubleParameter(BabSetupBase::Cutoff) + CUTOFF_TOL);
+
+    model_.setDblParam(CbcModel::CbcAllowableGap, s.getDoubleParameter(BabSetupBase::AllowableGap));
+    model_.setDblParam(CbcModel::CbcAllowableFractionGap, s.getDoubleParameter(BabSetupBase::AllowableFractionGap));
+
+    // Definition of node selection strategy
+
+    if (s.nodeComparisonMethod()==BabSetupBase::bestBound) {
+      CbcCompareObjective compare;
+      model_.setNodeComparison(compare);
+    }
+    else if (s.nodeComparisonMethod()==BabSetupBase::DFS) {
+      CbcCompareDepth compare;
+      model_.setNodeComparison(compare);
+    }
+    else if (s.nodeComparisonMethod()==BabSetupBase::BFS) {
+      CbcCompareDefault compare;
+      compare.setWeight(0.0);
+      model_.setNodeComparison(compare);
+    }
+    else if (s.nodeComparisonMethod()==BabSetupBase::dynamic) {
+      CbcCompareDefault compare;
+      model_.setNodeComparison(compare);
+    }
+    else if (s.nodeComparisonMethod()==BabSetupBase::bestGuess) {
+      // Right now, this is a mess.  We need a separation of the
+      // pseudo costs from the ChooseVariable method
+      CbcCompareEstimate compare;
+      model_.setNodeComparison(compare);
+      GuessHeuristic * guessHeu = new GuessHeuristic(model_);
+      model_.addHeuristic(guessHeu);
+      delete guessHeu;
+    }
+
+    if (s.treeTraversalMethod() == BabSetupBase::HeapOnly) {
+      //Do nothing this is the default of Cbc.
+    }
+    else if (s.treeTraversalMethod() == BabSetupBase::DiveFromBest) {
+      CbcDiver treeTraversal;
+      treeTraversal.initialize(s);
+      model_.passInTreeHandler(treeTraversal);
+    }
+    else if (s.treeTraversalMethod() == BabSetupBase::ProbedDive) {
+      CbcProbedDiver treeTraversal;
+      treeTraversal.initialize(s);
+      model_.passInTreeHandler(treeTraversal);
+    }
+    else if (s.treeTraversalMethod() == BabSetupBase::DfsDiveFromBest) {
+      CbcDfsDiver treeTraversal;
+      treeTraversal.initialize(s);
+      model_.passInTreeHandler(treeTraversal);
+    }
+    else if (s.treeTraversalMethod() == BabSetupBase::DfsDiveDynamic) {
+      CbcDfsDiver treeTraversal;
+      treeTraversal.initialize(s);
+      model_.passInTreeHandler(treeTraversal);
+
+      DiverCompare compare;
+      compare.setComparisonDive(*model_.nodeComparison());
+      compare.setComparisonBound(CbcCompareObjective());
+      CbcDfsDiver * dfs = dynamic_cast<CbcDfsDiver *> (model_.tree());
+      assert(dfs);
+      compare.setDiver(dfs);
+      model_.setNodeComparison(compare);
+    }
+
+    model_.setNumberStrong(s.getIntParameter(BabSetupBase::NumberStrong));
+    model_.setNumberBeforeTrust(s.getIntParameter(BabSetupBase::MinReliability));
+    model_.setNumberPenalties(8);
+
+    model_.setDblParam(CbcModel::CbcMaximumSeconds, s.getDoubleParameter(BabSetupBase::MaxTime));
+
+    model_.setMaximumNodes(s.getIntParameter(BabSetupBase::MaxNodes));
+
+    model_.setMaximumNumberIterations(s.getIntParameter(BabSetupBase::MaxIterations));
+
+    model_.setMaximumSolutions(s.getIntParameter(BabSetupBase::MaxSolutions));
+
+    model_.setIntegerTolerance(s.getDoubleParameter(BabSetupBase::IntTol));
+
+
+
+    //Get objects from model_ if it is not null means there are some sos constraints or non-integer branching object
+    // pass them to cut generators.
+    OsiObject ** objects = model_.objects();
+    if (specOpt!=16 && objects) {
+      int numberObjects = model_.numberObjects();
+      if (objects_ != NULL) {
+        for (int i = 0 ; i < nObjects_; i++)
+          delete objects_[i];
+      }
+      delete [] objects_;
+      objects_ = new OsiObject*[numberObjects];
+      nObjects_ = numberObjects;
+      for (int i = 0 ; i < numberObjects; i++) {
+        OsiObject * obj = objects[i];
+        CbcSimpleInteger * intObj = dynamic_cast<CbcSimpleInteger *> (obj);
+        if (intObj) {
+          objects_[i] = intObj->osiObject();
+        }
+        else {
+          CbcSOS * sosObj = dynamic_cast<CbcSOS *>(obj);
+          if (sosObj) objects_[i] = sosObj->osiObject(model_.solver());
+          else {//Maybe an unsupported CbcObject
+            CbcObject * cbcObj = dynamic_cast<CbcObject *>(obj);
+            if (cbcObj) {
+              std::cerr<<"Unsupported CbcObject appears in the code"<<std::endl;
+              throw UNSUPPORTED_CBC_OBJECT;
+            }
+            else {//It has to be an OsiObject.
+              objects_[i]=obj->clone();
+            }
+          }
+        }
+      }
+      CbcCutGenerator ** gen = model_.cutGenerators();
+      int numGen = model_.numberCutGenerators();
+      for (int i = 0 ; i < numGen ; i++) {
+        OaDecompositionBase * oa = dynamic_cast<OaDecompositionBase * >(gen[i]->generator());
+        if (oa)//pass objects
+          oa->setObjects(objects_,nObjects_);
+      }
+    }
+
+#ifdef SIGNAL
+    //CoinSighandler_t saveSignal=SIG_DFL;
+    // register signal handler  FIXME restore original signal handler when finished
+    /*saveSignal =*/ signal(SIGINT,signal_handler);
+#endif
+
+    currentBranchModel = &model_;
+
+
+    try {
+    //Get the time and start.
+    {
+      OsiTMINLPInterface * tmpOsi = NULL;
+      if(s.nonlinearSolver() == s.continuousSolver()){
+        tmpOsi = dynamic_cast<OsiTMINLPInterface *> (model_.solver());
+        tmpOsi->forceSolverOutput(s.getIntParameter(BabSetupBase::RootLogLevel)); 
+      }
+      model_.initialSolve();
+      if(tmpOsi != NULL){
+        tmpOsi->setSolverOutputToDefault(); 
+      }
+    }
+
+    if(!BonminInteruptedOnce){
+    int ival;
+    s.options()->GetEnumValue("enable_dynamic_nlp", ival, "bonmin.");
+    if(s.nonlinearSolver() == s.continuousSolver() && ival)
+    {
+      if(!model_.solver()->isProvenOptimal() ){//Something went wrong check if objective is linear and alternate model
+                                            // can be solved
+        OsiTMINLPInterface * tmpOsi = dynamic_cast<OsiTMINLPInterface *> (model_.solver());
+        TMINLPLinObj * tmp_tminlp = dynamic_cast<TMINLPLinObj *> (tmpOsi->model());
+        tmpOsi->setModel(tmp_tminlp->tminlp());
+        model_.initialSolve();
+      } 
+      else {
+        LinearCutsGenerator cgl;
+        cgl.initialize(s); 
+        OsiCuts cuts;
+        cgl.generateCuts(*model_.solver(), cuts);
+        std::vector<OsiRowCut *> mycuts(cuts.sizeRowCuts());
+        for(int i = 0 ; i < cuts.sizeRowCuts() ; i++){
+          mycuts[i] = cuts.rowCutPtr(i);
+        }
+        model_.solver()->applyRowCuts((int)mycuts.size(), const_cast<const OsiRowCut **>(&mycuts[0]));
+      }
+
+       //Added by Claudia
+       OsiTMINLPInterface * nlpSolver = dynamic_cast<OsiTMINLPInterface *>(model_.solver());
+       if(nlpSolver && nlpSolver->getNewCutoffDecr()!=COIN_DBL_MAX)
+          model_.setDblParam(CbcModel::CbcCutoffIncrement, nlpSolver->getNewCutoffDecr());
+
+       model_.solver()->resolve();
+
+    }
+
+    continuousRelaxation_ =model_.solver()->getObjValue();
+    if (specOpt==16)//Set warm start point for Ipopt
+    {
+#if 1
+      const double * colsol = model_.solver()->getColSolution();
+      const double * duals = model_.solver()->getRowPrice();
+
+      OsiTMINLPInterface * tnlpSolver = dynamic_cast<OsiTMINLPInterface *>(model_.solver());
+      // Primal dual point is not copied if one (supposedely a better one) has already been put into the solver.
+      if(tnlpSolver->problem()->has_x_init() != 2){
+        model_.solver()->setColSolution(colsol);
+        model_.solver()->setRowPrice(duals);
+      }
+#else
+      OsiTMINLPInterface * tnlpSolver = dynamic_cast<OsiTMINLPInterface *>(model_.solver());
+      CoinWarmStart * warm = tnlpSolver->solver()->getWarmStart(tnlpSolver->problem());
+      tnlpSolver->solver()->setWarmStart(warm, tnlpSolver->problem());
+      delete warm;
+#endif
+
+#if 0 // Sometimes primal dual point is problematic in the context of Cut-and-branch
+    model_.solver()->resolve();
+    if(!model_.solver()->isProvenOptimal())
+       model_.solver()->setColSolution(NULL);
+#endif 
+    }
+
+    // to get node parent info in Cbc, pass parameter 3.
+    //model_.branchAndBound(3);
+    remaining_time -= CoinCpuTime();
+    model_.setDblParam(CbcModel::CbcMaximumSeconds, remaining_time);
+    if(remaining_time > 0.)
+      model_.branchAndBound();
+    }
+    }
+    catch(TNLPSolver::UnsolvedError *E){
+      s.nonlinearSolver()->model()->finalize_solution(TMINLP::MINLP_ERROR,
+           0,
+           NULL,
+           DBL_MAX);
+      throw E;
+   
+    }
+    numNodes_ = model_.getNodeCount();
+    bestObj_ = model_.getObjValue();
+    bestBound_ = model_.getBestPossibleObjValue();
+    mipIterationCount_ = model_.getIterationCount();
+
+    bool hasFailed = false;
+    if (specOpt==16)//Did we continue branching on a failure
+    {
+      CbcNlpStrategy * nlpStrategy = dynamic_cast<CbcNlpStrategy *>(model_.strategy());
+      if (nlpStrategy)
+        hasFailed = nlpStrategy->hasFailed();
+      else {
+        throw CoinError("BonCbc", "Bab", "Inconsistent construction of model_ strategy is"
+                        " not the right type.");
+      }
+    }
+    else
+      hasFailed = s.nonlinearSolver()->hasContinuedOnAFailure();
+
+    // Output summarizing cut generators (taken from CbcSolver.cpp)
+    // ToDo put into proper print level
+
+    
+
+    int numberGenerators = model_.numberCutGenerators();
+    for (int iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
+      CbcCutGenerator * generator = model_.cutGenerator(iGenerator);
+      //CglStored * stored = dynamic_cast<CglStored*>(generator->generator());
+      if (true&&!(generator->numberCutsInTotal() || generator->numberColumnCuts()))
+	continue;
+       if(modelHandler_->logLevel() >= 1) {
+       	*modelHandler_ << generator->cutGeneratorName()
+       		<< "was tried" << generator->numberTimesEntered()
+       		<< "times and created" << generator->numberCutsInTotal()+generator->numberColumnCuts()
+       		<< "cuts of which" << generator->numberCutsActive()
+       		<< "were active after adding rounds of cuts";
+         if (generator->timing()) {
+         	char timebuf[20];
+         	sprintf(timebuf, "(%.3fs)", generator->timeInCutGenerator());
+         	*modelHandler_ << timebuf << CoinMessageEol;
+         }
+         else {
+         	*modelHandler_ << CoinMessageEol;
+         }
+       }
+    }
+
+    if (hasFailed) {
+    	*model_.messageHandler()
+      << "************************************************************" << CoinMessageEol
+      << "WARNING : Optimization failed on an NLP during optimization"  << CoinMessageEol
+      << "  (no optimal value found within tolerances)."  << CoinMessageEol
+      << "  Optimization was not stopped because option"  << CoinMessageEol
+      << "\"nlp_failure_behavior\" has been set to fathom but"  << CoinMessageEol
+      << " beware that reported solution may not be optimal"  << CoinMessageEol
+      << "************************************************************" << CoinMessageEol;
+    }
+    TMINLP::SolverReturn status = TMINLP::MINLP_ERROR;
+
+    if(BonminAbortAll) status = TMINLP::USER_INTERRUPT;
+    if (model_.numberObjects()==0) {
+      if (bestSolution_)
+        delete [] bestSolution_;
+      OsiSolverInterface * solver = 
+             (s.nonlinearSolver() == s.continuousSolver())? 
+             model_.solver() : s.nonlinearSolver();
+      if(! solver->isProvenOptimal()){
+         bestSolution_ = NULL;
+         if ( solver->isProvenPrimalInfeasible () ) {
+           status = TMINLP::INFEASIBLE;
+           mipStatus_ = ProvenInfeasible;
+           bestObj_ = DBL_MAX;
+           bestBound_ = DBL_MAX;
+         }
+         else if ( solver->isProvenDualInfeasible () ) {
+           status = TMINLP::CONTINUOUS_UNBOUNDED;
+           mipStatus_ = UnboundedOrInfeasible;
+           bestObj_ = - DBL_MAX;
+           bestBound_ = - DBL_MAX;
+         }
+         else {
+           mipStatus_ = NoSolutionKnown;
+           bestObj_ = DBL_MAX;
+           bestBound_ = - DBL_MAX;
+         }
+      }
+      else {
+         bestSolution_ = new double[solver->getNumCols()];
+         CoinCopyN(solver->getColSolution(), solver->getNumCols(),
+            bestSolution_);
+         bestObj_ = bestBound_ = solver->getObjValue();
+          status = TMINLP::SUCCESS;
+          mipStatus_ = FeasibleOptimal;
+      }
+    }
+    else {
+      if (bonBabInfoPtr->bestSolution2().size() > 0) {
+         assert((int) bonBabInfoPtr->bestSolution2().size() == s.nonlinearSolver()->getNumCols());
+         if (bestSolution_)
+           delete [] bestSolution_;
+         bestSolution_ = new double[s.nonlinearSolver()->getNumCols()];
+         std::copy(bonBabInfoPtr->bestSolution2().begin(), bonBabInfoPtr->bestSolution2().end(),
+             bestSolution_);
+         bestObj_ = (bonBabInfoPtr->bestObj2());
+          (*s.nonlinearSolver()->messageHandler())<<"\nReal objective function: "
+                                               <<bestObj_<<CoinMessageEol;
+       }
+       else if (model_.bestSolution()) {
+         if (bestSolution_)
+           delete [] bestSolution_;
+         bestSolution_ = new double[s.nonlinearSolver()->getNumCols()];
+         CoinCopyN(model_.bestSolution(), s.nonlinearSolver()->getNumCols(), bestSolution_);
+       }
+       if(remaining_time <= 0.){
+         status = TMINLP::LIMIT_EXCEEDED;
+         if (bestSolution_) {
+           mipStatus_ = Feasible;
+         }
+         else {
+           mipStatus_ = NoSolutionKnown;
+         }
+       }
+       else if (model_.status() == 0) {
+         if(model_.isContinuousUnbounded()){
+           status = TMINLP::CONTINUOUS_UNBOUNDED;
+           mipStatus_ = UnboundedOrInfeasible;
+         }
+         else
+         if (bestSolution_) {
+           status = TMINLP::SUCCESS;
+           mipStatus_ = FeasibleOptimal;
+         }
+         else {
+           status = TMINLP::INFEASIBLE;
+           mipStatus_ = ProvenInfeasible;
+         }
+       }
+       else if (model_.status() == 1 || model_.status() == 5) {
+         status = model_.status() == 1 ? TMINLP::LIMIT_EXCEEDED : TMINLP::USER_INTERRUPT;
+         if (bestSolution_) {
+           mipStatus_ = Feasible;
+         }
+         else {
+           mipStatus_ = NoSolutionKnown;
+         }
+    }
+    else if (model_.status()==2) {
+      status = TMINLP::MINLP_ERROR;
+    }
+  }
+  s.nonlinearSolver()->model()->finalize_solution(status,
+     s.nonlinearSolver()->getNumCols(),
+     bestSolution_,
+     bestObj_);
+}
+
+
+  /** return the best known lower bound on the objective value*/
+  double
+  Bab::bestBound()
+  {
+    if (mipStatus_ == ProvenInfeasible) return 1e200;
+    else return bestBound_;
+  }
+
+
+}
diff --git a/src/CbcBonmin/BonCbc.hpp b/src/CbcBonmin/BonCbc.hpp
new file mode 100644
index 0000000..8649166
--- /dev/null
+++ b/src/CbcBonmin/BonCbc.hpp
@@ -0,0 +1,127 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/19/2007
+
+#ifndef BonCbc_H
+#define BonCbc_H
+
+//#include "BonBabSetupBase.hpp"
+#include "CbcModel.hpp"
+
+namespace Bonmin
+{
+  class BabSetupBase;
+  class Bab
+  {
+  public:
+    /** Integer optimization return codes.*/
+    enum MipStatuses {FeasibleOptimal /** Optimum solution has been found and its optimality proved.*/,
+        ProvenInfeasible /** Problem has been proven to be infeasible.*/,
+        Feasible /** An integer solution to the problem has been found.*/,
+        UnboundedOrInfeasible /*Coninuous relaxation is unbounded.*/,
+        NoSolutionKnown/** No feasible solution to the problem is known*/,
+        NumMipStats};
+
+
+    /** Constructor.*/
+    Bab();
+    /** destructor.*/
+    virtual ~Bab();
+    /** Perform a branch-and-bound using given setup.*/
+    virtual void branchAndBound(BabSetupBase & s);
+
+    /**operator() performs the branchAndBound*/
+    virtual void operator()(BabSetupBase & s);
+
+    /**operator() performs the branchAndBound*/
+    virtual void operator()(BabSetupBase * s){
+       operator()(*s);}
+
+    /** get the best solution known to the problem (is optimal if MipStatus is FeasibleOptimal).
+      if no solution is known returns NULL.*/
+    const double * bestSolution() const
+    {
+      return bestSolution_;
+    }
+    /** return objective value of the bestSolution */
+    double bestObj() const
+    {
+      return bestObj_;
+    }
+
+    /** return Mip Status */
+    MipStatuses mipStatus() const
+    {
+      return mipStatus_;
+    }
+
+    /** return the best known lower bound on the objective value*/
+    double bestBound();
+
+    /** return the total number of nodes explored.*/
+    int numNodes() const
+    {
+      return numNodes_;
+    }
+    /** return the total number of iterations in the last mip solved.*/
+    int iterationCount()
+    {
+      return mipIterationCount_;
+    }
+    /** returns the value of the continuous relaxation. */
+    double continuousRelaxation()
+    {
+      return continuousRelaxation_;
+    }
+
+    /** virtual callback function to eventually modify objects for integer variable
+      (replace with user set). This is called after CbcModel::findIntegers */
+    virtual void replaceIntegers(OsiObject ** objects, int numberObjects)
+    {}
+    /** Get cbc model used to solve. */
+    const CbcModel&  model() const
+    {
+      return model_;
+    }
+
+    /** Get cbc model used to solve as non-const, in case we want to
+        change options before things happen */
+    CbcModel&  model()
+    {
+      return model_;
+    }
+
+  protected:
+    /** Stores the solution of MIP. */
+    double * bestSolution_;
+
+    /** Status of the mip solved*/
+    MipStatuses mipStatus_;
+    /** objValue of MIP */
+    double bestObj_;
+    /** best known (lower) bound.*/
+    double bestBound_;
+    /** Continuous relaxation of the problem */
+    double continuousRelaxation_;
+    /** Number of nodes enumerated.*/
+    int numNodes_;
+    /** get total number of iterations in last mip solved.*/
+    int mipIterationCount_;
+    /** CbcModel used to solve problem.*/
+    CbcModel model_;
+    /** Message handler for CbcModel. */
+    CoinMessageHandler * modelHandler_;
+    /** \brief OsiObjects of the model.
+      * this is not null if and only if there are some non-simple-integer branching objects such as SOS constraints.
+      * It is up to Bab to pass them over to appropriate components of the algorithm. */
+    OsiObject** objects_;
+    /** number of objects.*/
+    int nObjects_;
+  };
+}
+#endif
diff --git a/src/CbcBonmin/BonCbcNlpStrategy.cpp b/src/CbcBonmin/BonCbcNlpStrategy.cpp
new file mode 100644
index 0000000..c18ece6
--- /dev/null
+++ b/src/CbcBonmin/BonCbcNlpStrategy.cpp
@@ -0,0 +1,172 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// John J. Forrest, International Business Machines Corporation
+// P. Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+
+#include <cassert>
+#include <cmath>
+#include <cfloat>
+
+#include "CoinPragma.hpp"
+#include "OsiSolverInterface.hpp"
+#include "CbcModel.hpp"
+#include "BonCbcNlpStrategy.hpp"
+#include "BonCbcNode.hpp"
+
+#include "BonOsiTMINLPInterface.hpp"
+namespace Bonmin
+{
+// Default Constructor
+  CbcNlpStrategy::CbcNlpStrategy(int maxFailures,
+      int maxInfeasibles,
+      int pretendFailIsInfeasible)
+      :
+      hasFailed_(false),
+      maxFailure_(maxFailures),
+      maxInfeasible_(maxInfeasibles),
+      pretendFailIsInfeasible_(pretendFailIsInfeasible)
+  {
+    setPreProcessState(0);
+  }
+
+
+// Destructor
+  CbcNlpStrategy::~CbcNlpStrategy ()
+  {}
+
+// Clone
+  CbcStrategy *
+  CbcNlpStrategy::clone() const
+  {
+    return new CbcNlpStrategy(*this);
+  }
+
+// Copy constructor
+  CbcNlpStrategy::CbcNlpStrategy(const CbcNlpStrategy & rhs)
+      :
+      hasFailed_(false),
+      maxFailure_(rhs.maxFailure_),
+      maxInfeasible_(rhs.maxInfeasible_),
+      pretendFailIsInfeasible_(rhs.pretendFailIsInfeasible_)
+  {}
+// Return a new Full node information pointer (descendant of CbcFullNodeInfo)
+  CbcNodeInfo *
+  CbcNlpStrategy::fullNodeInfo(CbcModel * model,int numberRowsAtContinuous) const
+  {
+    return new CbcFullNodeInfo(model,numberRowsAtContinuous);
+  }
+// Return a new Partial node information pointer (descendant of CbcPartialNodeInfo)
+  CbcNodeInfo *
+  CbcNlpStrategy::partialNodeInfo(CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
+      int numberChangedBounds,const int * variables,
+      const double * boundChanges,
+      const CoinWarmStartDiff *basisDiff) const
+  {
+    return new BonCbcPartialNodeInfo(model,parent, owner, numberChangedBounds, variables,
+        boundChanges,basisDiff);
+  }
+  /* After a CbcModel::resolve this can return a status
+     -1 no effect
+     0 treat as optimal
+     1 as 0 but do not do any more resolves (i.e. no more cuts)
+     2 treat as infeasible
+  */
+  int
+  CbcNlpStrategy::status(CbcModel * model, CbcNodeInfo * parent,int whereFrom)
+  {
+
+    OsiSolverInterface * solver = model->solver();//get solver
+    int feasible = 1;
+    bool solved = true;
+    int returnStatus = -1;
+    BonCbcPartialNodeInfo * bmNodeInfo = dynamic_cast<BonCbcPartialNodeInfo *>(parent);
+    if (!bmNodeInfo) return -1;
+
+    int seqOfInfeasiblesSize = bmNodeInfo->getSequenceOfInfeasiblesSize();
+    int seqOfUnsolvedSize = bmNodeInfo->getSequenceOfUnsolvedSize();
+
+
+    if (solver->isAbandoned()) {
+      solved = false;
+      seqOfUnsolvedSize++;
+      ;
+    }
+    else if (solver->isProvenPrimalInfeasible()) {
+      feasible = 0;
+      seqOfInfeasiblesSize++;
+    }
+
+    if (((seqOfUnsolvedSize==0) || (maxFailure_ == 0)) &&
+        ((maxInfeasible_== 0) || (seqOfInfeasiblesSize==0)))
+
+      if (feasible && seqOfInfeasiblesSize > 1) {
+        (*model->messageHandler())<<"Feasible node while father was infeasible."
+        <<CoinMessageEol;
+      }
+
+    if (solved && seqOfUnsolvedSize > 1) {
+      (*model->messageHandler())<<"Solved node while father was unsolved."
+      <<CoinMessageEol;
+    }
+
+    if (seqOfInfeasiblesSize < maxInfeasible_ &&
+        solved && !feasible) {
+      (*model->messageHandler())<<"Branching on infeasible node, sequence of infeasible size "
+      <<seqOfInfeasiblesSize<<CoinMessageEol;
+      // Have to make sure that we will branch
+      OsiTMINLPInterface * ipopt = dynamic_cast<OsiTMINLPInterface *>(solver);
+      ipopt->forceBranchable();
+      //change objective value
+      returnStatus = 0;
+
+    }
+
+    if (!solved && parent != NULL &&
+        seqOfUnsolvedSize <= maxFailure_) {
+      (*model->messageHandler())<<"Branching on unsolved node, sequence of unsolved size "<<seqOfUnsolvedSize<<CoinMessageEol;
+      // Have to make sure that we will branch
+      OsiTMINLPInterface * osiMinlp = dynamic_cast<OsiTMINLPInterface *>(solver);
+      osiMinlp->forceBranchable();     //      feasible=1;
+      returnStatus = 0;
+    }
+
+    if (solver->isAbandoned() && parent != NULL &&
+        seqOfUnsolvedSize > maxFailure_) {
+      hasFailed_ = true;
+      OsiTMINLPInterface * osiMinlp =
+        dynamic_cast<OsiTMINLPInterface *>(solver);
+      if (pretendFailIsInfeasible_) {
+        //force infeasible
+        osiMinlp->forceInfeasible();
+        returnStatus = 2;
+      }
+      else {
+        std::string probName;
+        osiMinlp->getStrParam(OsiProbName,probName);
+        throw osiMinlp->newUnsolvedError(0, osiMinlp->problem(), probName);
+      }
+    }
+    return returnStatus;
+  }
+
+  void
+  CbcNlpStrategy::setupCutGenerators(CbcModel &model)
+  {}
+
+  void
+  CbcNlpStrategy::setupHeuristics(CbcModel &model)
+  {}
+
+  void
+  CbcNlpStrategy::setupPrinting(CbcModel &model, int toto)
+  {}
+
+  void
+  CbcNlpStrategy::setupOther(CbcModel &model)
+  {}
+}
diff --git a/src/CbcBonmin/BonCbcNlpStrategy.hpp b/src/CbcBonmin/BonCbcNlpStrategy.hpp
new file mode 100644
index 0000000..5eda00a
--- /dev/null
+++ b/src/CbcBonmin/BonCbcNlpStrategy.hpp
@@ -0,0 +1,98 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// John J. Forrest, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+
+#ifndef BonCbcNlpStrategy_H
+#define BonCbcNlpStrategy_H
+
+#include "CbcStrategy.hpp"
+class CglPreProcess;
+class CbcNodeInfo;
+class CbcNode;
+class CoinWarmStartDiff;
+
+
+namespace Bonmin
+{
+  class CbcNlpStrategy : public CbcStrategy
+  {
+  public:
+
+    // Default Constructor
+    CbcNlpStrategy (int maxFailures,
+        int maxInfeasibles,
+        int pretendFailIsInfeasible);
+
+    // Copy constructor
+    CbcNlpStrategy ( const CbcNlpStrategy &);
+
+    // Destructor
+    virtual ~CbcNlpStrategy ();
+
+    /// Clone
+    virtual CbcStrategy * clone() const;
+
+    /// Return a new Full node information pointer (descendant of CbcFullNodeInfo)
+    virtual CbcNodeInfo * fullNodeInfo(CbcModel * model,int numberRowsAtContinuous) const;
+    /// Return a new Partial node information pointer (descendant of CbcPartialNodeInfo)
+    virtual CbcNodeInfo * partialNodeInfo(CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
+        int numberChangedBounds,const int * variables,
+        const double * boundChanges,
+        const CoinWarmStartDiff *basisDiff) const;
+    /** After a CbcModel::resolve this can return a status
+        -1 no effect
+        0 treat as optimal
+        1 as 0 but do not do any more resolves (i.e. no more cuts)
+        2 treat as infeasible
+    */
+    virtual int status(CbcModel * model, CbcNodeInfo * parent, int whereFrom);
+    /// set maximum number of consecutive failures in a branch before giving up
+    inline void setMaxFailure(int value)
+    {
+      maxFailure_ = value;
+    }
+    /// maximum number of consecutive infeasible nodes before giving up
+    inline void setMaxInfeasible(int value)
+    {
+      maxInfeasible_ = value;
+    }
+
+    /// Setup cut generators
+    virtual void setupCutGenerators(CbcModel & model);
+    /// Setup heuristics
+    virtual void setupHeuristics(CbcModel & model);
+    /// Do printing stuff
+    virtual void setupPrinting(CbcModel & model,int modelLogLevel);
+    /// Other stuff e.g. strong branching and preprocessing
+    virtual void setupOther(CbcModel & model);
+
+    bool hasFailed()
+    {
+      return hasFailed_;
+    }
+  protected:
+    // Data
+    /// did we fail?
+    bool hasFailed_;
+    /// maximum number of consecutive failures in a branch before giving up
+    int maxFailure_;
+    /// maximum number of consecutive infeasible nodes before giving up
+    int maxInfeasible_;
+    /** If yes when a problem is not solved (failed to be solved)
+        will pretend that it is infeasible. */
+    int pretendFailIsInfeasible_;
+
+  private:
+    /// Illegal Assignment operator
+    CbcNlpStrategy & operator=(const CbcNlpStrategy& rhs);
+
+  };
+}
+
+#endif
diff --git a/src/CbcBonmin/BonCbcNode.cpp b/src/CbcBonmin/BonCbcNode.cpp
new file mode 100644
index 0000000..9fe148f
--- /dev/null
+++ b/src/CbcBonmin/BonCbcNode.cpp
@@ -0,0 +1,167 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// John J. Forrest, International Business Machines Corporation
+// P. Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+
+
+#include <string>
+#include <cassert>
+#include <cfloat>
+#include "CoinPragma.hpp"
+#include "OsiSolverInterface.hpp"
+#include "CoinWarmStartBasis.hpp"
+#include "CbcModel.hpp"
+#include "BonCbcNode.hpp"
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonIpoptWarmStart.hpp"
+#include "BonOsiTMINLPInterface.hpp"
+
+using namespace std;
+
+
+namespace Bonmin
+{
+//Default constructor
+  BonCbcFullNodeInfo::BonCbcFullNodeInfo()
+      :
+      CbcFullNodeInfo(),
+      sequenceOfInfeasiblesSize_(0),
+      sequenceOfUnsolvedSize_(0)
+  {}
+
+  BonCbcFullNodeInfo::BonCbcFullNodeInfo(CbcModel * model,
+      int numberRowsAtContinuous) :
+      CbcFullNodeInfo(model, numberRowsAtContinuous),
+      sequenceOfInfeasiblesSize_(0),
+      sequenceOfUnsolvedSize_(0)
+  {}
+
+// Copy constructor
+  BonCbcFullNodeInfo::BonCbcFullNodeInfo ( const BonCbcFullNodeInfo &other):
+      CbcFullNodeInfo(other),
+      sequenceOfInfeasiblesSize_(other.sequenceOfInfeasiblesSize_),
+      sequenceOfUnsolvedSize_(other.sequenceOfUnsolvedSize_)
+
+  {}
+
+
+  void
+  BonCbcFullNodeInfo::allBranchesGone()
+  {
+    IpoptWarmStart * ipws = dynamic_cast<IpoptWarmStart *>(basis_);
+    if (ipws)
+      ipws->flushPoint();
+  }
+
+  BonCbcFullNodeInfo::~BonCbcFullNodeInfo()
+{}
+
+  CbcNodeInfo *
+  BonCbcFullNodeInfo::clone() const
+  {
+    return new BonCbcFullNodeInfo(*this);
+  }
+
+  void
+  BonCbcFullNodeInfo::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+
+
+    roptions->SetRegisteringCategory("Nonconvex problems", RegisteredOptions::BonminCategory);
+    roptions->AddLowerBoundedIntegerOption("max_consecutive_infeasible",
+        "Number of consecutive infeasible subproblems before aborting a"
+        " branch.",
+        0,0,
+        "Will continue exploring a branch of the tree until \"max_consecutive_infeasible\""
+        "consecutive problems are locally infeasible by the NLP sub-solver.");
+    roptions->setOptionExtraInfo("max_consecutive_infeasible",8);
+
+    roptions->SetRegisteringCategory("NLP solution robustness", RegisteredOptions::BonminCategory);
+    roptions->AddLowerBoundedIntegerOption
+    ("max_consecutive_failures",
+     "(temporarily removed) Number $n$ of consecutive unsolved problems before aborting a branch of the tree.",
+     0,10,
+     "When $n > 0$, continue exploring a branch of the tree until $n$ "
+     "consecutive problems in the branch are unsolved (we call unsolved a problem for which Ipopt can not "
+     "guarantee optimality within the specified tolerances).");
+    roptions->setOptionExtraInfo("max_consecutive_failures",8);
+
+  }
+
+
+  /****************************************************************************************************/
+
+// Default constructor
+  BonCbcPartialNodeInfo::BonCbcPartialNodeInfo ()
+      : CbcPartialNodeInfo(),
+      sequenceOfInfeasiblesSize_(0),
+      sequenceOfUnsolvedSize_(0)
+  {}
+// Constructor from current state
+  BonCbcPartialNodeInfo::BonCbcPartialNodeInfo (CbcModel * model,CbcNodeInfo *parent, CbcNode *owner,
+      int numberChangedBounds,
+      const int *variables,
+      const double *boundChanges,
+      const CoinWarmStartDiff *basisDiff)
+      : CbcPartialNodeInfo(parent,owner,numberChangedBounds,variables,
+          boundChanges,basisDiff),
+      sequenceOfInfeasiblesSize_(0),
+      sequenceOfUnsolvedSize_(0)
+  {
+    BonCbcPartialNodeInfo * nlpParent = dynamic_cast<BonCbcPartialNodeInfo *> (parent);
+    int numberInfeasible = 0;
+    int numberUnsolved = 0;
+    if (nlpParent)//father is not root
+    {
+      numberInfeasible = nlpParent->getSequenceOfInfeasiblesSize();
+      numberUnsolved =  nlpParent->getSequenceOfUnsolvedSize();
+//       if(!nlpParent->numberBranchesLeft_){
+// 	IpoptWarmStartDiff * ipws = dynamic_cast<IpoptWarmStartDiff *>(nlpParent->basisDiff_);
+// 	ipws->flushPoint();
+//       }
+    }
+    else {
+      BonCbcFullNodeInfo * nlpRoot = dynamic_cast<BonCbcFullNodeInfo *> (parent);
+      if (nlpRoot) {
+        numberInfeasible = nlpRoot->getSequenceOfInfeasiblesSize();
+        numberUnsolved =  nlpRoot->getSequenceOfUnsolvedSize();
+      }
+    }
+    if (model->solver()->isAbandoned() ||
+        model->solver()->isIterationLimitReached())
+      sequenceOfUnsolvedSize_ = numberUnsolved + 1;
+
+    if (model->solver()->isProvenPrimalInfeasible())
+      sequenceOfInfeasiblesSize_ = numberInfeasible + 1;
+  }
+
+  BonCbcPartialNodeInfo::BonCbcPartialNodeInfo (const BonCbcPartialNodeInfo & rhs)
+
+      : CbcPartialNodeInfo(rhs),
+      sequenceOfInfeasiblesSize_(rhs.sequenceOfInfeasiblesSize_),
+      sequenceOfUnsolvedSize_(rhs.sequenceOfUnsolvedSize_)
+
+{}
+
+  CbcNodeInfo *
+  BonCbcPartialNodeInfo::clone() const
+  {
+    return (new BonCbcPartialNodeInfo(*this));
+  }
+
+  void
+  BonCbcPartialNodeInfo::allBranchesGone()
+  {
+    IpoptWarmStartDiff * ipws = dynamic_cast<IpoptWarmStartDiff *>(basisDiff_);
+    if (ipws)
+      ipws->flushPoint();
+  }
+
+  BonCbcPartialNodeInfo::~BonCbcPartialNodeInfo ()
+{}
+}
diff --git a/src/CbcBonmin/BonCbcNode.hpp b/src/CbcBonmin/BonCbcNode.hpp
new file mode 100644
index 0000000..f551df1
--- /dev/null
+++ b/src/CbcBonmin/BonCbcNode.hpp
@@ -0,0 +1,133 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// John J. Forrest, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 03/15/2006
+
+#ifndef BonminCbcNode_H
+#define BonminCbcNode_H
+
+#include "CbcNode.hpp"
+#include "BonRegisteredOptions.hpp"
+
+
+namespace Bonmin
+{
+  /** \brief Holds information for recreating a subproblem by incremental change
+  	   from the parent for Bonmin
+
+    A BonminBonminCbcPartialNodeInfo object contains changes to the bounds and basis, and
+    additional cuts, required to recreate a subproblem by modifying and
+    augmenting the parent subproblem.
+  */
+
+  class BonCbcFullNodeInfo : public CbcFullNodeInfo
+  {
+
+  public:
+    friend class BonCbcPartialNodeInfo;
+    // Default Constructor
+    BonCbcFullNodeInfo ();
+
+    // Constructor from current state
+    BonCbcFullNodeInfo (CbcModel * model, int numberRowsAtContinuous);
+
+    // Copy constructor
+    BonCbcFullNodeInfo ( const BonCbcFullNodeInfo &);
+
+    // Destructor
+    ~BonCbcFullNodeInfo ();
+
+    /// Clone
+    virtual CbcNodeInfo * clone() const;
+
+    /**Method called when all direct sons have been explored to flush
+       useless warm start information.*/
+    virtual void allBranchesGone();
+
+    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
+    inline int getSequenceOfInfeasiblesSize()
+    {
+      return sequenceOfInfeasiblesSize_;
+    }
+    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
+    inline int getSequenceOfUnsolvedSize()
+    {
+      return sequenceOfUnsolvedSize_;
+    }
+    /** Register all the options for class instance.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+  private:
+    /* Data values */
+    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
+    int sequenceOfInfeasiblesSize_;
+    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
+    int sequenceOfUnsolvedSize_;
+  private:
+
+    /// Illegal Assignment operator
+    BonCbcFullNodeInfo & operator=(const BonCbcFullNodeInfo& rhs);
+  };
+
+  /** \brief Holds information for recreating a subproblem by incremental change
+  	   from the parent for
+
+    A BonminCbcPartialNodeInfo object contains changes to the bounds and basis, and
+    additional cuts, required to recreate a subproblem by modifying and
+    augmenting the parent subproblem.
+  */
+
+  class BonCbcPartialNodeInfo : public CbcPartialNodeInfo
+  {
+
+  public:
+    // Default Constructor
+    BonCbcPartialNodeInfo ();
+
+    // Constructor from current state
+    BonCbcPartialNodeInfo (CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
+        int numberChangedBounds,const int * variables,
+        const double * boundChanges,
+        const CoinWarmStartDiff *basisDiff) ;
+
+    // Copy constructor
+    BonCbcPartialNodeInfo ( const BonCbcPartialNodeInfo &);
+
+    // Destructor
+    ~BonCbcPartialNodeInfo ();
+
+    /// Clone
+    virtual CbcNodeInfo * clone() const;
+
+    /**Method called when all direct sons have been explored to flush
+       useless warm start information.*/
+    virtual void allBranchesGone();
+
+    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
+    inline int getSequenceOfInfeasiblesSize()
+    {
+      return sequenceOfInfeasiblesSize_;
+    }
+    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
+    inline int getSequenceOfUnsolvedSize()
+    {
+      return sequenceOfUnsolvedSize_;
+    }
+  private:
+    /* Data values */
+    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
+    int sequenceOfInfeasiblesSize_;
+    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
+    int sequenceOfUnsolvedSize_;
+  private:
+
+    /// Illegal Assignment operator
+    BonCbcPartialNodeInfo & operator=(const Bonmin::BonCbcPartialNodeInfo& rhs);
+  };
+}
+#endif
diff --git a/src/CbcBonmin/BonDiver.cpp b/src/CbcBonmin/BonDiver.cpp
new file mode 100644
index 0000000..0f5f7fe
--- /dev/null
+++ b/src/CbcBonmin/BonDiver.cpp
@@ -0,0 +1,859 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 09/01/2007
+
+#include "BonDiver.hpp"
+#include "CoinFinite.hpp"
+#include "CbcModel.hpp"
+#include "CbcConfig.h"
+#include "BonBabSetupBase.hpp"
+//#define DIVE_DEBUG
+namespace Bonmin
+{
+
+  /************************************************************************/
+  /*                CbcDiver methods                                       */
+  /************************************************************************/
+
+  /// Default constructor.
+  CbcDiver::CbcDiver(): CbcTree(),
+      treeCleaning_(false),
+      nextOnBranch_(NULL),
+      stop_diving_on_cutoff_(false)
+  {}
+
+  ///Copy constructor.
+  CbcDiver::CbcDiver(const CbcDiver &rhs):CbcTree(rhs),
+      treeCleaning_(rhs.treeCleaning_),
+      nextOnBranch_(rhs.nextOnBranch_),
+      stop_diving_on_cutoff_(rhs.stop_diving_on_cutoff_)
+  {}
+
+  /// Assignment operator.
+  CbcDiver &
+  CbcDiver::operator=(const CbcDiver &rhs)
+  {
+    if (this != &rhs) {
+      CbcTree::operator=(rhs);
+      treeCleaning_ = rhs.treeCleaning_;
+      nextOnBranch_ = rhs.nextOnBranch_;
+      stop_diving_on_cutoff_ = rhs.stop_diving_on_cutoff_;
+    }
+    return *this;
+  }
+
+  /// Destructor.
+  CbcDiver::~CbcDiver()
+  {}
+
+  ///copy constructor.
+  CbcTree *
+  CbcDiver::clone() const
+  {
+    return new CbcDiver(*this);
+  }
+
+
+  ///Return top node (next node to process.*/
+  CbcNode *
+  CbcDiver::top() const
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDiver::top"<<std::endl;
+#endif
+    if (nextOnBranch_ != NULL && !treeCleaning_) {
+      return nextOnBranch_;
+    }
+    else return CbcTree::top();
+  }
+
+  /// Add node to the heap.
+  void
+  CbcDiver::push(CbcNode * x)
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDiver::push"<<std::endl;
+#endif
+    if (treeCleaning_) return CbcTree::push(x);
+
+    if (x->branchingObject()->numberBranchesLeft() == x->branchingObject()->numberBranches()) {//Not Backtracking
+      assert(nextOnBranch_==NULL);//Should not happen twice in a row
+      nextOnBranch_ = x;
+    }
+    else
+      CbcTree::push(x);
+  }
+
+  /// Remove the top node of the heap.
+  void
+  CbcDiver::pop()
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDiver::pop"<<std::endl;
+#endif
+    if (nextOnBranch_ != NULL && !treeCleaning_) {
+      nextOnBranch_ = NULL;
+    }
+    else
+      CbcTree::pop();
+  }
+  /// Remove the best node from the heap and return it
+  CbcNode *
+  CbcDiver::bestNode(double cutoff)
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDiver::bestNode"<<std::endl;
+#endif
+    if (nextOnBranch_ != NULL && !treeCleaning_) {
+      if (nextOnBranch_->objectiveValue() < cutoff) {
+        if (stop_diving_on_cutoff_ && nextOnBranch_->guessedObjectiveValue() >= cutoff) {
+          //printf("Stopping dive %g %g\n", nextOnBranch_->objectiveValue(), nextOnBranch_->guessedObjectiveValue());
+          CbcTree::push(nextOnBranch_);
+          nextOnBranch_ = NULL;
+          return CbcTree::bestNode(cutoff);
+        }
+        //printf("Diving!! %g %g\n", nextOnBranch_->objectiveValue(), nextOnBranch_->guessedObjectiveValue());
+        CbcNode * ret_val = nextOnBranch_;
+        nextOnBranch_ = NULL;
+        return ret_val;
+      }
+      assert(true && "We did not think we get here.");
+      CbcTree::push(nextOnBranch_);//For safety
+      nextOnBranch_ = NULL;
+    }
+    return CbcTree::bestNode(cutoff);
+  }
+
+
+  /** Test if empty. */
+  bool CbcDiver::empty()
+  {
+    return (CbcTree::empty() && (nextOnBranch_ == NULL) );
+  }
+
+  /*! \brief Prune the tree using an objective function cutoff
+    if nextOnBranch_ exists we push it on the heap and call CbcTree function
+  */
+  void
+  CbcDiver::cleanTree(CbcModel * model, double cutoff, double & bestPossibleObjective)
+  {
+    if (nextOnBranch_ != NULL)
+      CbcTree::push(nextOnBranch_);
+    nextOnBranch_=NULL;
+    treeCleaning_ = true;
+    CbcTree::cleanTree(model,cutoff, bestPossibleObjective);
+    treeCleaning_ = false;
+  }
+
+  /// Get best possible objective function in the tree
+  double
+  CbcDiver::getBestPossibleObjective()
+  {
+    double bestPossibleObjective = (nextOnBranch_ != NULL) ? nextOnBranch_->objectiveValue() : 1e100;
+    for (unsigned int i = 0 ; i < nodes_.size() ; i++) {
+      if (nodes_[i] == NULL) continue;
+      const double & obj = nodes_[i]->objectiveValue();
+      if (obj < bestPossibleObjective) {
+        bestPossibleObjective = obj;
+      }
+    }
+    return bestPossibleObjective;
+  }
+
+  void
+  CbcDiver::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("Diving options", RegisteredOptions::UndocumentedCategory);
+    roptions->AddStringOption2(
+      "stop_diving_on_cutoff",
+      "Flag indicating whether we stop diving based on guessed feasible objective and the current cutoff",
+      "no",
+      "no", "",
+      "yes", "");
+    roptions->setOptionExtraInfo("stop_diving_on_cutoff", 63);
+
+  }
+
+  /// Initialize the method (get options)
+  void
+  CbcDiver::initialize(BabSetupBase &b)
+  {
+    b.options()->GetBoolValue("stop_diving_on_cutoff", stop_diving_on_cutoff_,
+        b.prefix());
+  }
+
+
+  /************************************************************************/
+  /*                CbcProbedDiver methods                                       */
+  /************************************************************************/
+
+  /// Default constructor.
+  CbcProbedDiver::CbcProbedDiver(): CbcTree(),
+      treeCleaning_(false),
+      nextOnBranch_(NULL),
+      candidateChild_(NULL),
+      stop_diving_on_cutoff_(false)
+  {}
+
+  ///Copy constructor.
+  CbcProbedDiver::CbcProbedDiver(const CbcProbedDiver &rhs):CbcTree(rhs),
+      treeCleaning_(rhs.treeCleaning_),
+      nextOnBranch_(rhs.nextOnBranch_),
+      candidateChild_(rhs.candidateChild_),
+      stop_diving_on_cutoff_(rhs.stop_diving_on_cutoff_)
+  {}
+
+  /// Assignment operator.
+  CbcProbedDiver &
+  CbcProbedDiver::operator=(const CbcProbedDiver &rhs)
+  {
+    if (this != &rhs) {
+      CbcTree::operator=(rhs);
+      treeCleaning_ = rhs.treeCleaning_;
+      nextOnBranch_ = rhs.nextOnBranch_;
+      candidateChild_ = rhs.candidateChild_;
+      stop_diving_on_cutoff_ = rhs.stop_diving_on_cutoff_;
+    }
+    return *this;
+  }
+
+  /// Destructor.
+  CbcProbedDiver::~CbcProbedDiver()
+  {}
+
+  ///copy constructor.
+  CbcTree *
+  CbcProbedDiver::clone() const
+  {
+    return new CbcProbedDiver(*this);
+  }
+
+
+  ///Return top node (next node to process.*/
+  CbcNode *
+  CbcProbedDiver::top() const
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcProbedDiver::top"<<std::endl;
+#endif
+    if (nextOnBranch_ != NULL && !treeCleaning_) {
+      return nextOnBranch_;
+    }
+    else if(candidateChild_ != NULL && !treeCleaning_){
+      return candidateChild_;
+    }
+    else return CbcTree::top();
+  }
+
+  /// Add node to the heap.
+  void
+  CbcProbedDiver::push(CbcNode * x)
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcProbedDiver::push"<<std::endl;
+#endif
+    if (treeCleaning_) return CbcTree::push(x);
+
+    if (x->branchingObject()->numberBranchesLeft() == x->branchingObject()->numberBranches()) {
+      //Not Backtracking
+      if(nextOnBranch_ == NULL && candidateChild_ == NULL){
+#ifdef DIVE_DEBUG
+        printf("Putting parent %i. objective value %g\n", x, x->objectiveValue());
+#endif
+        nextOnBranch_ = x;
+        return;
+      }
+      if(candidateChild_ == NULL){
+#ifdef DIVE_DEBUG
+        printf("Putting first kid %i. objective value %g\n", x, x->objectiveValue());
+#endif
+        candidateChild_ = x;
+        return;}
+#ifdef DIVE_DEBUG
+        printf("Putting second kid %i. objective value %g\n", x, x->objectiveValue());
+#endif
+      // If we get here we have two nodes follow on the best one and put the other on the tree
+      if(comparison_.compareNodes(x,candidateChild_)){// Follow on candidateChild_
+#ifdef DIVE_DEBUG
+        printf("first child %i is found better.\n", x);
+#endif
+        nextOnBranch_ = candidateChild_;
+        CbcTree::push(x);
+        candidateChild_ = NULL;
+        return;
+      }
+      else {// Follow on x
+#ifdef DIVE_DEBUG
+        printf("second child %i is found better\n", x);
+#endif
+        nextOnBranch_ = x;
+        CbcTree::push(candidateChild_);
+        candidateChild_ = NULL;
+        return;
+      }
+    }
+    else {
+#ifdef DIVE_DEBUG
+        printf("Putting back parent %i.\n",x);
+#endif
+      if(nextOnBranch_ != NULL){
+#ifdef DIVE_DEBUG
+        printf("Putting nextOnBranch_ in candidateChild_.\n");
+#endif
+        assert(candidateChild_ == NULL);
+        candidateChild_ = nextOnBranch_;
+      }
+      nextOnBranch_ = x;
+      return;
+      //CbcTree::push(x);
+    }
+  }
+  /// Remove the top node of the heap.
+  void
+  CbcProbedDiver::pop()
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcProbedDiver::pop"<<std::endl;
+#endif
+    if (nextOnBranch_ != NULL && !treeCleaning_) {
+      nextOnBranch_ = NULL;
+    }
+    else if(candidateChild_ != NULL && !treeCleaning_){
+      candidateChild_ = NULL;
+    }
+    else
+      CbcTree::pop();
+  }
+  /// Remove the best node from the heap and return it
+  CbcNode *
+  CbcProbedDiver::bestNode(double cutoff)
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcProbedDiver::bestNode"<<std::endl;
+#endif
+    if (nextOnBranch_ != NULL && !treeCleaning_) {
+      if (nextOnBranch_->objectiveValue() < cutoff) {
+        if (stop_diving_on_cutoff_ && nextOnBranch_->guessedObjectiveValue() >= cutoff) {
+#ifdef DIVE_DEBUG
+          printf("Stopping dive %g %g\n", nextOnBranch_->objectiveValue(), nextOnBranch_->guessedObjectiveValue());
+#endif
+          CbcTree::push(nextOnBranch_);
+          nextOnBranch_ = NULL;
+          //Also have to cleanup candidateChild_
+          CbcTree::push(candidateChild_);
+          candidateChild_ = NULL;
+          return CbcTree::bestNode(cutoff);
+        }
+#ifdef DIVE_DEBUG
+        printf("Diving on %i. obj=%g guesses=%g\n", nextOnBranch_, 
+                nextOnBranch_->objectiveValue(), 
+                nextOnBranch_->guessedObjectiveValue());
+#endif
+        CbcNode * ret_val = nextOnBranch_;
+        nextOnBranch_ = NULL;
+        return ret_val;
+      }
+      assert(true && "Should not get here.");
+      CbcTree::push(nextOnBranch_);//For safety
+      nextOnBranch_ = NULL;
+    }
+    else if(candidateChild_ != NULL && ! treeCleaning_){
+#ifdef DIVE_DEBUG
+      printf("brother was infeasible!!\n``");
+#endif
+      if(candidateChild_->objectiveValue() < cutoff) {
+        if(stop_diving_on_cutoff_ && candidateChild_->guessedObjectiveValue() >= cutoff) {
+#ifdef DIVE_DEBUG
+          printf("Stopping dive %g %g\n", candidateChild_->objectiveValue(), candidateChild_->guessedObjectiveValue());
+#endif
+          CbcTree::push(candidateChild_);
+          candidateChild_ = NULL;
+          return CbcTree::bestNode(cutoff);
+        }
+#ifdef DIVE_DEBUG
+        printf("Diving on %i. obj=%g guessed=%g\n", 
+               candidateChild_,
+               candidateChild_->objectiveValue(), 
+               candidateChild_->guessedObjectiveValue());
+#endif
+        CbcNode * ret_val =  candidateChild_;
+        candidateChild_ = NULL;
+        return ret_val;
+      }
+      assert(true && "Should not get here.");
+   }
+   CbcNode * ret_val = CbcTree::bestNode(cutoff);
+#ifdef DIVE_DEBUG
+        printf("Picking top of the heap node %i", ret_val);
+#endif
+    return ret_val;
+  }
+
+
+  /** Test if empty. */
+  bool CbcProbedDiver::empty()
+  {
+    return (CbcTree::empty() && (nextOnBranch_ == NULL) && (candidateChild_ == NULL) );
+  }
+
+  /*! \brief Prune the tree using an objective function cutoff
+    if nextOnBranch_ exists we push it on the heap and call CbcTree function
+  */
+  void
+  CbcProbedDiver::cleanTree(CbcModel * model, double cutoff, double & bestPossibleObjective)
+  {
+    if (nextOnBranch_ != NULL)
+      CbcTree::push(nextOnBranch_);
+    if (candidateChild_ != NULL)
+      CbcTree::push(candidateChild_);
+    nextOnBranch_=NULL;
+    candidateChild_ = NULL;
+    treeCleaning_ = true;
+    CbcTree::cleanTree(model,cutoff, bestPossibleObjective);
+    treeCleaning_ = false;
+  }
+
+  /// Get best possible objective function in the tree
+  double
+  CbcProbedDiver::getBestPossibleObjective()
+  {
+    double bestPossibleObjective = (nextOnBranch_ != NULL) ? nextOnBranch_->objectiveValue() : 1e100;
+    if(candidateChild_ != NULL && candidateChild_->objectiveValue() < bestPossibleObjective )
+       bestPossibleObjective = candidateChild_->objectiveValue();
+    for (unsigned int i = 0 ; i < nodes_.size() ; i++) {
+      if (nodes_[i] == NULL) continue;
+      const double & obj = nodes_[i]->objectiveValue();
+      if (obj < bestPossibleObjective) {
+        bestPossibleObjective = obj;
+      }
+    }
+    return bestPossibleObjective;
+  }
+
+  /// Initialize the method (get options)
+  void
+  CbcProbedDiver::initialize(BabSetupBase &b)
+  {
+    b.options()->GetBoolValue("stop_diving_on_cutoff", stop_diving_on_cutoff_,
+        b.prefix());
+  }
+
+  /************************************************************************/
+  /*                CbcDfsDiver methods                                    */
+  /************************************************************************/
+  /// Default constructor.
+  CbcDfsDiver::CbcDfsDiver(): CbcTree(),
+      treeCleaning_(false),
+      dive_(),
+      diveListSize_(0),
+      divingBoardDepth_(-1),
+      cutoff_(1e100),
+      nBacktracks_(0),
+      maxDepthBFS_(4),
+      maxDiveBacktracks_(2),
+      maxDiveDepth_(COIN_INT_MAX),
+      mode_(Enlarge)
+  {}
+
+  ///Copy constructor.
+  CbcDfsDiver::CbcDfsDiver(const CbcDfsDiver &rhs):CbcTree(rhs),
+      treeCleaning_(rhs.treeCleaning_),
+      dive_(rhs.dive_),
+      diveListSize_(rhs.diveListSize_),
+      divingBoardDepth_(rhs.divingBoardDepth_),
+      cutoff_(rhs.cutoff_),
+      nBacktracks_(rhs.nBacktracks_),
+      maxDepthBFS_(rhs.maxDepthBFS_),
+      maxDiveBacktracks_(rhs.maxDiveBacktracks_),
+      maxDiveDepth_(rhs.maxDiveDepth_),
+      mode_(rhs.mode_)
+  {}
+  /// Assignment operator.
+  CbcDfsDiver &
+  CbcDfsDiver::operator=(const CbcDfsDiver &rhs)
+  {
+    if (this != &rhs) {
+      CbcTree::operator=(rhs);
+      treeCleaning_ = rhs.treeCleaning_;
+      dive_ = rhs.dive_;
+      diveListSize_ = rhs.diveListSize_;
+      divingBoardDepth_ = rhs.divingBoardDepth_;
+      cutoff_ = rhs.cutoff_;
+      nBacktracks_ = rhs.nBacktracks_;
+      maxDepthBFS_ = rhs.maxDepthBFS_;
+      maxDiveBacktracks_ = rhs.maxDiveBacktracks_;
+      maxDiveDepth_ = maxDiveDepth_;
+      mode_ = rhs.mode_;
+    }
+    return *this;
+  }
+
+  /// Destructor.
+  CbcDfsDiver::~CbcDfsDiver()
+  {}
+
+  ///copy constructor.
+  CbcTree *
+  CbcDfsDiver::clone() const
+  {
+    return new CbcDfsDiver(*this);
+  }
+
+  ///Return top node (next node to process.*/
+  CbcNode *
+  CbcDfsDiver::top() const
+  {
+    if (treeCleaning_) return CbcTree::top();
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDfsDiver::top"<<std::endl;
+#endif
+    if (mode_ != CbcDfsDiver::FindSolutions) {
+      assert(dive_.empty());
+      CbcTree::top();
+    }
+    if (diveListSize_) {
+      return dive_.front();
+    }
+    else return CbcTree::top();
+  }
+
+  /// Add node to the heap.
+  void
+  CbcDfsDiver::push(CbcNode * x)
+  {
+    if (treeCleaning_) return CbcTree::push(x);
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDfsDiver::push"<<std::endl;
+#endif
+    if (mode_ > CbcDfsDiver::FindSolutions) {
+      CbcTree::push(x);
+      assert(dive_.empty());
+      return;
+    }
+    //Always push on dive;
+    dive_.push_front(x);
+    diveListSize_++;
+#ifdef DIVE_DEBUG
+    printf("diveListSize_ = %i == %u = dive_.size()\n",diveListSize_, dive_.size());
+    assert(diveListSize_ == dive_.size());
+#endif
+  }
+
+  /// Remove the top node of the heap.
+  void
+  CbcDfsDiver::pop()
+  {
+    if (treeCleaning_) return CbcTree::pop();
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDfsDiver::pop"<<std::endl;
+#endif
+    if (mode_ > CbcDfsDiver::FindSolutions) {
+      assert(dive_.empty());
+    }
+    if (!dive_.empty()) {
+      dive_.pop_front();
+      diveListSize_--;
+    }
+    else
+      CbcTree::pop();
+  }
+
+  /// Remove the best node from the heap and return it
+  CbcNode *
+  CbcDfsDiver::bestNode(double cutoff)
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDfsDiver::bestNode"<<std::endl;
+#endif
+    if (treeCleaning_) return CbcTree::bestNode(cutoff);
+#ifdef DIVE_DEBUG
+    for (unsigned int i = 0 ; i < nodes_.size() ; i++) {
+      if (nodes_[i]->objectiveValue() >= cutoff)
+        std::cerr<<"CbcDfsDiver::bestNode"<<std::endl
+        <<nodes_[i]->objectiveValue()<<", "<<cutoff<<std::endl;
+      assert(nodes_[i]->objectiveValue() < cutoff);
+    }
+#endif
+    if (mode_ == CbcDfsDiver::Enlarge) {
+      if (diveListSize_ == 0)
+        mode_ = CbcDfsDiver::FindSolutions;
+      else {
+        CbcNode * node = dive_.back();
+        assert(node != NULL);
+        if (node->depth() > maxDepthBFS_) {
+          //Switch mode to Diving
+          setComparisonMode(FindSolutions);
+        }
+        else {
+          //pop and return node;
+          dive_.pop_back();
+          diveListSize_ --;
+          return node;
+        }
+      }
+    }
+    if (mode_ != CbcDfsDiver::FindSolutions) {
+      assert(dive_.empty());
+      CbcTree::bestNode(cutoff);
+    }
+    assert(nBacktracks_ < maxDiveBacktracks_);
+    CbcNode * node = NULL;
+    while (diveListSize_ > 0) {
+#ifdef DIVE_DEBUG
+      std::cerr<<"CbcDfsDiver::bestNode"
+      <<", examining node"<<std::endl;
+#endif
+      assert(!dive_.empty());
+      node = dive_.front();
+      dive_.pop_front();
+      diveListSize_ --;
+      assert(node);
+      assert((node->depth() - divingBoardDepth_) <= maxDiveDepth_);
+      if (node->objectiveValue() > cutoff) {//throw away node for now just put it on the heap as deleting a node is
+        //more complicated than that (has to delete nodeInfo, cuts...)
+#ifdef DIVE_DEBUG
+        std::cout<<"CbcDfsDiver::bestNode"
+        <<", node above cutoff"<<std::endl;
+#endif
+        CbcTree::push(node);
+        node = NULL;
+        nBacktracks_++;
+      }
+      else if (0 && node->guessedObjectiveValue() > cutoff) {//Put it on the real heap
+#ifdef DIVE_DEBUG
+        std::cout<<"CbcDfsDiver::bestNode"
+        <<", node estimates "<<node->guessedObjectiveValue()<<"above cutoff"
+        <<cutoff<<std::endl;
+#endif
+        CbcTree::push(node);
+        nBacktracks_++;
+        node = NULL;
+      }
+      else if ((node->depth() - divingBoardDepth_) > maxDiveDepth_) {//Put it on the real heap
+#ifdef DIVE_DEBUG
+        std::cout<<"CbcDfsDiver::bestNode"
+        <<", node too deep"<<std::endl;
+#endif
+        CbcTree::push(node);
+        nBacktracks_++;
+        node = NULL;
+      }
+      else if (node->branchingObject()->numberBranchesLeft() < node->branchingObject()->numberBranches()) {//Backtracking
+        nBacktracks_++;
+#ifdef DIVE_DEBUG
+        std::cout<<"CbcDfsDiver::bestNode"
+        <<", backtracking"<<std::endl;
+#endif
+      }
+      if (nBacktracks_ >= maxDiveBacktracks_) {//Push all the node in dive_ onto nodes_
+#ifdef DIVE_DEBUG
+        std::cout<<"CbcDfsDiver::bestNode"
+        <<", maximum number of backtracks attained emptying dive_"<<std::endl;
+#endif
+        pushDiveOntoHeap(-COIN_DBL_MAX);
+        if (node != NULL) CbcTree::push(node);
+        node = NULL;
+      }
+      if (node != NULL)
+        return node;
+    }
+    assert(node == NULL);
+    assert(dive_.empty());
+    assert(diveListSize_ == 0);
+    node = CbcTree::bestNode(cutoff);
+    divingBoardDepth_ = node->depth();
+    nBacktracks_ = 0;
+    return node;
+  }
+
+
+  void CbcDfsDiver::pushDiveOntoHeap(double cutoff)
+  {
+    while (!dive_.empty() ){//&& dive_.front()->objectiveValue() >= cutoff) {
+      CbcTree::push(dive_.front());
+      dive_.pop_front();
+      diveListSize_--;
+    }
+    for (std::list<CbcNode *>::iterator i = dive_.begin() ; i != dive_.end();
+        i++) {
+      assert(*i != NULL);
+    }
+  }
+  /** Test if empty. */
+  bool CbcDfsDiver::empty()
+  {
+    return (CbcTree::empty() && dive_.empty());
+  }
+
+  /*! \brief Prune the tree using an objective function cutoff
+    if nextOnBranch_ exists we push it on the heap and call CbcTree function
+  */
+  void
+  CbcDfsDiver::cleanTree(CbcModel * model, double cutoff, double & bestPossibleObjective)
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDfsDiver::cleanTree"<<std::endl;
+    std::cout<<"cutoff: "<<cutoff<<std::endl;
+#endif
+    pushDiveOntoHeap(cutoff);
+    treeCleaning_ = true;
+    CbcTree::cleanTree(model,cutoff, bestPossibleObjective);
+    treeCleaning_ = false;
+  }
+
+  /// Get best possible objective function in the tree
+  double
+  CbcDfsDiver::getBestPossibleObjective()
+  {
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDfsDiver::getBestPossibleObjective"<<std::endl;
+#endif
+    double bestPossibleObjective = CbcTree::empty() ? COIN_DBL_MAX : CbcTree::getBestPossibleObjective();
+    for (std::list<CbcNode *>::iterator i = dive_.begin() ; i != dive_.end() ; i++) {
+      if (*i == NULL) continue;
+      const double & obj = (*i)->objectiveValue();
+      if (obj < bestPossibleObjective) {
+        bestPossibleObjective = obj;
+      }
+    }
+    return bestPossibleObjective;
+  }
+//#ifdef COIN_HAS_BONMIN
+  ///Register the options of the method.
+  void
+  CbcDfsDiver::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("Diving options", RegisteredOptions::UndocumentedCategory);
+    roptions->AddLowerBoundedIntegerOption("max_backtracks_in_dive",
+        "Set the number of backtracks in a dive when using dfs-dive tree search"
+        "strategy.",
+        0,5,
+        "");
+    roptions->setOptionExtraInfo("max_backtracks_in_dive",27);
+
+    roptions->AddLowerBoundedIntegerOption("max_dive_depth",
+        "When using dfs-dive search. Maximum depth to go to from the diving "
+        "board (node where the diving started.",
+        0,COIN_INT_MAX,
+        "");
+    roptions->setOptionExtraInfo("max_dive_depth",27);
+
+  }
+
+  /// Initialize the method (get options)
+  void
+  CbcDfsDiver::initialize(BabSetupBase &b)
+  {
+    b.options()->GetIntegerValue("max_dive_depth", maxDiveDepth_,b.prefix());
+    b.options()->GetIntegerValue("max_backtracks_in_dive", maxDiveBacktracks_,b.prefix());
+  }
+//#endif
+
+  /** Changes the mode of comparison of the tree for "safety reasons" if the mode really changes we always
+      finish the current dive and put all the node back onto the heap.*/
+  void
+  CbcDfsDiver::setComparisonMode(ComparisonModes newMode)
+  {
+    if (newMode != mode_) {
+      mode_ = newMode;
+      //Empty heap
+      pushDiveOntoHeap(-COIN_DBL_MAX);
+      nBacktracks_ = maxDiveBacktracks_ -1;//Force to start a new dive
+#ifdef DIVE_DEBUG
+      std::cout<<"CbcDfsDiver::setComparisonMode"
+      <<std::endl;
+      switch (mode_) {
+      case Enlarge:
+        std::cout<<"Enlarge"<<std::endl;
+        break;
+      case FindSolutions:
+        std::cout<<"FindSolutions"<<std::endl;
+        break;
+      case CloseBound:
+        std::cout<<"CloseBound"<<std::endl;
+        break;
+      case LimitTreeSize:
+        std::cout<<"LimitTreeSize"<<std::endl;
+        break;
+      }
+#endif
+      CbcTree::setComparison(*comparison_.test_); 
+    }
+  }
+
+
+
+  // This allows any method to change behavior as it is called
+  // after each solution
+  bool
+  DiverCompare::newSolution(CbcModel * model)
+  {
+    assert(diver_);
+#ifdef DIVE_DEBUG
+    std::cout<<"CbcDfsDiver::newSolution"
+    <<std::endl;
+    std::cout<<"Found "<<model->getSolutionCount()<<" solutions"<<std::endl;
+#endif
+    bool r_value = false;
+    if (diver_->getComparisonMode() == CbcDfsDiver::Enlarge){
+      diver_->setComparisonMode(CbcDfsDiver::FindSolutions);
+      r_value = true;}
+    if (model->getSolutionCount() >= numberSolToStopDive_ && diver_->getComparisonMode() == CbcDfsDiver::FindSolutions) {
+      diver_->setComparisonMode(CbcDfsDiver::CloseBound);
+      r_value = true;
+    }
+    return r_value;
+  }
+
+  /// This is test function
+  bool
+  DiverCompare::test (CbcNode * x, CbcNode * y)
+  {
+    assert(diver_);
+    assert(comparisonDive_);
+    assert(comparisonBound_);
+    CbcDfsDiver::ComparisonModes mode = diver_->getComparisonMode();
+    if (mode == CbcDfsDiver::FindSolutions) {
+      return comparisonDive_->test(x,y);
+    }
+    else if (mode == CbcDfsDiver::CloseBound) {
+      return comparisonBound_->test(x,y);
+    }
+    else if (mode == CbcDfsDiver::LimitTreeSize) {
+      return comparisonDepth_.test(x,y);
+    }
+    else {
+      throw CoinError("DiverCompare","test"," Unknown mode for comparison.");
+    }
+  }
+
+
+  // This Also allows any method to change behavior as it is called
+  // after each solution
+  bool
+  DiverCompare::newSolution(CbcModel * model,
+      double objectiveAtContinuous,
+      int numberInfeasibilitiesAtContinuous)
+  { return false; }
+
+  // This allows any method to change behavior as it is called
+  // after every 1000 nodes.
+  // Return true if want tree re-sorted
+  bool
+  DiverCompare::every1000Nodes(CbcModel * model,int numberNodes)
+  {
+    assert(diver_);
+    if (numberNodes > numberNodesToLimitTreeSize_  && diver_->getComparisonMode() != CbcDfsDiver::LimitTreeSize) {
+      diver_->setComparisonMode(CbcDfsDiver::LimitTreeSize);
+      return true;
+    }
+    return false;
+  }
+
+}/* Ends namespace Bonmin.*/
+
diff --git a/src/CbcBonmin/BonDiver.hpp b/src/CbcBonmin/BonDiver.hpp
new file mode 100644
index 0000000..3eb7b8a
--- /dev/null
+++ b/src/CbcBonmin/BonDiver.hpp
@@ -0,0 +1,424 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 09/01/2007
+
+#ifndef BonDiver_H
+#define BonDiver_H
+
+#include "BonminConfig.h"
+#include "CbcCompareBase.hpp"
+#include "CbcTree.hpp"
+#include "IpRegOptions.hpp"
+#include "IpOptionsList.hpp"
+#include "CbcCompareActual.hpp"
+#include "BonRegisteredOptions.hpp"
+#include <list>
+namespace Bonmin
+{
+  class BabSetupBase;
+  /** Class to do diving in the tree. Principle is that branch-and-bound follows current branch of the tree untill it
+      hits the bottom at which point it goes to the best candidate (according to CbcCompare) on the heap.*/
+  class CbcDiver : public CbcTree
+  {
+  public:
+    /// Default constructor.
+    CbcDiver();
+
+    ///Copy constructor.
+    CbcDiver(const CbcDiver &rhs);
+
+    /// Assignment operator.
+    CbcDiver & operator=(const CbcDiver &rhs);
+
+    /// Destructor.
+    virtual ~CbcDiver();
+
+    ///Virtual copy constructor.
+    virtual CbcTree * clone() const;
+
+    /** \name Heap access and maintenance methods.*/
+    /**@{*/
+    ///Return top node (next node to process.*/
+    virtual CbcNode * top() const;
+
+    /// Add node to the heap.
+    virtual void push(CbcNode * x);
+    /// Remove the top node of the heap.
+    virtual void pop();
+    /// Remove the best node from the heap and return it
+    virtual CbcNode * bestNode(double cutoff);
+    /** @} */
+
+    /// \name vector methods
+    /** @{ */
+    /** Test if empty. */
+    virtual bool empty();
+    /** Give size of the tree.*/
+    virtual int size()
+    {
+      return (static_cast<int>(nodes_.size()) + (nextOnBranch_ != NULL) );
+    }
+    /** @} */
+
+    /*! \brief Prune the tree using an objective function cutoff
+      
+    This routine removes all nodes with objective worst than the
+    specified cutoff value.
+    It also sets bestPossibleObjective to best
+    of all on tree before deleting.
+    */
+    virtual void cleanTree(CbcModel * model, double cutoff, double & bestPossibleObjective);
+
+    /// Get best possible objective function in the tree
+    virtual double getBestPossibleObjective();
+
+
+    ///Don't know what this is yet?
+    virtual void endSearch()
+    {
+      nextOnBranch_ = NULL;
+    }
+
+    ///Register the options of the method.
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+    /// Initialize the method (get options)
+    void initialize(BabSetupBase &b);
+
+  private:
+    /** Say if we are cleaning the tree (then only call CbcTree functions).*/
+    bool treeCleaning_;
+    /** Noext node on the branch.*/
+    CbcNode * nextOnBranch_;
+    /** Flag indicating if we want to stop diving based on the guessed
+    objective value and the cutoff value */
+    bool stop_diving_on_cutoff_;
+  };
+
+
+  /** Class to do probed diving in the tree.
+    * Principle is that branch-and-bound follows current branch of the tree by exploring the two children at each level
+    * and continuing the dive on the best one of the two. Untill it 
+    *  hits the bottom at which point it goes to the best candidate (according to CbcCompare) on the heap.*/
+  class CbcProbedDiver : public CbcTree
+  {
+  public:
+    /// Default constructor.
+    CbcProbedDiver();
+
+    ///Copy constructor.
+    CbcProbedDiver(const CbcProbedDiver &rhs);
+
+    /// Assignment operator.
+    CbcProbedDiver & operator=(const CbcProbedDiver &rhs);
+
+    /// Destructor.
+    virtual ~CbcProbedDiver();
+
+    ///Virtual copy constructor.
+    virtual CbcTree * clone() const;
+
+    /** \name Heap access and maintenance methods.*/
+    /**@{*/
+    ///Return top node (next node to process.*/
+    virtual CbcNode * top() const;
+
+    /// Add node to the heap.
+    virtual void push(CbcNode * x);
+    /// Remove the top node of the heap.
+    virtual void pop();
+    /// Remove the best node from the heap and return it
+    virtual CbcNode * bestNode(double cutoff);
+    /** @} */
+
+    /// \name vector methods
+    /** @{ */
+    /** Test if empty. */
+    virtual bool empty();
+    /** Give size of the tree.*/
+    virtual int size()
+    {
+      return (static_cast<int>(nodes_.size()) + (nextOnBranch_ != NULL) + (candidateChild_ != NULL) );
+    }
+    /** @} */
+
+    /*! \brief Prune the tree using an objective function cutoff
+      
+    This routine removes all nodes with objective worst than the
+    specified cutoff value.
+    It also sets bestPossibleObjective to best
+    of all on tree before deleting.
+    */
+    virtual void cleanTree(CbcModel * model, double cutoff, double & bestPossibleObjective);
+
+    /// Get best possible objective function in the tree
+    virtual double getBestPossibleObjective();
+
+
+    ///Don't know what this is yet?
+    virtual void endSearch()
+    {
+      nextOnBranch_ = NULL;
+    }
+
+    /// Initialize the method (get options)
+    void initialize(BabSetupBase &b);
+
+  private:
+    /** Say if we are cleaning the tree (then only call CbcTree functions).*/
+    bool treeCleaning_;
+    /** Next node on the branch.*/
+    CbcNode * nextOnBranch_;
+    /** Candidate child explored.*/
+    CbcNode * candidateChild_;
+    /** Flag indicating if we want to stop diving based on the guessed
+    objective value and the cutoff value */
+    bool stop_diving_on_cutoff_;
+  };
+
+
+  /** A more elaborate diving class. First there are several modes which can be commanded by the Comparison class below.
+     In particular can command to dive to find solutions, to try to close the bound as possible or to limit the size of
+     the tree.
+
+     The diving goes into the tree doing depth-first search until one of the following happens:
+     \li A prescibed \c maxDiveBacktrack_ number of backtracking are performed.
+     \li The guessed objective value of the current node is worst than the best incumbent.
+     \li The depth of the dive is bigger than \c maxDiveDepth_
+
+     In the first case all the nodes are put on the tree and the next node on top will be the top of the heap, in the
+     two latter case we just put the node on the tree and backtrack in the list of depth-first search nodes.
+
+     \bug This won't work in a non-convex problem where objective does not decrease down branches.
+   */
+  class CbcDfsDiver :public CbcTree
+  {
+  public:
+    enum ComparisonModes{
+      Enlarge/** At the very beginning we might want to enlarge the tree just a bit*/,
+      FindSolutions,
+      CloseBound,
+      LimitTreeSize};
+    /// Default constructor.
+    CbcDfsDiver();
+
+    ///Copy constructor.
+    CbcDfsDiver(const CbcDfsDiver &rhs);
+
+    /// Assignment operator.
+    CbcDfsDiver & operator=(const CbcDfsDiver &rhs);
+
+    /// Destructor.
+    virtual ~CbcDfsDiver();
+
+    ///Virtual copy constructor.
+    virtual CbcTree * clone() const;
+
+    /** \name Heap access and maintenance methods.*/
+    /**@{*/
+    ///Return top node (next node to process.*/
+    virtual CbcNode * top() const;
+
+    /// Add node to the heap.
+    virtual void push(CbcNode * x);
+    /// Remove the top node of the heap.
+    virtual void pop();
+    /// Remove the best node from the heap and return it
+    virtual CbcNode * bestNode(double cutoff);
+    /** @} */
+
+    /// \name vector methods
+    /** @{ */
+    /** Test if empty. */
+    virtual bool empty();
+    /** Give size of the tree.*/
+    virtual int size()
+    {
+      return static_cast<int>(nodes_.size()) + diveListSize_;
+    }
+    /** @} */
+
+    /*! \brief Prune the tree using an objective function cutoff
+      
+    This routine removes all nodes with objective worst than the
+    specified cutoff value.
+    It also sets bestPossibleObjective to best
+    of all on tree before deleting.
+     \bug This won't work in a non-convex problem where objective does not decrease down branches.
+    */
+    virtual void cleanTree(CbcModel * model, double cutoff, double & bestPossibleObjective);
+
+    /// Get best possible objective function in the tree
+    virtual double getBestPossibleObjective();
+
+//#ifdef COIN_HAS_BONMIN
+    ///Register the options of the method.
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+    /// Initialize the method (get options)
+    void initialize(BabSetupBase &b);
+//#endif
+    ///Don't know what this is yet?
+    virtual void endSearch()
+    {}
+
+    /** Changes the mode of comparison of the tree for "safety reasons" if the mode really changes we always
+        finish the current dive and put all the node back onto the heap.*/
+    void setComparisonMode(ComparisonModes newMode);
+    /** get the mode of comparison of the tree.*/
+    ComparisonModes getComparisonMode()
+    {
+      return mode_;
+    }
+  protected:
+    /**Flag to say that we are currently cleaning the tree and should work only
+       on the heap.*/
+    int treeCleaning_;
+    /** List of the nodes in the current dive.*/
+    std::list<CbcNode *> dive_;
+    /** Record dive list size for constant time access.*/
+    int diveListSize_;
+    /** Depth of the node from which diving was started (we call this node the diving board).*/
+    int divingBoardDepth_;
+    /** Last reported cutoff.*/
+    double cutoff_;
+    /** number of backtracks done in current dive.*/
+    int nBacktracks_;
+    /** \name Parameters of the method.*/
+    /** @{ */
+    /** Maximum depth until which we'll do a bredth-first-search.*/
+    int maxDepthBFS_;
+    /** Maximum number of backtrack in one dive.*/
+    int maxDiveBacktracks_;
+    /** Maximum depth to go from divingBoard.*/
+    int maxDiveDepth_;
+    /** Current mode of the diving strategy.*/
+    ComparisonModes mode_;
+    /** @} */
+  private:
+    /** Pushes onto heap all the nodes with objective value > cutoff. */
+    void pushDiveOntoHeap(double cutoff);
+
+  };
+
+  class DiverCompare : public CbcCompareBase
+  {
+  public:
+    // Default Constructor
+    DiverCompare ():
+        CbcCompareBase(),
+        diver_(NULL),
+        numberSolToStopDive_(5),
+        numberNodesToLimitTreeSize_(1000000),
+        comparisonDive_(NULL),
+        comparisonBound_(NULL)
+    {}
+
+
+    virtual ~DiverCompare()
+    {
+      delete comparisonDive_;
+      delete comparisonBound_;
+    }
+
+    // Copy constructor
+    DiverCompare ( const DiverCompare & rhs):
+        CbcCompareBase(rhs),
+        diver_(rhs.diver_),
+        numberSolToStopDive_(rhs.numberSolToStopDive_),
+        numberNodesToLimitTreeSize_(rhs.numberNodesToLimitTreeSize_),
+        comparisonDive_(rhs.comparisonDive_->clone()),
+        comparisonBound_(rhs.comparisonBound_->clone())
+    {}
+
+    // Assignment operator
+    DiverCompare & operator=( const DiverCompare& rhs)
+    {
+      if (this != &rhs) {
+        CbcCompareBase::operator=(rhs);
+        diver_ = rhs.diver_;
+        numberSolToStopDive_ = rhs.numberSolToStopDive_;
+        numberNodesToLimitTreeSize_ = rhs.numberNodesToLimitTreeSize_;
+        delete comparisonDive_;
+        delete comparisonBound_;
+        comparisonDive_ = NULL;
+        comparisonBound_ = NULL;
+        if (rhs.comparisonDive_) comparisonDive_ = rhs.comparisonDive_->clone();
+        if (rhs.comparisonBound_) comparisonBound_ = rhs.comparisonBound_->clone();
+      }
+      return *this;
+    }
+
+    /// Clone
+    virtual CbcCompareBase * clone() const
+    {
+      return new DiverCompare(*this);
+    }
+
+    /// This is test function
+    virtual bool test (CbcNode * x, CbcNode * y);
+
+    ///  Called after each new solution
+    virtual bool newSolution(CbcModel * model);
+
+    ///  Called after each new solution
+    virtual bool newSolution(CbcModel * model,
+        double objectiveAtContinuous,
+        int numberInfeasibilitiesAtContinuous);
+
+    /** Called 1000 nodes.
+      * Return true if want tree re-sorted.*/
+    virtual bool every1000Nodes(CbcModel * model,int numberNodes);
+
+    /** Set the dfs diver to use.*/
+    void setDiver(CbcDfsDiver * diver)
+    {
+      diver_ = diver;
+    }
+
+    /** Set numberSolToStopDive_ */
+    void setNumberSolToStopDive(int val)
+    {
+      numberSolToStopDive_ = val;
+    }
+
+    /** Set numberNodesToLimitTreeSize_.*/
+    void setNumberNodesToLimitTreeSize(int val)
+    {
+      numberNodesToLimitTreeSize_ = val;
+    }
+
+    /** Set comparison method when diving.*/
+    void setComparisonDive(const CbcCompareBase & val)
+    {
+      comparisonDive_ = val.clone();
+    }
+    /** Set comparison method when closing bound.*/
+    void setComparisonBound(const CbcCompareBase & val)
+    {
+      comparisonBound_ = val.clone();
+    }
+  private:
+    /** Pointer to the CbcDfsDiver handling the tree.*/
+    CbcDfsDiver * diver_;
+    /** Number of solution before we command diver_ to stop diving.*/
+    int numberSolToStopDive_;
+    /** Number of nodes before we command diver_ to limit the tree size.*/
+    int numberNodesToLimitTreeSize_;
+    /** Comparison method used in diving mode*/
+    CbcCompareBase * comparisonDive_;
+    /** Comparison method used bound mode*/
+    CbcCompareBase * comparisonBound_;
+    /** Comparison method used when limit tree size.*/
+    CbcCompareDepth comparisonDepth_;
+  };
+
+}/* Ends bonmin namespace.*/
+
+#endif
+
diff --git a/src/CbcBonmin/BonGuessHeuristic.cpp b/src/CbcBonmin/BonGuessHeuristic.cpp
new file mode 100644
index 0000000..76d41f4
--- /dev/null
+++ b/src/CbcBonmin/BonGuessHeuristic.cpp
@@ -0,0 +1,75 @@
+// (C) Copyright International Business Machines  2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter          IBM       2007-09-01
+
+#include "BonGuessHeuristic.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+#include "BonChooseVariable.hpp"
+
+//#include "OsiAuxInfo.hpp"
+namespace Bonmin
+{
+/// Default constructor
+  GuessHeuristic::GuessHeuristic(CbcModel &model)
+      :
+      CbcHeuristic(model)
+  {}
+
+  /// heuristic method
+  int
+  GuessHeuristic::solution(double &solutionValue, double *betterSolution)
+  {
+    // Get pointer to pseudo costs object
+    const BonChooseVariable* chooseMethod = dynamic_cast<BonChooseVariable*>(model_->branchingMethod()->chooseMethod());
+
+    if (!chooseMethod) {
+      (*model_->messageHandler()) << "Can't get pseudo costs!!!\n";
+      solutionValue = model_->getCurrentMinimizationObjValue();
+      return -1;
+    }
+    const OsiPseudoCosts& pseudoCosts = chooseMethod->pseudoCosts();
+    int numberObjects = pseudoCosts.numberObjects();
+    assert(numberObjects == model_->numberObjects());
+    const double* upTotalChange = pseudoCosts.upTotalChange();
+    const double* downTotalChange = pseudoCosts.downTotalChange();
+    const int* upNumber = pseudoCosts.upNumber();
+    const int* downNumber = pseudoCosts.downNumber();
+
+    double sumUpTot = 0.;
+    int numberUpTot = 0;
+    double sumDownTot = 0.;
+    int numberDownTot = 0;
+    for (int i=0;i<numberObjects;i++) {
+      sumUpTot += upTotalChange[i];
+      numberUpTot += upNumber[i];
+      sumDownTot += downTotalChange[i];
+      numberDownTot += downNumber[i];
+    }
+    if (!numberUpTot || !numberDownTot) {
+      // don't have ANY pseudo-costs information yet
+      solutionValue = COIN_DBL_MAX;
+      return -1;
+    }
+    double upAvrg=sumUpTot/numberUpTot;
+    double downAvrg=sumDownTot/numberDownTot;
+
+    OsiObject** object =  model_->objects();
+
+    solutionValue = model_->getCurrentMinimizationObjValue();
+    for (int iObj = 0; iObj < numberObjects; iObj++) {
+      //printf("%3d upest=%e uptot=%e upnum=%d downest=%e downtot=%e downnum=%d  ", iObj, object[iObj]->upEstimate(), upTotalChange[iObj], upNumber[iObj], object[iObj]->downEstimate(), downTotalChange[iObj], downNumber[iObj]);
+
+      double upEstimate = upNumber[iObj] ? object[iObj]->upEstimate()*upTotalChange[iObj]/upNumber[iObj] : object[iObj]->upEstimate()*upAvrg;
+      double downEstimate = downNumber[iObj] ? object[iObj]->downEstimate()*downTotalChange[iObj]/downNumber[iObj] : object[iObj]->downEstimate()*downAvrg;
+      //printf("up=%e down=%e\n", upEstimate, downEstimate);
+      solutionValue += CoinMin(upEstimate,downEstimate);
+    }
+    //printf("solutionValue = %e\n", solutionValue);
+    return -1;
+  }
+
+}
diff --git a/src/CbcBonmin/BonGuessHeuristic.hpp b/src/CbcBonmin/BonGuessHeuristic.hpp
new file mode 100644
index 0000000..83a952b
--- /dev/null
+++ b/src/CbcBonmin/BonGuessHeuristic.hpp
@@ -0,0 +1,46 @@
+// (C) Copyright International Business Machines  2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter          IBM       2007-09-01
+
+#ifndef BonGuessHeuristic_HPP
+#define BonGuessHeuristic_HPP
+#include "BonOsiTMINLPInterface.hpp"
+
+#include "CbcHeuristic.hpp"
+
+namespace Bonmin
+{
+  class  GuessHeuristic : public CbcHeuristic
+  {
+  public:
+    /// Usefull constructor
+    GuessHeuristic(CbcModel &model);
+    ///Copy constructor
+    GuessHeuristic( const GuessHeuristic &copy):
+        CbcHeuristic(copy)
+    {}
+
+    /// heuristic method providing guess, based on pseudo costs
+    virtual int solution(double &solutionValue, double *betterSolution);
+    virtual int solution(double &solutionValue, double *betterSolution, OsiCuts & cs)
+    {
+      return solution(solutionValue, betterSolution);
+    }
+    virtual CbcHeuristic * clone()const
+    {
+      return new GuessHeuristic(*this);
+    }
+    virtual void resetModel(CbcModel*)
+    {}
+  private:
+    /// Default constructor
+    GuessHeuristic();
+
+    /// Assignment operator
+    GuessHeuristic & operator=(const GuessHeuristic& rhs);
+  };
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonDummyPump.cpp b/src/CbcBonmin/Heuristics/BonDummyPump.cpp
new file mode 100644
index 0000000..f149f07
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonDummyPump.cpp
@@ -0,0 +1,80 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 06/18/2008
+
+#include "BonDummyPump.hpp"
+#include "CbcModel.hpp"
+#include "OsiBranchingObject.hpp"
+
+namespace Bonmin {
+
+  /** Default constructor*/
+  DummyPump::DummyPump():
+    LocalSolverBasedHeuristic(){
+  }
+  /** Constructor with setup.*/
+  DummyPump::DummyPump(BonminSetup * setup):
+    LocalSolverBasedHeuristic(setup){
+  }
+
+  /** Copy constructor.*/
+  DummyPump::DummyPump
+             (const DummyPump &other):
+    LocalSolverBasedHeuristic(other){
+  }
+
+  DummyPump::~DummyPump(){
+  }
+
+  /** Runs heuristic*/
+  int
+  DummyPump::solution(double & objectiveValue,
+                                 double * newSolution){
+    if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+    //int numberObjects = model_->numberObjects();
+    //OsiObject ** objects = model_->objects();
+    OsiTMINLPInterface * nlp = dynamic_cast<OsiTMINLPInterface *>
+                               (setup_->nonlinearSolver()->clone());
+
+    OsiBranchingInformation info = model_->usefulInformation();
+    info.solution_ = model_->getColSolution();
+    int numcols = model_->getNumCols();
+    vector<double> vals;
+    vector<int> inds;
+
+    for(int i = 0 ;i < numcols ; i++){
+       if(nlp->isInteger(i)){
+            vals.push_back(info.solution_[i]);
+            inds.push_back(i);
+       }
+    }
+    nlp->switchToFeasibilityProblem(inds.size(), vals(), inds(), 1., 0., 1);
+
+    double cutoff = info.cutoff_; 
+    int r_val = doLocalSearch(nlp, newSolution, objectiveValue, cutoff);
+    delete nlp;
+    return r_val;
+  }
+
+  void
+  DummyPump::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+   roptions->SetRegisteringCategory("Primal Heuristics (undocumented)", RegisteredOptions::UndocumentedCategory);
+   roptions->AddStringOption2(
+     "dummy_pump_heuristic",
+     "if yes runs a heuristic which looks like a dummy FP",
+     "no",
+     "no", "don't run it",
+     "yes", "runs the heuristic",
+     "");
+   roptions->setOptionExtraInfo("dummy_pump_heuristic", 63);
+  }
+
+   /** Initiaize using passed options.*/
+   void 
+   DummyPump::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+   }
+}/* ends bonmin namespace*/
diff --git a/src/CbcBonmin/Heuristics/BonDummyPump.hpp b/src/CbcBonmin/Heuristics/BonDummyPump.hpp
new file mode 100644
index 0000000..8a51c70
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonDummyPump.hpp
@@ -0,0 +1,43 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 06/18/2008
+
+#ifndef BonDummyPump_H
+#define BonDummyPump_H
+#include "BonLocalSolverBasedHeuristic.hpp"
+
+namespace Bonmin {
+  class DummyPump:public LocalSolverBasedHeuristic {
+    public:
+     /** Default constructor*/
+     DummyPump();
+    /** Constructor with setup.*/
+    DummyPump(BonminSetup * setup);
+
+     /** Copy constructor.*/
+     DummyPump(const DummyPump &other);
+     /** Virtual constructor.*/
+     virtual CbcHeuristic * clone() const{
+      return new DummyPump(*this);
+     }
+
+     /** Destructor*/
+     virtual ~DummyPump();
+
+     /** Runs heuristic*/
+     int solution(double & objectiveValue,
+                  double * newSolution);
+   /** Register the options common to all local search based heuristics.*/
+   static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+   /** Initiaize using passed options.*/
+   void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+  };
+
+}/* Ends Bonmin namepace.*/
+#endif
+
diff --git a/src/CbcBonmin/Heuristics/BonFixAndSolveHeuristic.cpp b/src/CbcBonmin/Heuristics/BonFixAndSolveHeuristic.cpp
new file mode 100644
index 0000000..140bbff
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonFixAndSolveHeuristic.cpp
@@ -0,0 +1,91 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 06/18/2008
+
+#include "BonFixAndSolveHeuristic.hpp"
+#include "CbcModel.hpp"
+#include "OsiBranchingObject.hpp"
+
+namespace Bonmin {
+
+  /** Default constructor*/
+  FixAndSolveHeuristic::FixAndSolveHeuristic():
+    LocalSolverBasedHeuristic()
+    {
+  }
+  /** Constructor with setup.*/
+  FixAndSolveHeuristic::FixAndSolveHeuristic(BonminSetup * setup):
+    LocalSolverBasedHeuristic(setup)
+    {
+  }
+
+  /** Copy constructor.*/
+  FixAndSolveHeuristic::FixAndSolveHeuristic
+             (const FixAndSolveHeuristic &other):
+    LocalSolverBasedHeuristic(other){
+  }
+
+  FixAndSolveHeuristic::~FixAndSolveHeuristic(){
+  }
+
+  /** Runs heuristic*/
+  int
+  FixAndSolveHeuristic::solution(double & objectiveValue,
+                                 double * newSolution){
+    //if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+    if(model_->getSolutionCount() > 0) return 0;
+    if(model_->getNodeCount() > 1000) return 0;
+    if(model_->getNodeCount() % 100 != 0) return 0;
+    int numberObjects = model_->numberObjects();
+    OsiObject ** objects = model_->objects();
+
+    OsiTMINLPInterface * nlp = dynamic_cast<OsiTMINLPInterface *>
+                               (model_->solver());
+    if(nlp == NULL){
+       nlp = dynamic_cast<OsiTMINLPInterface *>
+                         (setup_->nonlinearSolver()->clone());
+     }
+     else {
+       nlp = dynamic_cast<OsiTMINLPInterface *>(nlp->clone());
+     }
+
+    OsiBranchingInformation info = model_->usefulInformation();
+    info.solution_ = model_->getColSolution();
+
+    int dummy;
+    int nFixed = 0;
+    for(int i = 0 ; i < numberObjects; i++){
+      if(objects[i]->infeasibility(&info, dummy) == 0.){
+         objects[i]->feasibleRegion(nlp, &info);
+         nFixed ++;
+      }
+    }
+    if(nFixed < numberObjects / 3) return 0;
+    double cutoff = info.cutoff_; 
+    int r_val = doLocalSearch(nlp, newSolution, objectiveValue, cutoff);
+    delete nlp;
+    return r_val;
+  }
+
+  void
+  FixAndSolveHeuristic::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+   roptions->SetRegisteringCategory("Primal Heuristics (undocumented)", RegisteredOptions::UndocumentedCategory);
+   roptions->AddStringOption2(
+     "fix_and_solve_heuristic",
+     "if yes runs a heuristic at root where fixes all variables integer in the continuous solution",
+     "no",
+     "no", "don't run it",
+     "yes", "runs the heuristic",
+     "");
+   roptions->setOptionExtraInfo("fix_and_solve_heuristic", 63);
+  }
+
+   /** Initiaize using passed options.*/
+   void 
+   FixAndSolveHeuristic::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+   }
+}/* ends bonmin namespace*/
diff --git a/src/CbcBonmin/Heuristics/BonFixAndSolveHeuristic.hpp b/src/CbcBonmin/Heuristics/BonFixAndSolveHeuristic.hpp
new file mode 100644
index 0000000..948e8d5
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonFixAndSolveHeuristic.hpp
@@ -0,0 +1,43 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 06/18/2008
+
+#ifndef BonFixAndSolveHeuristic_H
+#define BonFixAndSolveHeuristic_H
+#include "BonLocalSolverBasedHeuristic.hpp"
+
+namespace Bonmin {
+  class FixAndSolveHeuristic:public LocalSolverBasedHeuristic {
+    public:
+     /** Default constructor*/
+     FixAndSolveHeuristic();
+    /** Constructor with setup.*/
+    FixAndSolveHeuristic(BonminSetup * setup);
+
+     /** Copy constructor.*/
+     FixAndSolveHeuristic(const FixAndSolveHeuristic &other);
+     /** Virtual constructor.*/
+     virtual CbcHeuristic * clone() const{
+      return new FixAndSolveHeuristic(*this);
+     }
+
+     /** Destructor*/
+     virtual ~FixAndSolveHeuristic();
+
+     /** Runs heuristic*/
+     int solution(double & objectiveValue,
+                  double * newSolution);
+   /** Register the options common to all local search based heuristics.*/
+   static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+   /** Initiaize using passed options.*/
+   void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+  };
+
+}/* Ends Bonmin namepace.*/
+#endif
+
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDive.cpp b/src/CbcBonmin/Heuristics/BonHeuristicDive.cpp
new file mode 100644
index 0000000..c1b1a51
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDive.cpp
@@ -0,0 +1,365 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#include "BonHeuristicDive.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+
+#include "OsiAuxInfo.hpp"
+
+#include "CoinTime.hpp"
+
+#include <fstream>
+
+#include <iomanip>
+
+//#define DEBUG_BON_HEURISTIC_DIVE
+
+using namespace std;
+
+namespace Bonmin
+{
+  HeuristicDive::HeuristicDive()
+    :
+    CbcHeuristic(),
+    setup_(NULL),
+    percentageToFix_(0.2),
+    howOften_(100)
+  {}
+
+  HeuristicDive::HeuristicDive(BonminSetup * setup)
+    :
+    CbcHeuristic(),
+    setup_(setup),
+    percentageToFix_(0.2),
+    howOften_(100)
+  {
+    //    Initialize(setup->options());
+  }
+
+  HeuristicDive::HeuristicDive(const HeuristicDive &copy)
+    :
+    CbcHeuristic(copy),
+    setup_(copy.setup_),
+    percentageToFix_(copy.percentageToFix_),
+    howOften_(copy.howOften_)
+  {}
+
+  HeuristicDive &
+  HeuristicDive::operator=(const HeuristicDive & rhs)
+  {
+    if(this != &rhs) {
+      CbcHeuristic::operator=(rhs);
+      setup_ = rhs.setup_;
+      percentageToFix_ = rhs.percentageToFix_;
+      howOften_ = rhs.howOften_;
+    }
+    return *this;
+  }
+
+  int
+  HeuristicDive::solution(double &solutionValue, double *betterSolution)
+  {
+    //    if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+    if ((model_->getNodeCount()%howOften_)!=0||model_->getCurrentPassNumber()>1)
+      return 0;
+
+    int returnCode = 0; // 0 means it didn't find a feasible solution
+
+    OsiTMINLPInterface * nlp = NULL;
+    if(setup_->getAlgorithm() == B_BB)
+      nlp = dynamic_cast<OsiTMINLPInterface *>(model_->solver()->clone());
+    else
+      nlp = dynamic_cast<OsiTMINLPInterface *>(setup_->nonlinearSolver()->clone());
+
+    TMINLP2TNLP* minlp = nlp->problem();
+
+    // set tolerances
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+    double primalTolerance = 1.0e-6;
+
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    const Bonmin::TMINLP::VariableType* variableType = minlp->var_types();
+    const double* x_sol = minlp->x_sol();
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+    //const double* g_sol = minlp->g_sol();
+    const double* g_l = minlp->g_l();
+    const double* g_u = minlp->g_u();
+
+    adjustPrimalTolerance(minlp, primalTolerance);
+
+    assert(isNlpFeasible(minlp, primalTolerance));
+
+    // Get solution array for heuristic solution
+    double* newSolution = new double [numberColumns];
+    memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+    double* new_g_sol = new double [numberRows];
+
+
+    // create a set with the indices of the fractional variables
+    vector<int> integerColumns; // stores the integer variables
+    int numberFractionalVariables = 0;
+    for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+      if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	integerColumns.push_back(iColumn);
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  numberFractionalVariables++;
+	}
+      }
+    }
+
+    setInternalVariables(minlp);
+
+    // vectors to store the latest variables fixed at their bounds
+    int numberIntegers = (int) integerColumns.size();
+    int* columnFixed = new int [numberIntegers];
+    double* originalBound = new double [numberIntegers];
+    bool * fixedAtLowerBound = new bool [numberIntegers];
+
+    const int maxNumberAtBoundToFix = (int) floor(percentageToFix_ * numberIntegers);
+
+    int iteration = -1;
+    while(numberFractionalVariables) {
+      iteration++;
+
+      // select a fractional variable to bound
+      int bestColumn = -1;
+      int bestRound = -1; // -1 rounds down, +1 rounds up
+      selectVariableToBranch(minlp, integerColumns, newSolution,
+			     bestColumn, bestRound);
+
+      // fix integer variables that are at their bounds
+      int numberAtBoundFixed = 0;
+      for (int i=0; i<numberIntegers; i++) {
+	int iColumn = integerColumns[i];
+	double value=newSolution[iColumn];
+	if(fabs(floor(value+0.5)-value)<=integerTolerance && 
+	   numberAtBoundFixed < maxNumberAtBoundToFix) {
+	  // fix the variable at one of its bounds
+	  if (fabs(x_l[iColumn]-value)<=integerTolerance &&
+	      x_l[iColumn] != x_u[iColumn]) {
+	    columnFixed[numberAtBoundFixed] = iColumn;
+	    originalBound[numberAtBoundFixed] = x_u[iColumn];
+	    fixedAtLowerBound[numberAtBoundFixed] = true;
+	    minlp->SetVariableUpperBound(iColumn, x_l[iColumn]);
+	    numberAtBoundFixed++;
+	  }
+	  else if(fabs(x_u[iColumn]-value)<=integerTolerance &&
+		  x_l[iColumn] != x_u[iColumn]) {
+	    columnFixed[numberAtBoundFixed] = iColumn;
+	    originalBound[numberAtBoundFixed] = x_l[iColumn];
+	    fixedAtLowerBound[numberAtBoundFixed] = false;
+	    minlp->SetVariableLowerBound(iColumn, x_u[iColumn]);
+	    numberAtBoundFixed++;
+	  }
+	  if(numberAtBoundFixed == maxNumberAtBoundToFix)
+	    break;
+	}
+      }
+
+      double originalBoundBestColumn;
+      if(bestColumn >= 0) {
+	if(bestRound < 0) {
+	  originalBoundBestColumn = x_u[bestColumn];
+	  minlp->SetVariableUpperBound(bestColumn, floor(newSolution[bestColumn]));
+	}
+	else {
+	  originalBoundBestColumn = x_l[bestColumn];
+	  minlp->SetVariableLowerBound(bestColumn, ceil(newSolution[bestColumn]));
+	}
+      } else {
+	break;
+      }
+      int originalBestRound = bestRound;
+      while (1) {
+
+	nlp->initialSolve();
+
+	if(minlp->optimization_status() != Ipopt::SUCCESS) {
+	  if(numberAtBoundFixed > 0) {
+	    // Remove the bound fix for variables that were at bounds
+	    for(int i=0; i<numberAtBoundFixed; i++) {
+	      int iColFixed = columnFixed[i];
+	      if(fixedAtLowerBound[i])
+		minlp->SetVariableUpperBound(iColFixed, originalBound[i]);
+	      else
+		minlp->SetVariableLowerBound(iColFixed, originalBound[i]);
+	    }
+	    numberAtBoundFixed = 0;
+	  }
+	  else if(bestRound == originalBestRound) {
+	    bestRound *= (-1);
+	    if(bestRound < 0) {
+	      minlp->SetVariableLowerBound(bestColumn, originalBoundBestColumn);
+	      minlp->SetVariableUpperBound(bestColumn, floor(newSolution[bestColumn]));
+	    }
+	    else {
+	      minlp->SetVariableLowerBound(bestColumn, ceil(newSolution[bestColumn]));
+	      minlp->SetVariableUpperBound(bestColumn, originalBoundBestColumn);
+	    }
+	  }
+	  else
+	    break;
+	}
+	else
+	  break;
+      }
+
+      if(minlp->optimization_status() != Ipopt::SUCCESS) {
+	break;
+      }
+
+      memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+
+      double newSolutionValue;
+      minlp->eval_f(numberColumns, newSolution, true, newSolutionValue); 
+      if(newSolutionValue >= solutionValue)
+	break;
+
+      numberFractionalVariables = 0;
+      for(int iIntCol=0; iIntCol<(int)integerColumns.size(); iIntCol++) {
+	int iColumn = integerColumns[iIntCol];
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance)
+	  numberFractionalVariables++;
+      }
+
+    }
+
+    bool feasible = true;
+    for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+      double value=newSolution[iColumn];
+      if(value < x_l[iColumn] || value > x_u[iColumn]) {
+	feasible = false;
+	break;
+      }
+      if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  feasible = false;
+	  break;
+	}
+      }
+    }
+    minlp->eval_g(numberColumns, newSolution, true,
+		  numberRows, new_g_sol);
+    for(int iRow=0; iRow<numberRows; iRow++) {
+      if(new_g_sol[iRow]<g_l[iRow]-primalTolerance ||
+	 new_g_sol[iRow]>g_u[iRow]+primalTolerance) {
+	if(minlp->optimization_status() != Ipopt::SUCCESS) {
+	  feasible = false;
+	  break;
+	} else {
+#ifdef DEBUG_BON_HEURISTIC_DIVE
+	  cout<<"It should be infeasible because: "<<endl;
+	  cout<<"g_l["<<iRow<<"]= "<<g_l[iRow]<<" "
+	      <<"g_sol["<<iRow<<"]= "<<new_g_sol[iRow]<<" "
+	      <<"g_u["<<iRow<<"]= "<<g_u[iRow]<<endl;
+	  cout<<"primalTolerance= "<<primalTolerance<<endl;
+#endif
+	  feasible = false;
+	  break;
+	}
+      }
+    }
+
+    if(feasible) {
+      double newSolutionValue;
+      minlp->eval_f(numberColumns, newSolution, true, newSolutionValue); 
+      if(newSolutionValue < solutionValue) {
+	memcpy(betterSolution,newSolution,numberColumns*sizeof(double));
+	solutionValue = newSolutionValue;
+	returnCode = 1;
+      }
+    }
+
+    delete [] newSolution;
+    delete [] new_g_sol;
+    delete nlp;
+    delete [] columnFixed;
+    delete [] originalBound;
+    delete [] fixedAtLowerBound;
+
+#ifdef DEBUG_BON_HEURISTIC_DIVE
+    std::cout<<"Dive returnCode = "<<returnCode<<std::endl;
+#endif
+
+    return returnCode;
+  }
+
+
+  bool
+  isNlpFeasible(TMINLP2TNLP* minlp, const double primalTolerance)
+  {
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    const double* x_sol = minlp->x_sol();
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+    const double* g_sol = minlp->g_sol();
+    const double* g_l = minlp->g_l();
+    const double* g_u = minlp->g_u();
+
+    // check if the problem is feasible
+    for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+      double value=x_sol[iColumn];
+      if(value < x_l[iColumn] || value > x_u[iColumn]) {
+	return false;
+      }
+    }
+    for(int iRow=0; iRow<numberRows; iRow++) {
+      if(g_sol[iRow]<g_l[iRow]-primalTolerance ||
+	 g_sol[iRow]>g_u[iRow]+primalTolerance) {
+	return false;
+      }
+    }
+
+    return true;
+  }
+
+  void
+  adjustPrimalTolerance(TMINLP2TNLP* minlp, double & primalTolerance)
+  {
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    const double* g_sol = minlp->g_sol();
+    const double* g_l = minlp->g_l();
+    const double* g_u = minlp->g_u();
+
+    for(int iRow=0; iRow<numberRows; iRow++) {
+      if(g_sol[iRow]<g_l[iRow]-primalTolerance) {
+	primalTolerance = g_l[iRow]-g_sol[iRow];
+      } else if(g_sol[iRow]>g_u[iRow]+primalTolerance) {
+	primalTolerance = g_sol[iRow]-g_u[iRow];
+      }
+    }
+  }
+
+}
+
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDive.hpp b/src/CbcBonmin/Heuristics/BonHeuristicDive.hpp
new file mode 100644
index 0000000..952fee7
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDive.hpp
@@ -0,0 +1,88 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#ifndef BonHeuristicDive_HPP
+#define BonHeuristicDive_HPP
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonBonminSetup.hpp"
+#include "CbcHeuristic.hpp"
+
+namespace Bonmin
+{
+  class HeuristicDive : public CbcHeuristic
+  {
+  public:
+    /// Default constructor
+    HeuristicDive();
+
+    /// Constructor with setup
+    HeuristicDive(BonminSetup * setup);
+
+    /// Copy constructor
+    HeuristicDive(const HeuristicDive &copy);
+
+    /// Destructor
+    ~HeuristicDive() {}
+
+    /// Assignment operator
+    HeuristicDive & operator=(const HeuristicDive & rhs);
+
+    /// Clone
+    virtual CbcHeuristic * clone() const = 0;
+
+    /// Resets stuff if model changes
+    virtual void resetModel(CbcModel * model){
+      setModel(model);
+    }
+
+    /** Change setup used for heuristic.*/
+    virtual void setSetup(BonminSetup * setup){
+      setup_ = setup;
+      //      Initialize(setup_->options());
+    }
+
+    /// Set percentage of integer variables to fix at bounds
+    void setPercentageToFix(double value)
+    { percentageToFix_ = value; }
+
+    /// Performs heuristic
+    virtual int solution(double &solutionValue, double *betterSolution);
+
+    /// sets internal variables
+    virtual void setInternalVariables(TMINLP2TNLP* minlp) = 0;
+
+    /// Selects the next variable to branch on
+    /** If bestColumn = -1, it means that no variable was found
+    */
+    virtual void selectVariableToBranch(TMINLP2TNLP* minlp,
+					const vector<int> & integerColumns,
+					const double* newSolution,
+					int& bestColumn,
+					int& bestRound) = 0;
+
+  protected:
+    /** Setup to use for local searches (will make copies).*/
+    BonminSetup * setup_; 
+
+    /// Percentage of integer variables to fix at bounds
+    double percentageToFix_;
+
+  private:
+    /// How often to do (code can change)
+    int howOften_;
+
+  };
+
+  /// checks if the NLP relaxation of the problem is feasible
+  bool isNlpFeasible(TMINLP2TNLP* minlp, const double primalTolerance);
+  
+  /// Adjusts the primalTolerance in case some of the constraints are violated
+  void adjustPrimalTolerance(TMINLP2TNLP* minlp, double & primalTolerance);
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveFractional.cpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveFractional.cpp
new file mode 100644
index 0000000..9985e6b
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveFractional.cpp
@@ -0,0 +1,127 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#include "CoinPragma.hpp"
+#include "BonHeuristicDiveFractional.hpp"
+#include "CbcModel.hpp"
+
+namespace Bonmin
+{
+  HeuristicDiveFractional::HeuristicDiveFractional() 
+    :
+    HeuristicDive()
+  {}
+
+  HeuristicDiveFractional::HeuristicDiveFractional(BonminSetup * setup)
+    :
+    HeuristicDive(setup)
+  {
+    Initialize(setup->options());    
+  }
+
+  HeuristicDiveFractional::HeuristicDiveFractional(const HeuristicDiveFractional &copy)
+    :
+    HeuristicDive(copy)
+  {}
+
+  HeuristicDiveFractional & 
+  HeuristicDiveFractional::operator=( const HeuristicDiveFractional& rhs)
+  {
+    if (this!=&rhs) {
+      HeuristicDive::operator=(rhs);
+    }
+    return *this;
+  }
+
+  CbcHeuristic *
+  HeuristicDiveFractional::clone() const
+  {
+    return new HeuristicDiveFractional(*this);
+  }
+
+  void
+  HeuristicDiveFractional::setInternalVariables(TMINLP2TNLP* minlp)
+  {
+    // no variables to set
+  }
+
+  void
+  HeuristicDiveFractional::selectVariableToBranch(TMINLP2TNLP* minlp,
+						  const vector<int> & integerColumns,
+						  const double* newSolution,
+						  int& bestColumn,
+						  int& bestRound)
+  {
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+    
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+
+    // select a fractional variable to bound
+    double smallestFraction = COIN_DBL_MAX;
+    bestColumn = -1;
+    bestRound = -1; // -1 rounds down, +1 rounds up
+    for(int iIntCol=0; iIntCol<(int)integerColumns.size(); iIntCol++) {
+      int iColumn = integerColumns[iIntCol];
+      double value=newSolution[iColumn];
+      if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	double below = floor(value);
+	double downFraction = COIN_DBL_MAX;
+	if(below >= x_l[iColumn])
+	  downFraction = value-below;
+	double above = ceil(value);
+	double upFraction = COIN_DBL_MAX;
+	if(above <= x_u[iColumn])
+	  upFraction = ceil(value)-value;
+	double fraction = 0;
+	int round = 0;
+	if(downFraction < upFraction) {
+	  fraction = downFraction;
+	  round = -1;
+	} else if(downFraction > upFraction) {
+	  fraction = upFraction;
+	  round = 1;
+	} else {
+	  double randomNumber = CoinDrand48();
+	  if(randomNumber<0.5) {
+	    fraction = downFraction;
+	    round = -1;
+	  } else {
+	    fraction = upFraction;
+	    round = 1;
+	  }	  
+	}
+	if(fraction<smallestFraction) {
+	  smallestFraction = fraction;
+	  bestColumn = iColumn;
+	  bestRound = round;
+	}
+      }
+    }
+
+  }
+
+  void
+  HeuristicDiveFractional::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+    roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+   roptions->AddStringOption2(
+     "heuristic_dive_fractional",
+     "if yes runs the Dive Fractional heuristic",
+     "no",
+     "no", "",
+     "yes", "",
+     "");
+   roptions->setOptionExtraInfo("heuristic_dive_fractional", 63);
+  }
+
+  void 
+  HeuristicDiveFractional::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+  }
+
+}
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveFractional.hpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveFractional.hpp
new file mode 100644
index 0000000..590c31e
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveFractional.hpp
@@ -0,0 +1,67 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#ifndef BonHeuristicDiveFractional_H
+#define BonHeuristicDiveFractional_H
+
+#include "BonBonminSetup.hpp"
+#include "BonHeuristicDive.hpp"
+
+/** DiveFractional class
+ */
+
+namespace Bonmin
+{
+  class HeuristicDiveFractional : public HeuristicDive {
+  public:
+    /// Default Constructor 
+    HeuristicDiveFractional ();
+
+    /// Constructor with setup
+    HeuristicDiveFractional(BonminSetup * setup);
+
+    /// Copy constructor
+    HeuristicDiveFractional(const HeuristicDiveFractional &copy);
+
+    /// Destructor
+    ~HeuristicDiveFractional() {}
+
+    /// Assignment operator
+    HeuristicDiveFractional & operator=(const HeuristicDiveFractional & rhs);
+
+    /// Clone
+    virtual CbcHeuristic * clone() const;
+
+    /** Change setup used for heuristic.*/
+    virtual void setSetup(BonminSetup * setup){
+      HeuristicDive::setSetup(setup);
+      Initialize(setup->options());
+    }
+
+    /// sets internal variables
+    virtual void setInternalVariables(TMINLP2TNLP* minlp);
+
+    /// Selects the next variable to branch on
+    /** If bestColumn = -1, it means that no variable was found
+    */
+    virtual void selectVariableToBranch(TMINLP2TNLP* minlp,
+					const vector<int> & integerColumns,
+					const double* newSolution,
+					int& bestColumn,
+					int& bestRound);
+
+    /** Register the options common to all local search based heuristics.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    
+    /** Initiaize using passed options.*/
+    void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+  };
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.cpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.cpp
new file mode 100644
index 0000000..9d5fc2c
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.cpp
@@ -0,0 +1,490 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#include "BonminConfig.h"
+#include "BonHeuristicDiveMIP.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+#include "BonHeuristicDive.hpp"
+#include "BonSubMipSolver.hpp"
+#include "BonCbcLpStrategy.hpp"
+
+#ifdef COIN_HAS_CPX
+#include "OsiCpxSolverInterface.hpp"
+#endif
+
+#include "OsiClpSolverInterface.hpp"
+
+#include "OsiAuxInfo.hpp"
+
+#include "CoinTime.hpp"
+
+#include <fstream>
+
+#include <iomanip>
+
+#include "CoinHelperFunctions.hpp"
+
+//#define DEBUG_BON_HEURISTIC_DIVE_MIP
+
+using namespace std;
+
+namespace Bonmin
+{
+  HeuristicDiveMIP::HeuristicDiveMIP(BonminSetup * setup)
+    :
+    CbcHeuristic(),
+    setup_(setup),
+    howOften_(100),
+    mip_(NULL)
+  {
+    Initialize(setup);
+  }
+
+  void
+  HeuristicDiveMIP::Initialize(BonminSetup * b){
+    delete mip_;
+    mip_ = new SubMipSolver (*b, b->prefix());
+   
+  }
+
+  HeuristicDiveMIP::HeuristicDiveMIP(const HeuristicDiveMIP &copy)
+    :
+    CbcHeuristic(copy),
+    setup_(copy.setup_),
+    howOften_(copy.howOften_),
+    mip_(new SubMipSolver(*copy.mip_))
+  {
+  }
+
+  HeuristicDiveMIP &
+  HeuristicDiveMIP::operator=(const HeuristicDiveMIP & rhs)
+  {
+    if(this != &rhs) {
+      CbcHeuristic::operator=(rhs);
+      setup_ = rhs.setup_;
+      howOften_ = rhs.howOften_;
+      delete mip_;
+      if(rhs.mip_)
+        mip_ = new SubMipSolver(*rhs.mip_);
+    }
+    return *this;
+  }
+
+  HeuristicDiveMIP::~HeuristicDiveMIP(){
+    delete mip_;
+  }
+
+  struct MatComp{
+    const int * iRow;
+    const int * jCol;
+  /// Destructor
+    bool operator()(int i,int j){
+      return (jCol[i] < jCol[j]) || (jCol[i] == jCol[j] && iRow[i] < iRow[j]);
+    }
+  };
+
+
+  int
+  HeuristicDiveMIP::solution(double &solutionValue, double *betterSolution)
+  {
+    if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+    if ((model_->getNodeCount()%howOften_)!=0||model_->getCurrentPassNumber()>1)
+      return 0;
+ 
+    int returnCode = 0; // 0 means it didn't find a feasible solution
+
+    OsiTMINLPInterface * nlp = NULL;
+    if(setup_->getAlgorithm() == B_BB)
+      nlp = dynamic_cast<OsiTMINLPInterface *>(model_->solver()->clone());
+    else
+      nlp = dynamic_cast<OsiTMINLPInterface *>(setup_->nonlinearSolver()->clone());
+
+    TMINLP2TNLP* minlp = nlp->problem();
+ 
+    // set tolerances
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+    double primalTolerance = 1.0e-6;
+
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    const Bonmin::TMINLP::VariableType* variableType = minlp->var_types();
+    const double* x_sol = minlp->x_sol();
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+    //const double* g_sol = minlp->g_sol();
+    const double* g_l = minlp->g_l();
+    const double* g_u = minlp->g_u();
+
+    adjustPrimalTolerance(minlp, primalTolerance);
+
+    assert(isNlpFeasible(minlp, primalTolerance));
+
+    // Get information about the linear and nonlinear part of the instance
+    TMINLP* tminlp = nlp->model();
+    Ipopt::TNLP::LinearityType* variableLinearNonLinear = new 
+      Ipopt::TNLP::LinearityType [numberColumns];
+    tminlp->get_variables_linearity(numberColumns, variableLinearNonLinear);
+    vector<int> linearVariable;
+    vector<int> nonlinearVariable;
+    for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+      if (variableLinearNonLinear[iColumn]==Ipopt::TNLP::LINEAR)
+	linearVariable.push_back(iColumn);
+      else
+	nonlinearVariable.push_back(iColumn);
+    }
+    size_t numberLinearColumns = linearVariable.size();
+    size_t numberNonlinearColumns = nonlinearVariable.size();
+
+
+    // Get the indicies of the jacobian
+    // This is also a way of knowing which variables are
+    // used in each row
+    int* indexRow = new int[nnz_jac_g];
+    int* indexCol = new int[nnz_jac_g];
+    minlp->eval_jac_g(numberColumns, x_sol, false,
+		      numberRows, nnz_jac_g,
+		      indexRow, indexCol, 0);
+
+    vector<int> sortedIndex(nnz_jac_g);
+    CoinIotaN(sortedIndex(), nnz_jac_g, 0);
+    MatComp c;
+    c.iRow = indexRow;
+    c.jCol = indexCol;
+    std::sort(sortedIndex.begin(), sortedIndex.end(), c);
+
+    int* row = new int[nnz_jac_g];
+    int* columnStart = new int[numberColumns];
+    int* columnLength = new int[numberColumns];
+    CoinZeroN(columnStart, numberColumns);
+    CoinZeroN(columnLength, numberColumns);
+    vector<vector<int> > column(numberRows); // stores the index of
+    // the variables in
+    // each row
+    vector<vector<int> > columnInt(numberRows); // stores the index of
+    // the integer variables in
+    // each row
+    std::vector<int> numberColumnsLinear(numberRows, 0); // stores the number
+    // of the linear variables in
+    // each row
+    int indexCorrection = (index_style == Ipopt::TNLP::C_STYLE) ? 0 : 1;
+    int iniCol = -1;
+    for(int i=0; i<nnz_jac_g; i++) {
+      int thisIndexCol = indexCol[sortedIndex[i]]-indexCorrection;
+      if(indexCol[sortedIndex[i]] != iniCol) {
+	iniCol = indexCol[sortedIndex[i]];
+	columnStart[thisIndexCol] = i;
+	columnLength[thisIndexCol] = 1;
+      }
+      else {
+	columnLength[thisIndexCol]++;
+      }
+      row[i] = indexRow[sortedIndex[i]]-indexCorrection;
+      column[row[i]].push_back(thisIndexCol);
+      if (variableType[thisIndexCol] != Bonmin::TMINLP::CONTINUOUS)
+	columnInt[row[i]].push_back(thisIndexCol);
+      if(variableLinearNonLinear[thisIndexCol] == Ipopt::TNLP::LINEAR)
+	numberColumnsLinear[row[i]]++;
+    }
+
+    // Get solution array for heuristic solution
+    double* newSolution = new double [numberColumns];
+    memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+    double* new_g_sol = new double [numberRows];
+
+
+    // create a set with the indices of the fractional variables
+    vector<int> integerNonlinearColumns; // stores the integer variables
+    int numberFractionalNonlinearVariables = 0;
+    for (size_t iNLCol=0;iNLCol<numberNonlinearColumns;iNLCol++) {
+      int iColumn = nonlinearVariable[iNLCol];
+      if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	integerNonlinearColumns.push_back(iColumn);
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  numberFractionalNonlinearVariables++;
+	}
+      }
+    }
+
+    setInternalVariables(minlp);
+
+    int iteration = -1;
+    while(numberFractionalNonlinearVariables) {
+      iteration++;
+
+      // select a fractional variable to bound
+      int bestColumn = -1;
+      int bestRound = -1; // -1 rounds down, +1 rounds up
+      selectVariableToBranch(minlp, integerNonlinearColumns, newSolution,
+			     bestColumn, bestRound);
+
+      if(bestColumn >= 0) {
+	if(bestRound < 0)
+	  minlp->SetVariableUpperBound(bestColumn, floor(newSolution[bestColumn]));
+	else
+	  minlp->SetVariableLowerBound(bestColumn, ceil(newSolution[bestColumn]));
+      } else {
+	break;
+      }
+
+      nlp->initialSolve();
+
+      if(minlp->optimization_status() != Ipopt::SUCCESS) {
+	break;
+      }
+
+      memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+
+      numberFractionalNonlinearVariables = 0;
+      for(int iIntCol=0; iIntCol<(int)integerNonlinearColumns.size(); iIntCol++) {
+	int iColumn = integerNonlinearColumns[iIntCol];
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance)
+	  numberFractionalNonlinearVariables++;
+      }
+
+      double newSolutionValue;
+      minlp->eval_f(numberColumns, newSolution, true, newSolutionValue); 
+    }
+
+
+    // now we are going to solve a MIP with the linear part of the problem
+    int numberFractionalLinearVariables = 0;
+    for (size_t iLCol=0;iLCol<numberLinearColumns;iLCol++) {
+      int iColumn = linearVariable[iLCol];
+      if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  numberFractionalLinearVariables++;
+	}
+      }
+    }
+
+    bool feasible = true;
+    if(numberFractionalLinearVariables) {
+      int numberMIPRows = 0;
+      int* mapRows = new int[numberRows];
+      for(int iRow=0; iRow<numberRows; iRow++) {
+	mapRows[iRow] = -1; // this means that there are no linear columns in this row
+	if(numberColumnsLinear[iRow] > 0) {
+	  mapRows[iRow] = numberMIPRows++;
+	}
+      }
+
+      // set all linear variables to zero in order to compute the
+      // impact of the nonlinear variables in each row
+      int numberIntegerLinearColumns = 0;
+      for (size_t iLCol=0;iLCol<numberLinearColumns;iLCol++) {
+	int iColumn = linearVariable[iLCol];
+	newSolution[iColumn] = 0.0;
+	if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS)
+	  numberIntegerLinearColumns++;
+      }
+
+      double* gradient_f = new double[numberColumns];
+      minlp->eval_grad_f(numberColumns,newSolution,true,gradient_f);
+      // create row lower and upper bounds for MILP
+      minlp->eval_g(numberColumns, newSolution, true,
+		    numberRows, new_g_sol);
+      double* row_lb = new double[numberMIPRows];
+      double* row_ub = new double[numberMIPRows];
+      for(int iRow=0; iRow<numberRows; iRow++) {
+	if(mapRows[iRow] > -1) {
+	  assert(mapRows[iRow] < numberMIPRows);
+	  if(g_l[iRow] == (-1.0) * nlp->getInfinity())
+	    row_lb[mapRows[iRow]] = g_l[iRow];
+	  else
+	    row_lb[mapRows[iRow]] = g_l[iRow] - new_g_sol[iRow];
+	  if(g_u[iRow] == nlp->getInfinity())
+	    row_ub[mapRows[iRow]] = g_u[iRow];
+	  else
+	    row_ub[mapRows[iRow]] = g_u[iRow] - new_g_sol[iRow];
+	}
+      }
+
+      // get the jacobian so that we know the coefficients of the MILP matrix
+      double* jac_g = new double [nnz_jac_g];
+      minlp->eval_jac_g(numberColumns, x_sol, false,
+			numberRows, nnz_jac_g,
+			0, 0, jac_g);
+
+
+      // Define the constraint matrix for MILP
+      CoinPackedMatrix* matrix = new CoinPackedMatrix(true,0,0);
+      matrix->setDimensions(numberMIPRows,0);
+
+      // create objective function and columns lower and upper bounds for MILP
+      // and create columns for matrix in MILP
+      double* objective = new double[numberLinearColumns];
+      double* col_lb = new double[numberLinearColumns];
+      double* col_ub = new double[numberLinearColumns];
+      int* indexIntegerColumn = new int[numberIntegerLinearColumns];
+      int numberIndexIntegerColumn = 0;
+      for (size_t iLCol=0;iLCol<numberLinearColumns;iLCol++) {
+	int iColumn = linearVariable[iLCol];
+	objective[iLCol] = gradient_f[iColumn];
+	col_lb[iLCol] = x_l[iColumn];
+	col_ub[iLCol] = x_u[iColumn];
+	CoinPackedVector newRow;
+        int end = columnStart[iColumn]+columnLength[iColumn];
+	for (int j=columnStart[iColumn];
+	     j< end;j++) {
+	  int iRow = row[j];
+	  newRow.insert(mapRows[iRow], jac_g[sortedIndex[j]]);
+	}
+	matrix->appendCol(newRow);
+	if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS)
+	  indexIntegerColumn[numberIndexIntegerColumn++] = static_cast<int>(iLCol);
+      }
+
+      // load the problem to OSI
+      OsiSolverInterface *si = mip_->solver();
+      bool delete_si = false;
+      if(si == NULL){
+        si = new OsiClpSolverInterface;
+        mip_->setLpSolver(si);
+        delete_si = true;
+      }
+      CoinMessageHandler * handler = model_->messageHandler()->clone();
+      si->passInMessageHandler(handler);
+      si->messageHandler()->setLogLevel(0);
+
+      si->loadProblem(*matrix, col_lb, col_ub, objective, row_lb, row_ub);
+      si->setInteger(indexIntegerColumn, numberIndexIntegerColumn);
+      
+      mip_->optimize(DBL_MAX, 0, 60);
+
+      if(mip_->getLastSolution()) {
+	const double* solution = mip_->getLastSolution();
+	assert(si->getNumCols() == static_cast<int>(numberLinearColumns));
+	for (size_t iLCol=0;iLCol<numberLinearColumns;iLCol++) {
+	  int iColumn = linearVariable[iLCol];
+	  newSolution[iColumn] = solution[iLCol];
+	}
+      }
+      else
+	feasible = false;
+
+      delete [] mapRows;
+      delete [] row_lb;
+      delete [] row_ub;
+      delete [] jac_g;
+      delete [] gradient_f;
+      delete matrix;
+      delete [] objective;
+      delete [] col_lb;
+      delete [] col_ub;
+      delete [] indexIntegerColumn;
+      if(delete_si){
+        delete si;
+      }
+      delete handler;
+    }
+
+#if 0
+    bool feasible = true;
+    for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+      double value=newSolution[iColumn];
+      if(value < x_l[iColumn] || value > x_u[iColumn]) {
+	feasible = false;
+	break;
+      }
+      if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  feasible = false;
+	  break;
+	}
+      }
+    }
+    minlp->eval_g(numberColumns, newSolution, true,
+		  numberRows, new_g_sol);
+    for(int iRow=0; iRow<numberRows; iRow++) {
+      if(new_g_sol[iRow]<g_l[iRow]-primalTolerance ||
+	 new_g_sol[iRow]>g_u[iRow]+primalTolerance) {
+	if(minlp->optimization_status() != SUCCESS) {
+	  feasible = false;
+	  break;
+	} else {
+#ifdef DEBUG_BON_HEURISTIC_DIVE_MIP
+	  cout<<"It should be infeasible because: "<<endl;
+	  cout<<"g_l["<<iRow<<"]= "<<g_l[iRow]<<" "
+	      <<"g_sol["<<iRow<<"]= "<<new_g_sol[iRow]<<" "
+	      <<"g_u["<<iRow<<"]= "<<g_u[iRow]<<endl;
+	  cout<<"primalTolerance= "<<primalTolerance<<endl;
+#endif
+	  feasible = false;
+	  break;
+	}
+      }
+    }
+#else
+    if(feasible) {
+      // fix the integer variables and solve the NLP
+      for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+	if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	  double value=newSolution[iColumn];
+	  if (fabs(floor(value+0.5)-value)>integerTolerance) {
+#ifdef DEBUG_BON_HEURISTIC_DIVE_MIP
+	    cout<<"It should be infeasible because: "<<endl;
+	    cout<<"variable "<<iColumn<<" is not integer"<<endl;
+#endif
+	    feasible = false;
+	    break;
+	  }
+	  else {
+	    value=floor(newSolution[iColumn]+0.5);
+	    minlp->SetVariableUpperBound(iColumn, value);
+	    minlp->SetVariableLowerBound(iColumn, value);
+	  }
+	}
+      }
+      if(feasible) {
+	nlp->initialSolve();
+	if(minlp->optimization_status() != Ipopt::SUCCESS) {
+	  feasible = false;
+	}
+	memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+      }
+    }
+#endif
+
+    if(feasible) {
+      double newSolutionValue;
+      minlp->eval_f(numberColumns, newSolution, true, newSolutionValue); 
+      if(newSolutionValue < solutionValue) {
+	memcpy(betterSolution,newSolution,numberColumns*sizeof(double));
+	solutionValue = newSolutionValue;
+	returnCode = 1;
+      }
+    }
+
+    delete [] variableLinearNonLinear;
+    delete [] indexRow;
+    delete [] indexCol;
+    delete [] row;
+    delete [] columnStart;
+    delete [] columnLength;
+    delete [] newSolution;
+    delete [] new_g_sol;
+    delete nlp;
+
+#ifdef DEBUG_BON_HEURISTIC_DIVE_MIP
+    std::cout<<"DiveMIP returnCode = "<<returnCode<<std::endl;
+#endif
+
+    return returnCode;
+  }
+}
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.hpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.hpp
new file mode 100644
index 0000000..7f6f20d
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIP.hpp
@@ -0,0 +1,83 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#ifndef BonHeuristicDiveMIP_HPP
+#define BonHeuristicDiveMIP_HPP
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonBonminSetup.hpp"
+#include "CbcHeuristic.hpp"
+#include "CbcStrategy.hpp"
+namespace Bonmin
+{
+  class SubMipSolver;
+  class HeuristicDiveMIP : public CbcHeuristic
+  {
+  public:
+#if 0
+    /// Default constructor
+    HeuristicDiveMIP();
+#endif
+
+    /// Constructor with setup
+    HeuristicDiveMIP(BonminSetup * setup);
+
+    /// Copy constructor
+    HeuristicDiveMIP(const HeuristicDiveMIP &copy);
+
+    /// Destructor
+    ~HeuristicDiveMIP();
+
+    /// Assignment operator
+    HeuristicDiveMIP & operator=(const HeuristicDiveMIP & rhs);
+
+    /// Clone
+    virtual CbcHeuristic * clone() const = 0;
+
+    /// Initialize method 
+    void Initialize(BonminSetup * setup);
+
+    /// Resets stuff if model changes
+    virtual void resetModel(CbcModel * model){
+      setModel(model);
+    }
+
+    /** Change setup used for heuristic.*/
+    virtual void setSetup(BonminSetup * setup){
+      setup_ = setup;
+      //      Initialize(setup_->options());
+    }
+
+    /// Performs heuristic
+    virtual int solution(double &solutionValue, double *betterSolution);
+
+    /// sets internal variables
+    virtual void setInternalVariables(TMINLP2TNLP* minlp) = 0;
+
+    /// Selects the next variable to branch on
+    /** If bestColumn = -1, it means that no variable was found
+    */
+    virtual void selectVariableToBranch(TMINLP2TNLP* minlp,
+					const vector<int> & integerColumns,
+					const double* newSolution,
+					int& bestColumn,
+					int& bestRound) = 0;
+
+  protected:
+    /** Setup to use for local searches (will make copies).*/
+    BonminSetup * setup_; 
+
+  private:
+    /// How often to do (code can change)
+    int howOften_;
+    /// A subsolver for MIP
+    SubMipSolver * mip_;
+
+  };
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPFractional.cpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPFractional.cpp
new file mode 100644
index 0000000..8bb087c
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPFractional.cpp
@@ -0,0 +1,129 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#include "CoinPragma.hpp"
+#include "BonHeuristicDiveMIPFractional.hpp"
+#include "CbcModel.hpp"
+
+namespace Bonmin
+{
+#if 0
+  HeuristicDiveMIPFractional::HeuristicDiveMIPFractional() 
+    :
+    HeuristicDiveMIP()
+  {}
+#endif
+
+  HeuristicDiveMIPFractional::HeuristicDiveMIPFractional(BonminSetup * setup)
+    :
+    HeuristicDiveMIP(setup)
+  {
+    Initialize(setup->options());    
+  }
+
+  HeuristicDiveMIPFractional::HeuristicDiveMIPFractional(const HeuristicDiveMIPFractional &copy)
+    :
+    HeuristicDiveMIP(copy)
+  {}
+
+  HeuristicDiveMIPFractional & 
+  HeuristicDiveMIPFractional::operator=( const HeuristicDiveMIPFractional& rhs)
+  {
+    if (this!=&rhs) {
+      HeuristicDiveMIP::operator=(rhs);
+    }
+    return *this;
+  }
+
+  CbcHeuristic *
+  HeuristicDiveMIPFractional::clone() const
+  {
+    return new HeuristicDiveMIPFractional(*this);
+  }
+
+  void
+  HeuristicDiveMIPFractional::setInternalVariables(TMINLP2TNLP* minlp)
+  {
+    // no variables to set
+  }
+
+  void
+  HeuristicDiveMIPFractional::selectVariableToBranch(TMINLP2TNLP* minlp,
+						  const vector<int> & integerColumns,
+						  const double* newSolution,
+						  int& bestColumn,
+						  int& bestRound)
+  {
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+    
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+
+    // select a fractional variable to bound
+    double smallestFraction = COIN_DBL_MAX;
+    bestColumn = -1;
+    bestRound = -1; // -1 rounds down, +1 rounds up
+    for(int iIntCol=0; iIntCol<(int)integerColumns.size(); iIntCol++) {
+      int iColumn = integerColumns[iIntCol];
+      double value=newSolution[iColumn];
+      if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	double below = floor(value);
+	double downFraction = COIN_DBL_MAX;
+	if(below >= x_l[iColumn])
+	  downFraction = value-below;
+	double above = ceil(value);
+	double upFraction = COIN_DBL_MAX;
+	if(above <= x_u[iColumn])
+	  upFraction = ceil(value)-value;
+	double fraction = 0;
+	int round = 0;
+	if(downFraction < upFraction) {
+	  fraction = downFraction;
+	  round = -1;
+	} else if(downFraction > upFraction) {
+	  fraction = upFraction;
+	  round = 1;
+	} else {
+	  double randomNumber = CoinDrand48();
+	  if(randomNumber<0.5) {
+	    fraction = downFraction;
+	    round = -1;
+	  } else {
+	    fraction = upFraction;
+	    round = 1;
+	  }	  
+	}
+	if(fraction<smallestFraction) {
+	  smallestFraction = fraction;
+	  bestColumn = iColumn;
+	  bestRound = round;
+	}
+      }
+    }
+
+  }
+
+  void
+  HeuristicDiveMIPFractional::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+    roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+   roptions->AddStringOption2(
+     "heuristic_dive_MIP_fractional",
+     "if yes runs the Dive MIP Fractional heuristic",
+     "no",
+     "no", "",
+     "yes", "",
+     "");
+   roptions->setOptionExtraInfo("heuristic_dive_MIP_fractional", 63);
+  }
+
+  void 
+  HeuristicDiveMIPFractional::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+  }
+
+}
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPFractional.hpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPFractional.hpp
new file mode 100644
index 0000000..cb2eab2
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPFractional.hpp
@@ -0,0 +1,67 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#ifndef BonHeuristicDiveMIPFractional_H
+#define BonHeuristicDiveMIPFractional_H
+
+#include "BonBonminSetup.hpp"
+#include "BonHeuristicDiveMIP.hpp"
+
+/** DiveMIPFractional class
+ */
+
+namespace Bonmin
+{
+  class HeuristicDiveMIPFractional : public HeuristicDiveMIP {
+  public:
+    /// Default Constructor 
+    HeuristicDiveMIPFractional ();
+
+    /// Constructor with setup
+    HeuristicDiveMIPFractional(BonminSetup * setup);
+
+    /// Copy constructor
+    HeuristicDiveMIPFractional(const HeuristicDiveMIPFractional &copy);
+
+    /// Destructor
+    ~HeuristicDiveMIPFractional() {}
+
+    /// Assignment operator
+    HeuristicDiveMIPFractional & operator=(const HeuristicDiveMIPFractional & rhs);
+
+    /// Clone
+    virtual CbcHeuristic * clone() const;
+
+    /** Change setup used for heuristic.*/
+    virtual void setSetup(BonminSetup * setup){
+      HeuristicDiveMIP::setSetup(setup);
+      Initialize(setup->options());
+    }
+
+    /// sets internal variables
+    virtual void setInternalVariables(TMINLP2TNLP* minlp);
+
+    /// Selects the next variable to branch on
+    /** If bestColumn = -1, it means that no variable was found
+    */
+    virtual void selectVariableToBranch(TMINLP2TNLP* minlp,
+					const vector<int> & integerColumns,
+					const double* newSolution,
+					int& bestColumn,
+					int& bestRound);
+
+    /** Register the options common to all local search based heuristics.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    
+    /** Initiaize using passed options.*/
+    void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+  };
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPVectorLength.cpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPVectorLength.cpp
new file mode 100644
index 0000000..1e6238c
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPVectorLength.cpp
@@ -0,0 +1,180 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#include "CoinPragma.hpp"
+#include "BonHeuristicDiveMIPVectorLength.hpp"
+#include "CbcModel.hpp"
+
+namespace Bonmin
+{
+#if 0
+  HeuristicDiveMIPVectorLength::HeuristicDiveMIPVectorLength() 
+    :
+    HeuristicDiveMIP(),
+    columnLength_(NULL)
+  {}
+#endif
+
+  HeuristicDiveMIPVectorLength::HeuristicDiveMIPVectorLength(BonminSetup * setup)
+    :
+    HeuristicDiveMIP(setup),
+    columnLength_(NULL)
+  {
+    Initialize(setup->options());    
+  }
+
+  HeuristicDiveMIPVectorLength::HeuristicDiveMIPVectorLength(const HeuristicDiveMIPVectorLength &copy)
+    :
+    HeuristicDiveMIP(copy),
+    columnLength_(NULL)
+  {
+  }
+
+  HeuristicDiveMIPVectorLength & 
+  HeuristicDiveMIPVectorLength::operator=( const HeuristicDiveMIPVectorLength& rhs)
+  {
+    if (this!=&rhs) {
+      HeuristicDiveMIP::operator=(rhs);
+      delete [] columnLength_;
+      columnLength_ = NULL;
+    }
+    return *this;
+  }
+
+  CbcHeuristic *
+  HeuristicDiveMIPVectorLength::clone() const
+  {
+    return new HeuristicDiveMIPVectorLength(*this);
+  }
+
+  void
+  HeuristicDiveMIPVectorLength::setInternalVariables(TMINLP2TNLP* minlp)
+  {
+    delete [] columnLength_;
+    
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+    
+    const double* x_sol = minlp->x_sol();
+
+    // Get the indicies of the jacobian
+    // This is also a way of knowing which variables are
+    // used in each row
+    int* indexRow = new int[nnz_jac_g];
+    int* indexCol = new int[nnz_jac_g];
+    minlp->eval_jac_g(numberColumns, x_sol, false,
+		      numberRows, nnz_jac_g,
+		      indexRow, indexCol, 0);
+    columnLength_ = new int[numberColumns];
+    int indexCorrection = (index_style == Ipopt::TNLP::C_STYLE) ? 0 : 1;
+    int iniCol = -1;
+    for(int i=0; i<nnz_jac_g; i++) {
+      int thisIndexCol = indexCol[i]-indexCorrection;
+      if(indexCol[i] != iniCol) {
+	iniCol = indexCol[i];
+	columnLength_[thisIndexCol] = 1;
+      }
+      else {
+	columnLength_[thisIndexCol]++;
+      }
+    }
+    
+  }
+
+  void
+  HeuristicDiveMIPVectorLength::selectVariableToBranch(TMINLP2TNLP* minlp,
+						    const vector<int> & integerColumns,
+						    const double* newSolution,
+						    int& bestColumn,
+						    int& bestRound)
+  {
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    double* gradient_f = new double[numberColumns];
+
+    double bestScore = COIN_DBL_MAX;
+    bestColumn = -1;
+    bestRound = -1; // -1 rounds down, +1 rounds up
+    minlp->eval_grad_f(numberColumns,newSolution,true,gradient_f);
+    for(int iIntCol=0; iIntCol<(int)integerColumns.size(); iIntCol++) {
+      int iColumn = integerColumns[iIntCol];
+      double value=newSolution[iColumn];
+      if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	double below = floor(value);
+	double downFraction = COIN_DBL_MAX;
+	//double downCost = COIN_DBL_MAX;
+	double gradient = gradient_f[iColumn];
+	if(below >= x_l[iColumn])
+	  downFraction = value-below;
+	double above = ceil(value);
+	double upFraction = COIN_DBL_MAX;
+	if(above <= x_u[iColumn])
+	  upFraction = ceil(value)-value;
+	double objdelta = 0;
+	int round = 0;
+	if(gradient>=0.0 && upFraction < COIN_DBL_MAX) {
+	  objdelta = gradient*upFraction;
+	  round = 1;
+	} else if(gradient<0.0 && downFraction < COIN_DBL_MAX) {
+	  objdelta = gradient*downFraction;
+	  round = -1;
+	} else if(upFraction < COIN_DBL_MAX) {
+	  objdelta = gradient*upFraction;
+	  round = 1;
+	} else {
+	  objdelta = gradient*downFraction;
+	  round = -1;
+	}
+	double score = (objdelta + 1e-6)/((double)columnLength_[iColumn]+1.0);
+	if(score<bestScore) {
+	  bestScore = score;
+	  bestColumn = iColumn;
+	  bestRound = round;
+	}
+      }
+    }
+
+    delete [] gradient_f;
+
+  }
+
+  void
+  HeuristicDiveMIPVectorLength::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+    roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+   roptions->AddStringOption2(
+     "heuristic_dive_MIP_vectorLength",
+     "if yes runs the Dive MIP VectorLength heuristic",
+     "no",
+     "no", "",
+     "yes", "",
+     "");
+   roptions->setOptionExtraInfo("heuristic_dive_MIP_vectorLength", 63);
+  }
+
+  void 
+  HeuristicDiveMIPVectorLength::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+  }
+
+}
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPVectorLength.hpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPVectorLength.hpp
new file mode 100644
index 0000000..be82cb6
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveMIPVectorLength.hpp
@@ -0,0 +1,74 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#ifndef BonHeuristicDiveMIPVectorLength_H
+#define BonHeuristicDiveMIPVectorLength_H
+
+#include "BonBonminSetup.hpp"
+#include "BonHeuristicDiveMIP.hpp"
+
+/** DiveMIPVectorLength class
+ */
+
+namespace Bonmin
+{
+  class HeuristicDiveMIPVectorLength : public HeuristicDiveMIP {
+  public:
+    /// Default Constructor 
+    HeuristicDiveMIPVectorLength ();
+
+    /// Constructor with setup
+    HeuristicDiveMIPVectorLength(BonminSetup * setup);
+
+    /// Copy constructor
+    HeuristicDiveMIPVectorLength(const HeuristicDiveMIPVectorLength &copy);
+
+    /// Destructor
+    ~HeuristicDiveMIPVectorLength() 
+    {
+      delete [] columnLength_;
+    }
+
+    /// Assignment operator
+    HeuristicDiveMIPVectorLength & operator=(const HeuristicDiveMIPVectorLength & rhs);
+
+    /// Clone
+    virtual CbcHeuristic * clone() const;
+
+    /** Change setup used for heuristic.*/
+    virtual void setSetup(BonminSetup * setup){
+      HeuristicDiveMIP::setSetup(setup);
+      Initialize(setup->options());
+    }
+
+    /// sets internal variables
+    virtual void setInternalVariables(TMINLP2TNLP* minlp);
+
+    /// Selects the next variable to branch on
+    /** If bestColumn = -1, it means that no variable was found
+    */
+    virtual void selectVariableToBranch(TMINLP2TNLP* minlp,
+					const vector<int> & integerColumns,
+					const double* newSolution,
+					int& bestColumn,
+					int& bestRound);
+
+    /** Register the options common to all local search based heuristics.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    
+    /** Initiaize using passed options.*/
+    void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+  private:
+    /// the number of nonzero elements in each column
+    int* columnLength_;
+
+  };
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveVectorLength.cpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveVectorLength.cpp
new file mode 100644
index 0000000..651c705
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveVectorLength.cpp
@@ -0,0 +1,178 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#include "CoinPragma.hpp"
+#include "BonHeuristicDiveVectorLength.hpp"
+#include "CbcModel.hpp"
+
+namespace Bonmin
+{
+  HeuristicDiveVectorLength::HeuristicDiveVectorLength() 
+    :
+    HeuristicDive(),
+    columnLength_(NULL)
+  {}
+
+  HeuristicDiveVectorLength::HeuristicDiveVectorLength(BonminSetup * setup)
+    :
+    HeuristicDive(setup),
+    columnLength_(NULL)
+  {
+    Initialize(setup->options());    
+  }
+
+  HeuristicDiveVectorLength::HeuristicDiveVectorLength(const HeuristicDiveVectorLength &copy)
+    :
+    HeuristicDive(copy),
+    columnLength_(NULL)
+  {
+  }
+
+  HeuristicDiveVectorLength & 
+  HeuristicDiveVectorLength::operator=( const HeuristicDiveVectorLength& rhs)
+  {
+    if (this!=&rhs) {
+      HeuristicDive::operator=(rhs);
+      delete [] columnLength_;
+      columnLength_ = NULL;
+    }
+    return *this;
+  }
+
+  CbcHeuristic *
+  HeuristicDiveVectorLength::clone() const
+  {
+    return new HeuristicDiveVectorLength(*this);
+  }
+
+  void
+  HeuristicDiveVectorLength::setInternalVariables(TMINLP2TNLP* minlp)
+  {
+    delete [] columnLength_;
+    
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+    
+    const double* x_sol = minlp->x_sol();
+
+    // Get the indicies of the jacobian
+    // This is also a way of knowing which variables are
+    // used in each row
+    int* indexRow = new int[nnz_jac_g];
+    int* indexCol = new int[nnz_jac_g];
+    minlp->eval_jac_g(numberColumns, x_sol, false,
+		      numberRows, nnz_jac_g,
+		      indexRow, indexCol, 0);
+    columnLength_ = new int[numberColumns];
+    int indexCorrection = (index_style == Ipopt::TNLP::C_STYLE) ? 0 : 1;
+    int iniCol = -1;
+    for(int i=0; i<nnz_jac_g; i++) {
+      int thisIndexCol = indexCol[i]-indexCorrection;
+      if(indexCol[i] != iniCol) {
+	iniCol = indexCol[i];
+	columnLength_[thisIndexCol] = 1;
+      }
+      else {
+	columnLength_[thisIndexCol]++;
+      }
+    }
+    
+  }
+
+  void
+  HeuristicDiveVectorLength::selectVariableToBranch(TMINLP2TNLP* minlp,
+						    const vector<int> & integerColumns,
+						    const double* newSolution,
+						    int& bestColumn,
+						    int& bestRound)
+  {
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    double* gradient_f = new double[numberColumns];
+
+    double bestScore = COIN_DBL_MAX;
+    bestColumn = -1;
+    bestRound = -1; // -1 rounds down, +1 rounds up
+    minlp->eval_grad_f(numberColumns,newSolution,true,gradient_f);
+    for(int iIntCol=0; iIntCol<(int)integerColumns.size(); iIntCol++) {
+      int iColumn = integerColumns[iIntCol];
+      double value=newSolution[iColumn];
+      if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	double below = floor(value);
+	double downFraction = COIN_DBL_MAX;
+	//double downCost = COIN_DBL_MAX;
+	double gradient = gradient_f[iColumn];
+	if(below >= x_l[iColumn])
+	  downFraction = value-below;
+	double above = ceil(value);
+	double upFraction = COIN_DBL_MAX;
+	if(above <= x_u[iColumn])
+	  upFraction = ceil(value)-value;
+	double objdelta = 0;
+	int round = 0;
+	if(gradient>=0.0 && upFraction < COIN_DBL_MAX) {
+	  objdelta = gradient*upFraction;
+	  round = 1;
+	} else if(gradient<0.0 && downFraction < COIN_DBL_MAX) {
+	  objdelta = gradient*downFraction;
+	  round = -1;
+	} else if(upFraction < COIN_DBL_MAX) {
+	  objdelta = gradient*upFraction;
+	  round = 1;
+	} else {
+	  objdelta = gradient*downFraction;
+	  round = -1;
+	}
+	double score = (objdelta + 1e-6)/((double)columnLength_[iColumn]+1.0);
+	if(score<bestScore) {
+	  bestScore = score;
+	  bestColumn = iColumn;
+	  bestRound = round;
+	}
+      }
+    }
+
+    delete [] gradient_f;
+
+  }
+
+  void
+  HeuristicDiveVectorLength::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+    roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+   roptions->AddStringOption2(
+     "heuristic_dive_vectorLength",
+     "if yes runs the Dive VectorLength heuristic",
+     "no",
+     "no", "",
+     "yes", "",
+     "");
+   roptions->setOptionExtraInfo("heuristic_dive_vectorLength", 63);
+  }
+
+  void 
+  HeuristicDiveVectorLength::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+  }
+
+}
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicDiveVectorLength.hpp b/src/CbcBonmin/Heuristics/BonHeuristicDiveVectorLength.hpp
new file mode 100644
index 0000000..9ff7912
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicDiveVectorLength.hpp
@@ -0,0 +1,74 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#ifndef BonHeuristicDiveVectorLength_H
+#define BonHeuristicDiveVectorLength_H
+
+#include "BonBonminSetup.hpp"
+#include "BonHeuristicDive.hpp"
+
+/** DiveVectorLength class
+ */
+
+namespace Bonmin
+{
+  class HeuristicDiveVectorLength : public HeuristicDive {
+  public:
+    /// Default Constructor 
+    HeuristicDiveVectorLength ();
+
+    /// Constructor with setup
+    HeuristicDiveVectorLength(BonminSetup * setup);
+
+    /// Copy constructor
+    HeuristicDiveVectorLength(const HeuristicDiveVectorLength &copy);
+
+    /// Destructor
+    ~HeuristicDiveVectorLength() 
+    {
+      delete [] columnLength_;
+    }
+
+    /// Assignment operator
+    HeuristicDiveVectorLength & operator=(const HeuristicDiveVectorLength & rhs);
+
+    /// Clone
+    virtual CbcHeuristic * clone() const;
+
+    /** Change setup used for heuristic.*/
+    virtual void setSetup(BonminSetup * setup){
+      HeuristicDive::setSetup(setup);
+      Initialize(setup->options());
+    }
+
+    /// sets internal variables
+    virtual void setInternalVariables(TMINLP2TNLP* minlp);
+
+    /// Selects the next variable to branch on
+    /** If bestColumn = -1, it means that no variable was found
+    */
+    virtual void selectVariableToBranch(TMINLP2TNLP* minlp,
+					const vector<int> & integerColumns,
+					const double* newSolution,
+					int& bestColumn,
+					int& bestRound);
+
+    /** Register the options common to all local search based heuristics.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+    
+    /** Initiaize using passed options.*/
+    void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+  private:
+    /// the number of nonzero elements in each column
+    int* columnLength_;
+
+  };
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicFPump.cpp b/src/CbcBonmin/Heuristics/BonHeuristicFPump.cpp
new file mode 100644
index 0000000..f294174
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicFPump.cpp
@@ -0,0 +1,559 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#include "BonHeuristicFPump.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+
+#include "OsiAuxInfo.hpp"
+
+#include "CoinTime.hpp"
+
+#include <fstream>
+
+#include <iomanip>
+
+using namespace std;
+
+//#define DEBUG_BON_HEURISTIC_FPUMP
+
+namespace Bonmin
+{
+  class score_sorter {
+  public:
+    //! Constructor
+    score_sorter(const vector<double>& score):
+      score_(score) {}
+    
+    bool operator() (const int x, const int y) const {
+      return score_[x]>score_[y];
+    }
+    
+  private:
+    const vector<double>& score_;
+  };
+
+
+  HeuristicFPump::HeuristicFPump()
+    :
+    CbcHeuristic(),
+    setup_(NULL),
+    objective_norm_(1),
+    enableAdvanced_(false)
+  {}
+
+  HeuristicFPump::HeuristicFPump(BonminSetup * setup)
+    :
+    CbcHeuristic(),
+    setup_(setup),
+    objective_norm_(1),
+    enableAdvanced_(false)
+  {
+    Initialize(setup->options());
+  }
+
+  HeuristicFPump::HeuristicFPump(const HeuristicFPump &copy)
+    :
+    CbcHeuristic(copy),
+    setup_(copy.setup_),
+    objective_norm_(copy.objective_norm_),
+    enableAdvanced_(copy.enableAdvanced_)
+  {}
+
+  HeuristicFPump &
+  HeuristicFPump::operator=(const HeuristicFPump & rhs)
+  {
+    if(this != &rhs) {
+      CbcHeuristic::operator=(rhs);
+      setup_ = rhs.setup_;
+      objective_norm_ = rhs.objective_norm_;
+      enableAdvanced_ = rhs.enableAdvanced_;
+    }
+    return *this;
+  }
+
+  int
+  HeuristicFPump::solution(double &solutionValue, double *betterSolution)
+  {
+    if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+
+    bool integerSolutionAlreadyExists = false;
+    if(model_->getSolutionCount()) {
+      //      bestSolutionValue = model_->getObjValue();
+      integerSolutionAlreadyExists = true;
+      if(!enableAdvanced_)
+        return 0;
+      assert(solutionValue < 1.0e50);
+    }
+
+    const int maxNumberIterations = 200;
+    const double toleranceObjectiveFP = 1.0e-5;
+
+    int returnCode = 0; // 0 means it didn't find a feasible solution
+
+    OsiTMINLPInterface * nlp = NULL;
+    if(setup_->getAlgorithm() == B_BB)
+      nlp = dynamic_cast<OsiTMINLPInterface *>(model_->solver()->clone());
+    else
+      nlp = dynamic_cast<OsiTMINLPInterface *>(setup_->nonlinearSolver()->clone());
+
+    TMINLP2TNLP* minlp = nlp->problem();
+
+    // set tolerances
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+    double primalTolerance;
+#if 0
+    OsiSolverInterface * solver = model_->solver();
+    solver->getDblParam(OsiPrimalTolerance,primalTolerance);
+#endif
+    primalTolerance=1.0e-6;
+
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    const Bonmin::TMINLP::VariableType* variableType = minlp->var_types();
+    const double* x_sol = minlp->x_sol();
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+
+#ifdef DEBUG_BON_HEURISTIC_FPUMP
+    const double* g_sol = minlp->g_sol();
+    const double* g_l = minlp->g_l();
+    const double* g_u = minlp->g_u();
+    // print bounds_info
+    for(int i=0; i<numberColumns; i++)
+      cout<<"x_l["<<i<<"]= "<<x_l[i]<<" "
+	  <<"x_sol["<<i<<"]= "<<x_sol[i]<<" "
+	  <<"x_u["<<i<<"]= "<<x_u[i]<<" "
+	  <<"variableType = "<<variableType[i]<<endl;
+    for(int i=0; i<numberRows; i++)
+      cout<<"g_l["<<i<<"]= "<<g_l[i]<<" "
+	  <<"g_sol["<<i<<"]= "<<g_sol[i]<<" "
+	  <<"g_u["<<i<<"]= "<<g_u[i]<<endl;
+
+    cout<<"obj_value = "<<minlp->obj_value()<<endl;
+  
+    cout<<"optimization_status = "<<minlp->optimization_status()<<endl;
+#endif
+
+    // exit if the current NLP solution is infeasible
+    // infeasibility is determined by the NLP solver
+    if(minlp->optimization_status() != Ipopt::SUCCESS){
+      delete nlp;
+      return returnCode;
+    }
+
+    // Get solution array for heuristic solution
+    double* newSolution = new double [numberColumns];
+    memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+    double* new_g_sol = new double [numberRows];
+
+    // create a set with the indices of the fractional variables
+    vector<int> integerColumns; // stores the integer variables
+    int numberFractionalVariables = 0;
+    for (int iColumn=0;iColumn<numberColumns;iColumn++) {
+      if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	integerColumns.push_back(iColumn);
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  numberFractionalVariables++;
+	}
+      }
+    }
+    int numberIntegerColumns = (int) integerColumns.size();
+
+    // create space to store old solutions in order to prevent cycling
+    const int numberOldSolutionsStored = 4;
+    double ** oldSolution = new double * [numberOldSolutionsStored];
+    for (int j=0;j<numberOldSolutionsStored;j++) {
+      oldSolution[j]= new double[numberIntegerColumns];
+      for (int i=0;i<numberIntegerColumns;i++)
+	oldSolution[j][i]=-COIN_DBL_MAX;
+    }
+
+    RoundingFPump roundObj(minlp);
+
+    //bool stopDueToAlmostZeroObjective = false;
+    double* x_bar = new double[numberIntegerColumns];
+    int* indexes_x_bar = new int[numberIntegerColumns];
+    double* copy_newSolution = new double[numberColumns];
+    int iteration = 0;
+    while(numberFractionalVariables) {
+      iteration++;
+      if(iteration > maxNumberIterations) {
+	break;
+      }
+      memcpy(copy_newSolution, newSolution, numberColumns*sizeof(double));
+      roundObj.round(integerTolerance, primalTolerance, copy_newSolution);
+      bool flip = true;
+      for(int iIntCol=0; iIntCol<numberIntegerColumns; iIntCol++) {
+	int iColumn = integerColumns[iIntCol];
+	double value=copy_newSolution[iColumn];
+#if 0
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  value = floor(value+0.5);
+	  // make sure that the new value is within bounds
+	  if(value < x_l[iColumn]-primalTolerance)
+	    value++;
+	  else if(value > x_u[iColumn]+primalTolerance)
+	    value--;
+	}
+#endif
+	x_bar[iIntCol]=value;
+	indexes_x_bar[iIntCol]=iColumn;
+	if(flip && 
+	   fabs(x_bar[iIntCol]-oldSolution[0][iIntCol])>integerTolerance)
+	  flip = false;
+      }
+
+#ifdef DEBUG_BON_HEURISTIC_FPUMP
+      cout<<"iteration= "<<iteration<<", flip= "<<flip<<endl;
+#endif
+
+      // flip some of the integer variables if the rounded solution is the
+      // same as the previous one
+      if(flip) {
+	vector<int> sortedIntegerColumns(numberIntegerColumns);
+	vector<double> score(numberIntegerColumns);
+	for(int iIntCol=0; iIntCol<numberIntegerColumns; iIntCol++) {
+	  int iColumn = integerColumns[iIntCol];
+	  sortedIntegerColumns[iIntCol] = iIntCol;
+	  double value=newSolution[iColumn];
+	  score[iIntCol] = fabs(value-oldSolution[0][iIntCol]);
+	}
+	sort(sortedIntegerColumns.begin(),sortedIntegerColumns.end(),
+	     score_sorter(score));
+
+	int maxNumberToMove = 1;
+	int numberMoved = 0;
+	for(int i=0; i<numberIntegerColumns; i++) {
+	  int iIntCol = sortedIntegerColumns[i];
+	  if(score[iIntCol] > 0.00) {
+	    int iColumn = integerColumns[iIntCol];
+	    double value=newSolution[iColumn];
+	    if(value-oldSolution[0][iIntCol]>0.0)
+	      value = oldSolution[0][iIntCol]+1.0;
+	    else
+	      value = oldSolution[0][iIntCol]-1.0;
+	    // make sure that the new value is within bounds
+	    if(value < x_l[iColumn]-primalTolerance)
+	      value++;
+	    else if(value > x_u[iColumn]+primalTolerance)
+	      value--;
+	    assert(fabs(floor(value+0.5)-value)<=integerTolerance);
+	    x_bar[iIntCol]=value;
+	    numberMoved++;
+	  } else
+	    break;
+	  if(numberMoved >= maxNumberToMove)
+	    break;
+	}
+
+	// check for loop.
+	// see if the new rounded solution is equal to an old solution.
+	// If yes, then perturb the new rounded solution
+	bool matched;
+	for (int k = numberOldSolutionsStored-1; k > 0; k--) {
+	  double * b = oldSolution[k];
+	  matched = true;
+	  for(int iIntCol=0; iIntCol<numberIntegerColumns; iIntCol++) {
+	    if (fabs(x_bar[iIntCol]-b[iIntCol])>integerTolerance) {
+	      matched=false;
+	      break;
+	    } 
+	  }
+	  if (matched) break;
+	}
+
+#ifdef DEBUG_BON_HEURISTIC_FPUMP
+	cout<<"matched= "<<matched<<endl;
+#endif
+
+	if (matched) {
+	  // perturbation
+	  for(int iIntCol=0; iIntCol<numberIntegerColumns; iIntCol++) {
+	    int iColumn = integerColumns[iIntCol];
+	    double value=newSolution[iColumn];
+	    double random = max(0.0,CoinDrand48()-0.3);
+	    double difference = fabs(value-oldSolution[0][iIntCol]);
+	    if(difference+random>0.5) {
+	      if(value-oldSolution[0][iIntCol]>0.0)
+		value = oldSolution[0][iIntCol]+1.0;
+	      else
+		value = oldSolution[0][iIntCol]-1.0;
+	      // make sure that the new value is within bounds
+	      if(value < x_l[iColumn]-primalTolerance)
+		value++;
+	      else if(value > x_u[iColumn]+primalTolerance)
+		value--;
+	      assert(fabs(floor(value+0.5)-value)<=integerTolerance);
+	    } else {
+	      // this variable is not going to be perturbed
+	      value = oldSolution[0][iIntCol];
+	    }
+	    x_bar[iIntCol]=value;
+	  }
+	}
+      }
+      // store the new solution and remove the oldest one
+      for (int j=numberOldSolutionsStored-1;j>0;j--) {
+	for (int i = 0; i < numberIntegerColumns; i++) 
+	  oldSolution[j][i]=oldSolution[j-1][i];
+      }
+      for (int j = 0; j < numberIntegerColumns; j++) 
+	oldSolution[0][j] = x_bar[j];
+
+
+      // solve the NLP problem
+      double obj_nlp;
+      if(integerSolutionAlreadyExists)
+	// use cutoff constraint
+	obj_nlp = nlp->solveFeasibilityProblem(numberIntegerColumns,
+					       x_bar,indexes_x_bar,
+					       objective_norm_, solutionValue);
+      else
+	obj_nlp = nlp->solveFeasibilityProblem(numberIntegerColumns,
+					       x_bar,indexes_x_bar,
+					       1,0,objective_norm_);
+
+
+#ifdef DEBUG_BON_HEURISTIC_FPUMP
+      cout<<"obj_nlp= "<<obj_nlp<<endl;
+#endif
+
+      memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+
+      if(obj_nlp < toleranceObjectiveFP) {
+	//stopDueToAlmostZeroObjective = true;
+	break;
+      }
+
+      // compute number of fractional variables
+      numberFractionalVariables = 0;
+      for(int iIntCol=0; iIntCol<numberIntegerColumns; iIntCol++) {
+	int iColumn = integerColumns[iIntCol];
+	double value=newSolution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance)
+	  numberFractionalVariables++;
+      }
+
+    }
+
+    for (int j=0;j<numberOldSolutionsStored;j++) 
+      delete [] oldSolution[j];
+    delete [] oldSolution;
+    delete [] x_bar;
+    delete [] indexes_x_bar;
+
+
+    // fix the integer variables and solve the NLP
+    for(int iIntCol=0; iIntCol<numberIntegerColumns; iIntCol++) {
+      int iColumn = integerColumns[iIntCol];
+      double value=floor(newSolution[iColumn]+0.5);
+      minlp->SetVariableUpperBound(iColumn, floor(value));
+      minlp->SetVariableLowerBound(iColumn, ceil(value));
+    }
+    nlp->initialSolve();
+    bool feasible = true;
+    if(minlp->optimization_status() != Ipopt::SUCCESS) {
+      feasible = false;
+      //      if(stopDueToAlmostZeroObjective)
+	//	returnCode = 8;
+    }
+    memcpy(newSolution,x_sol,numberColumns*sizeof(double));
+
+    if(feasible) {
+      double newSolutionValue;
+      minlp->eval_f(numberColumns, newSolution, true, newSolutionValue);
+      if(newSolutionValue < solutionValue) {
+	memcpy(betterSolution,newSolution,numberColumns*sizeof(double));
+	solutionValue = newSolutionValue;
+	returnCode = 1;
+      }
+    }
+
+#ifdef DEBUG_BON_HEURISTIC_FPUMP
+    cout<<"returnCode= "<<returnCode<<endl;
+#endif
+
+#if 0
+    delete [] indexRow;
+    delete [] indexCol;
+    delete [] row;
+    delete [] columnStart;
+    delete [] columnLength;
+#endif
+    delete [] newSolution;
+    delete [] new_g_sol;
+    delete [] copy_newSolution;
+    delete nlp;
+
+    return returnCode;
+  }
+
+  void
+  HeuristicFPump::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+    roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+    roptions->AddBoundedIntegerOption("feasibility_pump_objective_norm","Norm of feasibility pump objective function",
+				      1, 2, 1,"");
+    roptions->setOptionExtraInfo("feasibility_pump_objective_norm", 63);
+    roptions->AddStringOption2("heuristic_feasibility_pump", "whether the heuristic feasibility pump should be used",
+      "no", "no", "", "yes", "", "");
+    roptions->setOptionExtraInfo("heuristic_feasibility_pump", 63);
+
+    roptions->SetRegisteringCategory("Primal Heuristics (undocumented)", RegisteredOptions::UndocumentedCategory);
+    roptions->AddStringOption2("unstable_fp","use at your own risks",
+                               "no",
+                               "no", "",
+                               "yes", "","");
+    roptions->setOptionExtraInfo("unstable_fp", 63);
+  }
+
+  void 
+  HeuristicFPump::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+    options->GetIntegerValue("feasibility_pump_objective_norm", objective_norm_, "bonmin.");
+    options->GetEnumValue("unstable_fp", enableAdvanced_, "bonmin.");
+  }
+
+  RoundingFPump::RoundingFPump(TMINLP2TNLP* minlp)
+    :
+    minlp_(minlp)
+  {
+    gutsOfConstructor();
+  }
+
+  RoundingFPump::~RoundingFPump()
+  {
+    delete [] col_and_jac_g_;
+  }
+
+  void
+  RoundingFPump::gutsOfConstructor()
+  {
+
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp_->get_nlp_info(numberColumns_, numberRows_, nnz_jac_g,
+			nnz_h_lag, index_style);
+    
+    const double* x_sol = minlp_->x_sol();
+
+    // Get the indicies of the jacobian
+    // This is also a way of knowing which variables are
+    // used in each row
+    int* indexRow = new int[nnz_jac_g];
+    int* indexCol = new int[nnz_jac_g];
+    minlp_->eval_jac_g(numberColumns_, x_sol, false,
+		       numberRows_, nnz_jac_g,
+		       indexRow, indexCol, 0);
+
+    // get the jacobian for the solution with zeros
+    double* jac_g = new double [nnz_jac_g];
+    double* zero_sol = new double [numberColumns_];
+    minlp_->get_starting_point(numberColumns_, 1, zero_sol, 0, NULL, NULL, numberRows_, 0, NULL);
+    //memset(zero_sol, 0, numberColumns_ * sizeof(double));
+    minlp_->eval_jac_g(numberColumns_, zero_sol, true,
+		       numberRows_, nnz_jac_g,
+		       0, 0, jac_g);
+
+    col_and_jac_g_ = new vector<pair<int, int> >[numberRows_];
+
+    int indexCorrection = (index_style == Ipopt::TNLP::C_STYLE) ? 0 : 1;
+    for(int i=0; i<nnz_jac_g; i++) {
+      int thisIndexRow = indexRow[i]-indexCorrection;      
+      int thisIndexCol = indexCol[i]-indexCorrection;
+      pair<int, int> value(thisIndexCol, static_cast<int>(jac_g[i]));
+      col_and_jac_g_[thisIndexRow].push_back(value);
+    }    
+
+    delete [] indexRow;
+    delete [] indexCol;
+    delete [] jac_g;
+    delete [] zero_sol;
+  }
+
+  void
+  RoundingFPump::round(const double integerTolerance, 
+		       const double primalTolerance,
+		       double* solution)
+  {
+    const Bonmin::TMINLP::VariableType* variableType = minlp_->var_types();
+    const double* x_l = minlp_->x_l();
+    const double* x_u = minlp_->x_u();
+    const double* g_l = minlp_->g_l();
+    const double* g_u = minlp_->g_u();
+
+
+    for(int iRow=0; iRow<numberRows_; iRow++) {
+      if(g_l[iRow] == 1.0 && g_u[iRow] == 1.0) {
+	bool sosConstraint = true;
+	double weightedSum = 0.0;
+	int counter = 1;
+	vector<pair<int, int> > jac_g = col_and_jac_g_[iRow];
+	for (unsigned int j=0; j<jac_g.size(); j++) {
+	  int iColumn = jac_g[j].first;
+	  if (solution[iColumn]>=1.0-integerTolerance ||
+	      jac_g[j].second != 1.0 ||
+	      variableType[iColumn] == Bonmin::TMINLP::CONTINUOUS) {
+	    sosConstraint = false;
+	    break;
+	  }
+	  else {
+	    weightedSum += counter * solution[iColumn];
+	    counter++;
+	  }
+	}
+#ifdef DEBUG_BON_HEURISTIC_FPUMP
+	if(sosConstraint) {
+	  cout<<"weightedSum= "<<weightedSum
+	      <<", numberColumns_= "<<numberColumns_<<endl;
+	}
+#endif
+        
+	if(sosConstraint) {
+	  double fl = floor(weightedSum + 0.5); 
+	  int indexColumnSelected = static_cast<int>(fl) - 1;
+          if(indexColumnSelected < 0){//Looks like all variables have been fixed to 0
+            continue;
+          }
+	  assert(indexColumnSelected < jac_g.size());
+	  for (size_t j=0; j<jac_g.size(); j++) {
+	    int iColumn = jac_g[j].first;
+	    if((int)j == indexColumnSelected)
+	      solution[iColumn] = 1.0;
+	    else
+	      solution[iColumn] = 0.0;
+	  }
+	}
+      }
+    }
+
+    for(int iColumn=0; iColumn<numberColumns_; iColumn++) {
+      if(variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	double value=solution[iColumn];
+	if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	  value = floor(value+0.5);
+	  // make sure that the new value is within bounds
+	  if(value < x_l[iColumn]-primalTolerance)
+	    value++;
+	  else if(value > x_u[iColumn]+primalTolerance)
+	    value--;
+	  solution[iColumn] = value;
+	}
+      }
+    }
+  }
+}
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicFPump.hpp b/src/CbcBonmin/Heuristics/BonHeuristicFPump.hpp
new file mode 100644
index 0000000..467b563
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicFPump.hpp
@@ -0,0 +1,111 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Joao P. Goncalves, International Business Machines Corporation
+//
+// Date : November 12, 2007
+
+#ifndef BonHeuristicFPump_HPP
+#define BonHeuristicFPump_HPP
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonBonminSetup.hpp"
+#include "CbcHeuristic.hpp"
+
+namespace Bonmin
+{
+  class  HeuristicFPump : public CbcHeuristic
+  {
+  public:
+    /// Default constructor
+    HeuristicFPump();
+
+    /// Constructor with setup
+    HeuristicFPump(BonminSetup * setup);
+
+    /// Copy constructor
+    HeuristicFPump(const HeuristicFPump &copy);
+
+    /// Destructor
+    ~HeuristicFPump() {}
+
+    /// Assignment operator
+    HeuristicFPump & operator=(const HeuristicFPump & rhs);
+
+    /** Virtual constructor.*/
+    virtual CbcHeuristic * clone() const{
+      return new HeuristicFPump(*this);
+    }
+
+    /// Resets stuff if model changes
+    virtual void resetModel(CbcModel * model){
+      setModel(model);
+    }
+
+    /** Change setup used for heuristic.*/
+    void setSetup(BonminSetup * setup){
+      setup_ = setup;
+      Initialize(setup_->options());
+    }
+
+    /// Performs heuristic
+    virtual int solution(double &solutionValue, double *betterSolution);
+
+    /// Performs heuristic with add cust
+    virtual int solution(double &solutionValue, double *betterSolution, OsiCuts & cs)
+    {
+      return solution(solutionValue, betterSolution);
+    }
+
+    /** Register the options for this heuristic */
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+    /** Initiaize using passed options.*/
+    void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+  private:
+    /** Setup to use for local searches (will make copies).*/
+    BonminSetup * setup_; 
+
+    /** Norm of the objective function - either 1 or 2 */
+    int objective_norm_;
+
+    /// To enable advanced unstable stuff
+    int enableAdvanced_;
+  };
+
+  class RoundingFPump
+  {
+  public:
+    /// Default constructor
+    RoundingFPump(TMINLP2TNLP* minlp);
+
+    /// Destructor
+    ~RoundingFPump();
+
+    /// Rounds the solution
+    void round(const double integerTolerance, 
+	       const double primalTolerance,
+	       double* solution);
+
+  private:
+    /// gutsOfConstructor
+    void gutsOfConstructor();
+
+    /// Pointer to problem
+    TMINLP2TNLP* minlp_;
+
+    /// Number of rows
+    int numberRows_;
+
+    /// Number of columns
+    int numberColumns_;
+
+    /// Jacobian of g
+    std::vector<std::pair<int, int> >* col_and_jac_g_;
+
+  };
+
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicLocalBranching.cpp b/src/CbcBonmin/Heuristics/BonHeuristicLocalBranching.cpp
new file mode 100644
index 0000000..679a5d6
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicLocalBranching.cpp
@@ -0,0 +1,138 @@
+// (C) Copyright CNRS and International Business Machines Corporation
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+// Joao Goncalves, International Business Machines Corporation
+//
+// Date : 06/18/2008
+
+#include "BonHeuristicLocalBranching.hpp"
+#include "CbcModel.hpp"
+#include "OsiBranchingObject.hpp"
+
+namespace Bonmin {
+
+  /** Default constructor*/
+  HeuristicLocalBranching::HeuristicLocalBranching():
+    LocalSolverBasedHeuristic(),
+    howOften_(100),
+    numberSolutions_(0)
+  {}
+  /** Constructor with setup.*/
+  HeuristicLocalBranching::HeuristicLocalBranching(BonminSetup * setup):
+    LocalSolverBasedHeuristic(setup),
+    howOften_(100),
+    numberSolutions_(0)
+  {}
+
+  /** Copy constructor.*/
+  HeuristicLocalBranching::HeuristicLocalBranching
+  (const HeuristicLocalBranching &other):
+    LocalSolverBasedHeuristic(other),
+    howOften_(other.howOften_),
+    numberSolutions_(other.numberSolutions_)
+  {}
+
+  HeuristicLocalBranching::~HeuristicLocalBranching(){
+  }
+
+  void 
+  HeuristicLocalBranching::setModel(CbcModel * model)
+  {
+    model_=model;
+    //  assert(model_->solver());
+    validate();
+  }
+
+  void
+  HeuristicLocalBranching::validate()
+  {
+    assert(setup_ != NULL);
+    OsiTMINLPInterface * nlp = dynamic_cast<OsiTMINLPInterface *>
+      (setup_->nonlinearSolver());
+    TMINLP2TNLP* minlp = nlp->problem();
+    int numberColumns;
+    int numberRows;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(numberColumns, numberRows, nnz_jac_g,
+			nnz_h_lag, index_style);
+    const Bonmin::TMINLP::VariableType* variableType = minlp->var_types();
+    const double* x_l = minlp->x_l();
+    const double* x_u = minlp->x_u();
+
+    for(int i=0; i<numberColumns; i++) {
+      if ((variableType[i] != Bonmin::TMINLP::CONTINUOUS) &&
+	  (x_l[i] != 0.0 || x_u[i] != 1.0)) {
+	setWhen(0);
+	return;
+      }
+    }
+  }
+
+  /** Runs heuristic*/
+  int
+  HeuristicLocalBranching::solution(double & objectiveValue,
+			  double * newSolution)
+  {
+    //    if(!when() || model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+    if (numberSolutions_>=model_->getSolutionCount())
+      return 0;
+    else
+      numberSolutions_=model_->getSolutionCount();
+
+    const double * bestSolution = model_->bestSolution();
+    if (!bestSolution)
+      return 0; // No solution found yet
+
+    OsiTMINLPInterface * nlp = dynamic_cast<OsiTMINLPInterface *>
+                               (setup_->nonlinearSolver()->clone());
+
+
+    int numberIntegers = model_->numberIntegers();
+    const int * integerVariable = model_->integerVariable();
+
+    double* vals = new double[numberIntegers];
+    int* inds = new int[numberIntegers];
+
+    for (int i=0; i<numberIntegers; i++) {
+      int iColumn = integerVariable[i];
+      vals[i] = bestSolution[iColumn];
+      inds[i] = iColumn;
+    }
+
+    double rhs_local_branching_constraint = numberIntegers / 2; //stefan: this should be the same as floor(numInt/2) since numInt and 2 are int's
+    nlp->switchToFeasibilityProblem(numberIntegers, vals, inds, rhs_local_branching_constraint);
+
+    int r_val = 0;
+    r_val = doLocalSearch(nlp, newSolution, objectiveValue, model_->getCutoff());
+
+    delete [] vals;
+    delete [] inds;
+
+    if(r_val > 0) numberSolutions_ = model_->getSolutionCount() + 1;
+
+    return r_val;
+  }
+
+  void
+  HeuristicLocalBranching::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+   roptions->SetRegisteringCategory("Primal Heuristics (undocumented)", RegisteredOptions::UndocumentedCategory);
+   roptions->AddStringOption2(
+     "heuristic_local_branching",
+     "if yes runs the LocalBranching heuristic",
+     "no",
+     "no", "",
+     "yes", "",
+     "");
+    roptions->setOptionExtraInfo("heuristic_local_branching", 63);
+  }
+
+   /** Initiaize using passed options.*/
+   void 
+   HeuristicLocalBranching::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+   }
+}/* ends bonmin namespace*/
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicLocalBranching.hpp b/src/CbcBonmin/Heuristics/BonHeuristicLocalBranching.hpp
new file mode 100644
index 0000000..416bd02
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicLocalBranching.hpp
@@ -0,0 +1,59 @@
+// (C) Copyright CNRS and International Business Machines Corporation
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+// Joao Goncalves, International Business Machines Corporation
+//
+// Date : 06/18/2008
+
+#ifndef BonHeuristicLocalBranching_H
+#define BonHeuristicLocalBranching_H
+#include "BonLocalSolverBasedHeuristic.hpp"
+
+namespace Bonmin {
+  class HeuristicLocalBranching:public LocalSolverBasedHeuristic {
+    public:
+     /** Default constructor*/
+     HeuristicLocalBranching();
+    /** Constructor with setup.*/
+    HeuristicLocalBranching(BonminSetup * setup);
+
+     /** Copy constructor.*/
+     HeuristicLocalBranching(const HeuristicLocalBranching &other);
+     /** Virtual constructor.*/
+     virtual CbcHeuristic * clone() const{
+      return new HeuristicLocalBranching(*this);
+     }
+
+     /** Destructor*/
+     virtual ~HeuristicLocalBranching();
+    
+    /// Update model
+    virtual void setModel(CbcModel * model);
+
+    /// Validate model i.e. sets when_ to 0 if necessary
+    virtual void validate();
+
+     /** Runs heuristic*/
+     int solution(double & objectiveValue,
+                  double * newSolution);
+
+    /** Register the options common to all local search based heuristics.*/
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+    /** Initiaize using passed options.*/
+    void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+  private:
+    /// How often to do (code can change)
+    int howOften_;
+    /// Number of solutions so we can do something at solution
+    int numberSolutions_;
+
+  };
+
+}/* Ends Bonmin namepace.*/
+#endif
+
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicRINS.cpp b/src/CbcBonmin/Heuristics/BonHeuristicRINS.cpp
new file mode 100644
index 0000000..9e9daf1
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicRINS.cpp
@@ -0,0 +1,136 @@
+// (C) Copyright CNRS and International Business Machines Corporation
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+// Joao Goncalves, International Business Machines Corporation
+//
+// Date : 06/18/2008
+
+#include "BonHeuristicRINS.hpp"
+#include "CbcModel.hpp"
+#include "OsiBranchingObject.hpp"
+
+//#define DEBUG_BON_HEURISTIC_RINS
+
+namespace Bonmin {
+
+  /** Default constructor*/
+  HeuristicRINS::HeuristicRINS():
+    LocalSolverBasedHeuristic(),
+    howOften_(10),
+    numberSolutions_(0)
+  {}
+  /** Constructor with setup.*/
+  HeuristicRINS::HeuristicRINS(BonminSetup * setup):
+    LocalSolverBasedHeuristic(setup),
+    howOften_(10),
+    numberSolutions_(0){
+  }
+
+  /** Copy constructor.*/
+  HeuristicRINS::HeuristicRINS
+  (const HeuristicRINS &other):
+    LocalSolverBasedHeuristic(other),
+    howOften_(other.howOften_),
+    numberSolutions_(other.numberSolutions_)
+  {}
+
+  HeuristicRINS::~HeuristicRINS(){
+  }
+
+  /** Runs heuristic*/
+  int
+  HeuristicRINS::solution(double & objectiveValue,
+			  double * newSolution)
+  {
+    if(!howOften_ || model_->getNodeCount() % howOften_ != 0) return 0;
+    numberSolutions_=model_->getSolutionCount();
+
+    const double * bestSolution = model_->bestSolution();
+    if (!bestSolution){
+#ifdef DEBUG_BON_HEURISTIC_RINS
+    std::cout<<"exited RINS b"<<std::endl;
+#endif
+      return 0; // No solution found yet
+    }
+    OsiTMINLPInterface * nlp = dynamic_cast<OsiTMINLPInterface *>
+                               (model_->solver());
+    if(nlp == NULL){
+       nlp = dynamic_cast<OsiTMINLPInterface *>
+                         (setup_->nonlinearSolver()->clone());
+     }
+     else {
+       nlp = dynamic_cast<OsiTMINLPInterface *>(nlp->clone());
+    }
+
+    int numberIntegers = model_->numberIntegers();
+    const int * integerVariable = model_->integerVariable();
+
+    const double * currentSolution = model_->getColSolution();
+
+    double primalTolerance;
+    nlp->getDblParam(OsiPrimalTolerance,primalTolerance);
+
+    int nFix=0;
+    for (int i=0; i<numberIntegers; i++) {
+      int iColumn=integerVariable[i];
+      const OsiObject * object = model_->object(i);
+      // get original bounds
+      double originalLower;
+      double originalUpper;
+      getIntegerInformation(object, originalLower, originalUpper); 
+      double valueInt=bestSolution[iColumn];
+      if (valueInt<originalLower) {
+	valueInt=originalLower;
+      } else if (valueInt>originalUpper) {
+	valueInt=originalUpper;
+      }
+      if (fabs(currentSolution[iColumn]-valueInt)<10.0*primalTolerance) {
+	double nearest=floor(valueInt+0.5);
+	nlp->setColLower(iColumn,nearest);
+	nlp->setColUpper(iColumn,nearest);
+	nFix++;
+      }
+    }
+
+    int r_val = 0;
+    if(nFix > numberIntegers/10) {
+#ifdef DEBUG_BON_HEURISTIC_RINS
+      std::cout<<"cutoff = "<<model_->getCutoff()<<std::endl;
+#endif
+      r_val = doLocalSearch(nlp, newSolution, objectiveValue, model_->getCutoff(), "rins.");
+#ifdef DEBUG_BON_HEURISTIC_RINS
+      std::cout<<"executed RINS "<<r_val<<std::endl;
+#endif
+    }
+    else {numberSolutions_ --;}
+
+    if(r_val > 0) {
+      numberSolutions_ = model_->getSolutionCount() + 1;
+      howOften_ = std::max(10, howOften_ / 2);
+    }
+    else
+      howOften_ = std::min(10000,2*howOften_);
+    return r_val;
+  }
+
+  void
+  HeuristicRINS::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+   roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+   roptions->AddStringOption2(
+     "heuristic_RINS",
+     "if yes runs the RINS heuristic",
+     "no",
+     "no", "",
+     "yes", "",
+     "");
+    roptions->setOptionExtraInfo("heuristic_RINS", 63);
+  }
+
+   /** Initiaize using passed options.*/
+   void 
+   HeuristicRINS::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+   }
+}/* ends bonmin namespace*/
diff --git a/src/CbcBonmin/Heuristics/BonHeuristicRINS.hpp b/src/CbcBonmin/Heuristics/BonHeuristicRINS.hpp
new file mode 100644
index 0000000..f70e36e
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonHeuristicRINS.hpp
@@ -0,0 +1,55 @@
+// (C) Copyright CNRS and International Business Machines Corporation
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+// Joao Goncalves, International Business Machines Corporation
+//
+// Date : 06/18/2008
+
+#ifndef BonHeuristicRINS_H
+#define BonHeuristicRINS_H
+#include "BonLocalSolverBasedHeuristic.hpp"
+
+namespace Bonmin {
+  class HeuristicRINS:public LocalSolverBasedHeuristic {
+    public:
+     /** Default constructor*/
+     HeuristicRINS();
+    /** Constructor with setup.*/
+    HeuristicRINS(BonminSetup * setup);
+
+     /** Copy constructor.*/
+     HeuristicRINS(const HeuristicRINS &other);
+     /** Virtual constructor.*/
+     virtual CbcHeuristic * clone() const{
+      return new HeuristicRINS(*this);
+     }
+
+     /** Destructor*/
+     virtual ~HeuristicRINS();
+
+     /** Runs heuristic*/
+     int solution(double & objectiveValue,
+                  double * newSolution);
+   /** Register the options common to all local search based heuristics.*/
+   static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+   /** Initiaize using passed options.*/
+   void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+    /// Sets how often to do it
+    inline void setHowOften(int value)
+    { howOften_=value;}
+
+  private:
+    /// How often to do (code can change)
+    int howOften_;
+    /// Number of solutions so we can do something at solution
+    int numberSolutions_;
+
+  };
+
+}/* Ends Bonmin namepace.*/
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonLocalSolverBasedHeuristic.cpp b/src/CbcBonmin/Heuristics/BonLocalSolverBasedHeuristic.cpp
new file mode 100644
index 0000000..7283787
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonLocalSolverBasedHeuristic.cpp
@@ -0,0 +1,122 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 06/18/2008
+
+#include "BonLocalSolverBasedHeuristic.hpp"
+#include "BonCbc.hpp"
+
+namespace Bonmin {
+  LocalSolverBasedHeuristic::LocalSolverBasedHeuristic():
+     CbcHeuristic(),
+     setup_(NULL),
+     time_limit_(60),
+     max_number_nodes_(1000),
+     max_number_solutions_(10){
+  }
+  LocalSolverBasedHeuristic::LocalSolverBasedHeuristic(BonminSetup * setup):
+     CbcHeuristic(),
+     setup_(setup),
+     time_limit_(60),
+     max_number_nodes_(1000),
+     max_number_solutions_(10){
+     Initialize(setup->options());
+  }
+
+  LocalSolverBasedHeuristic::LocalSolverBasedHeuristic(const LocalSolverBasedHeuristic & other):
+    CbcHeuristic(other),
+    setup_(other.setup_),
+    time_limit_(other.time_limit_),
+    max_number_nodes_(other.max_number_nodes_),
+    max_number_solutions_(other.max_number_solutions_) {
+  }
+
+   LocalSolverBasedHeuristic::~LocalSolverBasedHeuristic(){
+   }  
+
+   LocalSolverBasedHeuristic &
+   LocalSolverBasedHeuristic::operator=(const LocalSolverBasedHeuristic& rhs){
+     if(this != &rhs){
+        CbcHeuristic::operator=(rhs);
+        setup_ = rhs.setup_;
+     }
+     return *this;
+   }
+
+   void
+   LocalSolverBasedHeuristic::changeIfNotSet(Ipopt::SmartPtr<Ipopt::OptionsList> options, 
+                                             std::string prefix,
+                                             const std::string &option,
+                                             const std::string &value){
+     int dummy;
+     if(!options->GetEnumValue(option,dummy,prefix))
+       options->SetStringValue(prefix + option, value, true, true);
+   
+   }
+   void
+   LocalSolverBasedHeuristic::changeIfNotSet(Ipopt::SmartPtr<Ipopt::OptionsList> options, 
+                                             std::string prefix,
+                                             const std::string &option,
+                                             const double &value){
+     double dummy;
+     if(!options->GetNumericValue(option,dummy,prefix))
+       options->SetNumericValue(prefix + option, value, true, true);
+   
+   }
+   void
+   LocalSolverBasedHeuristic::changeIfNotSet(Ipopt::SmartPtr<Ipopt::OptionsList> options,
+                                             std::string prefix,
+                                             const std::string &option,
+                                             const int &value){
+     int dummy;
+     if(!options->GetIntegerValue(option,dummy,prefix))
+       options->SetIntegerValue(prefix + option, value, true, true);
+   
+   }
+
+   void
+   LocalSolverBasedHeuristic::setupDefaults(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+     std::string prefix = "local_solver.";
+     changeIfNotSet(options, prefix, "algorithm", "B-QG");
+     changeIfNotSet(options, prefix, "variable_selection", "most-fractional");
+     changeIfNotSet(options, prefix, "time_limit", 60.);
+     changeIfNotSet(options, prefix, "node_limit", 1000);
+     changeIfNotSet(options, prefix, "solution_limit", 5);
+   }
+
+   int
+   LocalSolverBasedHeuristic::doLocalSearch(OsiTMINLPInterface * solver,
+                                            double *solution,
+                                            double & solValue,
+                                            double cutoff,std::string prefix) const{
+      BonminSetup * mysetup = setup_->clone(*solver, prefix);
+      Bab bb;
+      mysetup->setDoubleParameter(BabSetupBase::Cutoff, cutoff);
+      mysetup->setIntParameter(BabSetupBase::NumberStrong, 0);
+      bb(mysetup); 
+      int r_val = 0;
+      if(bb.bestSolution()){
+        CoinCopyN(bb.bestSolution(), solver->getNumCols(), solution);
+        solValue = bb.bestObj();
+        r_val = 1;
+      }
+      delete mysetup;
+      return r_val;
+    }
+
+   /** Register the options common to all local search based heuristics.*/
+   void
+   LocalSolverBasedHeuristic::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+   }
+
+   /** Initiaize using passed options.*/
+   void 
+   LocalSolverBasedHeuristic::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+     /** Some fancy defaults.*/
+     setupDefaults(options);
+   }
+} /* Ends Bonmin namespace.*/
+
diff --git a/src/CbcBonmin/Heuristics/BonLocalSolverBasedHeuristic.hpp b/src/CbcBonmin/Heuristics/BonLocalSolverBasedHeuristic.hpp
new file mode 100644
index 0000000..9411bfb
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonLocalSolverBasedHeuristic.hpp
@@ -0,0 +1,102 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 06/18/2008
+
+#ifndef BonLocalSolverBasedHeuristic_H
+#define BonLocalSolverBasedHeuristic_H
+#include "BonBonminSetup.hpp"
+#include "CbcHeuristic.hpp"
+
+namespace Bonmin {
+  class LocalSolverBasedHeuristic : public CbcHeuristic {
+  public:
+    /** Default constructor.*/
+    LocalSolverBasedHeuristic();
+
+    /** Constructor with setup.*/
+    LocalSolverBasedHeuristic(BonminSetup * setup);
+
+    /** Copy constructor.*/
+    LocalSolverBasedHeuristic(const LocalSolverBasedHeuristic & other);
+
+    /** Destructor.*/
+    ~LocalSolverBasedHeuristic();
+
+    /** Virtual copy constructor.*/
+    virtual CbcHeuristic * clone() const = 0;
+ 
+  /// Assignment operator 
+  LocalSolverBasedHeuristic & operator=(const LocalSolverBasedHeuristic& rhs);
+
+#if 0
+  /// update model (This is needed if cliques update matrix etc)
+  virtual void setModel(CbcModel * model){throw -1;}
+#endif
+  /// Resets stuff if model changes
+  virtual void resetModel(CbcModel * model){
+   setModel(model);
+  }
+
+  /** Change setup used for heuristic.*/
+  void setSetup(BonminSetup * setup){
+    setup_ = setup;
+    Initialize(setup_->options());
+  }
+  /** Performs heuristic  */
+  virtual int solution(double & objectiveValue,
+		       double * newSolution)=0;
+
+  /** Performs heuristic which adds cuts  */
+  virtual int solution(double & objectiveValue,
+		       double * newSolution,
+		       OsiCuts & cs) {return 0;}
+
+
+   /** Do a local search based on setup and passed solver.*/
+   int doLocalSearch(OsiTMINLPInterface * solver, 
+                      double *solution, 
+                      double & solValue,
+                      double cutoff, std::string prefix = "local_solver.") const;
+
+   /** Register the options common to all local search based heuristics.*/
+   static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+   /** Setup the defaults.*/
+   virtual void setupDefaults(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+   /** Initiaize using passed options.*/
+   void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+   protected:
+   /** Setup to use for local searches (will make copies).*/
+   BonminSetup * setup_; 
+
+   static void changeIfNotSet(Ipopt::SmartPtr<Ipopt::OptionsList> options, 
+                       std::string prefix,
+                       const std::string &option,
+                       const std::string &value);
+   
+   static void changeIfNotSet(Ipopt::SmartPtr<Ipopt::OptionsList> options, 
+                       std::string prefix,
+                       const std::string &option,
+                       const double &value);
+   
+   static void changeIfNotSet(Ipopt::SmartPtr<Ipopt::OptionsList> options,
+                       std::string prefix,
+                       const std::string &option,
+                       const int &value);
+   private:
+    /** Time limit in local search.*/
+    double time_limit_;
+    /** maximal number of nodes in local search.*/
+    int max_number_nodes_;
+    /** Maximal number of solutions in local search.*/
+    int max_number_solutions_;
+  };
+} /** ends namespace Bonmin.*/
+
+#endif
+
diff --git a/src/CbcBonmin/Heuristics/BonMilpRounding.cpp b/src/CbcBonmin/Heuristics/BonMilpRounding.cpp
new file mode 100644
index 0000000..f7f9f21
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonMilpRounding.cpp
@@ -0,0 +1,363 @@
+// Copyright (C) 2007, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami CNRS
+//
+// Date : May, 26 2010
+
+#include "BonMilpRounding.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CbcModel.hpp"
+#include "BonSubMipSolver.hpp"
+
+#include "CoinTime.hpp"
+
+#include <fstream>
+
+#include <iomanip>
+
+#include "CoinHelperFunctions.hpp"
+#include "OsiClpSolverInterface.hpp"
+
+//#define DEBUG_BON_HEURISTIC_DIVE_MIP
+
+using namespace std;
+
+namespace Bonmin
+{
+  MilpRounding::MilpRounding(BonminSetup * setup)
+    :
+    CbcHeuristic(),
+    setup_(setup),
+    howOften_(20),
+    mip_(NULL)
+  {
+    Initialize(setup);
+  }
+
+  void
+  MilpRounding::Initialize(BonminSetup * b){
+    delete mip_;
+    mip_ = new SubMipSolver (*b, b->prefix());
+   
+  }
+
+  MilpRounding::MilpRounding(const MilpRounding &copy)
+    :
+    CbcHeuristic(copy),
+    setup_(copy.setup_),
+    howOften_(copy.howOften_),
+    mip_(new SubMipSolver(*copy.mip_))
+  {
+  }
+
+  MilpRounding &
+  MilpRounding::operator=(const MilpRounding & rhs)
+  {
+    if(this != &rhs) {
+      CbcHeuristic::operator=(rhs);
+      setup_ = rhs.setup_;
+      howOften_ = rhs.howOften_;
+      delete mip_;
+      if(rhs.mip_)
+        mip_ = new SubMipSolver(*rhs.mip_);
+    }
+    return *this;
+  }
+
+  MilpRounding::~MilpRounding(){
+    delete mip_;
+  }
+
+  struct MatComp{
+    const int * iRow;
+    const int * jCol;
+  /// Destructor
+    bool operator()(int i,int j){
+      return (jCol[i] < jCol[j]) || (jCol[i] == jCol[j] && iRow[i] < iRow[j]);
+    }
+  };
+
+
+  int
+  MilpRounding::solution(double &solutionValue, double *betterSolution)
+  {
+    if(model_->getCurrentPassNumber() > 1) return 0;
+    if (model_->currentDepth() > 2 && (model_->getNodeCount()%howOften_)!=0)
+      return 0;
+ 
+    int returnCode = 0; // 0 means it didn't find a feasible solution
+
+    OsiTMINLPInterface * nlp = NULL;
+    if(setup_->getAlgorithm() == B_BB)
+      nlp = dynamic_cast<OsiTMINLPInterface *>(model_->solver()->clone());
+    else
+      nlp = dynamic_cast<OsiTMINLPInterface *>(setup_->nonlinearSolver()->clone());
+
+    TMINLP2TNLP* minlp = nlp->problem();
+ 
+    // set tolerances
+    double integerTolerance = model_->getDblParam(CbcModel::CbcIntegerTolerance);
+    //double primalTolerance = 1.0e-6;
+
+    int n;
+    int m;
+    int nnz_jac_g;
+    int nnz_h_lag;
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    minlp->get_nlp_info(n, m, nnz_jac_g,
+			nnz_h_lag, index_style);
+
+    const Bonmin::TMINLP::VariableType* variableType = minlp->var_types();
+    const double* x_sol = minlp->x_sol();
+    const double* g_l = minlp->g_l();
+    const double* g_u = minlp->g_u();
+
+    const double * colsol = model_->solver()->getColSolution();
+
+
+    // Get information about the linear and nonlinear part of the instance
+    TMINLP* tminlp = nlp->model();
+    vector<Ipopt::TNLP::LinearityType> c_lin(m);
+    tminlp->get_constraints_linearity(m, c_lin());
+    vector<int> c_idx(m);
+    int n_lin = 0;
+    for (int i=0;i<m;i++) {
+      if (c_lin[i]==Ipopt::TNLP::LINEAR)
+	c_idx[i] = n_lin++;
+      else
+	c_idx[i] = -1;
+    }
+
+
+    // Get the structure of the jacobian
+    vector<int> indexRow(nnz_jac_g);
+    vector<int> indexCol(nnz_jac_g);
+    minlp->eval_jac_g(n, x_sol, false,
+		      m, nnz_jac_g,
+		      indexRow(), indexCol(), 0);
+
+    // get the jacobian values 
+    vector<double> jac_g(nnz_jac_g);
+    minlp->eval_jac_g(n, x_sol, false,
+                      m, nnz_jac_g,
+                      NULL, NULL, jac_g());
+
+    // Sort the matrix to column ordered
+    vector<int> sortedIndex(nnz_jac_g);
+    CoinIotaN(sortedIndex(), nnz_jac_g, 0);
+    MatComp c;
+    c.iRow = indexRow();
+    c.jCol = indexCol();
+    std::sort(sortedIndex.begin(), sortedIndex.end(), c);
+
+    vector<int> row (nnz_jac_g);
+    vector<double> value (nnz_jac_g);
+    vector<int> columnStart(n,0); 
+    vector<int> columnLength(n,0);
+    int indexCorrection = (index_style == Ipopt::TNLP::C_STYLE) ? 0 : 1;
+    int iniCol = -1;
+    int nnz = 0;
+    for(int i=0; i<nnz_jac_g; i++) {
+      int thisIndexCol = indexCol[sortedIndex[i]]-indexCorrection;
+      int thisIndexRow = c_idx[indexRow[sortedIndex[i]] - indexCorrection];
+      if(thisIndexCol != iniCol) {
+	iniCol = thisIndexCol;
+	columnStart[thisIndexCol] = nnz;
+	columnLength[thisIndexCol] = 0;
+      }
+      if(thisIndexRow == -1) continue;
+      columnLength[thisIndexCol]++;
+      row[nnz] = thisIndexRow;
+      value[nnz] = jac_g[i];
+      nnz++;
+    }
+
+    // Build the row lower and upper bounds
+    vector<double> newRowLower(n_lin);
+    vector<double> newRowUpper(n_lin);
+    for(int i = 0 ; i < m ; i++){
+      if(c_idx[i] == -1) continue;
+      newRowLower[c_idx[i]] = g_l[i];
+      newRowUpper[c_idx[i]] = g_u[i];
+    }
+
+    // Get solution array for heuristic solution
+    vector<double> newSolution(n);
+    std::copy(x_sol, x_sol + n, newSolution.begin());
+
+    // Define the constraint matrix for MILP
+    CoinPackedMatrix matrix(true,n_lin,n, nnz, value(), row(), columnStart(), columnLength());
+
+      // create objective function and columns lower and upper bounds for MILP
+      // and create columns for matrix in MILP
+      //double alpha = 0;
+      double beta = 1;
+      vector<double> objective(n);
+      vector<int> idxIntegers;
+      idxIntegers.reserve(n);
+      for(int i = 0 ; i < n ; i++){
+         if(variableType[i] != Bonmin::TMINLP::CONTINUOUS){
+            idxIntegers.push_back(i);
+            objective[i] = beta*(1 - 2*colsol[i]);
+         }
+      }
+
+#if 0
+      // Get dual multipliers and build gradient of the lagrangean
+      const double * duals = nlp->getRowPrice() + 2 *n;
+      vector<double> grad(n, 0); 
+      vector<int> indices(n, 0);
+      tminlp->eval_grad_f(n, x_sol, false, grad());
+      for(int i = 0 ; i < m ; i++){
+        if(c_lin[i] == Ipopt::TNLP::LINEAR) continue;
+        int nnz;
+        tminlp->eval_grad_gi(n, x_sol, false, i, nnz, indices(), NULL);  
+        tminlp->eval_grad_gi(n, x_sol, false, i, nnz, NULL, grad());
+        for(int k = 0 ; k < nnz ; k++){
+          objective[indices[k]] += alpha *duals[i] * grad[k];
+        } 
+      }
+      for(int i = 0 ; i < n ; i++){
+         if(variableType[i] != Bonmin::TMINLP::CONTINUOUS)
+         objective[i] += alpha * grad[i];
+         //if(fabs(objective[i]) < 1e-4) objective[i] = 0;
+         else objective[i] = 0;
+      }
+      std::copy(objective.begin(), objective.end(), std::ostream_iterator<double>(std::cout, " "));
+      std::cout<<std::endl;
+#endif
+
+      // load the problem to OSI
+      OsiSolverInterface *si = mip_->solver();
+      assert(si != NULL);
+      CoinMessageHandler * handler = model_->messageHandler()->clone();
+      si->passInMessageHandler(handler);
+      si->messageHandler()->setLogLevel(1);
+
+      si->loadProblem(matrix, model_->solver()->getColLower(), model_->solver()->getColUpper(), objective(), 
+                      newRowLower(), newRowUpper());
+      si->setInteger(idxIntegers(), static_cast<int>(idxIntegers.size()));
+      si->applyCuts(noGoods);
+
+      bool hasFractionnal = true;
+      while(hasFractionnal){
+        mip_->optimize(DBL_MAX, 0, 60);
+        hasFractionnal = false;
+#if 0
+        bool feasible = false;
+        if(mip_->getLastSolution()) {
+  	const double* solution = mip_->getLastSolution();
+          std::copy(solution, solution + n, newSolution.begin());
+  	feasible = true;
+  
+        }
+
+    if(feasible) {
+      // fix the integer variables and solve the NLP
+      // also add no good cut
+      CoinPackedVector v;
+      double lb = 1;
+      for (int iColumn=0;iColumn<n;iColumn++) {
+	if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	  double value=newSolution[iColumn];
+	  if (fabs(floor(value+0.5)-value)>integerTolerance) {
+#ifdef DEBUG_BON_HEURISTIC_DIVE_MIP
+	    cout<<"It should be infeasible because: "<<endl;
+	    cout<<"variable "<<iColumn<<" is not integer"<<endl;
+#endif
+	    feasible = false;
+	    break;
+	  }
+	  else {
+	    value=floor(newSolution[iColumn]+0.5);
+            if(value > 0.5){
+              v.insert(iColumn, -1);
+              lb -= value;
+            }
+	    minlp->SetVariableUpperBound(iColumn, value);
+	    minlp->SetVariableLowerBound(iColumn, value);
+	  }
+	}
+      }
+      }
+#endif
+      }
+      bool feasible = false;
+      if(mip_->getLastSolution()) {
+	const double* solution = mip_->getLastSolution();
+        std::copy(solution, solution + n, newSolution.begin());
+	feasible = true;
+
+        delete handler;
+      }
+      
+
+    if(feasible) {
+      // fix the integer variables and solve the NLP
+      // also add no good cut
+      CoinPackedVector v;
+      double lb = 1;
+      for (int iColumn=0;iColumn<n;iColumn++) {
+	if (variableType[iColumn] != Bonmin::TMINLP::CONTINUOUS) {
+	  double value=newSolution[iColumn];
+	  if (fabs(floor(value+0.5)-value)>integerTolerance) {
+	    feasible = false;
+	    break;
+	  }
+	  else {
+	    value=floor(newSolution[iColumn]+0.5);
+            if(value > 0.5){
+              v.insert(iColumn, -1);
+              lb -= value;
+            }
+	    minlp->SetVariableUpperBound(iColumn, value);
+	    minlp->SetVariableLowerBound(iColumn, value);
+	  }
+	}
+      }
+      OsiRowCut c;
+      c.setRow(v);
+      c.setLb(lb);
+      c.setUb(DBL_MAX);
+      noGoods.insert(c);
+      if(feasible) {
+	nlp->initialSolve();
+	if(minlp->optimization_status() != Ipopt::SUCCESS) {
+	  feasible = false;
+	}
+	std::copy(x_sol,x_sol+n, newSolution.begin());
+      }
+    }
+    if(feasible) {
+      double newSolutionValue;
+      minlp->eval_f(n, newSolution(), true, newSolutionValue); 
+      if(newSolutionValue < solutionValue) {
+        std::copy(newSolution.begin(), newSolution.end(), betterSolution);
+	solutionValue = newSolutionValue;
+	returnCode = 1;
+      }
+    }
+
+    delete nlp;
+
+#ifdef DEBUG_BON_HEURISTIC_DIVE_MIP
+    std::cout<<"DiveMIP returnCode = "<<returnCode<<std::endl;
+#endif
+
+    return returnCode;
+  }
+  void
+  MilpRounding::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+    roptions->SetRegisteringCategory("Primal Heuristics (undocumented)", RegisteredOptions::UndocumentedCategory);
+   roptions->AddStringOption2(
+     "MILP_rounding_heuristic",
+     "if yes runs the heuristic",
+     "no",
+     "no", "don't run it",
+     "yes", "runs the heuristic",
+     "");
+  }
+}
diff --git a/src/CbcBonmin/Heuristics/BonMilpRounding.hpp b/src/CbcBonmin/Heuristics/BonMilpRounding.hpp
new file mode 100644
index 0000000..f75f00c
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonMilpRounding.hpp
@@ -0,0 +1,74 @@
+// Copyright (C) 2010, International Business Machines Corporation and others. 
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami CNRS
+//
+// Date : May, 26 2010
+
+#ifndef BonMilpRounding_HPP
+#define BonMilpRounding_HPP
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonBonminSetup.hpp"
+#include "CbcHeuristic.hpp"
+#include "CbcStrategy.hpp"
+#include "OsiCuts.hpp"
+
+namespace Bonmin
+{
+  class SubMipSolver;
+  class MilpRounding : public CbcHeuristic
+  {
+  public:
+
+    /// Constructor with setup
+    MilpRounding(BonminSetup * setup);
+
+    /// Copy constructor
+    MilpRounding(const MilpRounding &copy);
+
+    /// Destructor
+    ~MilpRounding();
+
+    /// Assignment operator
+    MilpRounding & operator=(const MilpRounding & rhs);
+
+    /// Clone
+    virtual CbcHeuristic * clone() const{
+      return new MilpRounding(*this);
+    }
+
+    /// Initialize method 
+    void Initialize(BonminSetup * setup);
+
+    /// Resets stuff if model changes
+    virtual void resetModel(CbcModel * model){
+      setModel(model);
+    }
+
+    /** Change setup used for heuristic.*/
+    virtual void setSetup(BonminSetup * setup){
+      setup_ = setup;
+      //      Initialize(setup_->options());
+    }
+
+    /// Performs heuristic
+    virtual int solution(double &solutionValue, double *betterSolution);
+
+
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+  protected:
+    /** Setup to use for local searches (will make copies).*/
+    BonminSetup * setup_; 
+
+  private:
+    /// How often to do (code can change)
+    int howOften_;
+    /// A subsolver for MIP
+    SubMipSolver * mip_;
+
+    OsiCuts noGoods;
+  };
+}
+#endif
diff --git a/src/CbcBonmin/Heuristics/BonPumpForMinlp.cpp b/src/CbcBonmin/Heuristics/BonPumpForMinlp.cpp
new file mode 100644
index 0000000..c4aa352
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonPumpForMinlp.cpp
@@ -0,0 +1,79 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 02/18/2009
+
+#include "BonPumpForMinlp.hpp"
+#include "CbcModel.hpp"
+#include "OsiBranchingObject.hpp"
+
+namespace Bonmin {
+
+  /** Default constructor*/
+  PumpForMinlp::PumpForMinlp():
+    LocalSolverBasedHeuristic(){
+  }
+  /** Constructor with setup.*/
+  PumpForMinlp::PumpForMinlp(BonminSetup * setup):
+    LocalSolverBasedHeuristic(setup){
+    setupDefaults(setup->options());
+  }
+
+  /** Copy constructor.*/
+  PumpForMinlp::PumpForMinlp
+             (const PumpForMinlp &other):
+    LocalSolverBasedHeuristic(other){
+  }
+
+  PumpForMinlp::~PumpForMinlp(){
+  }
+
+  /** Runs heuristic*/
+  int
+  PumpForMinlp::solution(double & objectiveValue,
+                                 double * newSolution){
+    if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
+    if(model_->getSolutionCount()) return 0;
+    //int numberObjects = model_->numberObjects();
+    //OsiObject ** objects = model_->objects();
+    OsiTMINLPInterface * nlp = dynamic_cast<OsiTMINLPInterface *>
+                               (setup_->nonlinearSolver()->clone());
+
+    OsiBranchingInformation info = model_->usefulInformation();
+
+    double cutoff = info.cutoff_; 
+    int r_val = doLocalSearch(nlp, newSolution, objectiveValue, cutoff, "pump_for_minlp.");
+    return r_val;
+  }
+
+   void
+   PumpForMinlp::setupDefaults(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+     //int dummy;
+     std::string prefix = "pump_for_minlp.";
+     changeIfNotSet(options, prefix, "algorithm", "B-iFP");
+     changeIfNotSet(options, prefix, "time_limit", 30.);
+   }
+
+
+  void
+  PumpForMinlp::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){
+   roptions->SetRegisteringCategory("Primal Heuristics", RegisteredOptions::BonminCategory);
+   roptions->AddStringOption2(
+     "pump_for_minlp",
+     "whether to run the feasibility pump heuristic for MINLP",
+     "no",
+     "no", "",
+     "yes", "",
+     "");
+    roptions->setOptionExtraInfo("pump_for_minlp", 63);
+  }
+
+   /** Initiaize using passed options.*/
+   void 
+   PumpForMinlp::Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options){
+   }
+}/* ends bonmin namespace*/
+
diff --git a/src/CbcBonmin/Heuristics/BonPumpForMinlp.hpp b/src/CbcBonmin/Heuristics/BonPumpForMinlp.hpp
new file mode 100644
index 0000000..bd14ea5
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/BonPumpForMinlp.hpp
@@ -0,0 +1,45 @@
+// (C) Copyright CNRS
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF Université de la Méditérannée-CNRS
+//
+// Date : 02/18/2009
+
+#ifndef BonPumpForMinlp_H
+#define BonPumpForMinlp_H
+#include "BonLocalSolverBasedHeuristic.hpp"
+
+namespace Bonmin {
+  class PumpForMinlp:public LocalSolverBasedHeuristic {
+    public:
+     /** Default constructor*/
+     PumpForMinlp();
+    /** Constructor with setup.*/
+    PumpForMinlp(BonminSetup * setup);
+
+     /** Copy constructor.*/
+     PumpForMinlp(const PumpForMinlp &other);
+     /** Virtual constructor.*/
+     virtual CbcHeuristic * clone() const{
+      return new PumpForMinlp(*this);
+     }
+
+     /** Destructor*/
+     virtual ~PumpForMinlp();
+
+     /** Runs heuristic*/
+     int solution(double & objectiveValue,
+                  double * newSolution);
+   /** Register the options common to all local search based heuristics.*/
+   static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+
+   /** Setup the defaults.*/
+   virtual void setupDefaults(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+   /** Initiaize using passed options.*/
+   void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
+  };
+
+}/* Ends Bonmin namepace.*/
+#endif
+
diff --git a/src/CbcBonmin/Heuristics/Makefile.am b/src/CbcBonmin/Heuristics/Makefile.am
new file mode 100644
index 0000000..4d1b030
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/Makefile.am
@@ -0,0 +1,116 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 433 2007-03-28 05:01:22Z andreasw $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonheuristics.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonheuristics_la_SOURCES = \
+       BonLocalSolverBasedHeuristic.cpp  BonLocalSolverBasedHeuristic.hpp \
+       BonFixAndSolveHeuristic.cpp  BonFixAndSolveHeuristic.hpp \
+       BonDummyPump.cpp BonDummyPump.hpp \
+       BonPumpForMinlp.cpp BonPumpForMinlp.hpp \
+       BonHeuristicRINS.cpp BonHeuristicRINS.hpp \
+       BonHeuristicLocalBranching.cpp BonHeuristicLocalBranching.hpp \
+       BonHeuristicFPump.cpp BonHeuristicFPump.hpp \
+       BonHeuristicDive.cpp BonHeuristicDive.hpp \
+       BonHeuristicDiveFractional.cpp BonHeuristicDiveFractional.hpp \
+       BonHeuristicDiveVectorLength.cpp BonHeuristicDiveVectorLength.hpp \
+       BonHeuristicDiveMIP.cpp BonHeuristicDiveMIP.hpp \
+       BonHeuristicDiveMIPFractional.cpp BonHeuristicDiveMIPFractional.hpp \
+       BonMilpRounding.cpp BonMilpRounding.hpp \
+       BonHeuristicDiveMIPVectorLength.cpp BonHeuristicDiveMIPVectorLength.hpp
+
+# This is for libtool
+libbonheuristics_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+# Currently, the following has to be included for BonChooseVariable.hpp, but
+# we should try to unmangle the connection to Cbc
+
+#AM_CPPFLAGS += -I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin`
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+                     BonLocalSolverBasedHeuristic.hpp \
+                     BonFixAndSolveHeuristic.hpp \
+                     BonDummyPump.hpp \
+                     BonPumpForMinlp.hpp \
+                     BonMilpRounding.hpp \
+                     BonHeuristicRINS.hpp \
+                     BonHeuristicLocalBranching.hpp \
+                     BonHeuristicFPump.hpp \
+                     BonHeuristicDive.hpp \
+                     BonHeuristicDiveFractional.hpp \
+                     BonHeuristicDiveVectorLength.hpp \
+                     BonHeuristicDiveMIP.hpp \
+                     BonHeuristicDiveMIPFractional.hpp \
+                     BonHeuristicDiveMIPVectorLength.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+   BonLocalSolverBasedHeuristic.cppbak  BonLocalSolverBasedHeuristic.hppbak \
+   BonFixAndSolveHeuristic.cppbak  BonFixAndSolveHeuristic.hppbak \
+   BonDummyPump.cppbak BonDummyPump.hppbak \
+   BonHeuristicRINS.cppbak BonHeuristicRINS.hppbak \
+   BonHeuristicLocalBranching.cppbak BonHeuristicLocalBranching.hppbak \
+   BonHeuristicFPump.cppbak BonHeuristicFPump.hppbak \
+   BonHeuristicDive.cppbak BonHeuristicDive.hppbak \
+   BonHeuristicDiveFractional.cppbak BonHeuristicDiveFractional.hppbak \
+   BonHeuristicDiveVectorLength.cppbak BonHeuristicDiveVectorLength.hppbak \
+   BonHeuristicDiveMIP.cppbak BonHeuristicDiveMIP.hppbak \
+   BonHeuristicDiveMIPFractional.cppbak BonHeuristicDiveMIPFractional.hppbak \
+   BonHeuristicDiveMIPVectorLength.cppbak BonHeuristicDiveMIPVectorLength.hppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/CbcBonmin/Heuristics/Makefile.in b/src/CbcBonmin/Heuristics/Makefile.in
new file mode 100644
index 0000000..a27d181
--- /dev/null
+++ b/src/CbcBonmin/Heuristics/Makefile.in
@@ -0,0 +1,699 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/CbcBonmin/Heuristics
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libbonheuristics_la_LIBADD =
+am_libbonheuristics_la_OBJECTS = BonLocalSolverBasedHeuristic.lo \
+	BonFixAndSolveHeuristic.lo BonDummyPump.lo BonPumpForMinlp.lo \
+	BonHeuristicRINS.lo BonHeuristicLocalBranching.lo \
+	BonHeuristicFPump.lo BonHeuristicDive.lo \
+	BonHeuristicDiveFractional.lo BonHeuristicDiveVectorLength.lo \
+	BonHeuristicDiveMIP.lo BonHeuristicDiveMIPFractional.lo \
+	BonMilpRounding.lo BonHeuristicDiveMIPVectorLength.lo
+libbonheuristics_la_OBJECTS = $(am_libbonheuristics_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonheuristics_la_SOURCES)
+DIST_SOURCES = $(libbonheuristics_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonheuristics.la
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonheuristics_la_SOURCES = \
+       BonLocalSolverBasedHeuristic.cpp  BonLocalSolverBasedHeuristic.hpp \
+       BonFixAndSolveHeuristic.cpp  BonFixAndSolveHeuristic.hpp \
+       BonDummyPump.cpp BonDummyPump.hpp \
+       BonPumpForMinlp.cpp BonPumpForMinlp.hpp \
+       BonHeuristicRINS.cpp BonHeuristicRINS.hpp \
+       BonHeuristicLocalBranching.cpp BonHeuristicLocalBranching.hpp \
+       BonHeuristicFPump.cpp BonHeuristicFPump.hpp \
+       BonHeuristicDive.cpp BonHeuristicDive.hpp \
+       BonHeuristicDiveFractional.cpp BonHeuristicDiveFractional.hpp \
+       BonHeuristicDiveVectorLength.cpp BonHeuristicDiveVectorLength.hpp \
+       BonHeuristicDiveMIP.cpp BonHeuristicDiveMIP.hpp \
+       BonHeuristicDiveMIPFractional.cpp BonHeuristicDiveMIPFractional.hpp \
+       BonMilpRounding.cpp BonMilpRounding.hpp \
+       BonHeuristicDiveMIPVectorLength.cpp BonHeuristicDiveMIPVectorLength.hpp
+
+
+# This is for libtool
+libbonheuristics_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/..` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+
+# Currently, the following has to be included for BonChooseVariable.hpp, but
+# we should try to unmangle the connection to Cbc
+
+#AM_CPPFLAGS += -I`$(CYGPATH_W) $(srcdir)/../../CbcBonmin`
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+                     BonLocalSolverBasedHeuristic.hpp \
+                     BonFixAndSolveHeuristic.hpp \
+                     BonDummyPump.hpp \
+                     BonPumpForMinlp.hpp \
+                     BonMilpRounding.hpp \
+                     BonHeuristicRINS.hpp \
+                     BonHeuristicLocalBranching.hpp \
+                     BonHeuristicFPump.hpp \
+                     BonHeuristicDive.hpp \
+                     BonHeuristicDiveFractional.hpp \
+                     BonHeuristicDiveVectorLength.hpp \
+                     BonHeuristicDiveMIP.hpp \
+                     BonHeuristicDiveMIPFractional.hpp \
+                     BonHeuristicDiveMIPVectorLength.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+   BonLocalSolverBasedHeuristic.cppbak  BonLocalSolverBasedHeuristic.hppbak \
+   BonFixAndSolveHeuristic.cppbak  BonFixAndSolveHeuristic.hppbak \
+   BonDummyPump.cppbak BonDummyPump.hppbak \
+   BonHeuristicRINS.cppbak BonHeuristicRINS.hppbak \
+   BonHeuristicLocalBranching.cppbak BonHeuristicLocalBranching.hppbak \
+   BonHeuristicFPump.cppbak BonHeuristicFPump.hppbak \
+   BonHeuristicDive.cppbak BonHeuristicDive.hppbak \
+   BonHeuristicDiveFractional.cppbak BonHeuristicDiveFractional.hppbak \
+   BonHeuristicDiveVectorLength.cppbak BonHeuristicDiveVectorLength.hppbak \
+   BonHeuristicDiveMIP.cppbak BonHeuristicDiveMIP.hppbak \
+   BonHeuristicDiveMIPFractional.cppbak BonHeuristicDiveMIPFractional.hppbak \
+   BonHeuristicDiveMIPVectorLength.cppbak BonHeuristicDiveMIPVectorLength.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/CbcBonmin/Heuristics/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/CbcBonmin/Heuristics/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonheuristics.la: $(libbonheuristics_la_OBJECTS) $(libbonheuristics_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonheuristics_la_LDFLAGS) $(libbonheuristics_la_OBJECTS) $(libbonheuristics_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonDummyPump.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonFixAndSolveHeuristic.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicDive.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicDiveFractional.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicDiveMIP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicDiveMIPFractional.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicDiveMIPVectorLength.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicDiveVectorLength.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicFPump.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicLocalBranching.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonHeuristicRINS.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonLocalSolverBasedHeuristic.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonMilpRounding.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonPumpForMinlp.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/CbcBonmin/Makefile.am b/src/CbcBonmin/Makefile.am
new file mode 100644
index 0000000..06c9605
--- /dev/null
+++ b/src/CbcBonmin/Makefile.am
@@ -0,0 +1,137 @@
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 2090 2013-12-16 00:48:30Z tkr $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = Heuristics
+
+# Name of the library in this directory
+lib_LTLIBRARIES = libbonmin.la
+if COIN_HAS_ASL
+lib_LTLIBRARIES += libbonminampl.la
+endif
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonmin_la_SOURCES = \
+	BonCbc.cpp BonCbc.hpp \
+	BonCbcNlpStrategy.cpp BonCbcNlpStrategy.hpp \
+	BonCbcNode.cpp BonCbcNode.hpp \
+        BonBabInfos.cpp BonBabInfos.hpp \
+	BonGuessHeuristic.cpp BonGuessHeuristic.hpp \
+	BonDiver.cpp BonDiver.hpp
+
+libbonmin_la_LIBADD = $(libbonmin_la_DEPENDENCIES)
+if DEPENDENCY_LINKING
+libbonmin_la_LIBADD += $(BONMINLIB_LIBS)
+endif
+
+libbonmin_la_DEPENDENCIES = \
+	../Algorithms/libbonalgorithms.la \
+	../Interfaces/libbonmininterfaces.la \
+         Heuristics/libbonheuristics.la
+
+# This is for libtool
+libbonmin_la_LDFLAGS = $(LT_LDFLAGS)
+
+########################################################################
+#                         amplbonmin library                           #
+########################################################################
+
+# List all source files, including headers
+libbonminampl_la_SOURCES =
+
+# Dummy C++ source to cause C++ linking
+nodist_EXTRA_libbonminampl_la_SOURCES = dummy.cpp 
+
+# List all additionally required libraries
+libbonminampl_la_LIBADD = $(libbonminampl_la_DEPENDENCIES)
+if DEPENDENCY_LINKING
+libbonminampl_la_LIBADD += $(BONMINLIB_LIBS) \
+	$(BONMINAMPLINTERFACELIB_LIBS)
+endif
+
+# List all dependency libraries
+libbonminampl_la_DEPENDENCIES = \
+	../Algorithms/Ampl/libbonamplsetup.la \
+	../Interfaces/Ampl/libbonamplinterface.la 
+if DEPENDENCY_LINKING
+libbonminampl_la_DEPENDENCIES += libbonmin.la
+endif
+
+# This is for libtool
+libbonminampl_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/QuadCuts` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+     BonCbcNlpStrategy.hpp \
+     BonCbc.hpp \
+     BonBabInfos.hpp \
+     BonCbcNode.hpp \
+     BonDiver.hpp \
+     BonGuessHeuristic.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonCbc.cppbak BonCbc.hppbak \
+	BonCbcNlpStrategy.cppbak BonCbcNlpStrategy.hppbak \
+	BonCbcNode.cppbak BonCbcNode.hppbak \
+        BonBabInfos.cppbak BonBabInfos.hppbak \
+	BonGuessHeuristic.cppbak BonGuessHeuristic.hppbak \
+	BonDiver.cppbak BonDiver.hppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+DISTCLEANFILES = \
+	CbcCompareUser.cpp CbcBranchUser.cpp
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/CbcBonmin/Makefile.in b/src/CbcBonmin/Makefile.in
new file mode 100644
index 0000000..11b2bf0
--- /dev/null
+++ b/src/CbcBonmin/Makefile.in
@@ -0,0 +1,850 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006, 2007 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at COIN_HAS_ASL_TRUE@am__append_1 = libbonminampl.la
+ at DEPENDENCY_LINKING_TRUE@am__append_2 = $(BONMINLIB_LIBS)
+ at DEPENDENCY_LINKING_TRUE@am__append_3 = $(BONMINLIB_LIBS) \
+ at DEPENDENCY_LINKING_TRUE@	$(BONMINAMPLINTERFACELIB_LIBS)
+
+ at DEPENDENCY_LINKING_TRUE@am__append_4 = libbonmin.la
+subdir = src/CbcBonmin
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includecoindir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 = ../Algorithms/libbonalgorithms.la \
+	../Interfaces/libbonmininterfaces.la \
+	Heuristics/libbonheuristics.la
+am__DEPENDENCIES_2 =
+ at DEPENDENCY_LINKING_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2)
+am_libbonmin_la_OBJECTS = BonCbc.lo BonCbcNlpStrategy.lo BonCbcNode.lo \
+	BonBabInfos.lo BonGuessHeuristic.lo BonDiver.lo
+libbonmin_la_OBJECTS = $(am_libbonmin_la_OBJECTS)
+ at DEPENDENCY_LINKING_TRUE@am__DEPENDENCIES_4 = libbonmin.la
+am__DEPENDENCIES_5 = ../Algorithms/Ampl/libbonamplsetup.la \
+	../Interfaces/Ampl/libbonamplinterface.la \
+	$(am__DEPENDENCIES_4)
+ at DEPENDENCY_LINKING_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_2) \
+ at DEPENDENCY_LINKING_TRUE@	$(am__DEPENDENCIES_2)
+am_libbonminampl_la_OBJECTS =
+libbonminampl_la_OBJECTS = $(am_libbonminampl_la_OBJECTS)
+ at COIN_HAS_ASL_TRUE@am_libbonminampl_la_rpath = -rpath $(libdir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonmin_la_SOURCES) $(libbonminampl_la_SOURCES) \
+	$(nodist_EXTRA_libbonminampl_la_SOURCES)
+DIST_SOURCES = $(libbonmin_la_SOURCES) $(libbonminampl_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = Heuristics
+
+# Name of the library in this directory
+lib_LTLIBRARIES = libbonmin.la $(am__append_1)
+
+########################################################################
+#                          bonmin library                              #
+########################################################################
+
+# List all source files, including headers
+libbonmin_la_SOURCES = \
+	BonCbc.cpp BonCbc.hpp \
+	BonCbcNlpStrategy.cpp BonCbcNlpStrategy.hpp \
+	BonCbcNode.cpp BonCbcNode.hpp \
+        BonBabInfos.cpp BonBabInfos.hpp \
+	BonGuessHeuristic.cpp BonGuessHeuristic.hpp \
+	BonDiver.cpp BonDiver.hpp
+
+libbonmin_la_LIBADD = $(libbonmin_la_DEPENDENCIES) $(am__append_2)
+libbonmin_la_DEPENDENCIES = \
+	../Algorithms/libbonalgorithms.la \
+	../Interfaces/libbonmininterfaces.la \
+         Heuristics/libbonheuristics.la
+
+
+# This is for libtool
+libbonmin_la_LDFLAGS = $(LT_LDFLAGS)
+
+########################################################################
+#                         amplbonmin library                           #
+########################################################################
+
+# List all source files, including headers
+libbonminampl_la_SOURCES = 
+
+# Dummy C++ source to cause C++ linking
+nodist_EXTRA_libbonminampl_la_SOURCES = dummy.cpp 
+
+# List all additionally required libraries
+libbonminampl_la_LIBADD = $(libbonminampl_la_DEPENDENCIES) \
+	$(am__append_3)
+
+# List all dependency libraries
+libbonminampl_la_DEPENDENCIES = ../Algorithms/Ampl/libbonamplsetup.la \
+	../Interfaces/Ampl/libbonamplinterface.la $(am__append_4)
+
+# This is for libtool
+libbonminampl_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/QuadCuts` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Filter` \
+	$(BONMINLIB_CFLAGS)
+
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+     BonCbcNlpStrategy.hpp \
+     BonCbc.hpp \
+     BonBabInfos.hpp \
+     BonCbcNode.hpp \
+     BonDiver.hpp \
+     BonGuessHeuristic.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonCbc.cppbak BonCbc.hppbak \
+	BonCbcNlpStrategy.cppbak BonCbcNlpStrategy.hppbak \
+	BonCbcNode.cppbak BonCbcNode.hppbak \
+        BonBabInfos.cppbak BonBabInfos.hppbak \
+	BonGuessHeuristic.cppbak BonGuessHeuristic.hppbak \
+	BonDiver.cppbak BonDiver.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+DISTCLEANFILES = \
+	CbcCompareUser.cpp CbcBranchUser.cpp
+
+SUFFIXES = .cppbak .hppbak
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/CbcBonmin/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/CbcBonmin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonmin.la: $(libbonmin_la_OBJECTS) $(libbonmin_la_DEPENDENCIES) 
+	$(CXXLINK) -rpath $(libdir) $(libbonmin_la_LDFLAGS) $(libbonmin_la_OBJECTS) $(libbonmin_la_LIBADD) $(LIBS)
+libbonminampl.la: $(libbonminampl_la_OBJECTS) $(libbonminampl_la_DEPENDENCIES) 
+	$(CXXLINK) $(am_libbonminampl_la_rpath) $(libbonminampl_la_LDFLAGS) $(libbonminampl_la_OBJECTS) $(libbonminampl_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonBabInfos.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonCbc.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonCbcNlpStrategy.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonCbcNode.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonDiver.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonGuessHeuristic.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dummy.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am \
+	uninstall-libLTLIBRARIES
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am \
+	install-includecoinHEADERS install-info install-info-am \
+	install-libLTLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-includecoinHEADERS uninstall-info-am \
+	uninstall-libLTLIBRARIES
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/CbcBonmin/bonminamplinterface-uninstalled.pc.in b/src/CbcBonmin/bonminamplinterface-uninstalled.pc.in
new file mode 100644
index 0000000..6c04ff4
--- /dev/null
+++ b/src/CbcBonmin/bonminamplinterface-uninstalled.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+libdir=@ABSBUILDDIR@/src/CbcBonmin
+
+Name: BonminTMINLP
+Description: Ampl Interface to Bonmin
+URL: https://projects.coin-or.org/Bonmin
+Version: @PACKAGE_VERSION@
+Libs: ${libdir}/libbonminampl.la @BONMINAMPLINTERFACELIB_PCLIBS@
+Cflags: -I at abs_source_dir@/src/Interfaces/Ampl -I at abs_source_dir@/src/Algorithms/Ampl
+Requires: bonmin @BONMINAMPLINTERFACELIB_PCREQUIRES@
diff --git a/src/CbcBonmin/bonminamplinterface.pc.in b/src/CbcBonmin/bonminamplinterface.pc.in
new file mode 100644
index 0000000..0f794b5
--- /dev/null
+++ b/src/CbcBonmin/bonminamplinterface.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/coin
+
+Name: BonminTMINLP
+Description: Ampl Interface to Bonmin
+URL: https://projects.coin-or.org/Bonmin
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lbonminampl @BONMINAMPLINTERFACELIB_PCLIBS@
+Cflags: -I${includedir}
+Requires: bonmin @BONMINAMPLINTERFACELIB_PCREQUIRES@
diff --git a/src/Interfaces/Ampl/BonAmplInterface.cpp b/src/Interfaces/Ampl/BonAmplInterface.cpp
new file mode 100644
index 0000000..4f34a67
--- /dev/null
+++ b/src/Interfaces/Ampl/BonAmplInterface.cpp
@@ -0,0 +1,132 @@
+// (C) Copyright International Business Machines Corporation and
+// Carnegie Mellon University 2004, 2007
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 12/01/2004
+
+#include "BonminConfig.h"
+
+#include "BonAmplInterface.hpp"
+#include "BonIpoptSolver.hpp"
+#include "BonColReader.hpp"
+#ifdef COIN_HAS_FILTERSQP
+# include "BonFilterSolver.hpp"
+#endif
+#include <string>
+#include <sstream>
+
+#include "BonTNLP2FPNLP.hpp"
+
+namespace Bonmin
+{
+  /** Default constructor no initialization*/
+  AmplInterface::AmplInterface():
+      OsiTMINLPInterface(), amplTminlp_(NULL)
+  {}
+
+  /** Copy constructor */
+  AmplInterface::AmplInterface(const AmplInterface &other):
+      OsiTMINLPInterface(other), amplTminlp_(NULL)
+  {
+    amplTminlp_ = dynamic_cast<Bonmin::AmplTMINLP *> (GetRawPtr(tminlp_));
+  }
+/// Clone
+  OsiSolverInterface *
+  AmplInterface::clone(bool CopyData )
+  {
+    return new AmplInterface(*this);
+  }
+
+///Destructor
+  AmplInterface::~AmplInterface()
+  {
+    amplTminlp_ = NULL;
+  }
+
+
+  void AmplInterface::readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+      Ipopt::SmartPtr<Ipopt::OptionsList> options,
+      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+      std::string* nl_file_content /* = NULL*/
+                                    )
+  {
+    if (!IsValid(app_)) {
+      createApplication(roptions, options, journalist, "bonmin.");
+    }
+    // set the default options... expect_infeasible, etc...
+    if (!IsValid(tminlp_)) {
+      amplTminlp_ = new AmplTMINLP(Ipopt::ConstPtr(app_->journalist()), app_->roptions(), app_->options(), argv,
+          NULL, appName() , nl_file_content);
+      tminlp_ = GetRawPtr(amplTminlp_);
+    }
+    else {
+      AmplTMINLP * amplTMINLP = dynamic_cast<AmplTMINLP *> (GetRawPtr(tminlp_));
+      if (amplTMINLP) {
+        AmplTMINLP * newAmpl = amplTMINLP->createEmpty();
+        newAmpl->Initialize(ConstPtr(app_->journalist()), app_->roptions(), app_->options(), argv,
+            NULL, appName() , nl_file_content);
+        amplTminlp_ = newAmpl;
+        tminlp_ = GetRawPtr(amplTminlp_);
+      }
+      else {
+        amplTminlp_ = new AmplTMINLP(ConstPtr(app_->journalist()), app_->roptions(), app_->options(), argv,
+            NULL, appName() , nl_file_content);
+        tminlp_ = GetRawPtr(amplTminlp_);
+      }
+    }
+    problem_ = new TMINLP2TNLP(tminlp_);
+    feasibilityProblem_ = new TNLP2FPNLP
+        (Ipopt::SmartPtr<Ipopt::TNLP>(Ipopt::GetRawPtr(problem_)));
+  if(feasibility_mode_){
+    problem_to_optimize_ = GetRawPtr(feasibilityProblem_);
+  }
+  else {
+    problem_to_optimize_ = GetRawPtr(problem_);
+  }
+
+    int numcols = getNumCols();
+    if (obj_)
+      delete [] obj_;
+    obj_ = new double[numcols];
+    CoinFillN(obj_,numcols,1.);
+    setStrParam(OsiProbName, std::string(argv[1]));
+    extractInterfaceParams();
+    hasBeenOptimized_ = false;
+    //Read columns and row names if they exists
+    readNames();
+  }
+
+  void
+  AmplInterface::setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options)
+{}
+
+
+  void
+  AmplInterface::readNames()
+  {
+    std::string probName;
+    getStrParam(OsiProbName, probName);
+    NamesReader colRead(probName, ".col");
+    if (colRead.readFile()) {
+      OsiNameVec colNames;
+      colRead.copyNames(colNames);
+      setColNames(colNames, 0, static_cast<int>(colNames.size()), 0);
+    }
+
+    NamesReader rowRead(probName, ".row");
+    if (rowRead.readFile()) {
+      OsiNameVec rowNames;
+      rowRead.copyNames(rowNames);
+      setRowNames(rowNames, 0, static_cast<int>(rowNames.size()), 0);
+    }
+
+
+  }
+
+} /* end namespace Bonmin. */
diff --git a/src/Interfaces/Ampl/BonAmplInterface.hpp b/src/Interfaces/Ampl/BonAmplInterface.hpp
new file mode 100644
index 0000000..e2023ba
--- /dev/null
+++ b/src/Interfaces/Ampl/BonAmplInterface.hpp
@@ -0,0 +1,64 @@
+// (C) Copyright International Business Machines Corporation and
+// Carnegie Mellon University 2004, 2007
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 12/01/2004
+
+#ifndef BonminAmplInterface_H
+#define BonminAmplInterface_H
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonAmplTMINLP.hpp"
+
+class BM_lp;
+namespace Bonmin
+{
+  /** Class for providing an Osi interface to Ipopt with an ampl nl file as input. */
+  class AmplInterface: public OsiTMINLPInterface
+  {
+  public:
+    /** Default constructor */
+    /** Default constructor only available for Bonmin's friends and child classes.*/
+    AmplInterface();
+    /**@name Methods to input a problem */
+    //@{
+    virtual void readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+        std::string* nl_file_content  = NULL);
+    //@}
+    /** Copy constructor */
+    AmplInterface(const AmplInterface &other);
+    /// Clone
+    virtual OsiSolverInterface * clone(bool CopyData = true);
+
+    /// Destructor
+    virtual ~AmplInterface();
+
+
+    /** Fast access to AmplTMINLP */
+    const AmplTMINLP * amplModel() const
+    {
+      return GetRawPtr(amplTminlp_);
+    }
+    /** To set some application specific defaults. */
+    virtual void setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options);
+
+  protected:
+    /** Read variables and row names in .col and .row files.*/
+    void readNames() ;
+
+    /** TMINLP problem (the original problem usually an AmplTMINLP).*/
+    Ipopt::SmartPtr<Bonmin::AmplTMINLP> amplTminlp_;
+
+  private:
+    /** Write the ampl solution file or write a bonmin one?*/
+    int writeAmplSolFile_;
+  };
+}
+#endif
diff --git a/src/Interfaces/Ampl/BonAmplTMINLP.cpp b/src/Interfaces/Ampl/BonAmplTMINLP.cpp
new file mode 100644
index 0000000..e956c1e
--- /dev/null
+++ b/src/Interfaces/Ampl/BonAmplTMINLP.cpp
@@ -0,0 +1,865 @@
+// (C) Copyright International Business Machines Corporation and
+// Carnegie Mellon University 2004-2011
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Carl D. Laird, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 12/01/2004
+#include "IpBlas.hpp"
+
+#include <list>
+
+#include "AmplTNLP.hpp"
+#include "BonAmplTMINLP.hpp"
+#include <iostream>
+#include <fstream>
+
+#include "CoinHelperFunctions.hpp"
+#include "BonExitCodes.hpp"
+
+using namespace Ipopt;
+
+namespace Bonmin{
+  void 
+  RegisteredOptions::fillAmplOptionList(ExtraCategoriesInfo which, Ipopt::AmplOptionsList * amplOptList){
+      std::list<int> test;
+      std::list< Ipopt::RegisteredOption * > options;
+      chooseOptions(which, options);
+      for(std::list< Ipopt::RegisteredOption * >::iterator i = options.begin();
+           i != options.end() ; i++)
+       {
+           std::string name = "bonmin.";
+           name += (*i)->Name();
+           Ipopt::RegisteredOptionType T = (*i)->Type();
+           Ipopt::AmplOptionsList::AmplOptionType  type;
+           switch(T){
+             case Ipopt::OT_Number: type = Ipopt::AmplOptionsList::Number_Option;
+                  break;
+             case Ipopt::OT_Integer: type = Ipopt::AmplOptionsList::Integer_Option;
+                  break;
+             case Ipopt::OT_String: type = Ipopt::AmplOptionsList::String_Option;
+                  break;
+             case Ipopt::OT_Unknown:
+             default:
+                throw CoinError("RegisteredOptions","fillAmplOptionList","Unknown option type");
+           }
+           amplOptList->AddAmplOption(name, name, type, (*i)->ShortDescription());
+       }
+}
+}
+#include "asl.h"
+#include "asl_pfgh.h"
+#include "getstub.h"
+
+namespace ampl_utils
+{
+  void sos_kludge(int nsos, int *sosbeg, double *sosref);
+}
+namespace Bonmin
+{
+
+  AmplTMINLP::AmplTMINLP()
+      :
+      TMINLP(),
+      appName_(),
+      upperBoundingObj_(-1),
+      ampl_tnlp_(NULL),
+      branch_(),
+      sos_(),
+      suffix_handler_(NULL),
+      constraintsConvexities_(NULL),
+      numberNonConvex_(0),
+      nonConvexConstraintsAndRelaxations_(NULL),
+      numberSimpleConcave_(0),
+      simpleConcaves_(NULL),
+      hasLinearObjective_(false)
+  {}
+
+
+  AmplTMINLP::AmplTMINLP(const SmartPtr<const Journalist>& jnlst,
+      const SmartPtr<Bonmin::RegisteredOptions> roptions,
+      const SmartPtr<OptionsList> options,
+      char**& argv,
+      AmplSuffixHandler* suffix_handler /*=NULL*/,
+      const std::string& appName,
+      std::string* nl_file_content /* = NULL */
+                        )
+      :
+      TMINLP(),
+      appName_(),
+      upperBoundingObj_(-1),
+      ampl_tnlp_(NULL),
+      branch_(),
+      sos_(),
+      suffix_handler_(NULL),
+      constraintsConvexities_(NULL),
+      numberNonConvex_(0),
+      nonConvexConstraintsAndRelaxations_(NULL),
+      numberSimpleConcave_(0),
+      simpleConcaves_(NULL),
+      hasLinearObjective_(false)
+  {
+    Initialize(jnlst, roptions, options, argv, suffix_handler, appName, nl_file_content);
+  }
+
+  void
+  AmplTMINLP::Initialize(const SmartPtr<const Journalist>& jnlst,
+      const SmartPtr<Bonmin::RegisteredOptions> roptions,
+      const SmartPtr<OptionsList> options,
+      char**& argv,
+      AmplSuffixHandler* suffix_handler /*=NULL*/,
+      const std::string& appName,
+      std::string* nl_file_content /* = NULL */
+                        )
+  {
+    appName_ = appName;
+    options->GetEnumValue("file_solution",writeAmplSolFile_,"bonmin.");
+    jnlst_ = jnlst;
+
+    if (suffix_handler==NULL)
+      suffix_handler_ = suffix_handler = new AmplSuffixHandler();
+
+    // Add the suffix handler for scaling
+    suffix_handler->AddAvailableSuffix("scaling_factor", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("scaling_factor", AmplSuffixHandler::Constraint_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("scaling_factor", AmplSuffixHandler::Objective_Source, AmplSuffixHandler::Number_Type);
+
+    // Modified for warm-start from AMPL
+    suffix_handler->AddAvailableSuffix("ipopt_zL_out", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("ipopt_zU_out", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("ipopt_zL_in", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("ipopt_zU_in", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+
+    // priority suffix
+    suffix_handler->AddAvailableSuffix("priority", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Index_Type);
+    suffix_handler->AddAvailableSuffix("direction", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("downPseudocost", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("upPseudocost", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+
+
+
+    // sos suffixes
+    suffix_handler->AddAvailableSuffix("ref", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("sos",AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Index_Type);
+    suffix_handler->AddAvailableSuffix("sos",AmplSuffixHandler::Constraint_Source, AmplSuffixHandler::Index_Type);
+    suffix_handler->AddAvailableSuffix("sosno",AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("sosref",AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+    suffix_handler->AddAvailableSuffix("sstatus", AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Index_Type);
+    suffix_handler->AddAvailableSuffix("sstatus", AmplSuffixHandler::Constraint_Source, AmplSuffixHandler::Index_Type);
+
+
+    // For marking convex/nonconvex constraints
+    suffix_handler->AddAvailableSuffix("non_conv",AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Index_Type);
+    suffix_handler->AddAvailableSuffix("primary_var",AmplSuffixHandler::Constraint_Source, AmplSuffixHandler::Index_Type);
+
+    // For marking onoff constraints and indicator variables
+    suffix_handler->AddAvailableSuffix("onoff_c",AmplSuffixHandler::Constraint_Source, AmplSuffixHandler::Index_Type);
+    suffix_handler->AddAvailableSuffix("onoff_v",AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Index_Type);
+
+    // For objectives
+    suffix_handler->AddAvailableSuffix("UBObj", AmplSuffixHandler::Objective_Source, AmplSuffixHandler::Index_Type);
+
+
+    // Perturbation radius
+    suffix_handler->AddAvailableSuffix("perturb_radius",AmplSuffixHandler::Variable_Source, AmplSuffixHandler::Number_Type);
+
+    SmartPtr<AmplOptionsList> ampl_options_list = new AmplOptionsList();
+    roptions->fillAmplOptionList(RegisteredOptions::BonminCategory, GetRawPtr(ampl_options_list));
+    roptions->fillAmplOptionList(RegisteredOptions::FilterCategory, GetRawPtr(ampl_options_list));
+    roptions->fillAmplOptionList(RegisteredOptions::BqpdCategory, GetRawPtr(ampl_options_list));
+    fillApplicationOptions(GetRawPtr(ampl_options_list) );
+    std::string options_id = appName + "_options";
+    ampl_tnlp_ = new AmplTNLP(jnlst, options, argv, suffix_handler, true,
+        ampl_options_list, options_id.c_str(),
+        appName.c_str(), appName.c_str(), nl_file_content);
+
+
+    /* Read suffixes */
+    read_obj_suffixes();
+    read_priorities();
+    read_convexities();
+    read_onoff();
+    read_sos();
+
+
+    /* Determine if objective is linear.*/
+    Index n_non_linear_b= 0;
+    Index n_non_linear_bi= 0;
+    Index n_non_linear_c= 0;
+    Index n_non_linear_ci = 0;
+    Index n_non_linear_o= 0;
+    Index n_non_linear_oi = 0;
+    Index n_binaries = 0;
+    Index n_integers = 0;
+    ampl_tnlp_->get_discrete_info(n_non_linear_b, n_non_linear_bi, n_non_linear_c,
+        n_non_linear_ci, n_non_linear_o, n_non_linear_oi,
+        n_binaries, n_integers);
+    if (n_non_linear_b == 0 && n_non_linear_o == 0) {
+      hasLinearObjective_ = true;
+    }
+  }
+
+  AmplTMINLP::~AmplTMINLP()
+  {
+    delete [] constraintsConvexities_;
+    delete [] simpleConcaves_;
+    delete [] nonConvexConstraintsAndRelaxations_;
+    delete ampl_tnlp_;
+  }
+
+  void
+  AmplTMINLP::read_priorities()
+  {
+    int numcols, m, dummy1, dummy2;
+    TNLP::IndexStyleEnum index_style;
+    ampl_tnlp_->get_nlp_info(numcols, m, dummy1, dummy2, index_style);
+
+    const AmplSuffixHandler * suffix_handler = GetRawPtr(suffix_handler_);
+
+    const Index* pri = suffix_handler->GetIntegerSuffixValues("priority", AmplSuffixHandler::Variable_Source);
+    const Index* brac = suffix_handler->GetIntegerSuffixValues("direction", AmplSuffixHandler::Variable_Source);
+    const Number* upPs = suffix_handler->GetNumberSuffixValues("upPseudocost", AmplSuffixHandler::Variable_Source);
+    const Number* dwPs = suffix_handler->GetNumberSuffixValues("downPseudocost", AmplSuffixHandler::Variable_Source);
+
+
+    branch_.gutsOfDestructor();
+    branch_.size = numcols;
+    if (pri) {
+      branch_.priorities = new int[numcols];
+      for (int i = 0 ; i < numcols ; i++) {
+        branch_.priorities [i] = -pri[i] + 9999;
+      }
+    }
+    if (brac) {
+      branch_.branchingDirections = CoinCopyOfArray(brac,numcols);
+    }
+    if (upPs && !dwPs) dwPs = upPs;
+    else if (dwPs && !upPs) upPs = dwPs;
+
+    if (upPs) {
+      branch_.upPsCosts = CoinCopyOfArray(upPs,numcols);
+    }
+    if (dwPs) {
+      branch_.downPsCosts = CoinCopyOfArray(dwPs,numcols);
+    }
+
+    const double* perturb_radius =
+      suffix_handler->GetNumberSuffixValues("perturb_radius", AmplSuffixHandler::Variable_Source);
+    perturb_info_.SetPerturbationArray(numcols, perturb_radius);
+  }
+
+  void
+  AmplTMINLP::read_sos()
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+    int i = 0;//ASL_suf_sos_explict_free;
+    int copri[2], **p_sospri;
+    copri[0] = 0;
+    copri[1] = 0;
+    int * starts = NULL;
+    int * indices = NULL;
+    char * types = NULL;
+    double * weights = NULL;
+    int * priorities = NULL;
+    p_sospri = &priorities;
+
+    sos_.gutsOfDestructor();
+    int m = n_con;
+    sos_.num = suf_sos(i, &sos_.numNz, &types, p_sospri, copri,
+        &starts, &indices, &weights);
+    if(m != n_con){
+      throw CoinError("number of constraints changed by suf_sos. Not supported.",
+                       "read_sos","Bonmin::AmplTMINLP");
+   }
+    if (sos_.num) {
+      //Copy sos information
+      sos_.priorities = CoinCopyOfArray(priorities,sos_.num);
+      sos_.starts = CoinCopyOfArray(starts, sos_.num + 1);
+      sos_.indices = CoinCopyOfArray(indices, sos_.numNz);
+      sos_.types = CoinCopyOfArray(types, sos_.num);
+      sos_.weights = CoinCopyOfArray(weights, sos_.numNz);
+
+      ampl_utils::sos_kludge(sos_.num, sos_.starts, sos_.weights);
+      for (int ii=0;ii<sos_.num;ii++) {
+        int ichar = sos_.types[ii] - '0';
+        if (ichar != 1 && ichar != 2) {
+          std::cerr<<"Unsuported type of sos constraint: "<<sos_.types[ii]<<std::endl;
+          throw;
+        }
+        sos_.types[ii]= static_cast<char>(ichar);
+      }
+    }
+  }
+
+  void
+  AmplTMINLP::read_obj_suffixes()
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+    DBG_ASSERT(asl);
+    //Get the values
+    if (n_obj < 2) return;
+
+    const AmplSuffixHandler * suffix_handler = GetRawPtr(suffix_handler_);
+
+    const Index* UBObj = suffix_handler->GetIntegerSuffixValues("UBObj", AmplSuffixHandler::Objective_Source);
+    if (UBObj) {
+      //get index of lower bounding objective
+      int lowerBoundingObj = (UBObj[0] == 1)? 1:0;
+      // Pass information to Ipopt
+      ampl_tnlp_->set_active_objective(lowerBoundingObj);
+
+      //get the index of upper bounding objective
+      for (int i = 0; i < n_obj; i++) {
+        if (UBObj[i]==1) {
+          if (upperBoundingObj_ != -1) {
+            jnlst_->Printf(J_ERROR, J_MAIN,
+                "Too many objectives for upper-bounding");
+          }
+          upperBoundingObj_ = i;
+        }
+      }
+    }
+    else {
+      ampl_tnlp_->set_active_objective(0);
+    }
+  }
+  /** To store all data stored in the nonconvex suffixes.*/
+  struct NonConvexSuff
+  {
+    /** Default constructor.*/
+    NonConvexSuff():
+        cIdx(-1),relIdx(-1),scXIdx(-1),scYIdx(-1)
+    {}
+    /** Copy constructor.*/
+    NonConvexSuff(const NonConvexSuff& other):
+        cIdx(other.cIdx), relIdx(other.relIdx),
+        scXIdx(other.scXIdx), scYIdx(other.scYIdx)
+    {}
+    /** Index of the nonconvex constraint.*/
+    int cIdx;
+    /** Index of its relaxation.*/
+    int relIdx;
+    /** Index of variable x in a simple concave constraint of type y >= F(x).*/
+    int scXIdx;
+    /** Index of variable y in a simple concave constraint of type y >= F(x).*/
+    int scYIdx;
+  };
+  void AmplTMINLP::read_convexities()
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+    DBG_ASSERT(asl);
+
+    const AmplSuffixHandler * suffix_handler = GetRawPtr(suffix_handler_);
+    const Index * id = suffix_handler->GetIntegerSuffixValues("non_conv", AmplSuffixHandler::Variable_Source);
+    const Index * primary_var = suffix_handler->GetIntegerSuffixValues("primary_var", AmplSuffixHandler::Constraint_Source);
+
+
+    if (primary_var!= NULL) {
+      if (constraintsConvexities_ != NULL) {
+        delete [] constraintsConvexities_;
+      }
+      constraintsConvexities_ = new TMINLP::Convexity[n_con];
+      if (id == NULL) {
+        std::cerr<<"Incorrect suffixes description in ampl model. n_conv's are not declared "<<std::endl;
+        exit(ERROR_IN_AMPL_SUFFIXES);
+      }
+      int numberSimpleConcave = 0;
+      std::map<int, int> id_map;
+
+      for (int i = 0 ; i < n_var ; i++) {
+        id_map[id[i]] = i;
+      }
+
+
+      for (int i = 0 ; i < n_con ; i++) {
+        if (primary_var[i] != 0) {
+          constraintsConvexities_[i] = TMINLP::SimpleConcave;
+          numberSimpleConcave++;
+        }
+        else constraintsConvexities_[i] = TMINLP::Convex;
+      }
+      simpleConcaves_ = new SimpleConcaveConstraint[numberSimpleConcave];
+      nonConvexConstraintsAndRelaxations_ = new MarkedNonConvex[numberSimpleConcave];
+      numberSimpleConcave = 0;
+      int * jCol = new int[n_var];
+      for (int i = 0 ; i < n_con ; i++) {
+        if (primary_var[i] != 0) {
+          nonConvexConstraintsAndRelaxations_[numberSimpleConcave].cIdx = i;
+          nonConvexConstraintsAndRelaxations_[numberSimpleConcave].cRelaxIdx = -1;
+          simpleConcaves_[numberSimpleConcave].cIdx = i;
+          simpleConcaves_[numberSimpleConcave].yIdx = id_map[primary_var[i]];
+
+          //Now get gradient of i to get xIdx.
+          int nnz;
+          int & yIdx = simpleConcaves_[numberSimpleConcave].yIdx;
+          int & xIdx = simpleConcaves_[numberSimpleConcave].xIdx;
+          eval_grad_gi(n_var, NULL, false, i, nnz, jCol, NULL);
+          if (nnz != 2) {//Error in ampl model
+            std::cout<<"Incorrect suffixes description in ampl model. Constraint with id "
+            <<id<<" is simple concave and should have only two nonzero elements"<<std::endl;
+            exit(ERROR_IN_AMPL_SUFFIXES);
+          }
+          if (jCol[0] - 1== yIdx) {
+            xIdx = jCol[1] - 1;
+          }
+          else {
+            if (jCol[1] - 1!= yIdx) {//Error in ampl model
+              std::cout<<"Incorrect suffixes description in ampl model. Constraint with id "
+              <<id<<" : variable marked as y does not appear in the constraint."<<std::endl;
+              exit(ERROR_IN_AMPL_SUFFIXES);
+            }
+            xIdx = jCol[0] - 1;
+          }
+          numberSimpleConcave++;
+        }
+      }
+      delete [] jCol;
+      numberSimpleConcave_ = numberSimpleConcave;
+      numberNonConvex_ = numberSimpleConcave;
+    }
+
+  }
+
+
+  void AmplTMINLP::read_onoff()
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+    DBG_ASSERT(asl);
+
+    const AmplSuffixHandler * suffix_handler = GetRawPtr(suffix_handler_);
+    const Index * onoff_c = suffix_handler->GetIntegerSuffixValues("onoff_c", AmplSuffixHandler::Constraint_Source);
+    const Index * onoff_v = suffix_handler->GetIntegerSuffixValues("onoff_v", AmplSuffixHandler::Variable_Source);
+
+    if(onoff_c == NULL && onoff_v == NULL){//No suffixes
+      return;
+    } 
+    if(onoff_c == NULL || onoff_v == NULL){// If one in non-null both should be
+        std::cerr<<"Incorrect suffixes description in ampl model.  One of per_v or per_c is declared but not the other."<<std::endl;
+        exit(ERROR_IN_AMPL_SUFFIXES);
+    } 
+
+    c_extra_id_.clear();
+    c_extra_id_.resize(n_con, -1);
+    std::map<int, int> id_map;
+
+      for (int i = 0 ; i < n_var ; i++) {
+        if(onoff_v[i] > 0)
+          id_map[onoff_v[i]] = i;
+      }
+
+      for (int i = 0 ; i < n_con ; i++) {
+        if(onoff_c[i] > 0){
+          std::map<int, int >::iterator k = id_map.find(onoff_c[i]);
+          if(k != id_map.end()){
+            c_extra_id_[i] = (*k).second;
+          }
+          else{
+            std::cerr<<"Incorrect suffixes description in ampl model. onoff_c has value attributed to no variable "<<std::endl;
+            exit(ERROR_IN_AMPL_SUFFIXES);
+          }
+        }
+      }
+   }
+
+  bool AmplTMINLP::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g, Index& nnz_h_lag, TNLP::IndexStyleEnum& index_style)
+  {
+    return ampl_tnlp_->get_nlp_info(n, m, nnz_jac_g, nnz_h_lag, index_style);
+  }
+
+  bool AmplTMINLP::get_variables_types(Index n, VariableType* var_types)
+  {
+    // The variables are sorted by type in AMPL, so all we need to
+    // know are the counts of each type.
+
+
+    Index n_non_linear_b= 0;
+    Index n_non_linear_bi= 0;
+    Index n_non_linear_c= 0;
+    Index n_non_linear_ci = 0;
+    Index n_non_linear_o= 0;
+    Index n_non_linear_oi = 0;
+    Index n_binaries = 0;
+    Index n_integers = 0;
+    ampl_tnlp_->get_discrete_info(n_non_linear_b, n_non_linear_bi, n_non_linear_c,
+        n_non_linear_ci, n_non_linear_o, n_non_linear_oi,
+        n_binaries, n_integers);
+    int totalNumberOfNonContinuous = 0;
+
+
+    //begin with variables non-linear both in the objective function and in some constraints
+    // The first ones are continuous
+    Index start = 0;
+    Index end = n_non_linear_b - n_non_linear_bi;
+    for (int i=start; i<end; i++) {
+      var_types[i] = CONTINUOUS;
+    }
+
+    // The second ones are integers
+    start = end;
+    end = start + n_non_linear_bi;
+    for (int i=start; i < end; i++) {
+      var_types[i] = INTEGER;
+      totalNumberOfNonContinuous++;
+    }
+    //next variables non-linear in some constraints
+    // The first ones are continuous
+    start = end;
+    end = std::max(start,end + n_non_linear_c - n_non_linear_ci - n_non_linear_b);
+    for (int i=start; i<end; i++) {
+      var_types[i] = CONTINUOUS;
+    }
+
+    // The second ones are integers
+    start = end;
+    end = start + n_non_linear_ci;
+    for (int i=start; i < end; i++) {
+      var_types[i] = INTEGER;
+      totalNumberOfNonContinuous++;
+    }
+
+    //next variables non-linear in the objective function
+    // The first ones are continuous
+    start = end;
+    end = std::max(start,end + n_non_linear_o - std::max(n_non_linear_b, n_non_linear_c) - n_non_linear_oi);
+    for (int i=start; i<end; i++) {
+      var_types[i] = CONTINUOUS;
+    }
+
+    // The second ones are integers
+    start = end;
+    end = start + n_non_linear_oi;
+    for (int i=start; i < end; i++) {
+      var_types[i] = INTEGER;
+      totalNumberOfNonContinuous++;
+    }
+
+    //At last the linear variables
+    // The first ones are continuous
+    start = end;
+    end = n - n_binaries - n_integers;
+    for (int i=start; i<end; i++) {
+      var_types[i] = CONTINUOUS;
+    }
+
+    // The second ones are binaries
+    start = end;
+    end = start + n_binaries;
+    for (int i=start; i < end; i++) {
+      var_types[i] = BINARY;
+      totalNumberOfNonContinuous++;
+    }
+
+    // The third ones are integers
+    start = end;
+    end = start + n_integers;
+    for (int i=start; i < end; i++) {
+      var_types[i] = INTEGER;
+      totalNumberOfNonContinuous++;
+    }
+    return true;
+  }
+
+  bool AmplTMINLP::get_variables_linearity(Index n, Ipopt::TNLP::LinearityType* var_types)
+  {
+    // The variables are sorted by type in AMPL, so all we need to
+    // know are the counts of each type.
+
+
+    Index n_non_linear_b= 0;
+    Index n_non_linear_bi= 0;
+    Index n_non_linear_c= 0;
+    Index n_non_linear_ci = 0;
+    Index n_non_linear_o= 0;
+    Index n_non_linear_oi = 0;
+    Index n_binaries = 0;
+    Index n_integers = 0;
+    ampl_tnlp_->get_discrete_info(n_non_linear_b, n_non_linear_bi, n_non_linear_c,
+        n_non_linear_ci, n_non_linear_o, n_non_linear_oi,
+        n_binaries, n_integers);
+
+    //Compute the number of non linear variables:
+    int n_non_linear = std::max(n_non_linear_c, n_non_linear_o);//n_non_linear_c + n_non_linear_o - n_non_linear_b;
+
+    //printf("n_non_linear_c %i n_non_linear_o %i n_non_linear_b %i\n", n_non_linear_c, n_non_linear_o, n_non_linear_b);
+
+    int start = 0;
+    int end = n_non_linear;
+    for (int i=start; i<end; i++) {
+      var_types[i] = Ipopt::TNLP::NON_LINEAR;
+    }
+
+    //At last the linear variables
+    // The first ones are continuous
+    start = end;
+    end = n;
+    for (int i=start; i<end; i++) {
+      var_types[i] = Ipopt::TNLP::LINEAR;
+    }
+    return true;
+  }
+
+  /** Returns the constraint linearity.
+  * array should be alocated with length at least n.*/
+  bool
+  AmplTMINLP::get_constraints_linearity(Index m,
+      Ipopt::TNLP::LinearityType* const_types)
+  {
+    return ampl_tnlp_->get_constraints_linearity(m, const_types);
+  }
+
+  bool AmplTMINLP::get_bounds_info(Index n, Number* x_l, Number* x_u,
+      Index m, Number* g_l, Number* g_u)
+  {
+    return ampl_tnlp_->get_bounds_info(n, x_l, x_u, m, g_l, g_u);
+  }
+
+  bool AmplTMINLP::get_starting_point(Index n, bool init_x, Number* x,
+      bool init_z, Number* z_L, Number* z_U,
+      Index m, bool init_lambda, Number* lambda)
+  {
+    return ampl_tnlp_->get_starting_point(n, init_x, x,
+        init_z, z_L, z_U,
+        m, init_lambda, lambda);
+  }
+
+  bool AmplTMINLP::eval_f(Index n, const Number* x, bool new_x, Number& obj_value)
+  {
+    return ampl_tnlp_->eval_f(n, x, new_x, obj_value);
+  }
+
+  bool AmplTMINLP::eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f)
+  {
+    return ampl_tnlp_->eval_grad_f(n, x, new_x, grad_f);
+  }
+
+  bool AmplTMINLP::eval_g(Index n, const Number* x, bool new_x, Index m, Number* g)
+  {
+    return ampl_tnlp_->eval_g(n, x, new_x, m, g);
+  }
+
+  bool AmplTMINLP::eval_jac_g(Index n, const Number* x, bool new_x,
+      Index m, Index nele_jac, Index* iRow,
+      Index *jCol, Number* values)
+  {
+    return ampl_tnlp_->eval_jac_g(n, x, new_x,
+        m, nele_jac, iRow, jCol,
+        values);
+  }
+
+  bool AmplTMINLP::eval_h(Index n, const Number* x, bool new_x,
+      Number obj_factor, Index m, const Number* lambda,
+      bool new_lambda, Index nele_hess, Index* iRow,
+      Index* jCol, Number* values)
+  {
+    return ampl_tnlp_->eval_h(n, x, new_x, obj_factor,
+        m, lambda, new_lambda, nele_hess, iRow,
+        jCol, values);
+  }
+
+  bool AmplTMINLP::eval_gi(Index n, const Number* x, bool new_x,
+      Index i, Number& gi)
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+
+    // ignore new_x for now
+    xunknown();
+
+    fint nerror = 0;
+    gi = conival(i, const_cast<real*>(x), &nerror);
+    if (nerror!=0) {
+      return false;
+    }
+    else {
+      return true;
+    }
+  }
+
+  bool AmplTMINLP::eval_grad_gi(Index n, const Number* x, bool new_x,
+      Index i, Index& nele_grad_gi, Index* jCol,
+      Number* values)
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+
+    if (jCol) {
+      // Only compute the number of nonzeros and the indices
+      DBG_ASSERT(!values);
+      nele_grad_gi = 0;
+      for (cgrad* cg=Cgrad[i]; cg; cg = cg->next) {
+        jCol[nele_grad_gi++] = cg->varno + 1;
+      }
+      return true;
+    }
+    DBG_ASSERT(values);
+
+    // ignore new_x for now
+    xunknown();
+
+    asl->i.congrd_mode = 1;
+    fint nerror = 0;
+    congrd(i, const_cast<real*>(x), values, &nerror);
+    if (nerror!=0) {
+      return false;
+    }
+    else {
+      return true;
+    }
+  }
+
+  void AmplTMINLP::finalize_solution(TMINLP::SolverReturn status,
+      Index n, const Number* x, Number obj_value)
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+    std::string message;
+    std::string status_str;
+    if (status == TMINLP::SUCCESS) {
+      status_str = "\t\"Finished\"";
+      message = "\n" + appName_ +": Optimal";
+      solve_result_num = 3;
+    }
+    else if (status == TMINLP::INFEASIBLE) {
+      status_str = "\t\"Finished\"";
+      message = "\n" + appName_ + ": Infeasible problem";
+      solve_result_num = 220;
+    }
+    else if (status == TMINLP::CONTINUOUS_UNBOUNDED) {
+      status_str = "\t\"Finished\"";
+      message = "\n" + appName_ +" Continuous relaxation is unbounded.";
+      solve_result_num = 300;
+    }
+    else if (status == TMINLP::LIMIT_EXCEEDED) {
+      status_str = "\t\"Not finished\"";
+      message = "\n" + appName_ + ": Optimization interrupted on limit.";
+      if(x)
+        solve_result_num = 421; /* Limit reached or user interrupt with integer feasible solution.*/
+      else
+        solve_result_num = 410; /* Limit reached or user interrupt without solution.*/
+    }
+    else if (status == TMINLP::USER_INTERRUPT) {
+      status_str = "\t\"Not finished\"";
+      message = "\n" + appName_ + ": Optimization interrupted by user.";
+      if(x)
+        solve_result_num = 422; /* Limit reached or user interrupt with integer feasible solution.*/
+      else
+        solve_result_num = 411; /* Limit reached or user interrupt without solution.*/
+    }
+    else if (status == TMINLP::MINLP_ERROR) {
+      status_str = "\t\"Aborted\"";
+      message = "\n" + appName_ + ": Error encountered in optimization.";
+      solve_result_num = 500;
+    }
+    if (writeAmplSolFile_) {
+      write_solution(message, x);
+      std::cout<<"\n "<<status_str<<std::endl;
+    }
+    else {
+      std::cout<<status_str<<message<<std::endl;
+      std::string fName = appName_ + ".sol";
+      std::ofstream of(fName.c_str());
+      for (int i = 0 ; i < n ; i++) {
+        of<<i<<"\t"<<x[i]<<std::endl;
+      }
+      of<<"-1\n";
+    }
+  }
+
+  void AmplTMINLP::write_solution(const std::string & message, const Number *x_sol)
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+
+    DBG_ASSERT(asl);
+    //    DBG_ASSERT(x_sol);
+
+    // We need to copy the message into a non-const char array to make
+    // it work with the AMPL C function.
+    char* cmessage = new char[message.length()+1];
+    strcpy(cmessage, message.c_str());
+
+    // In order to avoid casting into non-const, we copy the data here...
+    double* x_sol_copy = NULL;
+    if (x_sol) {
+      x_sol_copy = new double[n_var];
+      for (int i=0; i<n_var; i++) {
+        x_sol_copy[i] = x_sol[i];
+      }
+    }
+    write_sol(cmessage, x_sol_copy, NULL, NULL);
+
+    delete [] x_sol_copy;
+    delete [] cmessage;
+
+  }
+
+
+  /** This methods gives the linear part of the objective function */
+  void AmplTMINLP::getLinearPartOfObjective(double * obj)
+  {
+    Index n, m, nnz_jac_g, nnz_h_lag;
+    TNLP::IndexStyleEnum index_style = TNLP::FORTRAN_STYLE;
+    get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+    eval_grad_f(n, NULL, 0,obj);
+    Index n_non_linear_b= 0;
+    Index n_non_linear_bi= 0;
+    Index n_non_linear_c= 0;
+    Index n_non_linear_ci = 0;
+    Index n_non_linear_o= 0;
+    Index n_non_linear_oi = 0;
+    Index n_binaries = 0;
+    Index n_integers = 0;
+    ampl_tnlp_->get_discrete_info(n_non_linear_b, n_non_linear_bi, n_non_linear_c,
+        n_non_linear_ci, n_non_linear_o, n_non_linear_oi,
+        n_binaries, n_integers);
+
+    // Now get the coefficients of variables wich are linear in the objective
+    // The first ones are not
+    Index start = 0;
+    Index end = n_non_linear_b;
+    for (int i=start; i<end; i++) {
+      obj[i] = 0.;
+    }
+
+    //next variables should be linear in the objective just skip them
+    // (from current end to (end + n_non_linear_c - n_non_linear_ci - n_non_linear_b;)
+
+
+    // Those are nonlinear in the objective
+    start = end + n_non_linear_c;
+    end = start + n_non_linear_o;
+    for (int i=start; i < end; i++) {
+      obj[i]=0.;
+    }
+    //The rest is linear keep the values of the gradient
+  }
+
+
+
+  /** This method to returns the value of an alternative objective function for
+  upper bounding (if one has been declared by using the prefix UBObj).*/
+  bool
+  AmplTMINLP::eval_upper_bound_f(Index n, const Number* x,
+      Number& obj_value)
+  {
+    ASL_pfgh* asl = ampl_tnlp_->AmplSolverObject();
+    //xknown(x);    // This tells ampl to use a new x
+    fint nerror = -1;
+    obj_value = objval(upperBoundingObj_, const_cast<double *>(x), &nerror);
+    if (nerror > 0) {
+      jnlst_->Printf(J_ERROR, J_MAIN,
+          "Error in evaluating upper bounding objecting");
+      throw -1;
+    }
+    return nerror;
+
+  }
+  /** Return the ampl solver object (ASL*) */
+  const ASL_pfgh*
+  AmplTMINLP::AmplSolverObject() const
+  {
+    return ampl_tnlp_->AmplSolverObject();
+  }
+
+} // namespace Bonmin
diff --git a/src/Interfaces/Ampl/BonAmplTMINLP.hpp b/src/Interfaces/Ampl/BonAmplTMINLP.hpp
new file mode 100644
index 0000000..464e543
--- /dev/null
+++ b/src/Interfaces/Ampl/BonAmplTMINLP.hpp
@@ -0,0 +1,332 @@
+// (C) Copyright International Business Machines Corporation and
+// Carnegie Mellon University 2004, 2007
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Carl D. Laird, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 12/01/2004
+
+#ifndef __IPAMPLTMINLP_HPP__
+#define __IPAMPLTMINLP_HPP__
+
+#include "BonTMINLP.hpp"
+#include "IpSmartPtr.hpp"
+#include "CoinPackedMatrix.hpp"
+#include "OsiCuts.hpp"
+#include "BonRegisteredOptions.hpp"
+#include "BonTypes.hpp"
+
+/* non Ipopt forward declaration */
+struct ASL_pfgh;
+struct SufDecl;
+struct SufDesc;
+
+
+// Declarations, so that we don't have to include the Ipopt AMPL headers
+namespace Ipopt
+{
+  class AmplSuffixHandler;
+  class AmplOptionsList;
+  class AmplTNLP;
+}
+
+namespace Bonmin
+{
+
+  /** Ampl MINLP Interface.
+   *  Ampl MINLP Interface, implemented as a TMINLP.
+   *  This interface creates a AmplTNLP and also retrieves
+   *  the information about the binary and integer variables
+   */
+  class AmplTMINLP : public TMINLP
+  {
+  public:
+    /**@name Constructors/Destructors */
+    //@{
+    /** Constructor */
+    AmplTMINLP(const Ipopt::SmartPtr<const Ipopt::Journalist>& jnlst,
+        const Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        const Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        char**& argv,
+        Ipopt::AmplSuffixHandler* suffix_handler = NULL,
+        const std::string& appName = "bonmin",
+        std::string* nl_file_content = NULL);
+
+    virtual void Initialize(const Ipopt::SmartPtr<const Ipopt::Journalist>& jnlst,
+        const Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        const Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        char**& argv,
+        Ipopt::AmplSuffixHandler* suffix_handler =NULL,
+        const std::string& appName = "bonmin",
+        std::string* nl_file_content = NULL);
+
+    /** read the branching priorities from ampl suffixes.*/
+    void read_priorities();
+
+    /** read the sos constraints from ampl suffixes */
+    void read_sos();
+
+    /** Read suffixes which indicate which constraints are convex.*/
+    void read_convexities();
+
+    /** Read suffixes used to apply perspective in OA to some of the constraints.*/
+    void read_onoff();
+
+    /** Read suffixes on objective functions for upper bounding*/
+    void read_obj_suffixes();
+
+    /** Default constructor.*/
+    AmplTMINLP();
+
+    virtual AmplTMINLP * createEmpty()
+    {
+      AmplTMINLP * tminlp = new AmplTMINLP;
+      return tminlp;
+    }
+
+    /** destructor */
+    virtual ~AmplTMINLP();
+    //@}
+
+    /** Return the ampl solver object (ASL*) */
+    const ASL_pfgh* AmplSolverObject() const;
+
+
+    /**@name methods to gather information about the NLP. These
+    * methods are overloaded from TMINLP. See TMINLP for their more
+    * detailed documentation. */
+    //@{
+    /** returns dimensions of the nlp. Overloaded from TMINLP */
+    virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+        Ipopt::Index& nnz_h_lag,
+        Ipopt::TNLP::IndexStyleEnum& index_style);
+
+    /** returns the vector of variable types */
+    virtual bool get_variables_types(Ipopt::Index n, VariableType* var_types);
+
+    /** return the variables linearity (linear or not)*/
+    virtual bool get_variables_linearity(Ipopt::Index n, Ipopt::TNLP::LinearityType * var_types);
+
+    /** Returns the constraint linearity.
+     * array should be alocated with length at least n.*/
+    virtual bool get_constraints_linearity(Ipopt::Index m,
+        Ipopt::TNLP::LinearityType* const_types);
+
+    /** returns bounds of the nlp. Overloaded from TMINLP */
+    virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+        Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
+
+    /** provides a starting point for the nlp variables. Overloaded
+    from TMINLP */
+    virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+        bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+        Ipopt::Index m, bool init_lambda, Ipopt::Number* lambda);
+
+    /** evaluates the objective value for the nlp. Overloaded from TMINLP */
+    virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number& obj_value);
+
+    /** evaluates the gradient of the objective for the
+    nlp. Overloaded from TMINLP */
+    virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number* grad_f);
+
+    /** evaluates the constraint residuals for the nlp. Overloaded from TMINLP */
+    virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Number* g);
+
+    /** specifies the jacobian structure (if values is NULL) and
+     *  evaluates the jacobian values (if values is not NULL) for the
+     *  nlp. Overloaded from TMINLP */
+    virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
+        Ipopt::Index *jCol, Ipopt::Number* values);
+
+    /** specifies the structure of the hessian of the lagrangian (if
+     *  values is NULL) and evaluates the values (if values is not
+     *  NULL). Overloaded from TMINLP */
+    virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+        bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index* iRow,
+        Ipopt::Index* jCol, Ipopt::Number* values);
+
+    /** compute the value of a single constraint */
+    virtual bool eval_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index i, Ipopt::Number& gi);
+    /** compute the structure or values of the gradient for one
+    constraint */
+    virtual bool eval_grad_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index i, Ipopt::Index& nele_grad_gi, Ipopt::Index* jCol,
+        Ipopt::Number* values);
+    //@}
+
+    /** @name Solution Methods */
+    //@{
+    /** Called after optimizing to return results to ampl.
+      * Status code is put into solve_result_num according to the table below.
+      * <table>
+      * <tr> <td> <b> <center> Code </center> </b> </td> <td> <b> <center> Status </center> </b> </td> </tr>
+      * <tr> <td> 3 </td> <td> Integer optimal </td> </tr>
+      * <tr> <td> 220 </td> <td> problem is proven infeasible. </td> </tr>
+      * <tr> <td> 421 </td> <td> limit reached or user interrupt with integer feasible solution found. </td> </tr>
+      * <tr> <td> 410 </td> <td> limit reached or user interrupt without any integer feasible solution. </td> </tr>
+      * <tr> <td> 500 </td> <td> error. </td> </tr>
+      * <caption> Status codes for optimization. </caption>
+      * </table>
+      *    */
+    virtual void finalize_solution(TMINLP::SolverReturn status,
+        Ipopt::Index n, const Ipopt::Number* x, Ipopt::Number obj_value);
+
+    /** Write the solution using ampl's write_sol (called by finalize_solution).*/
+    void write_solution(const std::string & message, const Ipopt::Number *x_sol);
+    //@}
+
+    //@}
+
+
+    virtual const BranchingInfo * branchingInfo() const
+    {
+      return &branch_;
+    }
+
+    virtual const SosInfo * sosConstraints() const
+    {
+      return &sos_;
+    }
+
+    virtual const PerturbInfo* perturbInfo() const
+    {
+      return &perturb_info_;
+    }
+
+    /** @name User callbacks */
+    //@{
+    /** Additional application specific options.*/
+    virtual void fillApplicationOptions(Ipopt::AmplOptionsList* amplOptList)
+    {}
+    //@}
+
+
+    /** This methods gives the linear part of the objective function */
+    virtual void getLinearPartOfObjective(double * obj);
+
+
+    /** Do we have an alternate objective for upper bounding?*/
+    virtual bool hasUpperBoundingObjective()
+    {
+      return upperBoundingObj_ != -1;
+    }
+
+    /** This method to returns the value of an alternative objective function for
+      upper bounding (if one has been declared by using the prefix UBObj).*/
+    virtual bool eval_upper_bound_f(Ipopt::Index n, const Ipopt::Number* x,
+        Ipopt::Number& obj_value);
+
+    /** Get accest to constraint convexities.*/
+    virtual bool get_constraint_convexities(int m, TMINLP::Convexity * constraints_convexities)const
+    {
+      if (constraintsConvexities_ != NULL) {
+        CoinCopyN(constraintsConvexities_, m, constraints_convexities);
+      }
+      else {
+        CoinFillN(constraints_convexities, m, TMINLP::Convex);
+      }
+      return true;
+    }
+    /** Get dimension information on nonconvex constraints.*/
+    virtual bool get_number_nonconvex(int & number_non_conv, int & number_concave) const
+    {
+      number_non_conv = numberNonConvex_;
+      number_concave = numberSimpleConcave_;
+      return true;
+    }
+    /** Get array describing the constraints marked nonconvex in the model.*/
+    virtual bool get_constraint_convexities(int number_non_conv, MarkedNonConvex * non_convexes) const
+    {
+      assert(number_non_conv == numberNonConvex_);
+      CoinCopyN( nonConvexConstraintsAndRelaxations_, number_non_conv, non_convexes);
+      return true;
+    }
+    /** Fill array containing indices of simple concave constraints.*/
+    virtual bool get_simple_concave_constraints(int number_concave, SimpleConcaveConstraint * simple_concave) const
+    {
+      assert(number_concave == numberSimpleConcave_);
+      CoinCopyN(simpleConcaves_, numberSimpleConcave_, simple_concave);
+      return true;
+    }
+
+    /** Say if problem has a linear objective (for OA) */
+    virtual bool hasLinearObjective()
+    {
+      return hasLinearObjective_;
+    }
+
+  /** Access array describing onoff constraint.*/
+  virtual const int * get_const_xtra_id() const{
+    return c_extra_id_();
+  }
+  private:
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+
+    /** Copy Constructor */
+    AmplTMINLP(const AmplTMINLP&);
+
+    /** Overloaded Equals Operator */
+    void operator=(const AmplTMINLP&);
+    //@}
+     /** Name of application.*/
+    std::string appName_;
+
+    /** Index of the objective to use for upper bounding*/
+    int upperBoundingObj_;
+    /** pointer to the internal AmplTNLP */
+    Ipopt::AmplTNLP* ampl_tnlp_;
+    /** Journalist */
+    Ipopt::SmartPtr<const Ipopt::Journalist> jnlst_;
+
+    /** Storage of branching priorities information.*/
+    BranchingInfo branch_;
+    /** Storage of sos constraints */
+    SosInfo sos_;
+    /** Storage for perturbation radii */
+    PerturbInfo perturb_info_;
+    /** Store a suffix handler.*/
+    Ipopt::SmartPtr<Ipopt::AmplSuffixHandler> suffix_handler_;
+
+    /** Store constraints types.*/
+    TMINLP::Convexity * constraintsConvexities_;
+
+    /** Store onoff information.*/
+    vector<int> c_extra_id_; 
+
+    /** Ipopt::Number of nonConvex constraints.*/
+    int numberNonConvex_;
+    /** Store marked non-convex constraints and their relaxations.*/
+    MarkedNonConvex * nonConvexConstraintsAndRelaxations_;
+    /** Ipopt::Number of simpleConcave constraints.*/
+    int numberSimpleConcave_;
+    /** Store simple concave constraints descriptions.*/
+    SimpleConcaveConstraint * simpleConcaves_;
+
+    /** Flag to indicate if objective function is linear */
+    bool hasLinearObjective_;
+
+    /** Flag to say if AMPL solution file should be written.*/
+    int writeAmplSolFile_;
+  };
+} // namespace Ipopt
+
+#endif
+
diff --git a/src/Interfaces/Ampl/BonSolReader.cpp b/src/Interfaces/Ampl/BonSolReader.cpp
new file mode 100644
index 0000000..4d3b558
--- /dev/null
+++ b/src/Interfaces/Ampl/BonSolReader.cpp
@@ -0,0 +1,70 @@
+// (C) Copyright CNRS 2011
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF, CNRS,
+//
+// Date : 03/01/2011
+#include "BonSolReader.hpp"
+#include <fstream>
+#include <iostream>
+
+namespace Bonmin{
+
+SolReader::SolReader(const char * file, const char * suffix)
+    :
+    file_(), suffix_(suffix), x_()
+{
+  assert(file!= NULL);
+  file_=file;
+  if (suffix!=NULL)
+    suffix_ = suffix;
+}
+SolReader::SolReader(const std::string & file, const std::string & suffix)
+    :
+    file_(file), suffix_(suffix), x_()
+{}
+
+bool SolReader::readFile()
+{
+  std::string fileName = file_;
+  size_t size = fileName.size();
+  bool hasNlExtension =  (fileName.size()>4) && (fileName[size - 1] =='l') && (fileName[size - 2] =='n') && (fileName[size - 3] =='.');
+  if(hasNlExtension)
+    fileName.erase(size-3,3);
+  fileName+=suffix_;
+  std::ifstream inFile(fileName.c_str());
+  if(!inFile.is_open()) {
+    return false;
+  }
+  std::string token;
+  inFile>>token;
+  assert(token == "bonmin:");
+
+  std::string status;
+  inFile>>status;
+  inFile>>token;
+  if(token == "Options"){
+    for(int i = 0 ; i < 6 ; i++){
+      inFile>>token;
+    }
+    int n_cols, n_cols_2;
+    inFile>>n_cols_2>>n_cols;
+    if(n_cols != static_cast<int>(x_.size())){
+       fprintf(stderr, "Number of columns different %d\n", n_cols);
+       x_.resize(n_cols);
+    }
+  }
+for(size_t i = 0 ; i < x_.size() ; i++){
+     inFile>>x_[i];
+  }
+  return true;
+}
+
+void
+SolReader::copySol(double * x)
+{
+  std::copy(x_.begin(), x_.end(), x);
+}
+}
diff --git a/src/Interfaces/Ampl/BonSolReader.hpp b/src/Interfaces/Ampl/BonSolReader.hpp
new file mode 100755
index 0000000..f494ef2
--- /dev/null
+++ b/src/Interfaces/Ampl/BonSolReader.hpp
@@ -0,0 +1,62 @@
+// (C) Copyright CNRS 2011
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, LIF, CNRS,
+//
+// Date : 03/01/2011
+
+#ifndef SolReader_HPP
+#define SolReader_HPP
+#include <string>
+#include <vector>
+#include <list>
+#include <fstream>
+#include <iostream>
+#include <CoinHelperFunctions.hpp>
+#include "OsiSolverInterface.hpp"
+#include "BonTypes.hpp"
+
+namespace Bonmin{
+/** A class for reading a .col or .row file containing name for variables and constraints (usually ampl generated file).
+   */
+class SolReader
+{
+public:
+  /** Constructor with a file name given by a const char * */
+  SolReader(const char * fileName, const char * suffix);
+  /** Constructor with a file name given by a string and also default (empty string) */
+  SolReader(const std::string & fileName="", const std::string& suffix=".col");
+  /** Reads the .sol file*/
+  bool readFile();
+  /** Reads the .sol file fileName*/
+  bool readFile(const std::string &file)
+  {
+    file_=file;
+    return readFile();
+  }
+
+  /** Copy the names to Names. */
+  void copySol(double * x);
+
+  const double * x(){
+    return x_();
+  }
+
+  /** Set the number of variables in the problem.*/
+  void set_n_cols(int n){
+    x_.resize(n);
+  }
+private:
+  /// Name of the file to read.
+  std::string file_;
+
+  /// Suffix of the file (".col", ".row")
+  std::string suffix_;
+
+  /// Sol values
+ vector<double> x_;
+};
+}
+#endif
diff --git a/src/Interfaces/Ampl/Makefile.am b/src/Interfaces/Ampl/Makefile.am
new file mode 100644
index 0000000..937b4f0
--- /dev/null
+++ b/src/Interfaces/Ampl/Makefile.am
@@ -0,0 +1,77 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 1896 2011-08-14 11:10:38Z stefan $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonamplinterface.la
+
+# List all source files, including headers
+libbonamplinterface_la_SOURCES = \
+	BonAmplInterface.cpp BonAmplInterface.hpp \
+	BonAmplTMINLP.cpp BonAmplTMINLP.hpp \
+	BonSolReader.cpp BonSolReader.hpp \
+        sos_kludge.cpp
+
+# This is for libtool
+libbonamplinterface_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+        -I`$(CYGPATH_W) $(srcdir)/..` \
+        -I`$(CYGPATH_W) $(srcdir)/../Ipopt` \
+        $(BONMINLIB_CFLAGS) $(ASL_CFLAGS)
+
+if COIN_HAS_FILTERSQP
+  AM_CPPFLAGS += -I`$(CYGPATH_W) $(srcdir)/../Filter` 
+endif
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = BonAmplInterface.hpp BonAmplTMINLP.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonAmplTMINLP.cppbak BonAmplTMINLP.hppbak \
+	BonAmplInterface.cppbak BonAmplInterface.hppbak 
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Interfaces/Ampl/Makefile.in b/src/Interfaces/Ampl/Makefile.in
new file mode 100644
index 0000000..c4d6e46
--- /dev/null
+++ b/src/Interfaces/Ampl/Makefile.in
@@ -0,0 +1,640 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at COIN_HAS_FILTERSQP_TRUE@am__append_1 = -I`$(CYGPATH_W) $(srcdir)/../Filter` 
+subdir = src/Interfaces/Ampl
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libbonamplinterface_la_LIBADD =
+am_libbonamplinterface_la_OBJECTS = BonAmplInterface.lo \
+	BonAmplTMINLP.lo BonSolReader.lo sos_kludge.lo
+libbonamplinterface_la_OBJECTS = $(am_libbonamplinterface_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonamplinterface_la_SOURCES)
+DIST_SOURCES = $(libbonamplinterface_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonamplinterface.la
+
+# List all source files, including headers
+libbonamplinterface_la_SOURCES = \
+	BonAmplInterface.cpp BonAmplInterface.hpp \
+	BonAmplTMINLP.cpp BonAmplTMINLP.hpp \
+	BonSolReader.cpp BonSolReader.hpp \
+        sos_kludge.cpp
+
+
+# This is for libtool
+libbonamplinterface_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/..` -I`$(CYGPATH_W) \
+	$(srcdir)/../Ipopt` $(BONMINLIB_CFLAGS) $(ASL_CFLAGS) \
+	$(am__append_1)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = BonAmplInterface.hpp BonAmplTMINLP.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonAmplTMINLP.cppbak BonAmplTMINLP.hppbak \
+	BonAmplInterface.cppbak BonAmplInterface.hppbak 
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Interfaces/Ampl/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Interfaces/Ampl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonamplinterface.la: $(libbonamplinterface_la_OBJECTS) $(libbonamplinterface_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonamplinterface_la_LDFLAGS) $(libbonamplinterface_la_OBJECTS) $(libbonamplinterface_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonAmplInterface.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonAmplTMINLP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonSolReader.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sos_kludge.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Interfaces/Ampl/sos_kludge.cpp b/src/Interfaces/Ampl/sos_kludge.cpp
new file mode 100644
index 0000000..f6486af
--- /dev/null
+++ b/src/Interfaces/Ampl/sos_kludge.cpp
@@ -0,0 +1,46 @@
+/****************************************************************
+Copyright (C) 1997-2000 Lucent Technologies
+Modifications for Coin -  Copyright (C) 2006, International Business Machines Corporation and others.
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+****************************************************************/
+
+namespace ampl_utils
+{
+    void
+sos_kludge(int nsos, int *sosbeg, double *sosref)
+{
+  // Adjust sosref if necessary to make monotonic increasing
+  int i, j, k;
+  double t, t1;
+  for(i = j = 0; i++ < nsos; ) {
+    k = sosbeg[i];
+    t = sosref[j];
+    while(++j < k) {
+      t1 = sosref[j];
+      t += 1e-10;
+      if (t1 <= t)
+        sosref[j] = t1 = t + 1e-10;
+      t = t1;
+    }
+  }
+}
+}
diff --git a/src/Interfaces/BonAuxInfos.cpp b/src/Interfaces/BonAuxInfos.cpp
new file mode 100644
index 0000000..aaed3b6
--- /dev/null
+++ b/src/Interfaces/BonAuxInfos.cpp
@@ -0,0 +1,94 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/23/2007
+
+#include "BonminConfig.h"
+#include "BonAuxInfos.hpp"
+#include "CoinHelperFunctions.hpp"
+#include "CoinFinite.hpp"
+
+namespace Bonmin
+{
+  /** Default constructor.*/
+  AuxInfo::AuxInfo(int type):
+      OsiBabSolver(type),
+      infeasibleNode_(false),
+      objValue_ (COIN_DBL_MAX),
+      nlpSolution_(NULL),
+      numcols_(0),
+      hasNlpSolution_(false),
+      bestSolution2_(make_referenced(std::vector<double>())),
+      bestObj2_(make_referenced(COIN_DBL_MAX))
+  {}
+
+  /** Constructor from OsiBabSolver.*/
+  AuxInfo::AuxInfo(const OsiBabSolver &other):
+      OsiBabSolver(other),
+      infeasibleNode_(false),
+      objValue_ (COIN_DBL_MAX),
+      nlpSolution_(NULL),
+      numcols_(0),
+      hasNlpSolution_(false),
+      bestSolution2_(make_referenced(std::vector<double>())),
+      bestObj2_(make_referenced(COIN_DBL_MAX))
+  {}
+
+  /** Copy constructor.*/
+  AuxInfo::AuxInfo(const AuxInfo &other):
+      OsiBabSolver(other),
+      infeasibleNode_(other.infeasibleNode_),
+      objValue_ (other.objValue_),
+      nlpSolution_(NULL),
+      numcols_(other.numcols_),
+      hasNlpSolution_(other.hasNlpSolution_),
+      bestSolution2_(other.bestSolution2_),
+      bestObj2_(other.bestObj2_)
+  {
+    if (other.nlpSolution_!=NULL) {
+      assert(numcols_ > 0);
+      nlpSolution_ = new double[numcols_ + 1];
+      CoinCopyN(other.nlpSolution_, numcols_+1, nlpSolution_);
+    }
+  }
+
+  /** Destructor.*/
+  AuxInfo::~AuxInfo()
+  {
+    if (nlpSolution_ != NULL)
+      delete [] nlpSolution_;
+  }
+
+  /** Virtual copy constructor.*/
+  OsiAuxInfo *
+  AuxInfo::clone() const
+  {
+    return new AuxInfo(*this);
+  }
+
+  double AuxInfo::nlpObjValue ()
+  {return hasNlpSolution_ ? objValue_ : COIN_DBL_MAX;}
+
+  /** Pass a solution found by an nlp solver.*/
+  void
+  AuxInfo::setNlpSolution(const double * sol, int numcols, double objValue)
+  {
+    if (numcols_ < numcols) {
+      delete [] nlpSolution_;
+      nlpSolution_ = NULL;
+    }
+    if (nlpSolution_ == NULL) {
+      nlpSolution_ = new double[numcols + 1];
+      numcols_ = numcols;
+    }
+    CoinCopyN(sol,  numcols, nlpSolution_);
+    nlpSolution_[numcols] = objValue;
+    objValue_ = objValue;
+  }
+
+}/* end namespace Bonmin*/
+
diff --git a/src/Interfaces/BonAuxInfos.hpp b/src/Interfaces/BonAuxInfos.hpp
new file mode 100644
index 0000000..dbf3e22
--- /dev/null
+++ b/src/Interfaces/BonAuxInfos.hpp
@@ -0,0 +1,110 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 04/23/2007
+
+#ifndef BonAuxInfos_H
+#define BonAuxInfos_H
+#include <cstdlib>
+#include <vector>
+#include "OsiAuxInfo.hpp"
+#include "CoinSmartPtr.hpp"
+#include "BonTypes.hpp"
+
+
+namespace Bonmin {
+
+
+  /** Bonmin class for passing info between components of branch-and-cuts.*/
+class AuxInfo : public OsiBabSolver {
+public:
+  /** Default constructor.*/
+  AuxInfo(int type);
+
+  /** Constructor from OsiBabSolver.*/
+  AuxInfo(const OsiBabSolver &other);
+
+  /** Copy constructor.*/
+  AuxInfo(const AuxInfo &other);
+  
+  /** Destructor.*/
+  virtual ~AuxInfo();
+  
+  /** Virtual copy constructor.*/
+  virtual OsiAuxInfo * clone() const;
+  
+  /** Declare the node to be feasible.*/
+  void setFeasibleNode(){
+    infeasibleNode_ = false;}
+  
+  /** Declare the node to be infeasible.*/
+  void setInfeasibleNode(){
+    infeasibleNode_ = true;}
+  
+  /** Say if current node is found feasible by cut generators.*/
+  bool infeasibleNode(){
+    return infeasibleNode_;}
+  
+  /** Get solution found by nlp solver (or NULL if none found).*/
+  const double * nlpSolution(){
+
+    if(hasNlpSolution_)
+      return nlpSolution_;
+    else
+      return NULL;
+  }
+
+  /** Get objective value of nlp solution found, or +infinity if none exists */
+  double nlpObjValue ();
+
+  /** Pass a solution found by an nlp solver.*/
+  void setNlpSolution(const double * sol, int numcols, double objValue);
+  
+  /** Say if has an nlp solution*/
+  void setHasNlpSolution(bool b){
+    hasNlpSolution_ = b;}
+  /** get the best solution computed with alternative objective function.*/
+  const std::vector<double>& bestSolution2() const
+  {
+    return (*bestSolution2_)();
+  }
+  /** return objective value of the best solution computed with alternative
+      objective function.*/
+  double bestObj2() const
+  {
+    return (*bestObj2_)();
+  }
+  /** Set an alternate objective value.*/
+  void setBestObj2(double o)
+  {
+    (*bestObj2_)() = o;
+  }
+  void setBestSolution2(int n, double * d)
+  {
+    (*bestSolution2_)().clear();
+    (*bestSolution2_)().insert((*bestSolution2_)().end(),d, d+n);
+  }
+protected: 
+  /** Say if current node was found infeasible during cut generation*/
+  bool infeasibleNode_;
+  /** value of the objective function of this nlp solution */
+  double objValue_;
+  /** nlp solution found by heuristic if any.*/
+  double * nlpSolution_;
+  /** numcols_ gives the size of nlpSolution_.*/
+  int numcols_;
+  /** say if has a solution.*/
+  bool hasNlpSolution_;
+  /** Stores the solution with alternate objective.*/
+  Coin::SmartPtr< SimpleReferenced<std::vector<double> > > bestSolution2_;
+  /** Alternate solution objective value.*/
+  Coin::SmartPtr< SimpleReferenced<double> > bestObj2_;
+  };
+}/* End namespace.*/
+
+#endif
+
diff --git a/src/Interfaces/BonBoundsReader.cpp b/src/Interfaces/BonBoundsReader.cpp
new file mode 100644
index 0000000..31e1f48
--- /dev/null
+++ b/src/Interfaces/BonBoundsReader.cpp
@@ -0,0 +1,121 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 26/05/2005
+
+#include "BonBoundsReader.hpp"
+
+#include <fstream>
+
+namespace Bonmin {
+BoundsReader::~BoundsReader()
+{
+  gutsOfDestructor();
+}
+void BoundsReader::gutsOfDestructor()
+{
+  if(nLower_ > 0) {
+    assert(lowerBounds_!= NULL);
+    delete [] lowerBounds_;
+    lowerBounds_ = NULL;
+    assert(indexLowers_ != NULL);
+    delete [] indexLowers_;
+    indexLowers_ = NULL;
+  }
+  else {
+    assert(lowerBounds_ == NULL);
+    assert(indexLowers_ == NULL);
+  }
+  if(nUpper_ > 0) {
+    assert(upperBounds_!= NULL);
+    delete [] upperBounds_;
+    upperBounds_ = NULL;
+    assert(indexUppers_ != NULL);
+    delete [] indexUppers_;
+    indexUppers_ = NULL;
+  }
+  else {
+    assert(upperBounds_ == NULL);
+    assert(indexUppers_ == NULL);
+  }
+  nLower_=0;
+  nUpper_=0;
+}
+
+void BoundsReader::read(const std::string &fileName)
+{
+  setFileName(fileName);
+  read();
+}
+
+void BoundsReader::read()
+{
+  gutsOfDestructor();
+  //First count the number of lower and upper bounds resp
+  std::string lo="LO";
+  std::string up="UP";
+  std::string in;
+  {
+    std::ifstream fin(fileName_.c_str());
+    //std::streampos begin = fin.tellg();
+    while(!fin.eof()) {
+      fin>>in;
+      if(in==lo)
+        nLower_++;
+      else if(in==up)
+        nUpper_++;
+      else
+        throw;
+      fin.ignore(10000,'\n');
+    }
+  }
+  if(nLower_ > 0) {
+    lowerBounds_ = new double[nLower_];
+    indexLowers_ = new int[nLower_];
+  }
+  if(nUpper_ > 0) {
+    upperBounds_ = new double[nUpper_];
+    indexUppers_ = new int[nUpper_];
+  }
+  //fin.seekg(0);
+  // fin.seekg( 0, std::ios::beg);
+  nLower_ = 0;
+  nUpper_ = 0;
+  {
+    std::ifstream fin2(fileName_.c_str());
+    //fin.close();
+    //fin.open(fileName_.c_str());
+    while(!fin2.eof()) {
+      int index;
+      double bound;
+      fin2>>in>>index>>bound;
+      if(in==lo) {
+        lowerBounds_[nLower_] = bound;
+        indexLowers_[nLower_++] = index;
+      }
+      else if(in==up) {
+        upperBounds_[nUpper_] = bound;
+        indexUppers_[nUpper_++] = index;
+      }
+      else
+        throw;
+      fin2.ignore(10000,'\n');
+    }
+  }
+}
+
+void BoundsReader::readAndApply(OsiTMINLPInterface * solver)
+{
+  read();
+  for(int i = 0 ; i < nLower_ ; i++) {
+    solver->setColLower(indexLowers_[i], lowerBounds_[i]);
+  }
+  for(int i = 0 ; i < nUpper_ ; i++) {
+    solver->setColUpper(indexUppers_[i], upperBounds_[i]);
+  }
+}
+}
diff --git a/src/Interfaces/BonBoundsReader.hpp b/src/Interfaces/BonBoundsReader.hpp
new file mode 100644
index 0000000..9d74f36
--- /dev/null
+++ b/src/Interfaces/BonBoundsReader.hpp
@@ -0,0 +1,82 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 26/05/2005
+
+#ifndef BoundsReader_HPP
+#define BoundsReader_HPP
+
+#include <string>
+#include "BonOsiTMINLPInterface.hpp"
+
+
+namespace Bonmin {
+/** Reads a file containing change bounds for variables.
+    Files follows pretty much the Bounds section in MPS standard.*/
+class BoundsReader
+{
+public:
+  //Default constructor
+  BoundsReader():
+      fileName_(),
+      lowerBounds_(NULL),
+      upperBounds_(NULL),
+      nLower_(0),
+      nUpper_(0)
+  {}
+
+  // Constructor with name of the file to read passed.
+  BoundsReader(const std::string &fileName):
+      fileName_(fileName),
+      lowerBounds_(NULL),
+      upperBounds_(NULL),
+      indexLowers_(NULL),
+      indexUppers_(NULL),
+      nLower_(0),
+      nUpper_(0)
+  {}
+
+  // Set the name of the file to read.
+  void setFileName(const std::string &fileName)
+  {
+    fileName_ = fileName;
+  }
+
+  // Destructor
+  ~BoundsReader();
+
+  // Cleanup allocated data
+  void gutsOfDestructor();
+
+
+  // Read the file with given fileName
+  void read(const std::string &);
+
+  //Read the file named fileName_
+  void read();
+
+  //Read fileName_ and apply the bounds read to solver
+  void readAndApply(OsiTMINLPInterface * solver);
+private:
+
+  /// Current file
+  std::string fileName_;
+  /// changed lower bounds
+  double * lowerBounds_;
+  /// changed upper bounds
+  double * upperBounds_;
+  /// index of the changed lowerBounds_
+  int * indexLowers_;
+  /// index of the changed upperBounds_
+  int * indexUppers_;
+  /// number of changed lowerBounds_
+  int nLower_;
+  /// number of changed upperBounds_
+  int nUpper_;
+};
+}
+#endif
diff --git a/src/Interfaces/BonBranchingTQP.cpp b/src/Interfaces/BonBranchingTQP.cpp
new file mode 100644
index 0000000..eeed35a
--- /dev/null
+++ b/src/Interfaces/BonBranchingTQP.cpp
@@ -0,0 +1,337 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006, 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+//                   (derived from BonTMINLP2TNLP.cpp)            12/22/2006
+// Authors :
+
+
+#include "BonBranchingTQP.hpp"
+#include "IpBlas.hpp"
+#include "IpAlgTypes.hpp"
+#include <string>
+#include <fstream>
+#include <sstream>
+
+using namespace Ipopt;
+
+namespace Bonmin
+{
+  BranchingTQP::BranchingTQP(SmartPtr<TMINLP2TNLP> tminlp2tnlp)
+    :
+    tminlp2tnlp_(tminlp2tnlp)
+  {
+    bool retval = tminlp2tnlp_->get_nlp_info(n_, m_, nnz_jac_g_,
+					     nnz_h_lag_, index_style_);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't get NLP infor in BranchingTQP");
+    //DBG_ASSERT(x_sol_);
+    //DBG_ASSERT(duals_sol_);
+
+    obj_grad_ = new Number[n_];
+    obj_hess_ = new Number[nnz_h_lag_];
+    obj_hess_irow_ = new Index[nnz_h_lag_];
+    obj_hess_jcol_ = new Index[nnz_h_lag_];
+    g_vals_ = new Number[m_];
+    g_jac_ = new Number[nnz_jac_g_];
+    g_jac_irow_ = new Index[nnz_jac_g_];
+    g_jac_jcol_ = new Index[nnz_jac_g_];
+
+    const Number* x_sol = tminlp2tnlp_->x_sol();
+    const Number* duals_sol = tminlp2tnlp_->duals_sol();
+
+    // Compute all nonlinear values at the starting point so that we
+    // have all the information for the QP
+    bool new_x = true;   // ToDo: maybe NOT new?
+    retval = tminlp2tnlp_->eval_f(n_, x_sol, new_x, obj_val_);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't evaluate objective function in BranchingTQP");
+    new_x = false;
+    retval = tminlp2tnlp_->eval_grad_f(n_, x_sol, new_x, obj_grad_);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't evaluate objective gradient in BranchingTQP");
+    bool new_lambda = true; // ToDo: maybe NOT new?
+    retval = tminlp2tnlp_->eval_h(n_, x_sol, new_x, 1., m_, duals_sol + 2 * n_,
+			     new_lambda, nnz_h_lag_, obj_hess_irow_,
+			     obj_hess_jcol_, NULL);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't evaluate objective Hessian structure in BranchingTQP");
+    if (index_style_ == TNLP::FORTRAN_STYLE) {
+      for (Index i=0; i<nnz_h_lag_; i++) {
+	obj_hess_irow_[i]--;
+	obj_hess_jcol_[i]--;
+      }
+    }
+    retval = tminlp2tnlp_->eval_h(n_, x_sol, new_x, 1., m_, duals_sol + 2*n_,
+			     new_lambda, nnz_h_lag_, NULL, NULL, obj_hess_);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't evaluate objective Hessian values in BranchingTQP");
+    retval = tminlp2tnlp_->eval_g(n_, x_sol, new_x, m_, g_vals_);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't evaluate constraint values in BranchingTQP");
+    retval = tminlp2tnlp_->eval_jac_g(n_, x_sol, new_x, m_, nnz_jac_g_,
+				 g_jac_irow_, g_jac_jcol_, NULL);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't evaluate constraint Jacobian structure in BranchingTQP");
+    if (index_style_ == TNLP::FORTRAN_STYLE) {
+      for (Index i=0; i<nnz_jac_g_; i++) {
+	g_jac_irow_[i]--;
+	g_jac_jcol_[i]--;
+      }
+    }
+    retval = tminlp2tnlp_->eval_jac_g(n_, x_sol, new_x, m_, nnz_jac_g_,
+				 NULL, NULL, g_jac_);
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "Can't evaluate constraint Jacobian values in BranchingTQP");
+
+    // Keep copy of original x_sol and duals_sol values
+    x_sol_copy_ = new Number[n_];
+    IpBlasDcopy(n_, x_sol, 1, x_sol_copy_, 1);
+    duals_sol_copy_ = new Number[m_ + 2*n_];
+    IpBlasDcopy(m_+2*n_, duals_sol, 1, duals_sol_copy_, 1);
+#if 0
+    for (int i=0; i<n_; i++) {
+      printf("x_sol_copy_[%3d] = %15.8e duals_sol_copy_[%3d] = %15.8e obj_grad_[%3d] = %15.8e\n", i,x_sol_copy_[i],i,duals_sol_copy_[i],i,obj_grad_[i]);
+    }
+    for (int i=0; i<m_; i++) {
+      printf("g_vals_[%3d] = %15.8e\n", i, g_vals_[i]);
+    }
+    for (int i=0; i<nnz_h_lag_; i++) {
+      printf("Hess[%3d,%3d] = %15.8e\n",obj_hess_irow_[i],obj_hess_jcol_[i],obj_hess_[i]);
+    }
+    for (int i=0; i<nnz_jac_g_; i++) {
+      printf("Jac[%3d,%3d] = %15.8e\n",g_jac_irow_[i],g_jac_jcol_[i],g_jac_[i]);
+    }
+#endif
+  }
+
+  BranchingTQP::~BranchingTQP()
+  {
+    delete [] obj_grad_;
+    delete [] obj_hess_;
+    delete [] obj_hess_irow_;
+    delete [] obj_hess_jcol_;
+    delete [] g_vals_;
+    delete [] g_jac_;
+    delete [] g_jac_irow_;
+    delete [] g_jac_jcol_;
+    delete [] x_sol_copy_;
+    delete [] duals_sol_copy_;
+  }
+
+  bool BranchingTQP::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
+				  Index& nnz_h_lag,
+				  IndexStyleEnum& index_style)
+  {
+    n = n_;
+    m = m_;
+    nnz_jac_g = nnz_jac_g_;
+    nnz_h_lag = nnz_h_lag_;
+    index_style = index_style_;
+    return true;
+  }
+
+  bool BranchingTQP::get_bounds_info(Index n, Number* x_l, Number* x_u,
+				     Index m, Number* g_l, Number* g_u)
+  {
+    DBG_ASSERT(n == n_);
+    DBG_ASSERT(m == m_);
+    bool retval = tminlp2tnlp_->get_bounds_info(n, x_l, x_u, m, g_l, g_u);
+    // correct for displacement
+    for (int i=0; i<n; i++) {
+      x_l[i] -= x_sol_copy_[i];
+      x_u[i] -= x_sol_copy_[i];
+    }
+    // include the right hand side of the constraint
+    for (int i=0; i<m; i++) {
+      g_l[i] -= g_vals_[i];
+      g_u[i] -= g_vals_[i];
+    }
+    return retval;
+  }
+
+  bool BranchingTQP::get_starting_point(Index n, bool init_x, Number* x,
+      bool init_z, Number* z_L, Number* z_U,
+      Index m, bool init_lambda,
+      Number* lambda)
+  {
+    DBG_ASSERT(n==n_);
+    if (init_x == true) {
+      const double zero = 0.;
+      IpBlasDcopy(n, &zero, 0, x, 1);
+    }
+    if (init_z == true) {
+      DBG_ASSERT(duals_sol_copy_);
+      IpBlasDcopy(n, duals_sol_copy_, 1, z_L, 1);
+      IpBlasDcopy(n, duals_sol_copy_ + n, 1, z_U, 1);
+
+    }
+    if(init_lambda == true) {
+      DBG_ASSERT(duals_sol_copy_);
+      IpBlasDcopy(m_, duals_sol_copy_ + 2*n_, 1, lambda, 1);
+      for(int i = m_ ; i < m; i++)
+      {
+        lambda[i] = 0.;
+      }
+    }
+
+    return true;
+  }
+
+  bool
+  BranchingTQP::get_constraints_linearity(Index m, LinearityType* const_types)
+  {
+    for (int i=0; i<m; i++) {
+      const_types[i] = LINEAR;
+    }
+    return true;
+  }
+
+  bool BranchingTQP::eval_f(Index n, const Number* x, bool new_x,
+      Number& obj_value)
+  {
+    DBG_ASSERT(n == n_);
+
+    obj_value = IpBlasDdot(n, x, 1, obj_grad_, 1);
+    for (int i=0; i<nnz_h_lag_; i++) {
+      Index& irow = obj_hess_irow_[i];
+      Index& jcol = obj_hess_jcol_[i];
+      if (irow!=jcol) {
+	obj_value += obj_hess_[i]*x[irow]*x[jcol];
+      }
+      else {
+	obj_value += 0.5*obj_hess_[i]*x[irow]*x[irow];
+      }
+    }
+
+    return true;
+  }
+
+  bool BranchingTQP::eval_grad_f(Index n, const Number* x, bool new_x,
+				 Number* grad_f)
+  {
+    DBG_ASSERT(n == n_);
+
+    IpBlasDcopy(n_, obj_grad_, 1, grad_f, 1);
+    for (int i=0; i<nnz_h_lag_; i++) {
+      Index& irow = obj_hess_irow_[i];
+      Index& jcol = obj_hess_jcol_[i];
+      grad_f[irow] += obj_hess_[i]*x[jcol];
+      if (irow!=jcol) {
+	grad_f[jcol] += obj_hess_[i]*x[irow];
+      }
+    }
+
+    return true;
+  }
+
+  bool BranchingTQP::eval_g(Index n, const Number* x, bool new_x,
+			    Index m, Number* g)
+  {
+    DBG_ASSERT(n == n_);
+
+    const double zero = 0.;
+    IpBlasDcopy(m_, &zero, 0, g, 1);
+    for (Index i=0; i<nnz_jac_g_; i++) {
+      Index& irow = g_jac_irow_[i];
+      Index& jcol = g_jac_jcol_[i];
+      g[irow] += g_jac_[i]*x[jcol];
+    }
+
+    return true;
+  }
+
+  bool BranchingTQP::eval_jac_g(Index n, const Number* x, bool new_x,
+				Index m, Index nele_jac, Index* iRow,
+				Index *jCol, Number* values)
+  {
+    if (iRow != NULL) {
+      DBG_ASSERT(jCol != NULL);
+      DBG_ASSERT(values == NULL);
+      if (index_style_ == TNLP::FORTRAN_STYLE) {
+	for (Index i=0; i<nnz_jac_g_; i++) {
+	  iRow[i] = g_jac_irow_[i] + 1;
+	  jCol[i] = g_jac_jcol_[i] + 1;
+	}
+      }
+      else {
+	for (Index i=0; i<nnz_jac_g_; i++) {
+	  iRow[i] = g_jac_irow_[i];
+	  jCol[i] = g_jac_jcol_[i];
+	}
+      }
+    }
+    else {
+      IpBlasDcopy(nnz_jac_g_, g_jac_, 1, values, 1);
+    }
+
+    return true;
+  }
+
+  bool BranchingTQP::eval_h(Index n, const Number* x, bool new_x,
+      Number obj_factor, Index m, const Number* lambda,
+      bool new_lambda, Index nele_hess,
+      Index* iRow, Index* jCol, Number* values)
+  {
+    DBG_ASSERT(nele_hess == nnz_h_lag_);
+
+    if (iRow != NULL) {
+      DBG_ASSERT(jCol != NULL);
+      DBG_ASSERT(values == NULL);
+      if (index_style_ == TNLP::FORTRAN_STYLE) {
+	for (Index i=0; i<nele_hess; i++) {
+	  iRow[i] = obj_hess_irow_[i] + 1;
+	  jCol[i] = obj_hess_jcol_[i] + 1;
+	}
+      }
+      else {
+	for (Index i=0; i<nele_hess; i++) {
+	  iRow[i] = obj_hess_irow_[i];
+	  jCol[i] = obj_hess_jcol_[i];
+	}
+      }
+    }
+    else {
+      if (obj_factor==0.) {
+	const Number zero = 0.;
+	IpBlasDcopy(nele_hess, &zero, 0, values, 1);
+      }
+      else {
+	IpBlasDcopy(nele_hess, obj_hess_, 1, values, 1);
+	if (obj_factor != 1.) {
+	  IpBlasDscal(nele_hess, obj_factor, values, 1);
+	}
+      }
+    }
+
+    return true;
+  }
+
+  void BranchingTQP::finalize_solution(SolverReturn status,
+				       Index n, const Number* x,
+				       const Number* z_L, const Number* z_U,
+				       Index m, const Number* g,
+				       const Number* lambda, Number obj_value,
+				       const IpoptData* ip_data,
+				       IpoptCalculatedQuantities* ip_cq)
+  {
+    // Translate displacement solution back to a solution in the real
+    // variables
+    double* xx = new double[n];
+    for (int i=0; i<n; i++) {
+      xx[i] = x_sol_copy_[i] + x[i];
+    }
+
+    double obj = obj_value + obj_val_;
+    if(status == Ipopt::LOCAL_INFEASIBILITY) 
+    obj = obj_value;
+    tminlp2tnlp_->finalize_solution(status, n, xx, z_L, z_U, m, g, lambda,
+				    obj, ip_data, ip_cq);
+    delete [] xx;
+  }
+
+}
+// namespace Ipopt
+
diff --git a/src/Interfaces/BonBranchingTQP.hpp b/src/Interfaces/BonBranchingTQP.hpp
new file mode 100644
index 0000000..f911aa5
--- /dev/null
+++ b/src/Interfaces/BonBranchingTQP.hpp
@@ -0,0 +1,197 @@
+// (C) Copyright International Business Machines Corporation and
+// Carnegie Mellon University 2006, 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+//                   (derived from BonTMINLP2TNLP.hpp)            12/22/2006
+
+#ifndef __BONBRANCHINGTQP_HPP__
+#define __BONBRANCHINGTQP_HPP__
+
+#include "BonTMINLP2TNLP.hpp"
+
+namespace Bonmin
+{
+  /** This is an adapter class that converts a TMINLP2TNLP object into
+   *  a TNLP, which is now just a QP.  The QP is the linear quadratic
+   *  of the TNLP at the optimal point.  The purpose of the
+   *  BranchingTQP is that it is used in a strong-branching framework,
+   *  strong branching is only done for the QP approximation of the
+   *  TNLP, not on the TNLP itself.  The variables of the QP are the
+   *  displacement from the reference point.
+   */
+  class BranchingTQP : public Ipopt::TNLP
+  {
+  public:
+    /**@name Constructors/Destructors */
+    //@{
+    BranchingTQP(Ipopt::SmartPtr<TMINLP2TNLP> tminlp2tnlp);
+
+    /** Default destructor */
+    virtual ~BranchingTQP();
+    //@}
+
+    /**@name methods to gather information about the NLP, only those
+     *  that need to be overloaded from TNLP */
+    //@{
+    virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+                              Ipopt::Index& nnz_h_lag, Ipopt::TNLP::IndexStyleEnum& index_style);
+    virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+                                 Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
+    /** Returns the constraint linearity.  array should be alocated
+     * with length at least n. Since this is a QP, all constraints are
+     * linear.*/
+    virtual bool get_constraints_linearity(Ipopt::Index m, LinearityType* const_types);
+    /** Method called by Ipopt to get the starting point. The bools
+     *  init_x and init_lambda are both inputs and outputs. As inputs,
+     *  they indicate whether or not the algorithm wants you to
+     *  initialize x and lambda respectively. If, for some reason, the
+     *  algorithm wants you to initialize these and you cannot, set
+     *  the respective bool to false.
+     */
+    virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+        bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+        Ipopt::Index m, bool init_lambda,
+        Ipopt::Number* lambda);
+
+    /** Returns the value of the objective function in x*/
+    virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number& obj_value);
+
+    /** Returns the vector of the gradient of
+     *  the objective w.r.t. x */
+    virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number* grad_f);
+
+    /** Returns the vector of constraint values in x*/
+    virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Number* g);
+
+    /** Returns the jacobian of the
+     *  constraints. The vectors iRow and jCol only need to be set
+     *  once. The first call is used to set the structure only (iRow
+     *  and jCol will be non-NULL, and values will be NULL) For
+     *  subsequent calls, iRow and jCol will be NULL. */
+    virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
+        Ipopt::Index *jCol, Ipopt::Number* values);
+
+    /** Return the hessian of the
+     *  lagrangian. The vectors iRow and jCol only need to be set once
+     *  (during the first call). The first call is used to set the
+     *  structure only (iRow and jCol will be non-NULL, and values
+     *  will be NULL) For subsequent calls, iRow and jCol will be
+     *  NULL. This matrix is symmetric - specify the lower diagonal
+     *  only */
+    virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+        bool new_lambda, Ipopt::Index nele_hess,
+        Ipopt::Index* iRow, Ipopt::Index* jCol, Ipopt::Number* values);
+    virtual void finalize_solution(Ipopt::SolverReturn status,
+                                   Ipopt::Index n, const Ipopt::Number* x, const Ipopt::Number* z_L, const Ipopt::Number* z_U,
+                                   Ipopt::Index m, const Ipopt::Number* g, const Ipopt::Number* lambda,
+                                   Ipopt::Number obj_value,
+                                   const Ipopt::IpoptData* ip_data,
+                                   Ipopt::IpoptCalculatedQuantities* ip_cq);
+    //@}
+
+    /** Accessor Methods for QP data */
+    //@{
+    const Ipopt::Number ObjVal()
+    {
+      return obj_val_;
+    }
+    const Ipopt::Number* ObjGrad()
+    {
+      return obj_grad_;
+    }
+    const Ipopt::Number* ObjHessVals()
+    {
+      return obj_hess_;
+    }
+    const Ipopt::Index* ObjHessIRow()
+    {
+      return obj_hess_irow_;
+    }
+    const Ipopt::Index* ObjHessJCol()
+    {
+      return obj_hess_jcol_;
+    }
+    const Ipopt::Number* ConstrRhs()
+    {
+      return g_vals_;
+    }
+    const Ipopt::Number* ConstrJacVals()
+    {
+      return g_jac_;
+    }
+    const Ipopt::Index* ConstrJacIRow()
+    {
+      return g_jac_irow_;
+    }
+    const Ipopt::Index* ConstrJacJCol()
+    {
+      return g_jac_jcol_;
+    }
+    //@}
+
+  private:
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+    /** Default Constructor */
+    BranchingTQP();
+
+    /** Copy Constructor */
+    BranchingTQP(const BranchingTQP&);
+
+    /** Overloaded Equals Operator */
+    void operator=(const BranchingTQP&);
+    //@}
+
+    /** @name static information about the QP's constraints and
+     *  objective function */
+    //@{
+    Ipopt::Number obj_val_;
+    Ipopt::Number* obj_grad_;
+    Ipopt::Number* obj_hess_;
+    Ipopt::Index* obj_hess_irow_;
+    Ipopt::Index* obj_hess_jcol_;
+    Ipopt::Number* g_vals_;
+    Ipopt::Number* g_jac_;
+    Ipopt::Index* g_jac_irow_;
+    Ipopt::Index* g_jac_jcol_;
+    //@}
+
+    /** @name Data from the MINLP */
+    //@{
+    Ipopt::Index n_;
+    Ipopt::Index m_;
+    Ipopt::Index nnz_jac_g_;
+    Ipopt::Index nnz_h_lag_;
+    Ipopt::TNLP::IndexStyleEnum index_style_;
+    //@}
+
+    /** Copy of original x_sol_.  x_sol_ is changed after the first QP
+     *  has been solved once. */
+    Ipopt::Number* x_sol_copy_;
+
+    /** Copy of original duals_sol_.  duals_sol_ is changed after the
+     *  first QP has been solved once. */
+    Ipopt::Number* duals_sol_copy_;
+
+    /** Pointer to the TMINLP2TNLP model which stores the bounds
+     *  information */
+    Ipopt::SmartPtr<TMINLP2TNLP> tminlp2tnlp_;
+  };
+
+} // namespace Ipopt
+
+#endif
diff --git a/src/Interfaces/BonColReader.cpp b/src/Interfaces/BonColReader.cpp
new file mode 100644
index 0000000..4f3837c
--- /dev/null
+++ b/src/Interfaces/BonColReader.cpp
@@ -0,0 +1,66 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 26/05/2005
+#include "BonColReader.hpp"
+#include <fstream>
+#include <iostream>
+
+namespace Bonmin{
+
+NamesReader::NamesReader(const char * file, const char * suffix)
+    :
+    file_(), suffix_(suffix), indices_(), names_()
+{
+  assert(file!= NULL);
+  file_=file;
+  if (suffix!=NULL)
+    suffix_ = suffix;
+}
+NamesReader::NamesReader(const std::string & file, const std::string & suffix)
+    :
+    file_(file), suffix_(suffix), indices_(), names_()
+{}
+
+bool NamesReader::readFile()
+{
+  std::string colFileName = file_;
+  size_t size = colFileName.size();
+  bool hasNlExtension =  (colFileName.size()>4) && (colFileName[size - 1] =='l') && (colFileName[size - 2] =='n') && (colFileName[size - 3] =='.');
+  if(hasNlExtension)
+    colFileName.erase(size-3,3);
+  colFileName+=suffix_;
+  std::ifstream inFile(colFileName.c_str());
+  if(!inFile.is_open()) {
+    return false;
+  }
+  std::string name;
+  int nVar = 0;
+  do {
+    name="";
+    inFile>>name;
+    if(name.size()==0)
+      continue;
+    names_.push_back(name);
+    indices_[names_[nVar].c_str()] = nVar;
+    nVar++;
+  }
+  while(!inFile.eof());
+
+  //  names_ = new std::string[nVar];
+  for(int i = 0 ; i < nVar ; i++) {
+    assert(i==indices_ [ names_ [i].c_str()]);
+  }
+  return true;
+}
+
+void
+NamesReader::copyNames(OsiSolverInterface::OsiNameVec& names)
+{
+  names_ = names;
+}
+}
diff --git a/src/Interfaces/BonColReader.hpp b/src/Interfaces/BonColReader.hpp
new file mode 100644
index 0000000..99f6cfa
--- /dev/null
+++ b/src/Interfaces/BonColReader.hpp
@@ -0,0 +1,77 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 26/05/2005
+
+#ifndef NameReader_HPP
+#define NameReader_HPP
+#include <string>
+#include <vector>
+#include <list>
+#include <fstream>
+#include <iostream>
+#include <CoinHelperFunctions.hpp>
+#include "OsiSolverInterface.hpp"
+//#include <tr1/unordered_map>
+#include <map>
+
+namespace Bonmin{
+/** A class for reading a .col or .row file containing name for variables and constraints (usually ampl generated file).
+   */
+class NamesReader
+{
+public:
+  /** Constructor with a file name given by a const char * */
+  NamesReader(const char * fileName, const char * suffix);
+  /** Constructor with a file name given by a string and also default (empty string) */
+  NamesReader(const std::string & fileName="", const std::string& suffix=".col");
+  /** Reads the .col file*/
+  bool readFile();
+  /** Reads the .col file fileName*/
+  bool readFile(const std::string &file)
+  {
+    file_=file;
+    return readFile();
+  }
+
+  /** Copy the names to Names. */
+  void copyNames(OsiSolverInterface::OsiNameVec& Names);
+
+  /** Access Names of indexed by i. */
+  const std::string& name(int i){
+   return names_[i];
+  }
+
+  /** Access index of variable str */
+  int index(const char * str){
+    return indices_[str];
+  }
+private:
+  /// Name of the file to read.
+  std::string file_;
+
+  /// Suffix of the file (".col", ".row")
+  std::string suffix_;
+
+  /// String comparison strucutre.
+  struct ltstr
+  {
+    bool operator()(const char* s1, const char* s2) const
+    {
+      return strcmp(s1, s2) < 0;
+    }
+  };
+
+  /// Hash type.
+  typedef std::map<const char *, int, ltstr> namesHash;
+  ///Hash map used to store the indices.
+  namesHash indices_;
+  ///Variable names.
+  std::vector<std::string> names_;
+};
+}
+#endif
diff --git a/src/Interfaces/BonCurvatureEstimator.cpp b/src/Interfaces/BonCurvatureEstimator.cpp
new file mode 100644
index 0000000..a84a170
--- /dev/null
+++ b/src/Interfaces/BonCurvatureEstimator.cpp
@@ -0,0 +1,816 @@
+// Copyright (C) 2006, 2007 International Business Machines and others.
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// $Id: BonCurvatureEstimator.cpp 1757 2010-12-09 07:21:18Z pbonami $
+//
+// Author:   Andreas Waechter                 IBM    2006-10-11
+
+#include "BonCurvatureEstimator.hpp"
+#include "IpTSymLinearSolver.hpp"
+#include "IpGenTMatrix.hpp"
+#include "IpIdentityMatrix.hpp"
+#include "IpZeroMatrix.hpp"
+#include "IpDenseVector.hpp"
+#include "IpBlas.hpp"
+#include <cmath>
+#ifdef HAVE_MA27
+# include "IpMa27TSolverInterface.hpp"
+#endif
+#ifdef HAVE_MA57
+# include "IpMa57TSolverInterface.hpp"
+#endif
+#ifdef HAVE_MC19
+# include "IpMc19TSymScalingMethod.hpp"
+#endif
+#ifdef HAVE_PARDISO
+# include "IpPardisoSolverInterface.hpp"
+#endif
+#ifdef HAVE_TAUCS
+# include "IpTAUCSSolverInterface.hpp"
+#endif
+#ifdef HAVE_WSMP
+# include "IpWsmpSolverInterface.hpp"
+#endif
+#ifdef COIN_HAS_MUMPS
+# include "IpMumpsSolverInterface.hpp"
+#endif
+
+namespace Bonmin
+{
+  using namespace Ipopt;
+
+  // ToDo: Consider NLP scaling?
+
+  CurvatureEstimator::CurvatureEstimator
+    (SmartPtr<Journalist> jnlst,
+     SmartPtr<OptionsList> options,
+     SmartPtr<TNLP> tnlp)
+      :
+      jnlst_(jnlst),
+      options_(options),
+      prefix_(""),
+      tnlp_(tnlp),
+      grad_f_(NULL),
+      irows_jac_(NULL),
+      jcols_jac_(NULL),
+      jac_vals_(NULL),
+      irows_hess_(NULL),
+      jcols_hess_(NULL),
+      hess_vals_(NULL),
+      eq_x_free_map_(NULL),
+      eq_g_fixed_map_(NULL),
+      all_x_free_map_(NULL),
+      all_g_fixed_map_(NULL),
+      lambda_(NULL),
+      eq_projected_d_(NULL),
+      initialized_(false)
+  {
+    DBG_ASSERT(IsValid(jnlst));
+    DBG_ASSERT(IsValid(options));
+    DBG_ASSERT(IsValid(tnlp));
+
+    ////////////////////////////////////////////////////////////////////
+    // Create a strategy object for solving the linear system for the //
+    // projection matrix                                              //
+    ////////////////////////////////////////////////////////////////////
+
+    // The following linear are taken from AlgBuilder in Ipopt
+    SmartPtr<SparseSymLinearSolverInterface> SolverInterface1;
+    SmartPtr<SparseSymLinearSolverInterface> SolverInterface2;
+    std::string linear_solver;
+    options->GetStringValue("linear_solver", linear_solver, prefix_);
+    if (linear_solver=="ma27") {
+#ifdef HAVE_MA27
+      SolverInterface1 = new Ma27TSolverInterface();
+      SolverInterface2 = new Ma27TSolverInterface();
+#else
+
+      THROW_EXCEPTION(OPTION_INVALID,
+                      "Selected linear solver MA27 not available.");
+#endif
+
+    }
+    else if (linear_solver=="ma57") {
+#ifdef HAVE_MA57
+      SolverInterface1 = new Ma57TSolverInterface();
+      SolverInterface2 = new Ma57TSolverInterface();
+#else
+
+      THROW_EXCEPTION(OPTION_INVALID,
+                      "Selected linear solver MA57 not available.");
+#endif
+
+    }
+    else if (linear_solver=="pardiso") {
+#ifdef HAVE_PARDISO
+      SolverInterface1 = new PardisoSolverInterface();
+      SolverInterface2 = new PardisoSolverInterface();
+#else
+
+      THROW_EXCEPTION(OPTION_INVALID,
+                      "Selected linear solver Pardiso not available.");
+#endif
+
+    }
+    else if (linear_solver=="taucs") {
+#ifdef HAVE_TAUCS
+      SolverInterface1 = new TAUCSSolverInterface();
+      SolverInterface2 = new TAUCSSolverInterface();
+#else
+
+      THROW_EXCEPTION(OPTION_INVALID,
+                      "Selected linear solver TAUCS not available.");
+#endif
+
+    }
+    else if (linear_solver=="wsmp") {
+#ifdef HAVE_WSMP
+      SolverInterface1 = new WsmpSolverInterface();
+      SolverInterface2 = new WsmpSolverInterface();
+#else
+
+      THROW_EXCEPTION(OPTION_INVALID,
+                      "Selected linear solver WSMP not available.");
+#endif
+
+    }
+    else if (linear_solver=="mumps") {
+#ifdef COIN_HAS_MUMPS
+      SolverInterface1 = new MumpsSolverInterface();
+      SolverInterface2 = new MumpsSolverInterface();
+#else
+
+      THROW_EXCEPTION(OPTION_INVALID,
+                      "Selected linear solver MUMPS not available.");
+#endif
+
+    }
+
+    SmartPtr<TSymScalingMethod> ScalingMethod1;
+    SmartPtr<TSymScalingMethod> ScalingMethod2;
+    std::string linear_system_scaling;
+    if (!options->GetStringValue("linear_system_scaling",
+				 linear_system_scaling, prefix_)) {
+      // By default, don't use mc19 for non-HSL solvers
+      if (linear_solver!="ma27" && linear_solver!="ma57") {
+        linear_system_scaling="none";
+      }
+    }
+    if (linear_system_scaling=="mc19") {
+#ifdef HAVE_MC19
+      ScalingMethod1 = new Mc19TSymScalingMethod();
+      ScalingMethod2 = new Mc19TSymScalingMethod();
+#else
+
+      THROW_EXCEPTION(OPTION_INVALID,
+                      "Selected linear system scaling method MC19 not available.");
+#endif
+
+    }
+
+    eq_tsymlinearsolver_ =
+      new TSymLinearSolver(SolverInterface1, ScalingMethod1);
+    all_tsymlinearsolver_ =
+      new TSymLinearSolver(SolverInterface2, ScalingMethod2);
+    // End of lines from AlgBuilder
+  }
+
+  CurvatureEstimator::~CurvatureEstimator()
+  {
+    if (initialized_) {
+      delete [] grad_f_;
+      delete [] irows_jac_;
+      delete [] jcols_jac_;
+      delete [] jac_vals_;
+      delete [] irows_hess_;
+      delete [] jcols_hess_;
+      delete [] hess_vals_;
+      delete [] eq_x_free_map_;
+      delete [] eq_g_fixed_map_;
+      delete [] all_x_free_map_;
+      delete [] all_g_fixed_map_;
+      delete [] eq_projected_d_;
+      delete [] lambda_;
+    }
+  }
+
+  bool CurvatureEstimator::Initialize()
+  {
+    DBG_ASSERT(!initialized_);
+
+    //////////////////////////////////////
+    // Prepare internal data structures //
+    //////////////////////////////////////
+
+    // Get sizes
+    TNLP::IndexStyleEnum index_style;
+    if (!tnlp_->get_nlp_info(n_, m_, nnz_jac_, nnz_hess_, index_style)) {
+      return false;
+    }
+
+    // Space for gradient
+    delete [] grad_f_;
+    grad_f_ = NULL;
+    grad_f_ = new Number[n_];
+
+    // Get nonzero entries in the matrices
+    delete [] irows_jac_;
+    delete [] jcols_jac_;
+    irows_jac_ = NULL;
+    jcols_jac_ = NULL;
+    irows_jac_ = new Index[nnz_jac_];
+    jcols_jac_ = new Index[nnz_jac_];
+    if (!tnlp_->eval_jac_g(n_, NULL, false, m_, nnz_jac_,
+			   irows_jac_, jcols_jac_, NULL)) {
+      return false;
+    }
+    if (index_style == TNLP::FORTRAN_STYLE) {
+      for (Index i=0; i<nnz_jac_; i++) {
+	irows_jac_[i]--;
+	jcols_jac_[i]--;
+      }
+    }
+    delete [] jac_vals_;
+    jac_vals_ = NULL;
+    jac_vals_ = new Number[nnz_jac_];
+
+    delete [] irows_hess_;
+    irows_hess_ = NULL;
+    irows_hess_ = new Index[nnz_hess_];
+    delete [] jcols_hess_;
+    jcols_hess_ = NULL;
+    jcols_hess_ = new Index[nnz_hess_];
+    if (!tnlp_->eval_h(n_, NULL, false, 1., m_, NULL, false, nnz_hess_,
+		       irows_hess_, jcols_hess_, NULL)) {
+      return false;
+    }
+    if (index_style == TNLP::FORTRAN_STYLE) {
+      for (Index i=0; i<nnz_hess_; i++) {
+	irows_hess_[i]--;
+	jcols_hess_[i]--;
+      }
+    }
+    delete [] hess_vals_;
+    hess_vals_ = NULL; // We set it to NULL, so that we know later
+    // that we still need to compute the values
+
+    // Get space for the activities maps
+    delete [] eq_x_free_map_;
+    delete [] eq_g_fixed_map_;
+    delete [] all_x_free_map_;
+    delete [] all_g_fixed_map_;
+    eq_x_free_map_ = NULL;
+    eq_g_fixed_map_ = NULL;
+    all_x_free_map_ = NULL;
+    all_g_fixed_map_ = NULL;
+    eq_x_free_map_ = new Index[n_];
+    eq_g_fixed_map_ = new Index[m_];
+    all_x_free_map_ = new Index[n_];
+    all_g_fixed_map_ = new Index[m_];
+
+    // Get space for the multipliers
+    delete [] lambda_;
+    lambda_ = NULL;
+    lambda_ = new Number[m_];
+
+    // Get space for projected d
+    delete [] eq_projected_d_;
+    eq_projected_d_ = NULL;
+    eq_projected_d_ = new Number[n_];
+
+    initialized_ = true;
+    return true;
+  }
+
+  bool
+  CurvatureEstimator::ComputeNullSpaceCurvature(
+    int n,
+    const Number* x,
+    bool new_x,
+    const Number* x_l,
+    const Number* x_u,
+    const Number* g_l,
+    const Number* g_u,
+    bool new_bounds,
+    const Number* z_L,
+    const Number* z_U,
+    int m,
+    const Number* lam,
+    bool new_mults,
+    const Number* orig_d,
+    Number* projected_d,
+    Number& gradLagTd,
+    Number& dTHLagd)
+  {
+#if 0
+    printf("new_bounds = %d new_x = %d new_mults = %d\n", new_bounds, new_x, new_mults);
+  for (int i=0;  i<n; i++) {
+    printf("x[%3d] = %15.8e orig_d[%3d] = %15.8e z_L[%3d] = %15.8e z_U[%3d] = %15.8e\n",i,x[i],i,orig_d[i],i,z_L[i],i,z_U[i]);
+  }
+  for (int i=0; i<m; i++) {
+    printf("lam[%3d] = %15.8e\n", i, lam[i]);
+  }
+#endif
+    if (!initialized_) {
+      Initialize();
+      new_bounds = true;
+      new_mults = true;
+    }
+    //DELETEME
+    new_bounds = true;
+
+    DBG_ASSERT(n == n_);
+    DBG_ASSERT(m == m_);
+
+    // If necessary, get new Jacobian values (for the original matrix)
+    if (new_x) {
+      if (!tnlp_->eval_jac_g(n_, x, new_x, m_, nnz_jac_,
+			     NULL, NULL, jac_vals_)) {
+	return false;
+      }
+    }
+
+    // First we compute the direction projected into the space of only
+    // the equality constraints
+    if (new_x) {
+      std::vector<int> dummy_active_x;
+      std::vector<int> dummy_active_g;
+      if (!PrepareNewMatrixStructure(x_l, x_u, g_l, g_u,
+				     dummy_active_x, dummy_active_g,
+				     eq_nx_free_, eq_x_free_map_,
+				     eq_ng_fixed_, eq_g_fixed_map_,
+				     eq_comp_proj_matrix_space_,
+				     eq_comp_vec_space_)) {
+	return false;
+      }
+
+      if (!PrepareNewMatrixValues(eq_x_free_map_, eq_g_fixed_map_,
+				  eq_comp_proj_matrix_space_,
+				  eq_comp_proj_matrix_,
+				  eq_tsymlinearsolver_)) {
+	return false;
+      }
+    }
+
+    if (eq_ng_fixed_>0) {
+      // Compute the projection of the direction
+      if (!SolveSystem(orig_d, NULL, eq_projected_d_, NULL,
+		       eq_x_free_map_, eq_g_fixed_map_,
+		       eq_comp_vec_space_, eq_comp_proj_matrix_,
+		       eq_tsymlinearsolver_)) {
+	return false;
+      }
+      orig_d = eq_projected_d_; // This way we don't need to rememeber
+				// how the direction was projected;
+    }
+
+    // If necessary, determine new activities
+    bool new_activities = false;
+    if (new_bounds || new_mults) {
+      new_activities = true;
+      active_x_.clear();
+      if (eq_ng_fixed_>0) {
+	const Number zTol = 1e-4;
+	jnlst_->Printf(J_MOREDETAILED, J_NLP,
+		       "List of variables considered fixed (with orig_d and z)\n");
+	for (Index i=0; i<n; i++) {
+	  if (x_l[i] < x_u[i]) {
+	    if (orig_d[i]>0. && z_U[i]*orig_d[i]>zTol) {
+	      active_x_.push_back(i+1);
+	      jnlst_->Printf(J_MOREDETAILED, J_NLP,
+			     "x[%5d] (%e,%e)\n", i, orig_d[i], z_U[i]);
+	      DBG_ASSERT(x_u[i] < 1e19);
+	    }
+	    else if (orig_d[i]<0. && -z_L[i]*orig_d[i]>zTol) {
+	      active_x_.push_back(-(i+1));
+	      jnlst_->Printf(J_MOREDETAILED, J_NLP,
+			     "x[%5d] (%e,%e)\n", i, orig_d[i], z_L[i]);
+	      DBG_ASSERT(x_l[i] > -1e19);
+	    }
+	  }
+	}
+      }
+
+      active_g_.clear();
+      // Compute the product of the direction with the constraint Jacobian
+      // This could be done more efficient if we have d in sparse format
+      Number* jacTd = new Number[m];
+      const Number zero = 0.;
+      IpBlasDcopy(m, &zero, 0, jacTd, 1);
+      for (Index i=0; i<nnz_jac_; i++) {
+	const Index& irow = irows_jac_[i];
+	const Index& jcol = jcols_jac_[i];
+	jacTd[irow] += jac_vals_[i]*orig_d[jcol];
+      }
+
+      const Number lamTol = 1e-4;
+      jnlst_->Printf(J_MOREDETAILED, J_NLP,
+		     "List of constraints considered fixed (with lam and jacTd)\n");
+      for (Index j=0; j<m; j++) {
+	if (g_l[j] < g_u[j] && fabs(lam[j]) > lamTol) {
+	  if (lam[j]*jacTd[j] > 0) {
+	    if (lam[j] < 0.) {
+	      active_g_.push_back(-(j+1));
+	      DBG_ASSERT(g_l[j] > -1e19);
+	    }
+	    else {
+	      active_g_.push_back(j+1);
+	      DBG_ASSERT(g_u[j] < 1e19);
+	    }
+	    //	    active_g_.push_back(j+1);
+	    jnlst_->Printf(J_MOREDETAILED, J_NLP,
+			   "g[%5d] (%e,%e)\n", j, lam[j], jacTd[j]);
+	  }
+	}
+      }
+      delete [] jacTd;
+    }
+
+    // Check if the structure of the matrix has changed
+    if (new_activities) {
+      if (!PrepareNewMatrixStructure(x_l, x_u, g_l, g_u,
+				     active_x_, active_g_,
+				     all_nx_free_, all_x_free_map_,
+				     all_ng_fixed_, all_g_fixed_map_,
+				     all_comp_proj_matrix_space_,
+				     all_comp_vec_space_)) {
+	return false;
+      }
+    }
+
+    bool new_lambda = false;
+    if (new_x || new_activities) {
+      if (!PrepareNewMatrixValues(all_x_free_map_, all_g_fixed_map_,
+				  all_comp_proj_matrix_space_,
+				  all_comp_proj_matrix_,
+				  all_tsymlinearsolver_)) {
+	return false;
+      }
+
+#ifdef lambdas
+      // Compute least square multipliers for the given activities
+      if (!tnlp_->eval_grad_f(n_, x, new_x, grad_f_)) {
+	return false;
+      }
+      if (!SolveSystem(grad_f_, NULL, NULL, lambda_)) {
+	return false;
+      }
+      IpBlasDscal(m_, -1., lambda_, 1);
+      if (jnlst_->ProduceOutput(J_MOREVECTOR, J_NLP)) {
+	jnlst_->Printf(J_MOREVECTOR, J_NLP,
+		       "Curvature Estimator: least square multiplier:\n");
+	for (Index i=0; i<m_; i++) {
+	  jnlst_->Printf(J_MOREVECTOR, J_NLP, "lambda[%5d] = %23.16e\n",
+			 i, lambda_[i]);
+	}
+      }
+      new_lambda = true;
+#endif
+    }
+
+    // Compute the projection of the direction
+    if (!SolveSystem(orig_d, NULL, projected_d, NULL,
+		     all_x_free_map_, all_g_fixed_map_,
+		     all_comp_vec_space_, all_comp_proj_matrix_,
+		     all_tsymlinearsolver_)) {
+      return false;
+    }
+
+    // Sanity check to see if the thing is indeed in the null space
+    // (if the constraint gradients are rank-deficient, the solver
+    // might not have done a good job)
+    Number* trash = new Number[m_];
+    for (Index j=0; j<m_; j++) {
+      trash[j] = 0.;
+    }
+    for (Index i=0; i<nnz_jac_; i++) {
+      const Index &irow = irows_jac_[i];
+      const Index &jcol = jcols_jac_[i];
+      if (all_x_free_map_[jcol] >= 0 && all_g_fixed_map_[irow] >= 0) {
+	trash[irow] += jac_vals_[i]*projected_d[jcol];
+      }
+    }
+    if (jnlst_->ProduceOutput(J_MOREVECTOR, J_NLP)) {    
+      for (Index j=0; j<m_; j++) {
+	jnlst_->Printf(J_MOREVECTOR, J_NLP,
+		       "nullspacevector[%5d] = %e\n", j, trash[j]);
+      }
+    }
+    Index imax = IpBlasIdamax(m_, trash, 1)-1;
+    Number max_trash = trash[imax];
+    delete [] trash;
+    const Number max_trash_tol = 1e-6;
+    if (max_trash > max_trash_tol) {
+      jnlst_->Printf(J_WARNING, J_NLP,
+		     "Curvature Estimator: Bad solution from linear solver with max_red = %e:\n", max_trash);
+      return false;
+    }
+
+    if (jnlst_->ProduceOutput(J_MOREVECTOR, J_NLP)) {
+      jnlst_->Printf(J_MOREVECTOR, J_NLP,
+		     "Curvature Estimator: original and projected directions are:\n");
+      for (Index i=0; i<n_; i++) {
+	jnlst_->Printf(J_MOREVECTOR, J_NLP,
+		       "orig_d[%5d] = %23.16e proj_d[%5d] = %23.16e\n",
+		       i, orig_d[i], i, projected_d[i]);
+      }
+    }
+
+    gradLagTd = 0.;
+#ifdef lambdas
+    // Compute the product with the gradient of the Lagrangian
+    gradLagTd = IpBlasDdot(n, projected_d, 1, grad_f_, 1);
+    for (Index i=0; i<nnz_jac_; i++) {
+      const Index &irow = irows_jac_[i];
+      const Index &jcol = jcols_jac_[i];
+      gradLagTd += lambda_[irow]*jac_vals_[i]*projected_d[jcol];
+    }
+#endif
+
+    // Compute the product with the Hessian of the Lagrangian
+    //    if (!Compute_dTHLagd(projected_d, x, new_x, lambda_, new_lambda, dTHLagd)) {
+    if (!Compute_dTHLagd(projected_d, x, new_x, lam, new_lambda, dTHLagd)) {
+      return false;
+    }
+
+#if 0
+    printf("gradLagTd = %e dTHLagd = %e\n",gradLagTd,dTHLagd);
+#endif
+    return true;
+  }
+
+  bool CurvatureEstimator::PrepareNewMatrixStructure(
+    const Number* x_l,
+    const Number* x_u,
+    const Number* g_l,
+    const Number* g_u,
+    std::vector<int>& active_x,
+    std::vector<int>& active_g,
+    Index& nx_free,
+    Index* x_free_map,
+    Index& ng_fixed,
+    Index* g_fixed_map,
+    SmartPtr<CompoundSymMatrixSpace>& comp_proj_matrix_space,
+    SmartPtr<CompoundVectorSpace>& comp_vec_space)
+  {
+    // Deterimine which variables are free
+    for (Index i=0; i<n_; i++) {
+      x_free_map[i] = 0;
+    }
+    // fixed by activities
+    for (std::vector<int>::iterator i=active_x.begin();
+	 i != active_x.end(); i++) {
+      DBG_ASSERT(*i != 0 && *i<=n_ && *i>=-n_);
+      if (*i<0) {
+	x_free_map[(-*i)-1] = -1;
+	DBG_ASSERT(x_l[(-*i)-1] > -1e19);
+      }
+      else {
+	x_free_map[(*i)-1] = -1;
+	DBG_ASSERT(x_u[(*i)-1] < 1e19);
+      }
+    }
+    // fixed by bounds
+    for (Index i=0; i<n_; i++) {
+      if (x_l[i] == x_u[i]) {
+	x_free_map[i] = -1;
+      }
+    }
+    // Correct the numbering in the x map and determine number of
+    // free variables
+    nx_free = 0;
+    for (Index i=0; i<n_; i++) {
+      if (x_free_map[i] == 0) {
+	x_free_map[i] = nx_free++;
+      }
+    }
+
+    // Determine which constraints are fixed
+    for (Index j=0; j<m_; j++) {
+      g_fixed_map[j] = -1;
+    }
+    // fixed by activities
+    for (std::vector<int>::iterator i=active_g.begin();
+	 i != active_g.end(); i++) {
+      DBG_ASSERT(*i != 0 && *i<=m_ && *i>=-m_);
+      if (*i<0) {
+	g_fixed_map[(-*i)-1] = 0;
+	DBG_ASSERT(g_l[(-*i)-1] > -1e19); //ToDo look at option?
+      }
+      else {
+	g_fixed_map[(*i)-1] = 0;
+	DBG_ASSERT(g_u[(*i)-1] < 1e19);
+      }
+    }
+    // fixed by bounds
+    for (Index j=0; j<m_; j++) {
+      if (g_l[j] == g_u[j]) {
+	g_fixed_map[j] = 0;
+      }
+    }
+    // Correct the numbering in the g map and determine number of
+    // fixed constraints
+    ng_fixed = 0;
+    for (Index j=0; j<m_; j++) {
+      if (g_fixed_map[j] == 0) {
+	g_fixed_map[j] = ng_fixed++;
+      }
+    }
+
+    // Determine the row and column indices for the Jacobian of the fixed
+    // constraints in the space of the free variables
+    Index* iRows = new Index[nnz_jac_];
+    Index* jCols = new Index[nnz_jac_];
+    Index nnz_proj_jac = 0;
+    for (Index i=0; i<nnz_jac_; i++) {
+      const Index &irow = irows_jac_[i];
+      const Index &jcol = jcols_jac_[i];
+      if (x_free_map[jcol] >= 0 && g_fixed_map[irow] >= 0) {
+	iRows[nnz_proj_jac] = g_fixed_map[irow] + 1;
+	jCols[nnz_proj_jac] = x_free_map[jcol] + 1;
+	nnz_proj_jac++;
+      }
+    }
+
+    // Create the matrix space for the Jacobian matrices
+    SmartPtr<GenTMatrixSpace> proj_jac_space =
+      new GenTMatrixSpace(ng_fixed, nx_free, nnz_proj_jac, iRows, jCols);
+    delete [] iRows;
+    delete [] jCols;
+
+    // Create Matrix space for the projection matrix
+    comp_proj_matrix_space =
+      new CompoundSymMatrixSpace(2, nx_free+ng_fixed);
+    comp_proj_matrix_space->SetBlockDim(0, nx_free);
+    comp_proj_matrix_space->SetBlockDim(1, ng_fixed);
+    SmartPtr<SymMatrixSpace> identity_space =
+      new IdentityMatrixSpace(nx_free);
+    comp_proj_matrix_space->SetCompSpace(0, 0, *identity_space, true);
+    comp_proj_matrix_space->SetCompSpace(1, 0, *proj_jac_space, true);
+
+    // Create a Vector space for the rhs and sol
+    comp_vec_space = new CompoundVectorSpace(2, nx_free+ng_fixed);
+    SmartPtr<DenseVectorSpace> x_space = new DenseVectorSpace(nx_free);
+    comp_vec_space->SetCompSpace(0, *x_space);
+    SmartPtr<DenseVectorSpace> g_space = new DenseVectorSpace(ng_fixed);
+    comp_vec_space->SetCompSpace(1, *g_space);
+
+    return true;
+  }
+
+  bool CurvatureEstimator::PrepareNewMatrixValues(
+    const Index* x_free_map,
+    const Index* g_fixed_map,
+    SmartPtr<CompoundSymMatrixSpace>& comp_proj_matrix_space,
+    SmartPtr<CompoundSymMatrix>& comp_proj_matrix,
+    SmartPtr<TSymLinearSolver>& tsymlinearsolver)
+  {
+    comp_proj_matrix = comp_proj_matrix_space->MakeNewCompoundSymMatrix();
+    SmartPtr<Matrix> jac = comp_proj_matrix->GetCompNonConst(1, 0);
+    SmartPtr<GenTMatrix> tjac = static_cast<GenTMatrix*> (GetRawPtr(jac));
+    Number* vals = tjac->Values();
+    Index inz=0;
+    for (Index i=0; i<nnz_jac_; i++) {
+      Index irow = irows_jac_[i];
+      Index jcol = jcols_jac_[i];
+      if (x_free_map[jcol] >= 0 && g_fixed_map[irow] >= 0) {
+	vals[inz++] = jac_vals_[i];
+      }
+    }
+    DBG_ASSERT(inz == tjac->Nonzeros());
+
+    // We need to reset the linear solver object, so that it knows
+    // that the structure of the linear system has changed
+    tsymlinearsolver->ReducedInitialize(*jnlst_, *options_, prefix_);
+
+    return true;
+  }
+
+  bool CurvatureEstimator::SolveSystem(
+    const Number* rhs_x,
+    const Number* rhs_g,
+    Number* sol_x, Number* sol_g,
+    const Index* x_free_map,
+    const Index* g_fixed_map,
+    SmartPtr<CompoundVectorSpace>& comp_vec_space,
+    SmartPtr<CompoundSymMatrix>& comp_proj_matrix,
+    SmartPtr<TSymLinearSolver>& tsymlinearsolver)
+  {
+    // Create a vector for the RHS
+    SmartPtr<CompoundVector> rhs = comp_vec_space->MakeNewCompoundVector();
+    SmartPtr<Vector> vrhs_x = rhs->GetCompNonConst(0);
+    SmartPtr<Vector> vrhs_g = rhs->GetCompNonConst(1);
+    // Now fill this vector with the values, extracting the relevant entries
+    if (rhs_x) {
+      SmartPtr<DenseVector> drhs_x =
+	static_cast<DenseVector*> (GetRawPtr(vrhs_x));
+      Number* xvals = drhs_x->Values();
+      for (Index i=0; i<n_; i++) {
+	const Index& ix = x_free_map[i];
+	if (ix>=0) {
+	  xvals[ix] = rhs_x[i];
+	}
+      }
+    }
+    else {
+      vrhs_x->Set(0.);
+    }
+    if (rhs_g) {
+      SmartPtr<DenseVector> drhs_g =
+	static_cast<DenseVector*> (GetRawPtr(vrhs_g));
+      Number* gvals = drhs_g->Values();
+      for (Index j=0; j<m_; j++) {
+	const Index& jg = g_fixed_map[j];
+	if (jg>=0) {
+	  gvals[jg] = rhs_g[j];
+	}
+      }
+    }
+    else {
+      vrhs_g->Set(0.);
+    }
+
+    // Solve the linear system
+    SmartPtr<CompoundVector> sol = comp_vec_space->MakeNewCompoundVector();
+    ESymSolverStatus solver_retval =
+      tsymlinearsolver->Solve(*comp_proj_matrix, *rhs, *sol, false, 0);
+    // For now we try, if the system is reported to be singular, to
+    // still get a solution; ToDo
+    if (solver_retval == SYMSOLVER_SINGULAR) {
+      jnlst_->Printf(J_DETAILED, J_NLP,
+		     "Projection matrix reported to be singular, but we try to obtain a solution anyway.\n");
+      solver_retval =
+	tsymlinearsolver->Solve(*comp_proj_matrix, *rhs, *sol, false, 0);
+    }
+
+    if (solver_retval != SYMSOLVER_SUCCESS) {
+      // DELETEME
+      //printf("Return code from Solver is %d\n", solver_retval);
+      return false;
+    }
+
+    // and get the solution out of it
+    if (sol_x) {
+      SmartPtr<Vector> vsol_x = sol->GetCompNonConst(0);
+      SmartPtr<const DenseVector> dsol_x =
+	static_cast<const DenseVector*> (GetRawPtr(vsol_x));
+      const Number* xvals = dsol_x->Values();
+      for (Index i=0; i<n_; i++) {
+	const Index& ix = x_free_map[i];
+	if (ix >=0) {
+	  sol_x[i] = xvals[ix];
+	}
+	else {
+	  sol_x[i] = 0.;
+	}
+      }
+    }
+    if (sol_g) {
+      SmartPtr<Vector> vsol_g = sol->GetCompNonConst(1);
+      SmartPtr<const DenseVector> dsol_g =
+	static_cast<const DenseVector*> (GetRawPtr(vsol_g));
+      const Number* gvals = dsol_g->Values();
+      for (Index j=0; j<m_; j++) {
+	const Index& ig = g_fixed_map[j];
+	if (ig>=0) {
+	  sol_g[j] = gvals[ig];
+	}
+	else {
+	  sol_g[j] = 0.;
+	}
+      }
+    }
+
+    return true;
+  }
+
+  bool CurvatureEstimator::Compute_dTHLagd(
+    const Number* d, const Number* x, bool new_x, const Number* lambda,
+    bool new_lambda,  Number& dTHLagd)
+  {
+    if (new_x || new_lambda || !hess_vals_) {
+      if (!hess_vals_) {
+	hess_vals_ = new Number[nnz_hess_];
+      }
+      if (!tnlp_->eval_h(n_, x, new_x, 1., m_, lambda, new_lambda, nnz_hess_,
+			 NULL, NULL, hess_vals_)) {
+	return false;
+      }
+    }
+    dTHLagd = 0.;
+    for (Index i=0; i<nnz_hess_; i++) {
+      Index irow = irows_hess_[i];
+      Index jcol = jcols_hess_[i];
+      if (irow == jcol) {
+	dTHLagd += d[irow]*d[irow]*hess_vals_[i];
+      }
+      else {
+	dTHLagd += 2.*d[irow]*d[jcol]*hess_vals_[i];
+      }
+    }
+    return true;
+  }
+
+
+} // namespace Bonmin
diff --git a/src/Interfaces/BonCurvatureEstimator.hpp b/src/Interfaces/BonCurvatureEstimator.hpp
new file mode 100644
index 0000000..38229b6
--- /dev/null
+++ b/src/Interfaces/BonCurvatureEstimator.hpp
@@ -0,0 +1,236 @@
+// Copyright (C) 2006 International Business Machines and others.
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// $Id: BonCurvatureEstimator.hpp 1758 2010-12-09 12:23:50Z pbonami $
+//
+// Author:   Andreas Waechter                 IBM    2006-10-11
+
+#ifndef __BONCURVATUREESTIMATOR_HPP__
+#define __BONCURVATUREESTIMATOR_HPP__
+#error "Not supported currently"
+#include "IpTNLP.hpp"
+#include "IpOptionsList.hpp"
+#include "IpCompoundSymMatrix.hpp"
+#include "IpCompoundVector.hpp"
+#include <vector>
+
+namespace Ipopt {
+  //forward declarations
+  class TSymLinearSolver;
+}
+
+namespace Bonmin
+{
+  using namespace Ipopt;
+
+  /** 
+   */
+  class CurvatureEstimator: public ReferencedObject
+  {
+  public:
+    /** @name Constructor/Destructor */
+    //@{
+    /** Constructor.  It is given the options list to extract options
+     *  specifying linear solver options. */
+    CurvatureEstimator(
+      SmartPtr<Journalist> jnlst,
+      SmartPtr<OptionsList> options,
+      SmartPtr<TNLP> tnlp);
+
+    /** Destructor */
+    virtual ~CurvatureEstimator();
+    //@}
+
+    /** Method for computing a direction projected_d related to the
+	given direction orig_d and the two-sided product of
+	projected_d with Hessian of Lagrangian.  The arrays x, y_c,
+	and y_d constain the primal and dual variables definiting the
+	Lagrangian Hessian. The vectors active_d and active_x contain
+	the indices of active inequality and bound constraints,
+	respectively.  A positive index number is interpreted to
+	belong to an upper bound, and a negative number to a lower
+	bound.  The return status is false if the computation was not
+	possible, and true otherwise. */
+
+    bool ComputeNullSpaceCurvature(
+      int n,
+      const Number* x,
+      bool new_x,
+      const Number* x_l,
+      const Number* x_u,
+      const Number* g_l,
+      const Number* g_u,
+      bool new_bounds,
+      const Number* z_L,
+      const Number* z_U,
+      int m,
+      const Number* lam,
+      bool new_mults,
+      const Number* orig_d,
+      Number* projected_d,
+      Number& gradLagTd,
+      Number& dTHLagd);
+
+  private:
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and 
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+    /** Default Constructor */
+    CurvatureEstimator();
+
+    /** Copy Constructor */
+    CurvatureEstimator(const CurvatureEstimator&);
+
+    /** Overloaded Equals Operator */
+    void operator=(const CurvatureEstimator&);
+    //@}
+
+    /** @name Items related to handling the linear solver object */
+    //@{
+    SmartPtr<Journalist> jnlst_;
+    SmartPtr<OptionsList> options_;
+    /** prefix to be used when parsion the options for the linear
+     *  solver */
+    std::string prefix_;
+    /** Strategy object for solving the projection matrix for
+	equality constraints only */
+    SmartPtr<TSymLinearSolver> eq_tsymlinearsolver_;
+    /** Strategy object for solving the projection matrix for
+	all active constraints */
+    SmartPtr<TSymLinearSolver> all_tsymlinearsolver_;
+    //@}
+
+    /** @name Information about the tnlp */
+    //@{
+    SmartPtr<TNLP> tnlp_;
+    Index n_;
+    Number* grad_f_;
+    Index m_;
+    Index nnz_jac_;
+    Index* irows_jac_;
+    Index* jcols_jac_;
+    Number* jac_vals_;
+    Index nnz_hess_;
+    Index* irows_hess_;
+    Index* jcols_hess_;
+    Number* hess_vals_;
+    //@}
+
+    /** @name Information about activities for equality projection
+	only */
+    //@{
+    /** Number of free x variables */
+    Index eq_nx_free_;
+    /** Map for pointing from the original x space to the one without
+     *  fixed variables.  */
+    Index* eq_x_free_map_;
+    /** Number of active constraints */
+    Index eq_ng_fixed_;
+    /** Map for pointing from the original constraint space to the one
+     *  with only active constraints */
+    Index* eq_g_fixed_map_;
+    //@}
+
+    /** @name Information about activities for projection
+	with respect to all active constraints */
+    //@{
+    /** Number of free x variables */
+    Index all_nx_free_;
+    /** Map for pointing from the original x space to the one without
+     *  fixed variables.  */
+    Index* all_x_free_map_;
+    /** Number of active constraints */
+    Index all_ng_fixed_;
+    /** Map for pointing from the original constraint space to the one
+     *  with only active constraints */
+    Index* all_g_fixed_map_;
+    //@}
+
+    /** Space for most recent computed least-square multipliers */
+    Number* lambda_;
+
+    /** Space for storing the direction projected into the equality
+     *  constraints only.  Having this array around all the time means
+     *  that we don't have to be so careful about memory leaks. */
+    Number* eq_projected_d_;
+
+    /** @name Items for handling the projection system for equality
+     *  constraints only */
+    //@{
+    /** Compound Matrix space for storing the linear system for the
+     *  projection */
+    SmartPtr<CompoundSymMatrixSpace> eq_comp_proj_matrix_space_;
+    /** Compound Matrix storing the current projection matrix */
+    SmartPtr<CompoundSymMatrix> eq_comp_proj_matrix_;
+    /** Compound Vector space for storing right hand side and solution
+     *  for the projection system */
+    SmartPtr<CompoundVectorSpace> eq_comp_vec_space_;
+    //@}
+
+    /** @name Items for handling the projection system for all
+     *  constraints */
+    //@{
+    /** Compound Matrix space for storing the linear system for the
+     *  projection */
+    SmartPtr<CompoundSymMatrixSpace> all_comp_proj_matrix_space_;
+    /** Compound Matrix storing the current projection matrix */
+    SmartPtr<CompoundSymMatrix> all_comp_proj_matrix_;
+    /** Compound Vector space for storing right hand side and solution
+     *  for the projection system */
+    SmartPtr<CompoundVectorSpace> all_comp_vec_space_;
+    //@}
+
+    /** Storing the activities */
+    //@{
+    std::vector<int> active_x_;
+    std::vector<int> active_g_;
+    //@}
+
+    bool initialized_;
+
+    bool Initialize();
+
+    bool PrepareNewMatrixStructure(
+      const Number* x_l,
+      const Number* x_u,
+      const Number* g_l,
+      const Number* g_u,
+      std::vector<int>& active_x,
+      std::vector<int>& active_g,
+      Index& nx_free,
+      Index* x_free_map,
+      Index& ng_fixed,
+      Index* g_fixed_map,
+      SmartPtr<CompoundSymMatrixSpace>& comp_proj_matrix_space,
+      SmartPtr<CompoundVectorSpace>& comp_vec_space);
+
+    bool PrepareNewMatrixValues(
+      const Index* x_free_map,
+      const Index* g_fixed_map,
+      SmartPtr<CompoundSymMatrixSpace>& comp_proj_matrix_space,
+      SmartPtr<CompoundSymMatrix>& comp_proj_matrix,
+      SmartPtr<TSymLinearSolver>& tsymlinearsolver);
+
+    bool SolveSystem(
+      const Number* rhs_x,
+      const Number* rhs_g,
+      Number* sol_x, Number* sol_g,
+      const Index* x_free_map,
+      const Index* g_fixed_map,
+      SmartPtr<CompoundVectorSpace>& comp_vec_space,
+      SmartPtr<CompoundSymMatrix>& comp_proj_matrix,
+      SmartPtr<TSymLinearSolver>& tsymlinearsolver);
+
+    bool Compute_dTHLagd(
+      const Number* d, const Number* x, bool new_x, const Number* lambda,
+      bool new_lambda,  Number& dTHLagd);
+  };
+
+} // namespace Ipopt
+#endif
diff --git a/src/Interfaces/BonCutStrengthener.cpp b/src/Interfaces/BonCutStrengthener.cpp
new file mode 100644
index 0000000..62cf9e0
--- /dev/null
+++ b/src/Interfaces/BonCutStrengthener.cpp
@@ -0,0 +1,606 @@
+// Copyright (C) 2007 International Business Machines and others.
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// $Id: BonCutStrengthener.cpp 1360 2008-11-07 18:26:18Z pbonami $
+//
+// Author:   Andreas Waechter                 IBM    2007-03-30
+
+#include "BonCutStrengthener.hpp"
+#include "IpBlas.hpp"
+
+namespace Bonmin
+{
+  using namespace Ipopt;
+
+  CutStrengthener::CutStrengthener(SmartPtr<TNLPSolver> tnlp_solver,
+				   SmartPtr<OptionsList> options)
+    :
+    tnlp_solver_(tnlp_solver)
+  {
+    options->GetIntegerValue("oa_log_level", oa_log_level_, tnlp_solver->prefix());
+    options->GetEnumValue("cut_strengthening_type", cut_strengthening_type_,
+			  tnlp_solver->prefix());
+    options->GetEnumValue("disjunctive_cut_type", disjunctive_cut_type_,
+			  tnlp_solver->prefix());
+
+    tnlp_solver_->options()->clear();
+    if (!tnlp_solver_->Initialize("strength.opt")) {
+      throw CoinError("CutStrengthener","CutStrengthener","Error during initialization of tnlp_solver_");
+    }
+    tnlp_solver_->options()->SetStringValue("hessian_approximation","limited-memory");
+    tnlp_solver_->options()->SetStringValue("mu_strategy", "adaptive");
+  }
+
+  CutStrengthener::~CutStrengthener()
+  {
+  }
+
+  bool CutStrengthener::HandleOneCut(bool is_tight, TMINLP* tminlp,
+				     TMINLP2TNLP* problem,
+				     const double* minlp_lb,
+				     const double* minlp_ub,
+				     const int gindex, CoinPackedVector& cut,
+				     double& cut_lb, double& cut_ub,
+				     int n, const double* x,
+				     double infty)
+  {
+    bool retval = true;
+    const int cut_nele = cut.getNumElements();
+    const int* cut_indices = cut.getIndices();
+    const TMINLP::VariableType* vartypes = problem->var_types();
+    const double* cut_elements = cut.getElements();
+    switch (disjunctive_cut_type_) {
+    case DC_None:
+      if (!is_tight) {
+	retval = StrengthenCut(tminlp, gindex, cut, n, x, minlp_lb, minlp_ub,
+			       cut_lb, cut_ub);
+      }
+      break;
+    case DC_MostFractional: {
+      // First check if there is a discrete variable to do disjunction on
+      int imostfra = -1;
+      double viol = 1e-6;
+      for (int i=0; i<cut_nele; i++) {
+	const int& idx = cut_indices[i];
+	if (idx < n && (vartypes[idx] == TMINLP::BINARY ||
+			vartypes[idx] == TMINLP::INTEGER)) {
+	  const double& xi = x[idx];
+	  const double this_viol = CoinMin(xi-floor(xi),ceil(xi)-xi);
+	  if (this_viol > viol) {
+	    imostfra = i;
+	    viol = this_viol;
+	  }
+	}
+      }
+      if (imostfra == -1) {
+	// No disjunction to be done
+	if (!is_tight) {
+	  retval = StrengthenCut(tminlp, gindex, cut, n, x, minlp_lb, minlp_ub,
+				 cut_lb, cut_ub);
+	}
+      }
+      else {
+	//Do the disjunction for imostfra
+	const int& idx = cut_indices[imostfra];
+	const double& xi = x[idx];
+	if (oa_log_level_>=2) {
+	  printf("Doing disjunction for constr %d on x[%d] = %e\n", gindex, idx, xi);
+	}
+	const double down_xi = floor(xi);
+	double* changed_bnds = new double[n];
+	// First the down disjunction:
+	CoinCopyN(minlp_ub, n, changed_bnds);
+	changed_bnds[idx] = down_xi;
+	double cut_lb_down = cut_lb;
+	double cut_ub_down = cut_ub;
+	retval = StrengthenCut(tminlp, gindex, cut, n, x, minlp_lb,
+			       changed_bnds, cut_lb_down, cut_ub_down);
+	double cut_lb_up = cut_lb;
+	double cut_ub_up = cut_ub;
+	if (retval) {
+	  CoinCopyN(minlp_lb, n, changed_bnds);
+	  changed_bnds[idx] = down_xi + 1.;
+	  retval = StrengthenCut(tminlp, gindex, cut, n, x, changed_bnds,
+				 minlp_ub, cut_lb_up, cut_ub_up);
+	}
+	delete [] changed_bnds;
+	if (retval) {
+	  // change the cut
+	  double coeff_xi = cut_elements[imostfra];
+	  const double old_coeff = coeff_xi;
+	  if (cut_lb <= -infty) {
+	    // cut has upper bound
+	    coeff_xi += cut_ub_down - cut_ub_up;
+	    cut_ub = cut_ub_up + (down_xi+1.)*(cut_ub_down - cut_ub_up);
+	  }
+	  else {
+	    // cut has lower bound
+	    coeff_xi += cut_lb_down - cut_lb_up;
+	    cut_lb = cut_lb_up + (down_xi+1.)*(cut_lb_down - cut_lb_up);
+	  }
+	  cut.setElement(imostfra, coeff_xi);
+	  printf("old coeff = %e new = %e\n", old_coeff, coeff_xi);
+	}
+      }
+    }
+      break;
+    default:
+      std::cerr << "Invalid case for disjunctive_cut_type_ in CutStrengthener HandleOneCut\n";
+      exit(-2);
+      break;
+    }
+
+    return retval;
+  }
+
+  bool CutStrengthener::ComputeCuts(OsiCuts &cs,
+				    TMINLP* tminlp,
+				    TMINLP2TNLP* problem,
+				    const int gindex, CoinPackedVector& cut,
+				    double& cut_lb, double& cut_ub,
+				    const double g_val, const double g_lb,
+				    const double g_ub,
+				    int n, const double* x,
+				    double infty)
+  {
+    //printf("before: lb = %e ub = %e rl = %e ru = %e g = %e\n", lb[i], ub[i], rowLower[bindi], rowUpper[bindi], g[bindi]);
+    // First check if the cut is indeed away from the constraint
+    bool is_tight = false;
+    if (gindex==-1) {
+      is_tight = true;
+    }
+    else {
+      const Number tight_tol = 1e-8;
+      if (cut_lb <= -infty && g_ub - g_val <= tight_tol) {
+	is_tight = true;
+      }
+      else if (cut_ub >= infty && g_val - g_lb <= tight_tol) {
+	is_tight = true;
+      }
+    }
+    if (cut_strengthening_type_ == CS_StrengthenedGlobal ||
+	cut_strengthening_type_ == CS_StrengthenedGlobal_StrengthenedLocal) {
+      const double orig_lb = cut_lb;
+      const double orig_ub = cut_ub;
+      bool retval = HandleOneCut(is_tight, tminlp, problem,
+				 problem->orig_x_l(),
+				 problem->orig_x_u(), gindex, cut,
+				 cut_lb, cut_ub, n, x, infty);
+      if (!retval) {
+        if (oa_log_level_ >= 1) {
+          printf(" Error during strengthening of global cut for constraint %d\n", gindex);
+        }
+      }
+      else {
+        if (oa_log_level_ >=2 && (fabs(orig_lb-cut_lb)>1e-4 ||
+				  fabs(orig_ub-cut_ub)>1e-4)) {
+	  if (orig_ub < infty) {
+	    printf(" Strengthening ub of global cut for constraint %d from %e to %e\n", gindex, orig_ub, cut_ub);
+	  }
+	  else {
+	    printf(" Strengthening lb of global cut for constraint %d from %e to %e\n", gindex, orig_lb, cut_lb);
+	  }
+        }
+      }
+    }
+    if (cut_strengthening_type_ == CS_UnstrengthenedGlobal_StrengthenedLocal ||
+	cut_strengthening_type_ == CS_StrengthenedGlobal_StrengthenedLocal) {
+      Number lb2 = cut_lb;
+      Number ub2 = cut_ub;
+      CoinPackedVector cut2(cut);
+      bool retval = HandleOneCut(is_tight, tminlp, problem, problem->x_l(),
+				 problem->x_u(), gindex, cut2,
+				 lb2, ub2, n, x, infty);
+      if (!retval) {
+        if (oa_log_level_ >= 1) {
+          printf(" Error during strengthening of local cut for constraint %d\n", gindex);
+        }
+      }
+      else {
+        const Number localCutTol = 1e-4;
+        if (fabs(lb2-cut_lb) >= localCutTol || fabs(cut_ub-ub2) >= localCutTol) {
+	  if (ub2 < infty) {
+	    printf(" Strengthening ub of local cut for constraint %d from %e to %e\n", gindex, cut_ub, ub2);
+	  }
+	  else {
+	    printf(" Strengthening ub of local cut for constraint %d from %e to %e\n", gindex, cut_lb, lb2);
+	  }
+	  // Now we generate a new cut
+	  OsiRowCut newCut2;
+	  newCut2.setEffectiveness(99.99e99);
+	  newCut2.setLb(lb2);
+	  newCut2.setUb(ub2);
+	  newCut2.setRow(cut2);
+	  cs.insert(newCut2);
+        }
+      }
+    }
+    return true;
+  }
+
+  bool CutStrengthener::StrengthenCut(SmartPtr<TMINLP> tminlp,
+				      int constr_index,
+				      const CoinPackedVector& row,
+				      int n,
+				      const double* x,
+				      const double* x_l,
+				      const double* x_u,
+				      double& lb,
+				      double& ub)
+  {
+    // Get data to set up the NLP to be solved
+    Index nele_grad_gi;
+    Index* jCol = new Index[n+1];
+    bool new_x = true;
+    if (constr_index == -1) {
+      // Objective function
+      // Compute random perturbation of point
+      double* x_rand = new double[n];
+      for (int i=0; i<n; i++) {
+	const double radius = CoinMin(1., x_u[i]-x_l[i]);
+	const double p = CoinMax(CoinMin(x[i]-0.5*radius, x_u[i]-radius),
+				 x_l[i]);
+	x_rand[i] = p + radius*CoinDrand48();
+      }
+      Number* grad_f = new Number[n];
+      bool retval = tminlp->eval_grad_f(n, x_rand, new_x, grad_f);
+      delete [] x_rand;
+      if (!retval) {
+	delete [] grad_f;
+	delete [] jCol;
+	return false;
+      }
+      nele_grad_gi = 0;
+      for (int i=0; i<n; i++) {
+	if (grad_f[i] != 0.) {
+	  jCol[nele_grad_gi++] = i;
+	}
+      }
+      delete [] grad_f;
+      jCol[nele_grad_gi++] = n; // for the z variable
+    }
+    else {
+      if (!tminlp->eval_grad_gi(n, x, new_x, constr_index, nele_grad_gi,
+				jCol, NULL)) {
+	delete [] jCol;
+	return false;
+      }
+    }
+
+    bool lower_bound;
+    if (lb <= -COIN_DBL_MAX) {
+      assert(ub < COIN_DBL_MAX);
+      lower_bound = false;
+    }
+    else {
+      assert(ub >= COIN_DBL_MAX);
+      lower_bound = true;
+    }
+    SmartPtr<StrengtheningTNLP> stnlp =
+      new StrengtheningTNLP(tminlp, row, lower_bound, n, x, x_l, x_u,
+			    constr_index, nele_grad_gi, jCol);
+
+    delete [] jCol;
+
+    TNLPSolver::ReturnStatus status =
+      tnlp_solver_->OptimizeTNLP(GetRawPtr(stnlp));
+
+    if (status == TNLPSolver::solvedOptimal ||
+	status == TNLPSolver::solvedOptimalTol) {
+      const Number tiny_move = 0e-8;
+      const Number final_bound = stnlp->StrengthenedBound();
+      if (lower_bound) {
+	lb = final_bound - tiny_move;
+      }
+      else {
+	ub = final_bound + tiny_move;
+      }
+    }
+    else {
+      return false;
+    }
+
+    return true;
+  }
+
+  CutStrengthener::StrengtheningTNLP::
+  StrengtheningTNLP(SmartPtr<TMINLP> tminlp,
+		    const CoinPackedVector& cut,
+		    bool lower_bound,
+		    Index n,
+		    const Number* starting_point,
+		    const double* x_l_orig,
+		    const double* x_u_orig,
+		    Index constr_index,
+		    Index nvar_constr /** Number of variables in constraint */,
+		    const Index* jCol)
+    :
+    tminlp_(tminlp),
+    n_orig_(n),
+    constr_index_(constr_index),
+    nvar_constr_(nvar_constr),
+    lower_bound_(lower_bound),
+    have_final_bound_(false),
+    grad_f_(NULL)
+  {
+    starting_point_ = new Number[n_orig_];
+    x_full_ = new Number[n_orig_];
+    IpBlasDcopy(n_orig_, starting_point, 1, starting_point_, 1);
+    IpBlasDcopy(n_orig_, starting_point, 1, x_full_, 1);
+
+    obj_grad_ = new Number[nvar_constr_];
+    x_l_ = new Number[nvar_constr_];
+    x_u_ = new Number[nvar_constr_];
+    const Number zero = 0.;
+    IpBlasDcopy(nvar_constr_, &zero, 0, obj_grad_, 1);
+
+    const int cut_nele = cut.getNumElements();
+    const int* cut_indices = cut.getIndices();
+    const double* cut_elements = cut.getElements();
+
+    for (int i = 0; i<cut_nele; i++) {
+      const int& idx = cut_indices[i];
+      // ToDo: This could be done more efficiently
+      Index jidx = -1;
+      for (int j=0; j<nvar_constr_; j++) {
+	if (idx == jCol[j]) {
+	  jidx = j;
+	  break;
+	}
+      }
+      if (jidx < 0) {
+	printf("There is an index (%d) in the cut that does not appear in the constraint.\n",idx);
+	exit(-99);
+      }
+
+      if (lower_bound) {
+	obj_grad_[jidx] = cut_elements[i];
+      }
+      else {
+	obj_grad_[jidx] = -cut_elements[i];
+      }
+
+    }
+
+    var_indices_ = new Index[nvar_constr_];
+    for (int i=0; i<nvar_constr_; i++) {
+      const Index& j = jCol[i];
+      var_indices_[i] = j;
+      if (j < n) {
+	x_l_[i] = x_l_orig[j];
+	x_u_[i] = x_u_orig[j];
+      }
+      else {
+	x_l_[i] = -1e100;
+	x_u_[i] = 1e100;
+      }
+    }
+
+    if (constr_index_ == -1) {
+      grad_f_ = new Number[n_orig_];
+    }
+  }
+
+  CutStrengthener::StrengtheningTNLP::~StrengtheningTNLP()
+  {
+    delete [] obj_grad_;
+    delete [] x_l_;
+    delete [] x_u_;
+    delete [] var_indices_;
+    delete [] starting_point_;
+    delete [] x_full_;
+    delete [] grad_f_;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
+	       Index& nnz_h_lag, IndexStyleEnum& index_style)
+  {
+    n = nvar_constr_;
+    m = 1;
+    nnz_jac_g = nvar_constr_;
+    nnz_h_lag = 0;
+    index_style = C_STYLE;
+
+    Index n_orig;
+    Index nnz_jac_g_orig;
+    Index nnz_h_lag_orig;
+    TNLP::IndexStyleEnum index_style_orig;
+    if(!tminlp_->get_nlp_info(n_orig, m_orig_, nnz_jac_g_orig, nnz_h_lag_orig,
+			      index_style_orig)) {
+      return false;
+    }
+    if (n_orig_ != n_orig) {
+      std::cerr << "Number of variables inconsistent in StrengtheningTNLP::get_nlp_info\n";
+      return false;
+    }
+
+    return true;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  get_bounds_info(Index n, Number* x_l, Number* x_u,
+		  Index m, Number* g_l, Number* g_u)
+  {
+    if (constr_index_ == -1) {
+      g_l[0] = -1e100;
+      g_u[0] = 0.;
+    }
+    else {
+      Number* x_l_orig = new Number[n_orig_];
+      Number* x_u_orig = new Number[n_orig_];
+      Number* g_l_orig = new Number[m_orig_];
+      Number* g_u_orig = new Number[m_orig_];
+
+      if (!tminlp_->get_bounds_info(n_orig_, x_l_orig, x_u_orig,
+				  m_orig_, g_l_orig, g_u_orig)) {
+	delete [] x_l_orig;
+	delete [] x_u_orig;
+	delete [] g_l_orig;
+	delete [] g_u_orig;
+	return false;
+      }
+
+      g_l[0] = g_l_orig[constr_index_];
+      g_u[0] = g_u_orig[constr_index_];
+
+      delete [] x_l_orig;
+      delete [] x_u_orig;
+      delete [] g_l_orig;
+      delete [] g_u_orig;
+    }
+
+    for (Index i=0; i<nvar_constr_; i++) {
+      x_l[i] = x_l_[i];
+      x_u[i] = x_u_[i];
+    }
+
+    return true;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  get_starting_point(Index n, bool init_x, Number* x,
+		     bool init_z, Number* z_L, Number* z_U,
+		     Index m, bool init_lambda,
+		     Number* lambda)
+  {
+    assert(!init_z && !init_lambda);
+    assert(n = nvar_constr_);
+    if (init_x) {
+      if (constr_index_ == -1) {
+	for (Index i=0; i<n-1; i++) {
+	  x[i] = starting_point_[var_indices_[i]];
+	}
+	x[n-1] = 0.;
+      }
+      else {
+	for (Index i=0; i<n; i++) {
+	  x[i] = starting_point_[var_indices_[i]];
+	}
+      }
+    }
+
+    return true;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  eval_f(Index n, const Number* x, bool new_x, Number& obj_value)
+  {
+    obj_value = 0.;
+    for (Index i=0; i<n; i++) {
+      obj_value += obj_grad_[i]*x[i];
+    }
+    return true;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f)
+  {
+    IpBlasDcopy(n, obj_grad_, 1, grad_f, 1);
+    return true;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  eval_g(Index n, const Number* x, bool new_x, Index m, Number* g)
+  {
+    update_x_full(x);
+    bool retval;
+    if (constr_index_ == -1) {
+      retval = tminlp_->eval_f(n_orig_, x_full_, new_x, g[0]);
+      g[0] -= x[n-1];
+    }
+    else {
+      retval = tminlp_->eval_gi(n_orig_, x_full_, new_x, constr_index_, g[0]);
+    }
+    return retval;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  eval_jac_g(Index n, const Number* x, bool new_x,
+	     Index m, Index nele_jac, Index* iRow, Index *jCol,
+	     Number* values)
+  {
+    bool retval = true;
+    if (iRow) {
+      DBG_ASSERT(jCol && !values);
+      for (Index i=0; i<nele_jac; i++) {
+	iRow[i] = 0;
+	jCol[i] = i;
+      }
+    }
+    else {
+      DBG_ASSERT(!iRow && values);
+      update_x_full(x);
+      if (constr_index_ == -1) {
+	retval = tminlp_->eval_grad_f(n_orig_, x_full_, new_x, grad_f_);
+	if (retval) {
+	  for (Index i=0; i<n-1; i++) {
+	    values[i] = grad_f_[var_indices_[i]];
+	  }
+	  values[n-1] = -1.;
+	}
+      }
+      else {
+	retval = tminlp_->eval_grad_gi(n_orig_, x_full_, new_x, constr_index_,
+				       nele_jac, NULL, values);
+      }
+    }
+    return retval;
+  }
+
+  bool CutStrengthener::StrengtheningTNLP::
+  eval_h(Index n, const Number* x, bool new_x,
+	 Number obj_factor, Index m, const Number* lambda,
+	 bool new_lambda, Index nele_hess,
+	 Index* iRow, Index* jCol, Number* values)
+  {
+    std::cerr << "At the moment, StrengtheningTNLP::eval_h is not yet implemented\n";
+    return false;
+  }
+
+  void CutStrengthener::StrengtheningTNLP::
+  update_x_full(const Number *x)
+  {
+    if (constr_index_ == -1) {
+      for (Index i=0; i<nvar_constr_-1; i++) {
+	x_full_[var_indices_[i]] = x[i];
+      }
+    }
+    else {
+      for (Index i=0; i<nvar_constr_; i++) {
+	x_full_[var_indices_[i]] = x[i];
+      }
+    }
+  }
+
+  void CutStrengthener::StrengtheningTNLP::
+  finalize_solution(SolverReturn status,
+		    Index n, const Number* x, const Number* z_L, const Number* z_U,
+		    Index m, const Number* g, const Number* lambda,
+		    Number obj_value,
+		    const IpoptData* ip_data,
+		    IpoptCalculatedQuantities* ip_cq)
+  {
+    if (status == SUCCESS || status == STOP_AT_ACCEPTABLE_POINT) {
+      have_final_bound_ = true;
+      strengthened_bound_ = obj_value;
+    }
+    else {
+      have_final_bound_ = false;
+    }
+  }
+
+  Number CutStrengthener::StrengtheningTNLP::StrengthenedBound() const
+  {
+    DBG_ASSERT(have_final_bound_);
+    if (lower_bound_) {
+      return strengthened_bound_;
+    }
+    else {
+      return -strengthened_bound_;
+    }
+  }
+  
+
+} // namespace Bonmin
diff --git a/src/Interfaces/BonCutStrengthener.hpp b/src/Interfaces/BonCutStrengthener.hpp
new file mode 100644
index 0000000..fa6fa7d
--- /dev/null
+++ b/src/Interfaces/BonCutStrengthener.hpp
@@ -0,0 +1,244 @@
+// Copyright (C) 2007 International Business Machines and others.
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// $Id: BonCutStrengthener.hpp 1858 2011-06-18 20:13:40Z stefan $
+//
+// Author:   Andreas Waechter                 IBM    2007-03-29
+
+#ifndef __BONCUTSTRENGTHENER_HPP__
+#define __BONCUTSTRENGTHENER_HPP__
+
+#include "BonTMINLP.hpp"
+#include "CoinPackedVector.hpp"
+#include "BonTNLPSolver.hpp"
+
+namespace Bonmin
+{
+  enum CutStrengtheningType{
+    CS_None=0,
+    CS_StrengthenedGlobal=1,
+    CS_UnstrengthenedGlobal_StrengthenedLocal=2,
+    CS_StrengthenedGlobal_StrengthenedLocal=3
+  };
+
+  enum DisjunctiveCutType{
+    DC_None=0,
+    DC_MostFractional=1
+  };
+
+  /** Class for strengthening OA cuts, and generating additional ones.
+   */
+  class CutStrengthener: public Ipopt::ReferencedObject
+  {
+    /** Class implementing the TNLP for strengthening one cut.  We
+     *  assume that the cut has a lower bound. */
+    class StrengtheningTNLP: public Ipopt::TNLP {
+    public:
+      /** Contructor */
+      StrengtheningTNLP(Ipopt::SmartPtr<TMINLP> tminlp,
+			const CoinPackedVector& cut,
+			bool lower_bound,
+			Ipopt::Index n,
+			const Ipopt::Number* starting_point,
+			const double* x_l_orig,
+			const double* x_u_orig,
+			Ipopt::Index constr_index,
+			Ipopt::Index nvar_constr /** Ipopt::Number of variables in constraint */,
+			const Ipopt::Index* jCol);
+
+      /** Destructor */
+      ~StrengtheningTNLP();
+
+      /**@name Overloaded from TNLP */
+      //@{
+      /** Method to return some info about the nlp */
+      virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+				Ipopt::Index& nnz_h_lag, Ipopt::TNLP::IndexStyleEnum& index_style);
+
+      /** Method to return the bounds for my problem */
+      virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+				   Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
+
+      /** Method to return the starting point for the algorithm */
+      virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+				      bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+				      Ipopt::Index m, bool init_lambda,
+				      Ipopt::Number* lambda);
+
+      /** Method to return the objective value */
+      virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x, Ipopt::Number& obj_value);
+
+      /** Method to return the gradient of the objective */
+      virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x, Ipopt::Number* grad_f);
+
+      /** Method to return the constraint residuals */
+      virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x, Ipopt::Index m, Ipopt::Number* g);
+
+      /** Method to return:
+       *   1) The structure of the jacobian (if "values" is NULL)
+       *   2) The values of the jacobian (if "values" is not NULL)
+       */
+      virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			      Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow, Ipopt::Index *jCol,
+			      Ipopt::Number* values);
+
+      /** Method to return:
+       *   1) The structure of the hessian of the lagrangian (if "values" is NULL)
+       *   2) The values of the hessian of the lagrangian (if "values" is not NULL)
+       */
+      virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			  Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+			  bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index* iRow,
+			  Ipopt::Index* jCol, Ipopt::Number* values);
+
+      //@}
+      /** @name Solution Methods */
+      //@{
+      /** This method is called when the algorithm is complete so the TNLP can store/write the solution */
+      virtual void finalize_solution(Ipopt::SolverReturn status,
+				     Ipopt::Index n, const Ipopt::Number* x, const Ipopt::Number* z_L, const Ipopt::Number* z_U,
+				     Ipopt::Index m, const Ipopt::Number* g, const Ipopt::Number* lambda,
+				     Ipopt::Number obj_value,
+				     const Ipopt::IpoptData* ip_data,
+				     Ipopt::IpoptCalculatedQuantities* ip_cq);
+      //@}
+
+      /** Method for asking for the strengthened bound. */
+      Ipopt::Number StrengthenedBound() const;
+      
+    private:
+      /**@name Methods to block default compiler methods. */
+      //@{
+      StrengtheningTNLP();
+      StrengtheningTNLP(const StrengtheningTNLP&);
+      StrengtheningTNLP& operator=(const StrengtheningTNLP&);
+      //@}
+
+      /** TMINLP (with current bounds) for which the cut it to be
+       *  generated */
+      const Ipopt::SmartPtr<TMINLP> tminlp_;
+
+      /** Gradient of the (linear) objective function */
+      Ipopt::Number* obj_grad_;
+
+      /** Dimension of original problem */
+      const Ipopt::Index n_orig_;
+
+      /** Ipopt::Number of constraints in original problem */
+      Ipopt::Index m_orig_;
+
+      /** Starting point */
+      Ipopt::Number* starting_point_;
+
+      /** Full dimentional x which is used to call the TMINLP
+       *  evaluation routines */
+      Ipopt::Number* x_full_;
+
+      /** Lower bounds for constraint variables */
+      Ipopt::Number* x_l_;
+
+      /** Upper bounds for constraint variables */
+      Ipopt::Number* x_u_;
+
+      /** Ipopt::Index of the constraint */
+      const Ipopt::Index constr_index_;
+
+      /** Ipopt::Number of variables appearing in the constraint */
+      const Ipopt::Index nvar_constr_;
+
+      /** List of variables appearing on the constraints */
+      Ipopt::Index* var_indices_;
+
+      /** Flag indicating if the cut has a lower or upper bound */
+      bool lower_bound_;
+
+      /** Flag indicating if we TNLP has been solved successfully */
+      bool have_final_bound_;
+
+      /** Final strengthened bound */
+      Ipopt::Number strengthened_bound_;
+
+      /** space for original gradient if objective function is handled */
+      Ipopt::Number* grad_f_;
+
+      /** Auxilliary method for updating the full x variable */
+      void update_x_full(const Ipopt::Number *x);
+    };
+
+  public:
+    /** @name Constructor/Destructor */
+    //@{
+    /** Constructor.  It is given a TNLP solver to solve the internal
+     *  NLPs. */
+    CutStrengthener(Ipopt::SmartPtr<TNLPSolver> tnlp_solver,
+		    Ipopt::SmartPtr<Ipopt::OptionsList> options);
+
+    /** Destructor */
+    virtual ~CutStrengthener();
+    //@}
+
+    /** Method for generating and strenghtening all desired cuts */
+    bool ComputeCuts(OsiCuts &cs,
+		     TMINLP* tminlp,
+		     TMINLP2TNLP* problem,
+		     const int gindex, CoinPackedVector& cut,
+		     double& cut_lb, double& cut_ub,
+		     const double g_val, const double g_lb,
+		     const double g_ub,
+		     int n, const double* x,
+		     double infty);
+
+  private:
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and 
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+    /** Default Constructor */
+    CutStrengthener();
+
+    /** Copy Constructor */
+    CutStrengthener(const CutStrengthener&);
+
+    /** Overloaded Equals Operator */
+    void operator=(const CutStrengthener&);
+    //@}
+
+    /** Method for strengthening one cut. */
+    bool StrengthenCut(Ipopt::SmartPtr<TMINLP> tminlp /** current TMINLP */,
+		       int constr_index /** Ipopt::Index number of the constraint to be strengthened, -1 means objective function */,
+		       const CoinPackedVector& row /** Cut to be strengthened */,
+		       int n /** Ipopt::Number of variables */,
+		       const double* x /** solution from node */,
+		       const double* x_l /** Lower bounds for x in which should be valid. */,
+		       const double* x_u /** Upper bounds for x in which should be valid. */,
+		       double& lb,
+		       double& ub);
+
+    /** Method for generating one type of cut (strengthened or disjunctive) */
+    bool HandleOneCut(bool is_tight, TMINLP* tminlp,
+		      TMINLP2TNLP* problem,
+		      const double* minlp_lb,
+		      const double* minlp_ub,
+		      const int gindex, CoinPackedVector& cut,
+		      double& cut_lb, double& cut_ub,
+		      int n, const double* x,
+		      double infty);
+
+    /** Object for solving the TNLPs */
+    Ipopt::SmartPtr<TNLPSolver> tnlp_solver_;
+
+    /** Type of OA cut strengthener */
+    int cut_strengthening_type_;
+    /** What kind of disjuntion should be done */
+    int disjunctive_cut_type_;
+    /** verbosity level for OA-related output */
+    int oa_log_level_;
+  };
+
+} // namespace Ipopt
+#endif
diff --git a/src/Interfaces/BonExitCodes.hpp b/src/Interfaces/BonExitCodes.hpp
new file mode 100644
index 0000000..74234b1
--- /dev/null
+++ b/src/Interfaces/BonExitCodes.hpp
@@ -0,0 +1,12 @@
+#ifndef BonExitCodes_H
+#define BonExitCodes_H
+
+
+namespace Bonmin{
+ /** Some error codes for uncatachable errors.*/
+enum ErrorCodes{
+ ERROR_IN_AMPL_SUFFIXES = 111,
+ UNSUPPORTED_CBC_OBJECT/** There is a CbcObject in the model which is not understood by Bonmin.*/
+};
+}
+#endif
diff --git a/src/Interfaces/BonMsgUtils.hpp b/src/Interfaces/BonMsgUtils.hpp
new file mode 100644
index 0000000..7b40841
--- /dev/null
+++ b/src/Interfaces/BonMsgUtils.hpp
@@ -0,0 +1,15 @@
+#ifndef BonMsgUtils_H
+#define BonMsgUtils_H
+
+#ifdef ADD_MSG
+#error "Macro ADD_MSG already defined"    
+#endif    
+#define ADD_MSG(Id,Type,Level,MSG) addMessage(Id, CoinOneMessage( Type(Id), Level, MSG))
+
+namespace Bonmin{
+  inline int std_m(int n){return 1 + n;}
+  inline int warn_m(int n) {return  3000 + n;}
+  inline int err_m(int n) {return n + 6000;}
+}
+#endif
+
diff --git a/src/Interfaces/BonOsiTMINLPInterface.cpp b/src/Interfaces/BonOsiTMINLPInterface.cpp
new file mode 100644
index 0000000..7f66ec3
--- /dev/null
+++ b/src/Interfaces/BonOsiTMINLPInterface.cpp
@@ -0,0 +1,3126 @@
+// (C) Copyright International Business Machines Corporation and
+// Carnegie Mellon University 2004, 2007
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Carl D. Laird, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 12/01/2004
+
+#include "BonminConfig.h"
+
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonTMINLP.hpp"
+#include "BonTMINLP2TNLP.hpp"
+#include "BonTNLP2FPNLP.hpp"
+#include "BonTMINLP2OsiLP.hpp"
+#include "BonTNLPSolver.hpp"
+#include "CoinTime.hpp"
+#include <climits>
+#include <string>
+#include <sstream>
+#include "BonAuxInfos.hpp"
+
+#include "Ipopt/BonIpoptSolver.hpp"
+#include "Ipopt/BonIpoptWarmStart.hpp"
+#ifdef COIN_HAS_FILTERSQP
+#include "Filter/BonFilterSolver.hpp"
+#include "Filter/BonFilterWarmStart.hpp"
+//#include "Filter/BonBqpdWarmStart.hpp"
+#endif
+
+#include "OsiBranchingObject.hpp"
+#include "OsiRowCutDebugger.hpp"
+#include "BonStrongBranchingSolver.hpp"
+
+//Macros to try and make messages definition less heavy
+#include "BonMsgUtils.hpp"
+
+using namespace Ipopt;
+
+
+extern bool BonminAbortAll;
+namespace Bonmin {
+///Register options
+static void
+register_general_options
+(SmartPtr<RegisteredOptions> roptions)
+{
+  roptions->SetRegisteringCategory("NLP interface", RegisteredOptions::BonminCategory);
+  roptions->AddStringOption3("nlp_solver",
+                             "Choice of the solver for local optima of continuous NLP's",
+                             "Ipopt",
+                             "Ipopt", "Interior Point OPTimizer (https://projects.coin-or.org/Ipopt)",
+                             "filterSQP", "Sequential quadratic programming trust region "
+                                          "algorithm (http://www-unix.mcs.anl.gov/~leyffer/solvers.html)",
+                             "all", "run all available solvers at each node",
+                             "Note that option will work only if the specified solver has been installed. Ipopt will usually be installed with Bonmin by default. For FilterSQP please see http://www-unix.mcs.anl.gov/~leyffer/solvers.html on how to obtain it and https://projects.coin-or.org/Bonmin/wiki/HintTricks on how to configure Bonmin to use it.");
+  roptions->setOptionExtraInfo("nlp_solver",127);
+  
+  roptions->AddStringOption4("warm_start",
+      "Select the warm start method",
+      "none",
+      "none","No warm start, just start NLPs from optimal solution of the root relaxation",
+      "fake_basis", "builds fake basis, useful for cut management in Cbc (warm start is the same as in none)",
+      "optimum","Warm start with direct parent optimum",
+      "interior_point","Warm start with an interior point of direct parent",
+      "This will affect the function getWarmStart(), and as a consequence the warm starting in the various algorithms.");
+  roptions->setOptionExtraInfo("warm_start",8);
+
+  roptions->SetRegisteringCategory("Output and Loglevel", RegisteredOptions::BonminCategory);
+  
+  roptions->AddBoundedIntegerOption("nlp_log_level",
+                                    "specify NLP solver interface log level (independent from ipopt print_level).",
+                                     0,2,1,
+                                    "Set the level of output of the OsiTMINLPInterface : "
+                                    "0 - none, 1 - normal, 2 - verbose"
+                                   );
+  roptions->setOptionExtraInfo("nlp_log_level",127);
+
+  roptions->AddStringOption2("file_solution",
+       "Write a file bonmin.sol with the solution",
+       "no",
+       "yes","",
+       "no","","");
+  roptions->setOptionExtraInfo("file_solution",127);
+
+  roptions->SetRegisteringCategory("NLP solution robustness", RegisteredOptions::BonminCategory);
+
+  roptions->AddLowerBoundedNumberOption("max_random_point_radius",
+      "Set max value r for coordinate of a random point.",
+      0.,1,1e5,
+      "When picking a random point, coordinate i will be in the interval [min(max(l,-r),u-r), max(min(u,r),l+r)] "
+      "(where l is the lower bound for the variable and u is its upper bound)");
+  roptions->setOptionExtraInfo("max_random_point_radius",8);
+
+  roptions->AddStringOption3("random_point_type","method to choose a random starting point",
+			     "Jon",
+			     "Jon", "Choose random point uniformly between the bounds",
+			     "Andreas", "perturb the starting point of the problem within a prescribed interval",
+			     "Claudia", "perturb the starting point using the perturbation radius suffix information",
+			     "");
+  roptions->setOptionExtraInfo("random_point_type",8);
+
+    roptions->AddLowerBoundedNumberOption("random_point_perturbation_interval",
+					   "Amount by which starting point is perturbed when choosing to pick random point by perturbing starting point",
+					   0.,true, 1.,
+					   "");
+  roptions->setOptionExtraInfo("random_point_perturbation_interval",8);
+					   
+
+  roptions->AddLowerBoundedIntegerOption
+  ("num_iterations_suspect",
+   "Number of iterations over which a node is considered \"suspect\" (for debugging purposes only, see detailed documentation).",
+   -1,-1,
+   "When the number of iterations to solve a node is above this number, the subproblem at this"
+   " node is considered to be suspect and it will be written into a file (set to -1 to deactivate this).");
+  roptions->setOptionExtraInfo("num_iterations_suspect",127);
+
+  
+
+  roptions->AddLowerBoundedIntegerOption("num_retry_unsolved_random_point",
+      "Number $k$ of times that the algorithm will try to resolve an unsolved NLP with a random starting point "
+      "(we call unsolved an NLP for which Ipopt is not "
+      "able to guarantee optimality within the specified tolerances).",
+      0,0,
+      "When Ipopt fails to solve a continuous NLP sub-problem, if $k > 0$, the algorithm will "
+      "try again to solve the failed NLP with $k$ new randomly chosen starting points "
+      " or until the problem is solved with success.");
+  roptions->setOptionExtraInfo("num_retry_unsolved_random_point",127);
+
+  roptions->AddLowerBoundedNumberOption("resolve_on_small_infeasibility",
+      "If a locally infeasible problem is infeasible by less than this, resolve it "
+      "with initial starting point.",
+      0.,false, 0.,
+     "It is set to 0 by default with Ipopt. "
+     "When using FilterSQP, Bonmin sets it to a small value.");
+  roptions->setOptionExtraInfo("resolve_on_small_infeasibility",8);
+
+
+  roptions->SetRegisteringCategory("Nonconvex problems", RegisteredOptions::BonminCategory);
+
+
+  roptions->AddLowerBoundedIntegerOption("num_resolve_at_root",
+      "Number $k$ of tries to resolve the root node with different starting points.",
+      0,0,
+      "The algorithm will solve the root node with $k$ random starting points"
+      " and will keep the best local optimum found.");
+  roptions->setOptionExtraInfo("num_resolve_at_root",8);
+
+  roptions->AddLowerBoundedIntegerOption("num_resolve_at_node",
+      "Number $k$ of tries to resolve a node (other than the root) of the tree with different starting point.",
+      0,0,
+      "The algorithm will solve all the nodes with $k$ different random starting points "
+      "and will keep the best local optimum found.");
+  roptions->setOptionExtraInfo("num_resolve_at_node",8);
+
+  roptions->AddLowerBoundedIntegerOption("num_resolve_at_infeasibles",
+      "Number $k$ of tries to resolve an infeasible node (other than the root) of the tree with different starting point.",
+      0,0,
+      "The algorithm will solve all the infeasible nodes with $k$ different random starting points "
+      "and will keep the best local optimum found.");
+  roptions->setOptionExtraInfo("num_resolve_at_infeasibles",8);
+
+
+  roptions->AddStringOption2("dynamic_def_cutoff_decr",
+      "Do you want to define the parameter cutoff_decr dynamically?",
+      "no",
+      "no", "",
+      "yes", "");
+  roptions->setOptionExtraInfo("dynamic_def_cutoff_decr",8);
+
+  roptions->AddLowerBoundedNumberOption("coeff_var_threshold",
+      "Coefficient of variation threshold (for dynamic definition of cutoff_decr).",
+      0.0,
+      false,
+      0.1);
+  roptions->setOptionExtraInfo("coeff_var_threshold",8);
+  
+  roptions->AddNumberOption("first_perc_for_cutoff_decr",
+      "The percentage used when, the coeff of variance is smaller than the threshold, to compute the cutoff_decr dynamically.",
+      -0.02);
+  roptions->setOptionExtraInfo("first_perc_for_cutoff_decr",8);
+
+  roptions->AddNumberOption("second_perc_for_cutoff_decr",
+      "The percentage used when, the coeff of variance is greater than the threshold, to compute the cutoff_decr dynamically.",
+      -0.05);
+  roptions->setOptionExtraInfo("second_perc_for_cutoff_decr",8);
+
+  }
+
+static void register_OA_options
+(SmartPtr<RegisteredOptions> roptions)
+{
+	//
+
+  roptions->SetRegisteringCategory("Outer Approximation strengthening", RegisteredOptions::UndocumentedCategory);
+  roptions->AddStringOption2("disjunctive_cut_type",
+      "Determine if and what kind of disjunctive cuts should be computed.",
+      "none",
+      "none", "No disjunctive cuts.",
+      "most-fractional", "If discrete variables present, compute disjunction for most-fractional variable");
+  roptions->setOptionExtraInfo("disjunctive_cut_type",119);
+
+
+  
+  
+  roptions->AddStringOption4("cut_strengthening_type",
+                             "Determines if and what kind of cut strengthening should be performed.",
+                             "none",
+                             "none", "No strengthening of cuts.",
+                             "sglobal", "Strengthen global cuts.",
+                             "uglobal-slocal", "Unstrengthened global and strengthened local cuts",
+                             "sglobal-slocal", "Strengthened global and strengthened local cuts",
+                             "");
+  roptions->setOptionExtraInfo("cut_strengthening_type",119);
+
+  roptions->SetRegisteringCategory("Outer Approximation cuts generation", RegisteredOptions::BonminCategory);
+
+  roptions->AddStringOption2("oa_cuts_scope","Specify if OA cuts added are to be set globally or locally valid",
+                             "global",
+			     "local","Cuts are treated as locally valid",
+			     "global", "Cuts are treated as globally valid",
+			     "");
+  roptions->setOptionExtraInfo("oa_cuts_scope",119);
+
+  roptions->AddStringOption2("add_only_violated_oa","Do we add all OA cuts or only the ones violated by current point?",
+			     "no",
+			     "no","Add all cuts",
+			     "yes","Add only violated cuts","");
+  roptions->setOptionExtraInfo("add_only_violated_oa",119);
+
+  
+  roptions->AddLowerBoundedNumberOption("tiny_element","Value for tiny element in OA cut",
+      -0.,0,1e-08,
+      "We will remove \"cleanly\" (by relaxing cut) an element lower"
+      " than this.");
+  roptions->setOptionExtraInfo("tiny_element",119);
+
+  roptions->AddLowerBoundedNumberOption("very_tiny_element","Value for very tiny element in OA cut",
+      -0.,0,1e-17,
+      "Algorithm will take the risk of neglecting an element lower"
+      " than this.");
+  roptions->setOptionExtraInfo("very_tiny_element",119);
+
+  roptions->AddLowerBoundedNumberOption("oa_rhs_relax","Value by which to relax OA cut",
+      -0.,0,1e-8,
+      "RHS of OA constraints will be relaxed by this amount times the absolute value of the initial rhs if it is >= 1 (otherwise by this amount)."
+      );
+  roptions->setOptionExtraInfo("oa_rhs_relax",119);
+
+  roptions->SetRegisteringCategory("Output and Loglevel", RegisteredOptions::BonminCategory);
+
+  roptions->AddLowerBoundedIntegerOption("oa_cuts_log_level",
+                                         "level of log when generating OA cuts.",
+                                         0, 0,
+                                         "0: outputs nothing,\n"
+                                         "1: when a cut is generated, its violation and index of row from which it originates,\n"
+                                         "2: always output violation of the cut.\n"
+                                         "3: output generated cuts incidence vectors.");
+  roptions->setOptionExtraInfo("oa_cuts_log_level",119);
+
+}
+
+
+///Register options
+void
+OsiTMINLPInterface::registerOptions
+(SmartPtr<RegisteredOptions> roptions)
+{
+  // We try to register the options - if those have been registered
+  // already, we catch the exception and don't need to do it again
+  try {
+    register_general_options(roptions);
+    register_OA_options(roptions);
+#ifdef COIN_HAS_FILTERSQP
+    FilterSolver::RegisterOptions(roptions);
+#endif
+    IpoptSolver::RegisterOptions(roptions);
+  }   
+  catch(RegisteredOptions::OPTION_ALREADY_REGISTERED) {
+    // skipping
+  }
+
+
+}
+
+/** To set some application specific defaults. */
+void 
+OsiTMINLPInterface::setAppDefaultOptions(SmartPtr<OptionsList> Options)
+{}
+
+OsiTMINLPInterface::Messages::Messages
+():CoinMessages((int)OSITMINLPINTERFACE_DUMMY_END)
+{
+  strcpy(source_ ,"NLP");
+  ADD_MSG(SOLUTION_FOUND, std_m, 2,
+          "After %d tries found a solution of %g (previous best %g).");
+
+  ADD_MSG(INFEASIBLE_SOLUTION_FOUND, std_m, 2,
+          "After %d tries found an solution of %g infeasible problem.");
+
+  ADD_MSG(UNSOLVED_PROBLEM_FOUND, std_m, 2,
+          "After %d tries found an solution of %g unsolved problem.");
+  ADD_MSG(WARN_SUCCESS_WS, warn_m, 2,
+       "Problem not solved with warm start but solved without");
+
+  ADD_MSG(WARNING_RESOLVING, warn_m,2,
+       "Trying to resolve NLP with different starting point (%d attempts).");
+  ADD_MSG(WARN_SUCCESS_RANDOM, warn_m, 1,
+       "Problem initially not solved but solved with a random starting point (success on %d attempt)");
+  ADD_MSG(WARN_CONTINUING_ON_FAILURE, warn_m, 1,
+       "Warning : continuing branching, while there are unrecovered failures at nodes");
+
+  ADD_MSG(SUSPECT_PROBLEM, std_m, 2, "NLP number %d is suspect (see bounds and start file)");
+  ADD_MSG(IPOPT_SUMMARY, std_m, 2, "Ipopt return (for %s): status %2d, iter count %4d, time %g");
+  ADD_MSG(BETTER_SOL, std_m, 2, "Solution of value %g found on %d'th attempt");
+
+  ADD_MSG(LOG_HEAD, std_m, 1,
+          "\n          "
+          "    Num      Status      Obj             It       time                 Location");
+  ADD_MSG(LOG_LINE, std_m, 1, 
+          "%c    %8d %11s %g %8d %g %20s");
+
+  ADD_MSG(ALTERNATE_OBJECTIVE, std_m, 1, "Objective value recomputed with alternate objective: %g.");
+  
+  ADD_MSG(WARN_RESOLVE_BEFORE_INITIAL_SOLVE, warn_m, 1, 
+         "resolve called before any call to initialSol  can not use warm starts.");
+  ADD_MSG(ERROR_NO_TNLPSOLVER, warn_m, 1,"Can not parse options when no IpApplication has been created");
+  ADD_MSG(WARNING_NON_CONVEX_OA, warn_m, 1,
+          "OA on non-convex constraint is very experimental.");                          
+  ADD_MSG(SOLVER_DISAGREE_STATUS, warn_m, 1, "%s says problem %s, %s says %s.");
+  ADD_MSG(SOLVER_DISAGREE_VALUE, warn_m, 1, "%s gives objective %.16g, %s gives %.16g.");
+
+}
+
+
+void  
+OsiTMINLPInterface::OaMessageHandler::print(OsiRowCut &row){
+  FILE * fp = filePointer();
+  const int &n = row.row().getNumElements();
+  fprintf(fp,"Row cut has %d elements. Lower bound: %g, upper bound %g.\n", n, row.lb(), row.ub());
+  const int * idx = row.row().getIndices();
+  const double * val = row.row().getElements();
+  for(int i = 0 ; i < n ; i++){
+    fprintf(fp,"%g, x%d",val[i], idx[i]);
+    if(i && i % 7 == 0)
+      fprintf(fp,"\n");
+  } 
+}
+
+OsiTMINLPInterface::OaMessages::OaMessages(): CoinMessages((int) OA_MESSAGES_DUMMY_END){
+   strcpy(source_,"OaCg");
+   ADD_MSG(VIOLATED_OA_CUT_GENERATED, std_m, 1,"Row %d, cut violation is %g: Outer approximation cut generated.");
+
+   ADD_MSG(CUT_NOT_VIOLATED_ENOUGH, std_m, 2,"Row %d, cut violation is %g: Outer approximation cut not generated.");
+
+   ADD_MSG(OA_CUT_GENERATED, std_m, 1,"Row %d: Outer approximation cut not generated.");
+}
+bool OsiTMINLPInterface::hasPrintedOptions=0;
+
+////////////////////////////////////////////////////////////////////
+// Constructors and desctructors                                  //
+////////////////////////////////////////////////////////////////////
+/// Default Constructor
+OsiTMINLPInterface::OsiTMINLPInterface():
+    OsiSolverInterface(),
+    tminlp_(NULL),
+    problem_(NULL),
+    problem_to_optimize_(NULL),
+    feasibility_mode_(false),
+    app_(NULL),
+    debug_apps_(),
+    testOthers_(false),
+    warmstart_(NULL),
+    rowsense_(NULL),
+    rhs_(NULL),
+    rowrange_(NULL),
+    reducedCosts_(NULL),
+    OsiDualObjectiveLimit_(1e200),
+    hasVarNamesFile_(true),
+    nCallOptimizeTNLP_(0),
+    totalNlpSolveTime_(0),
+    totalIterations_(0),
+    maxRandomRadius_(1e08),
+    randomGenerationType_(0),
+    max_perturbation_(COIN_DBL_MAX),
+    pushValue_(1e-02),
+    numRetryInitial_(-1),
+    numRetryResolve_(-1),
+    numRetryInfeasibles_(-1),
+    numRetryUnsolved_(1),
+    infeasibility_epsilon_(0),
+    dynamicCutOff_(0),
+    coeff_var_threshold_(0.1),
+    first_perc_for_cutoff_decr_(-0.02),
+    second_perc_for_cutoff_decr_(-0.05),
+    messages_(),
+    pretendFailIsInfeasible_(0),
+    pretendSucceededNext_(0),
+    hasContinuedAfterNlpFailure_(false),
+    numIterationSuspect_(-1),
+    hasBeenOptimized_(false),
+    obj_(NULL),
+    feasibilityProblem_(NULL),
+    jRow_(NULL),
+    jCol_(NULL),
+    jValues_(NULL),
+    nnz_jac(0),
+    constTypes_(NULL),
+    nNonLinear_(0),
+    tiny_(1e-8),
+    veryTiny_(1e-20),
+    rhsRelax_(tiny_),
+    infty_(1e100),
+    warmStartMode_(None),
+    firstSolve_(true),
+    cutStrengthener_(NULL),
+    oaMessages_(),
+    oaHandler_(NULL),
+    newCutoffDecr(COIN_DBL_MAX)
+
+{
+   oaHandler_ = new OaMessageHandler;
+   oaHandler_->setLogLevel(0);
+}
+
+void 
+OsiTMINLPInterface::initialize(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+                               Ipopt::SmartPtr<Ipopt::OptionsList> options,
+                               Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+                               const std::string & prefix,
+                               Ipopt::SmartPtr<TMINLP> tminlp){
+  if(!IsValid(app_))
+     createApplication(roptions, options, journalist, prefix);
+  setModel(tminlp); 
+}
+
+void OsiTMINLPInterface::setSolver(Ipopt::SmartPtr<TNLPSolver> app){
+  app_ = app;
+  }
+
+
+void
+OsiTMINLPInterface::createApplication(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+                                      Ipopt::SmartPtr<Ipopt::OptionsList> options,
+                                      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+                                      const std::string & prefix
+                                      )
+{
+  assert(!IsValid(app_));
+  int ival;
+  options->GetEnumValue("nlp_solver", ival, prefix.c_str());
+  Solver s = (Solver) ival;
+  if(s == EFilterSQP){
+    testOthers_ = false;;
+#ifdef COIN_HAS_FILTERSQP
+    app_ = new Bonmin::FilterSolver(roptions, options, journalist, prefix);
+#else
+   throw SimpleError("createApplication",
+                     "Bonmin not configured to run with FilterSQP.");
+#endif    
+
+   debug_apps_.push_back(new IpoptSolver(roptions, options, journalist, prefix)); 
+  }
+  else if(s == EIpopt){
+    testOthers_ = false;
+    app_ = new IpoptSolver(roptions, options, journalist, prefix);
+
+#ifdef COIN_HAS_FILTERSQP
+    debug_apps_.push_back(new Bonmin::FilterSolver(roptions, options, journalist, prefix));
+#endif
+  }
+  else if(s == EAll){
+#ifdef COIN_HAS_FILTERSQP
+    app_ = new Bonmin::FilterSolver(roptions, options, journalist, prefix);
+#else
+   throw SimpleError("createApplication",
+                     "Bonmin not configured to run with Ipopt.");
+#endif
+   debug_apps_.push_back(new IpoptSolver(roptions, options, journalist, prefix)); 
+    testOthers_ = true;
+  }
+  if (!app_->Initialize("")) {
+    throw CoinError("Error during initialization of app_","createApplication", "OsiTMINLPInterface");
+  }
+  for(std::list<Ipopt::SmartPtr<TNLPSolver> >::iterator i = debug_apps_.begin() ; 
+      i != debug_apps_.end() ; i++){
+    (*i)->Initialize("");
+  }
+  extractInterfaceParams();
+  
+}
+
+/** Facilitator to allocate a tminlp and an application. */
+void
+OsiTMINLPInterface::setModel(SmartPtr<TMINLP> tminlp)
+{
+  assert(IsValid(tminlp));
+  tminlp_ = tminlp;
+  problem_ = new TMINLP2TNLP(tminlp_);
+  feasibilityProblem_ = new TNLP2FPNLP
+        (SmartPtr<TNLP>(GetRawPtr(problem_)));
+  if(feasibility_mode_){
+    problem_to_optimize_ = GetRawPtr(feasibilityProblem_);
+  }
+  else {
+    problem_to_optimize_ = GetRawPtr(problem_);
+  }
+}
+
+
+
+void
+OsiTMINLPInterface::readOptionFile(const std::string & fileName)
+{
+  if(IsValid(app_)){
+  std::ifstream is;
+  if (fileName != "") {
+    try {
+      is.open(fileName.c_str());
+    }
+    catch(std::bad_alloc) {
+      throw CoinError("Not enough memory to open option file.\n", "readOptionFile", "OsiTMINLPInterface");
+    }
+  }
+  options()->ReadFromStream(*app_->journalist(), is);
+  extractInterfaceParams();
+  }
+}
+
+/// Copy constructor
+OsiTMINLPInterface::OsiTMINLPInterface (const OsiTMINLPInterface &source):
+    OsiSolverInterface(source),
+    tminlp_(source.tminlp_),
+    problem_(NULL),
+    problem_to_optimize_(NULL),
+    feasibility_mode_(source.feasibility_mode_),
+    rowsense_(NULL),
+    rhs_(NULL),
+    rowrange_(NULL),
+    reducedCosts_(NULL),
+    OsiDualObjectiveLimit_(source.OsiDualObjectiveLimit_),
+    hasVarNamesFile_(source.hasVarNamesFile_),
+    nCallOptimizeTNLP_(0),
+    totalNlpSolveTime_(0),
+    totalIterations_(0),
+    maxRandomRadius_(source.maxRandomRadius_),
+    randomGenerationType_(source.randomGenerationType_),
+    max_perturbation_(source.max_perturbation_),
+    pushValue_(source.pushValue_),
+    numRetryInitial_(source.numRetryInitial_),
+    numRetryResolve_(source.numRetryResolve_),
+    numRetryInfeasibles_(source.numRetryInfeasibles_),
+    numRetryUnsolved_(source.numRetryUnsolved_),
+    infeasibility_epsilon_(source.infeasibility_epsilon_),
+    dynamicCutOff_(source.dynamicCutOff_),
+    coeff_var_threshold_(source.coeff_var_threshold_),
+    first_perc_for_cutoff_decr_(source.first_perc_for_cutoff_decr_),
+    second_perc_for_cutoff_decr_(source.second_perc_for_cutoff_decr_),
+    messages_(),
+    pretendFailIsInfeasible_(source.pretendFailIsInfeasible_),
+    pretendSucceededNext_(source.pretendSucceededNext_),
+    hasContinuedAfterNlpFailure_(source.hasContinuedAfterNlpFailure_),
+    numIterationSuspect_(source.numIterationSuspect_),
+    hasBeenOptimized_(source.hasBeenOptimized_),
+    obj_(NULL),
+    feasibilityProblem_(NULL),
+    jRow_(NULL),
+    jCol_(NULL),
+    jValues_(NULL),
+    nnz_jac(source.nnz_jac),
+    constTypes_(NULL),
+//    constTypesNum_(NULL),
+    nNonLinear_(0),
+    tiny_(source.tiny_),
+    veryTiny_(source.veryTiny_),
+    rhsRelax_(source.rhsRelax_),
+    infty_(source.infty_),
+    warmStartMode_(source.warmStartMode_),
+    firstSolve_(true),
+    cutStrengthener_(source.cutStrengthener_),
+    oaMessages_(),
+    oaHandler_(NULL),
+    newCutoffDecr(source.newCutoffDecr),
+    strong_branching_solver_(source.strong_branching_solver_)
+{
+  if(IsValid(source.tminlp_)) {
+    problem_ = source.problem_->clone();
+    feasibilityProblem_ = new TNLP2FPNLP
+        (SmartPtr<TNLP>(GetRawPtr(problem_)), source.feasibilityProblem_);
+    if(feasibility_mode_)
+      problem_to_optimize_ = GetRawPtr(feasibilityProblem_);
+    else
+      problem_to_optimize_ = GetRawPtr(problem_);
+    pretendFailIsInfeasible_ = source.pretendFailIsInfeasible_;
+    pretendSucceededNext_ = source.pretendSucceededNext_;
+
+    setAuxiliaryInfo(source.getAuxiliaryInfo());
+    // Copy options from old application
+    app_ = source.app_->clone();
+    for(std::list<Ipopt::SmartPtr<TNLPSolver> >::const_iterator i = source.debug_apps_.begin();
+        i != source.debug_apps_.end() ; i++){
+      debug_apps_.push_back((*i)->clone());
+    }
+    testOthers_ = source.testOthers_;
+  }
+  else {
+    throw SimpleError("Don't know how to copy an empty IpoptInterface.",
+        "copy constructor");
+  }
+
+  warmstart_ = source.warmstart_ ? source.warmstart_->clone() : NULL;
+
+  if(source.obj_) {
+    obj_ = new double[source.getNumCols()];
+    CoinCopyN(source.obj_, source.getNumCols(), obj_);
+  }
+
+
+   oaHandler_ = new OaMessageHandler(*source.oaHandler_);;
+
+}
+
+OsiSolverInterface * 
+OsiTMINLPInterface::clone(bool copyData ) const
+{
+  if(copyData)
+    return new OsiTMINLPInterface(*this);
+  else return new OsiTMINLPInterface;
+}
+
+/// Assignment operator
+OsiTMINLPInterface & OsiTMINLPInterface::operator=(const OsiTMINLPInterface& rhs)
+{
+  if(this!= &rhs) {
+    OsiSolverInterface::operator=(rhs);
+    OsiDualObjectiveLimit_ = rhs.OsiDualObjectiveLimit_;
+    nCallOptimizeTNLP_ = rhs.nCallOptimizeTNLP_;
+    totalNlpSolveTime_ = rhs.nCallOptimizeTNLP_;
+    totalIterations_ = rhs.totalIterations_;
+    maxRandomRadius_ = rhs.maxRandomRadius_;
+    hasVarNamesFile_ = rhs.hasVarNamesFile_;
+    pushValue_ = rhs.pushValue_;
+
+    delete warmstart_;
+    warmstart_ = NULL;
+
+    if(IsValid(rhs.tminlp_)) {
+
+      tminlp_ = rhs.tminlp_;
+      problem_ = new TMINLP2TNLP(tminlp_);
+      problem_to_optimize_ = GetRawPtr(problem_);
+      app_ = rhs.app_->clone();
+
+      warmstart_ = rhs.warmstart_ ? rhs.warmstart_->clone() : NULL;
+
+      feasibilityProblem_ = new TNLP2FPNLP
+          (SmartPtr<TNLP>(GetRawPtr(problem_)));
+      nnz_jac = rhs.nnz_jac;
+
+      if(constTypes_ != NULL) {
+        delete [] constTypes_;
+        constTypes_ = NULL;
+      }
+      if(rhs.constTypes_ != NULL) {
+        constTypes_ = new TNLP::LinearityType[getNumRows()];
+        CoinCopyN(rhs.constTypes_, getNumRows(), constTypes_);
+      }
+/*
+      if(constTypesNum_ != NULL) {
+        delete [] constTypesNum_;
+        constTypesNum_ = NULL;
+      }
+      if(rhs.constTypesNum_ != NULL) {
+        constTypesNum_ = new int[getNumRows()];
+        CoinCopyN(rhs.constTypesNum_, getNumRows(), constTypesNum_);
+      }
+*/
+      if(rhs.jValues_!=NULL && rhs.jRow_ != NULL && rhs.jCol_ != NULL && nnz_jac>0) {
+        jValues_ = new double [nnz_jac];
+        jCol_    = new Index [nnz_jac];
+        jRow_    = new Index [nnz_jac];
+        CoinCopyN(rhs.jValues_ , nnz_jac,jValues_ );
+        CoinCopyN(rhs.jCol_    , nnz_jac,jCol_    );
+        CoinCopyN(rhs.jRow_    , nnz_jac,jRow_    );
+      }
+      else if(nnz_jac > 0) {
+        throw CoinError("Arrays for storing jacobian are inconsistant.",
+            "copy constructor",
+            "IpoptOAInterface");
+      }
+      tiny_ = rhs.tiny_;
+      veryTiny_ = rhs.veryTiny_;
+      rhsRelax_ = rhs.rhsRelax_;
+      infty_ = rhs.infty_;
+      warmStartMode_ = rhs.warmStartMode_;
+      newCutoffDecr = rhs.newCutoffDecr;
+
+    }
+    else {
+      tminlp_ =NULL;
+      problem_ = NULL;
+      app_ = NULL;
+      feasibilityProblem_ = NULL;
+    }
+
+
+    if(obj_) {
+      delete [] obj_;
+      obj_ = NULL;
+    }
+    if(rhs.obj_) {
+      obj_ = new double[rhs.getNumCols()];
+      CoinCopyN(rhs.obj_, rhs.getNumCols(), obj_);
+    }
+
+    hasVarNamesFile_ = rhs.hasVarNamesFile_;
+
+    nCallOptimizeTNLP_ = rhs.nCallOptimizeTNLP_;
+    totalNlpSolveTime_ = rhs.totalNlpSolveTime_;
+    totalIterations_ = rhs.totalIterations_;
+    maxRandomRadius_ = rhs.maxRandomRadius_;
+    pushValue_ = rhs.pushValue_;
+    numRetryInitial_ = rhs.numRetryInitial_;
+    numRetryResolve_ = rhs.numRetryResolve_;
+    numRetryInfeasibles_ = rhs.numRetryInfeasibles_;
+    numRetryUnsolved_ = rhs.numRetryUnsolved_;
+    infeasibility_epsilon_ = rhs.infeasibility_epsilon_;
+    pretendFailIsInfeasible_ = rhs.pretendFailIsInfeasible_;
+    pretendSucceededNext_ = rhs.pretendSucceededNext_;
+    numIterationSuspect_ = rhs.numIterationSuspect_;
+
+    hasBeenOptimized_ = rhs.hasBeenOptimized_;
+    cutStrengthener_ = rhs.cutStrengthener_;
+
+    delete oaHandler_;
+    oaHandler_ = new OaMessageHandler(*rhs.oaHandler_);
+    strong_branching_solver_ = rhs.strong_branching_solver_;
+
+    dynamicCutOff_ = rhs.dynamicCutOff_;
+    coeff_var_threshold_ = rhs.coeff_var_threshold_;
+    first_perc_for_cutoff_decr_ = rhs.first_perc_for_cutoff_decr_;
+    second_perc_for_cutoff_decr_ = rhs.second_perc_for_cutoff_decr_;
+
+    freeCachedData();
+  }
+  return *this;
+}
+
+const SmartPtr<OptionsList> OsiTMINLPInterface::options() const
+{
+  if(!IsValid(app_)) {
+    messageHandler()->message(ERROR_NO_TNLPSOLVER, messages_)<<CoinMessageEol;
+    return NULL;
+  }
+  else
+    return app_->options();
+}
+
+SmartPtr<OptionsList> OsiTMINLPInterface::options()
+{
+  if(!IsValid(app_)) {
+    messageHandler()->message(ERROR_NO_TNLPSOLVER, messages_)<<CoinMessageEol;
+    return NULL;
+  }
+  else
+    return app_->options();
+}
+
+/// Destructor
+OsiTMINLPInterface::~OsiTMINLPInterface ()
+{
+  freeCachedData();
+  delete [] jRow_;
+  delete [] jCol_;
+  delete [] jValues_;
+  delete [] constTypes_;
+  delete [] obj_;
+  delete oaHandler_;
+  delete warmstart_;
+}
+
+void
+OsiTMINLPInterface::freeCachedColRim()
+{
+    if(reducedCosts_!=NULL) {
+    delete []  reducedCosts_;
+    reducedCosts_ = NULL;
+  }
+
+}
+
+void
+OsiTMINLPInterface::freeCachedRowRim()
+{
+  if(rowsense_!=NULL) {
+    delete []  rowsense_;
+    rowsense_ = NULL;
+  }
+  if(rhs_!=NULL) {
+    delete []  rhs_;
+    rhs_ = NULL;
+  }
+  if(rowrange_!=NULL) {
+    delete []  rowrange_;
+    rowrange_ = NULL;
+  }
+  //   if(dualsol_!=NULL)
+  //     {
+  //       delete []  dualsol_; dualsol_ = NULL;
+  //     }
+}
+
+void
+OsiTMINLPInterface::freeCachedData()
+{
+  freeCachedColRim();
+  freeCachedRowRim();
+}
+
+const char * OsiTMINLPInterface::OPT_SYMB="OPT";
+const char * OsiTMINLPInterface::FAILED_SYMB="FAILED";
+const char * OsiTMINLPInterface::UNBOUND_SYMB="UNBOUNDED";
+const char * OsiTMINLPInterface::INFEAS_SYMB="INFEAS";
+const char * OsiTMINLPInterface::TIME_SYMB="TIME";
+///////////////////////////////////////////////////////////////////
+// WarmStart Information                                                                           //
+///////////////////////////////////////////////////////////////////
+
+
+void
+OsiTMINLPInterface::resolveForCost(int numsolve, bool keepWarmStart)
+{
+  // This method assumes that a problem has just been solved and we try for a
+  // different solution. So disregard (in fact, clear out) any warmstart info
+  // we might have, and acquire a new one before returning.
+  delete warmstart_;
+  warmstart_ = NULL;
+ 
+  double * of_current = (numsolve > 0) ? new double[numsolve]: NULL;
+  int num_failed, num_infeas;
+  double mean, std_dev, var_coeff;
+  double min = DBL_MAX;
+  double max = -DBL_MAX;
+
+  Coin::SmartPtr<SimpleReferencedPtr<CoinWarmStart> > ws_backup = NULL;
+  if(warmStartMode_ <= Optimum && keepWarmStart){
+    //if warm start is not exposed, we need to store the current starting point to
+    //restore it at the end of the method
+    ws_backup = make_referenced(app_->getUsedWarmStart(problem_));
+  }
+  /** Save current optimum. */
+  vector<double> point(getNumCols()*3+ getNumRows());
+  double bestBound = (isProvenOptimal()) ? getObjValue() : DBL_MAX;
+  CoinCopyN(getColSolution(),
+      getNumCols(), point());
+  CoinCopyN(getRowPrice(),
+      2*getNumCols()+ getNumRows(),
+      point() + getNumCols());
+  TNLPSolver::ReturnStatus savedStatus = optimizationStatus_;
+  if(isProvenOptimal())
+    messageHandler()->message(SOLUTION_FOUND,
+        messages_)
+    <<1<<getObjValue()<<bestBound
+    <<CoinMessageEol;
+  else
+    messageHandler()->message(INFEASIBLE_SOLUTION_FOUND,
+        messages_)
+    <<1
+    <<CoinMessageEol;
+
+  num_failed = 0;
+  num_infeas = 0;
+  mean = 0;
+
+  for(int f = 0; f < numsolve ; f++) {
+    messageHandler()->message(WARNING_RESOLVING,
+        messages_)
+    <<f+1<< CoinMessageEol ;
+    randomStartingPoint();
+    solveAndCheckErrors(0,0,"resolve cost");
+
+
+    char c=' ';
+    //Is solution better than previous
+    if(isProvenOptimal() &&
+        getObjValue()<bestBound) {
+      c='*';
+      messageHandler()->message(BETTER_SOL, messages_)<<getObjValue()<<f+1<< CoinMessageEol;
+      CoinCopyN(getColSolution(),
+          getNumCols(), point());
+      CoinCopyN(getRowPrice(),
+          2*getNumCols()+ getNumRows(),
+          point() + getNumCols());
+      bestBound = getObjValue();
+      savedStatus = optimizationStatus_;
+    }
+
+    messageHandler()->message(LOG_LINE, messages_)
+    <<c<<f+1<<statusAsString()<<getObjValue()<<app_->IterationCount()<<app_->CPUTime()<<"resolve cost"<<CoinMessageEol;
+
+    if(isAbandoned()) {
+      num_failed++;
+    }
+    else if(isProvenPrimalInfeasible()) {
+       num_infeas++;
+    }
+
+    else if(isProvenOptimal())
+      messageHandler()->message(SOLUTION_FOUND,
+          messages_)
+      <<f+2<<getObjValue()<<bestBound
+      <<CoinMessageEol;
+    else if(!isAbandoned())
+      messageHandler()->message(UNSOLVED_PROBLEM_FOUND,
+          messages_)
+      <<f+2
+      <<CoinMessageEol;
+    else
+      messageHandler()->message(INFEASIBLE_SOLUTION_FOUND,
+          messages_)
+      <<f+2
+      <<CoinMessageEol;
+
+  if(of_current != NULL){
+    if(isProvenOptimal())
+    {
+      of_current[f] = getObjValue();
+      mean=mean+of_current[f];
+      if (of_current[f] < min)
+         min = of_current[f];
+      else if (of_current[f] > max)
+         max = of_current[f];
+    }
+    else
+    {
+      of_current[f] = 0;
+    }
+  }
+}
+
+
+  if(of_current != NULL){
+    //calculate the mean
+    mean=mean/(numsolve-num_failed-num_infeas);
+     
+    std_dev = 0;
+     
+    //calculate the std deviation
+    for(int i=0; i<numsolve; i++)
+    {
+      if(of_current[i]!=0)
+        std_dev=std_dev+pow(of_current[i]-mean,2);
+    }
+    std_dev=pow((std_dev/(numsolve-num_failed-num_infeas)),0.5);
+     
+    //calculate coeff of variation
+    var_coeff=std_dev/mean;
+
+    if(dynamicCutOff_)
+    {
+      if(var_coeff<0.1)
+      {
+        setNewCutoffDecr(mean*first_perc_for_cutoff_decr_);
+      }
+      else
+      {
+        setNewCutoffDecr(mean*second_perc_for_cutoff_decr_);
+      }
+    }
+  }
+
+  problem_->Set_x_sol(getNumCols(),point());
+  problem_->Set_dual_sol((int) point.size()-getNumCols(), point() + getNumCols());
+  problem_->set_obj_value(bestBound);
+  optimizationStatus_ = savedStatus;
+  hasBeenOptimized_ = true;
+
+  if(warmStartMode_ < Optimum && keepWarmStart) {
+    app_->setWarmStart(ws_backup->ptr(), problem_);
+  }
+}
+
+void
+OsiTMINLPInterface::resolveForRobustness(int numsolve)
+{
+  // This method assumes that a problem has just been solved and we try for a
+  // different solution. So disregard (in fact, clear out) any warmstart info
+  // we might have, and acquire a new one before returning.
+  delete warmstart_;
+  warmstart_ = NULL;
+  
+
+  CoinWarmStart * ws_backup = NULL;
+  if(warmStartMode_ < Optimum){
+    //if warm start is not exposed, we need to store the current starting point to
+    //restore it at the end of the method
+    ws_backup = app_->getUsedWarmStart(problem_);
+  }
+  //std::cerr<<"Resolving the problem for robustness"<<std::endl;
+  //First remove warm start point and resolve
+  app_->disableWarmStart();
+  problem()->resetStartingPoint();
+  messageHandler()->message(WARNING_RESOLVING,
+      messages_)
+  <<1<< CoinMessageEol ;
+  solveAndCheckErrors(0,0,"resolve robustness");
+
+
+  char c='*';
+  if(isAbandoned()) {
+    c=' ';
+  }
+  messageHandler()->message(LOG_LINE, messages_)
+  <<c<<1<<statusAsString()<<getObjValue()<<app_->IterationCount()<<
+    app_->CPUTime()<<"resolve robustness"<<CoinMessageEol;
+
+
+  if(!isAbandoned()) {
+    messageHandler()->message(WARN_SUCCESS_WS, messages_) << CoinMessageEol ;
+    // re-enable warmstart and get it
+    app_->enableWarmStart();
+    if (warmStartMode_ < Optimum) {
+      app_->setWarmStart(ws_backup, problem_);
+      delete ws_backup;
+    }
+    return; //we won go on
+  }
+
+  //still unsolved try again with different random starting points
+  for(int f = 0; f < numsolve ; f++) {
+    messageHandler()->message(WARNING_RESOLVING,
+        messages_)
+    <<f+2<< CoinMessageEol ;
+
+    randomStartingPoint();
+    solveAndCheckErrors(0,0,"resolve robustness");
+
+
+    messageHandler()->message(IPOPT_SUMMARY, messages_)
+    <<"resolveForRobustness"<<optimizationStatus_<<app_->IterationCount()<<app_->CPUTime()<<CoinMessageEol;
+
+
+    char c='*';
+    if(isAbandoned()) {
+      c=' ';
+    }
+    messageHandler()->message(LOG_LINE, messages_)
+    <<c<<f+2<<statusAsString()<<getObjValue()
+    <<app_->IterationCount()<<app_->CPUTime()<<"resolve robustness"<<CoinMessageEol;
+
+
+    if(!isAbandoned()) {
+      messageHandler()->message(WARN_SUCCESS_RANDOM, messages_)
+	<< f+2 << CoinMessageEol ;
+      // re-enable warmstart and get it
+      app_->enableWarmStart();
+      if (warmStartMode_ < Optimum) {
+        app_->setWarmStart(ws_backup, problem_);
+        delete ws_backup;
+      }
+        
+      return; //we have found a solution and continue
+    }
+  }
+
+
+  if(warmStartMode_ < Optimum){
+    app_->setWarmStart(ws_backup, problem_);
+    delete ws_backup;
+  }
+  if(pretendFailIsInfeasible_) {
+    pretendSucceededNext_ = true;
+    if(pretendFailIsInfeasible_ == 1) {
+      messageHandler()->message(WARN_CONTINUING_ON_FAILURE,
+          messages_)
+      <<CoinMessageEol;
+      hasContinuedAfterNlpFailure_ = 1;
+    }
+    return;
+  }
+  else {
+    std::string probName;
+    getStrParam(OsiProbName,probName);
+    throw newUnsolvedError(app_->errorCode(), problem_,
+                           probName);
+  }
+  // Do NOT get warmstart in other cases
+}
+
+////////////////////////////////////////////////////////////////////
+// Problem information methods                                    //
+////////////////////////////////////////////////////////////////////
+/// Get number of columns
+int OsiTMINLPInterface::getNumCols() const
+{
+
+  return problem_->num_variables();
+}
+
+
+/// Get number of rows
+int
+OsiTMINLPInterface::getNumRows() const
+{
+  return problem_->num_constraints();
+}
+
+const double *
+OsiTMINLPInterface::getColLower() const
+{
+  return problem_->x_l();
+}
+
+const double *
+OsiTMINLPInterface::getColUpper() const
+{
+  return problem_->x_u();
+}
+
+#if 1
+
+
+///get name of variables
+const OsiSolverInterface::OsiNameVec& 
+OsiTMINLPInterface::getVarNames() {
+  return getColNames();
+}
+#endif
+
+
+void OsiTMINLPInterface::extractSenseRhsAndRange() const
+{
+  assert(rowsense_==NULL&&rhs_==NULL&&rowrange_==NULL);
+  int numrows = problem_->num_constraints();
+  if(numrows == 0) return;
+  const double * rowLower = getRowLower();
+  const double * rowUpper = getRowUpper();
+  rowsense_ = new char [numrows];
+  rhs_ = new double [numrows];
+  rowrange_ = new double [numrows];
+  for(int i = 0 ; i < numrows ; i++) {
+    rowrange_[i]=0.;
+    convertBoundToSense(rowLower[i], rowUpper[i], rowsense_[i], rhs_[i], rowrange_[i]);
+  }
+}
+
+/** Get pointer to array[getNumRows()] of row constraint senses.
+    <ul>
+    <li>'L': <= constraint
+    <li>'E': =  constraint
+    <li>'G': >= constraint
+    <li>'R': ranged constraint
+    <li>'N': free constraint
+    </ul>
+*/
+const char *
+OsiTMINLPInterface::getRowSense() const
+{
+  if(rowsense_==NULL) {
+    extractSenseRhsAndRange();
+  }
+  return rowsense_;
+}
+
+/** Get pointer to array[getNumRows()] of rows right-hand sides
+    <ul>
+    <li> if rowsense()[i] == 'L' then rhs()[i] == rowupper()[i]
+    <li> if rowsense()[i] == 'G' then rhs()[i] == rowlower()[i]
+    <li> if rowsense()[i] == 'R' then rhs()[i] == rowupper()[i]
+    <li> if rowsense()[i] == 'N' then rhs()[i] == 0.0
+    </ul>
+*/
+const double *
+OsiTMINLPInterface::getRightHandSide() const
+{
+  if(rhs_==NULL) {
+    extractSenseRhsAndRange();
+  }
+  return rhs_;
+}
+
+/** Get pointer to array[getNumRows()] of row ranges.
+    <ul>
+    <li> if rowsense()[i] == 'R' then
+    rowrange()[i] == rowupper()[i] - rowlower()[i]
+    <li> if rowsense()[i] != 'R' then
+    rowrange()[i] is 0.0
+    </ul>
+*/
+const double *
+OsiTMINLPInterface::getRowRange() const
+{
+  if(rowrange_==NULL) {
+    extractSenseRhsAndRange();
+  }
+  return rowrange_;
+}
+
+const double *
+OsiTMINLPInterface::getRowLower() const
+{
+  return problem_->g_l();
+}
+
+const double *
+OsiTMINLPInterface::getRowUpper() const
+{
+  return problem_->g_u();
+}
+
+/// Return true if column is continuous
+bool
+OsiTMINLPInterface::isContinuous(int colNumber) const
+{
+  return (problem_->var_types()[colNumber]==TMINLP::CONTINUOUS);
+}
+
+/// Return true if column is binary
+bool
+OsiTMINLPInterface::isBinary(int colNumber) const
+{
+  return (problem_->var_types()[colNumber]==TMINLP::BINARY);
+}
+
+/** Return true if column is integer.
+    Note: This function returns true if the the column
+    is binary or a general integer.
+*/
+bool
+OsiTMINLPInterface::isInteger(int colNumber) const
+{
+  return ((problem_->var_types()[colNumber]==TMINLP::BINARY)||
+      (problem_->var_types()[colNumber]==TMINLP::INTEGER));
+}
+
+/// Return true if column is general integer
+bool
+OsiTMINLPInterface::isIntegerNonBinary(int colNumber) const
+{
+  return (problem_->var_types()[colNumber]==TMINLP::INTEGER);
+}
+/// Return true if column is binary and not fixed at either bound
+bool
+OsiTMINLPInterface::isFreeBinary(int colNumber) const
+{
+  return ((problem_->var_types()[colNumber]==TMINLP::BINARY)
+      &&((getColUpper()[colNumber]-getColLower()[colNumber]) > 1 - 1e-09));
+}
+
+/// Get solver's value for infinity
+double
+OsiTMINLPInterface::getInfinity() const
+{
+  return COIN_DBL_MAX;
+}
+
+/// Get pointer to array[getNumCols()] of primal solution vector
+const double *
+OsiTMINLPInterface::getColSolution() const
+{
+  if(hasBeenOptimized_)
+    return problem_->x_sol();
+  else
+    return problem_->x_init();
+}
+
+/// Get pointer to array[getNumRows()] of dual prices
+const double *
+OsiTMINLPInterface::getRowPrice() const
+{
+  if(hasBeenOptimized_)
+    return problem_->duals_sol();
+  else
+    return problem_->duals_init();
+}
+
+/// Get a pointer to array[getNumCols()] of reduced costs
+const double *
+OsiTMINLPInterface::getReducedCost() const
+{
+  (*handler_)<<"WARNING : trying to access reduced cost in Ipopt always retrun 0"<<CoinMessageEol;
+  if(reducedCosts_==NULL) {
+    reducedCosts_ = new double [getNumCols()];
+    CoinFillN(reducedCosts_,getNumCols(),0.);
+  }
+  return reducedCosts_;
+}
+
+/** Get pointer to array[getNumRows()] of row activity levels (constraint
+    matrix times the solution vector */
+const double *
+OsiTMINLPInterface::getRowActivity() const
+{
+  return problem_->g_sol();
+}
+
+/** Get how many iterations it took to solve the problem (whatever
+    "iteration" mean to the solver.
+*/
+int
+OsiTMINLPInterface::getIterationCount() const
+{
+    return app_->IterationCount();
+}
+
+
+/** Set a single column lower bound.
+    Use -getInfinity() for -infinity. */
+void
+OsiTMINLPInterface::setColLower( int elementIndex, double elementValue )
+{
+  //  if(fabs(problem_->x_l()[elementIndex]-elementValue)>1e-06)
+  problem_->SetVariableLowerBound(elementIndex,elementValue);
+  hasBeenOptimized_ = false;
+}
+
+/** Set a single column upper bound.
+    Use getInfinity() for infinity. */
+void
+OsiTMINLPInterface::setColUpper( int elementIndex, double elementValue )
+{
+  //  if(fabs(problem_->x_u()[elementIndex]-elementValue)>1e-06)
+  problem_->SetVariableUpperBound(elementIndex,elementValue);
+  hasBeenOptimized_ = false;
+}
+
+/** Set the lower bounds for all columns
+    Use -getInfinity() for -infinity. */
+void
+OsiTMINLPInterface::setColLower( const double* array )
+{
+  problem_->SetVariablesLowerBounds(problem_->num_variables(),
+                                  array);
+  hasBeenOptimized_ = false;
+}
+
+/** Set Set the upper bounds for all columns
+    Use getInfinity() for infinity. */
+void
+OsiTMINLPInterface::setColUpper( const double* array )
+{
+  problem_->SetVariablesUpperBounds(problem_->num_variables(), 
+                                  array);
+  hasBeenOptimized_ = false;
+}
+
+/** Set a single row lower bound.
+    Use -getInfinity() for -infinity. */
+void
+OsiTMINLPInterface::setRowLower( int elementIndex, double elementValue )
+{
+  throw SimpleError("Not implemented yet but should be if necessary.",
+      "setRowLower");
+  hasBeenOptimized_ = false;
+}
+
+/** Set a single row upper bound.
+    Use getInfinity() for infinity. */
+void
+OsiTMINLPInterface::setRowUpper( int elementIndex, double elementValue )
+{
+  throw SimpleError("Not implemented yet but should be if necessary.",
+      "setRowUpper");
+  hasBeenOptimized_ = false;
+}
+
+/** Set the type of a single row */
+void
+OsiTMINLPInterface::setRowType(int index, char sense, double rightHandSide,
+    double range)
+{
+  throw SimpleError("Not implemented yet but should be if necessary.",
+      "setRowType");
+  hasBeenOptimized_ = false;
+}
+
+
+/// Set the objective function sense.
+/// (1 for min (default), -1 for max)
+void
+OsiTMINLPInterface::setObjSense(double s)
+{
+  throw SimpleError("Can not change objective sense of an Ipopt problem.",
+      "setObjSense");
+  hasBeenOptimized_ = false;
+}
+
+/** Set the primal solution variable values
+
+colsol[getNumCols()] is an array of values for the primal variables.
+These values are copied to memory owned by the solver interface object
+or the solver.  They will be returned as the result of getColSolution()
+until changed by another call to setColSolution() or by a call to any
+solver routine.  Whether the solver makes use of the solution in any
+way is solver-dependent.
+*/
+void
+OsiTMINLPInterface::setColSolution(const double *colsol)
+{
+  if(colsol != NULL)
+    problem_->setxInit(getNumCols(), colsol);
+  else
+    problem_->resetStartingPoint();
+  hasBeenOptimized_ = false;
+}
+
+/** Set dual solution variable values
+
+rowprice[getNumRows()] is an array of values for the dual
+variables. These values are copied to memory owned by the solver
+interface object or the solver.  They will be returned as the result of
+getRowPrice() until changed by another call to setRowPrice() or by a
+call to any solver routine.  Whether the solver makes use of the
+solution in any way is solver-dependent.
+*/
+
+void
+OsiTMINLPInterface::setRowPrice(const double * rowprice)
+{
+  problem_->setDualsInit(getNumCols()*2 + getNumRows(), rowprice);
+  hasBeenOptimized_ = false;
+}
+
+  /*! \brief Get an empty warm start object
+
+  This routine returns an empty CoinWarmStartBasis object. Its purpose is
+  to provide a way to give a client a warm start basis object of the
+  appropriate type, which can resized and modified as desired.
+  */
+CoinWarmStart *
+OsiTMINLPInterface::getEmptyWarmStart () const
+{return app_->getEmptyWarmStart();}
+
+  /** Get warmstarting information */
+CoinWarmStart* 
+OsiTMINLPInterface::getWarmStart() const
+{
+  if (warmStartMode_ >= Optimum) {
+    return internal_getWarmStart();;
+  }
+  else if(warmStartMode_ == FakeBasis){
+    return build_fake_basis();
+  }
+  else {
+    return getEmptyWarmStart();
+  }
+}
+  /** Set warmstarting information. Return true/false depending on whether
+      the warmstart information was accepted or not. */
+bool 
+OsiTMINLPInterface::setWarmStart(const CoinWarmStart* ws)
+{
+  if (warmStartMode_ >= Optimum) {
+    return internal_setWarmStart(ws);
+  }
+  else {
+    return true;
+  }
+}
+
+
+#define EPSILON 1e-4
+
+CoinWarmStart*
+OsiTMINLPInterface::build_fake_basis() const{
+   CoinWarmStartBasis * r_val = new CoinWarmStartBasis();
+   int n_con = problem_->num_constraints();
+   r_val->setSize(problem_->num_variables(), n_con);
+   const double * act = problem_->g_sol();
+   const double * lb = problem_->g_l();
+   const double * ub = problem_->g_u();
+   for(int i = 0 ; i < n_con ; i++){
+     if(lb[i] > ub[i] - EPSILON){
+        r_val->setArtifStatus(i, CoinWarmStartBasis::isFree); 
+     }
+     if(act[i] > ub[i] - EPSILON){
+        r_val->setArtifStatus(i, CoinWarmStartBasis::atLowerBound); 
+     }
+     else if(act[i] < lb[i] + EPSILON){
+        r_val->setArtifStatus(i, CoinWarmStartBasis::atLowerBound); 
+     }
+     else {
+        r_val->setArtifStatus(i, CoinWarmStartBasis::basic); 
+     }
+   }
+   return r_val;
+}
+
+  /** Get warmstarting information */
+CoinWarmStart* 
+OsiTMINLPInterface::internal_getWarmStart() const
+{
+  if (warmStartMode_ >= Optimum && warmstart_) {
+    return warmstart_->clone();
+  }
+  else {
+    return getEmptyWarmStart();
+  }
+}
+  /** Set warmstarting information. Return true/false depending on whether
+      the warmstart information was accepted or not. */
+bool 
+OsiTMINLPInterface::internal_setWarmStart(const CoinWarmStart* ws)
+{
+  delete warmstart_;
+  warmstart_ = NULL;
+  hasBeenOptimized_ = false;
+  if (warmStartMode_ >= Optimum) {
+    if (ws == NULL) {
+      return true;
+    }
+  if(app_->warmStartIsValid(ws)) {
+    warmstart_ = ws->clone();
+    return true;
+  }
+  // See if it is anything else than the CoinWarmStartBasis that all others
+  // derive from
+  const CoinWarmStartPrimalDual* pdws =
+    dynamic_cast<const CoinWarmStartPrimalDual*>(ws);
+  if (pdws) {
+    // Must be an IpoptWarmStart, since the others do not derive from this.
+    // Accept it.
+    warmstart_ = new IpoptWarmStart(*pdws);
+    return true;
+  }
+  return false;
+  }
+  else {
+    return true;
+  }
+}
+
+/** Set the index-th variable to be a continuous variable */
+void
+OsiTMINLPInterface::setContinuous(int index)
+{
+  problem_->SetVariableType(index, TMINLP::CONTINUOUS);
+  hasBeenOptimized_ = false;
+}
+/** Set the index-th variable to be an integer variable */
+void
+OsiTMINLPInterface::setInteger(int index)
+{
+  problem_->SetVariableType(index, TMINLP::INTEGER);
+  hasBeenOptimized_ = false;
+}
+
+/// Get objective function value (can't use default)
+double
+OsiTMINLPInterface::getObjValue() const
+{
+  return problem_->obj_value();
+}
+
+//#############################################################################
+// Parameter related methods
+//#############################################################################
+
+bool
+OsiTMINLPInterface::setIntParam(OsiIntParam key, int value)
+{
+  //  debugMessage("OsiCpxSolverInterface::setIntParam(%d, %d)\n", key, value);
+
+  bool retval = false;
+  switch (key) {
+  case OsiMaxNumIteration:
+    retval = false;
+    break;
+  case OsiMaxNumIterationHotStart:
+    if( value >= 0 ) {
+      retval = false;
+    }
+    else
+      retval = false;
+    break;
+  case OsiLastIntParam:
+    retval = false;
+    break;
+  default:
+    retval = false;
+    (*handler_)<< "Unhandled case in setIntParam\n"<<CoinMessageEol;
+    break;
+  }
+  return retval;
+}
+
+//-----------------------------------------------------------------------------
+
+bool
+OsiTMINLPInterface::setDblParam(OsiDblParam key, double value)
+{
+  //  debugMessage("OsiTMINLPInterface::setDblParam(%d, %g)\n", key, value);
+
+  bool retval = false;
+  switch (key) {
+  case OsiDualObjectiveLimit:
+    OsiDualObjectiveLimit_ = value;
+    retval = true;
+    break;
+  case OsiPrimalObjectiveLimit:
+    (*handler_)<<"Can not set primal objective limit parameter"<<CoinMessageEol;
+    retval = false;
+    break;
+  case OsiDualTolerance:
+    (*handler_)<<"Can not set dual tolerance parameter"<<CoinMessageEol;
+    retval = false;
+    break;
+  case OsiPrimalTolerance:
+    (*handler_)<<"Can not set primal tolerance parameter"<<CoinMessageEol;
+    retval = false;
+  case OsiObjOffset:
+    retval = OsiSolverInterface::setDblParam(key,value);
+    break;
+  case OsiLastDblParam:
+    retval = false;
+    break;
+  default:
+    retval = false;
+    (*handler_) << "Unhandled case in setDblParam"<<CoinMessageEol;
+    break;
+  }
+  return retval;
+}
+
+
+//-----------------------------------------------------------------------------
+
+bool
+OsiTMINLPInterface::setStrParam(OsiStrParam key, const std::string & value)
+{
+  //  debugMessage("OsiTMINLPInterface::setStrParam(%d, %s)\n", key, value.c_str());
+
+  bool retval=false;
+  switch (key) {
+  case OsiProbName:
+    OsiSolverInterface::setStrParam(key,value);
+    return retval = true;
+  case OsiSolverName:
+    return false;
+  case OsiLastStrParam:
+    return false;
+  }
+  return false;
+}
+
+//-----------------------------------------------------------------------------
+
+bool
+OsiTMINLPInterface::getIntParam(OsiIntParam key, int& value) const
+{
+  //  debugMessage("OsiTMINLPInterface::getIntParam(%d)\n", key);
+
+  value = -COIN_INT_MAX; // Give a dummy value
+  bool retval = false;
+  switch (key) {
+  case OsiMaxNumIteration:
+    retval = false;
+    break;
+  case OsiMaxNumIterationHotStart:
+    retval = false;
+    break;
+  case OsiLastIntParam:
+    retval = false;
+    break;
+  default:
+    retval = false;
+    (*handler_) << "Unhandled case in setIntParam"<<CoinMessageEol;
+  }
+  return retval;
+}
+
+//-----------------------------------------------------------------------------
+
+bool
+OsiTMINLPInterface::getDblParam(OsiDblParam key, double& value) const
+{
+  //  debugMessage("OsiTMINLPInterface::getDblParam(%d)\n", key);
+
+  bool retval = false;
+  switch (key) {
+  case OsiDualObjectiveLimit:
+    value = OsiDualObjectiveLimit_;
+    retval = true;
+    break;
+  case OsiPrimalObjectiveLimit:
+    value = getInfinity();
+    retval = true;
+    break;
+  case OsiDualTolerance:
+    retval = false;
+    break;
+  case OsiPrimalTolerance:
+    options()->GetNumericValue("tol", value,"");
+    value = 1e-07;
+    retval = true;
+    break;
+  case OsiObjOffset:
+    retval = OsiSolverInterface::getDblParam(key, value);
+    break;
+  case OsiLastDblParam:
+    retval = false;
+    break;
+  }
+  return retval;
+}
+
+
+//-----------------------------------------------------------------------------
+
+bool
+OsiTMINLPInterface::getStrParam(OsiStrParam key, std::string & value) const
+{
+  //  debugMessage("OsiTMINLPInterface::getStrParam(%d)\n", key);
+
+  switch (key) {
+  case OsiProbName:
+    OsiSolverInterface::getStrParam(key, value);
+    break;
+  case OsiSolverName:
+    value = "Ipopt";
+    break;
+  case OsiLastStrParam:
+    return false;
+  }
+
+  return true;
+}
+
+void 
+OsiTMINLPInterface::set_linearizer(Ipopt::SmartPtr<TMINLP2OsiLP> linearizer)
+{
+  linearizer_ = linearizer->clone();
+  linearizer_->set_tols(tiny_, veryTiny_, rhsRelax_, infty_);
+  linearizer_->set_model(GetRawPtr(problem_));
+}
+
+Ipopt::SmartPtr<TMINLP2OsiLP> 
+OsiTMINLPInterface::linearizer(){
+   return linearizer_;
+}
+
+
+void
+OsiTMINLPInterface::randomStartingPoint()
+{
+  int numcols = getNumCols();
+  const double * colLower = getColLower();
+  const double * colUpper = getColUpper();
+  double * sol = new double[numcols];
+  const Number * x_init = problem_->x_init_user();
+  const double* perturb_radius = NULL;
+  if (randomGenerationType_ == perturb_suffix) {
+    const TMINLP::PerturbInfo* pertubinfo = tminlp_->perturbInfo();
+    if (pertubinfo) {
+      perturb_radius = pertubinfo->GetPerturbationArray();
+    }
+    if (!perturb_radius) {
+      throw SimpleError("Can't use perturb_radius if no radii are given.",
+			"randomStartingPoint");
+    }
+  }
+  for(int i = 0 ; i < numcols ; i++) {
+    if(randomGenerationType_ == uniform || x_init[i] < colLower[i] || x_init[i] > colUpper[i]) {
+      double lower = std::min(-maxRandomRadius_,colUpper[i] - maxRandomRadius_);
+      lower = std::max(colLower[i], lower);
+      double upper = std::max(maxRandomRadius_,colLower[i] + maxRandomRadius_);
+      upper = std::min(colUpper[i],upper);
+      lower = std::min(upper,lower);
+      upper = std::max(upper, lower);
+      double interval = upper - lower;
+      sol[i] = CoinDrand48()*(interval) + lower;
+    }
+    else if (randomGenerationType_ == perturb) {
+      const double lower = std::max(x_init[i] - max_perturbation_, colLower[i]);
+      const double upper = std::min(x_init[i] + max_perturbation_, colUpper[i]);
+      const double interval = upper - lower;
+      sol[i]  = lower + CoinDrand48()*(interval);
+    }
+    else if (randomGenerationType_ == perturb_suffix) {
+      const double radius = perturb_radius[i];
+      const double lower = std::max(x_init[i] - radius*max_perturbation_, colLower[i]);
+      const double upper = std::min(x_init[i] + radius*max_perturbation_, colUpper[i]);
+      const double interval = upper - lower;
+      sol[i]  = lower + CoinDrand48()*(interval);
+    }
+  }
+  app_->disableWarmStart();
+  setColSolution(sol);
+  delete [] sol;
+}
+
+
+
+/** This methods initialiaze arrays for storing the jacobian */
+int OsiTMINLPInterface::initializeJacobianArrays()
+{
+  Index n, m, nnz_h_lag;
+  TNLP::IndexStyleEnum index_style;
+  problem_to_optimize_->get_nlp_info( n, m, nnz_jac, nnz_h_lag, index_style);
+
+  if(jRow_ != NULL) delete [] jRow_;
+  if(jCol_ != NULL) delete [] jCol_;
+  if(jValues_ != NULL) delete [] jValues_;
+
+  jRow_ = new Index[nnz_jac];
+  jCol_ = new Index[nnz_jac];
+  jValues_ = new Number[nnz_jac];
+  problem_to_optimize_->eval_jac_g(n, NULL, 0, m, nnz_jac, jRow_, jCol_, NULL);
+  if(index_style == Ipopt::TNLP::FORTRAN_STYLE)//put C-style
+  {
+    for(int i = 0 ; i < nnz_jac ; i++){
+      jRow_[i]--;
+      jCol_[i]--;
+    }
+  }
+
+  if(constTypes_ != NULL) delete [] constTypes_;
+//  if(constTypesNum_ != NULL) delete [] constTypesNum_;
+
+  constTypes_ = new TNLP::LinearityType[getNumRows()];
+  problem_to_optimize_->get_constraints_linearity(getNumRows(), constTypes_);
+//  constTypesNum_ = new int[getNumRows()];
+  for(int i = 0; i < getNumRows() ; i++) {
+    if(constTypes_[i]==TNLP::NON_LINEAR) {
+      //constTypesNum_[i] = 
+      nNonLinear_++;
+    }
+  }
+  return nnz_jac;
+}
+
+
+double 
+OsiTMINLPInterface::getConstraintsViolation(const double *x, double &obj)
+{
+  int numcols = getNumCols();
+  int numrows = getNumRows();
+  double * g = new double[numrows];
+  tminlp_->eval_g(numcols, x, 1, numrows, g);
+  const double * rowLower = getRowLower();
+  const double * rowUpper = getRowUpper();
+
+
+  double norm = 0;
+  for(int i = 0; i< numrows ; i++) {
+    if(!constTypes_ || constTypes_[i] == TNLP::NON_LINEAR) {
+      double rowViolation = 0;
+      if(rowLower[i] > -1e10)
+         rowViolation = std::max(0.,rowLower[i] - g[i]);
+
+      if(rowUpper[i] < 1e10);
+        rowViolation = std::max(rowViolation, g[i] - rowUpper[i]);
+
+      norm = rowViolation > norm ? rowViolation : norm;
+    }
+  }
+  tminlp_->eval_f(numcols, x, 1, obj);
+  delete [] g;
+  return norm;
+}
+
+/** get infinity norm of constraint violation of a point and objective error*/
+double
+OsiTMINLPInterface::getNonLinearitiesViolation(const double *x, const double obj)
+{
+  double f;
+  double norm = getConstraintsViolation(x, f);
+  assert((f - obj) > -1e-08);
+  norm =  (f - obj) > norm ? f - obj : norm;
+  return norm;
+}
+
+
+
+//A procedure to try to remove small coefficients in OA cuts (or make it non small
+static inline
+bool cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny,
+    double infty)
+{
+  //return 1;
+  if(fabs(value)>= tiny) return 1;
+
+  if(fabs(value)<veryTiny) return 0;//Take the risk?
+
+  //try and remove
+  bool colUpBounded = colUpper < infty;
+  bool colLoBounded = colLower > -infty;
+  bool rowNotLoBounded =  rowLower <= - infty;
+  bool rowNotUpBounded = rowUpper >= infty;
+  bool pos =  value > 0;
+  if(colUpBounded && pos && rowNotUpBounded) {
+    lb += value * (colsol - colUpper);
+    return 0;
+  }
+  else
+    if(colUpBounded && !pos && rowNotLoBounded) {
+      ub += value * (colsol - colUpper);
+      return 0;
+    }
+    else
+      if(colLoBounded && !pos && rowNotUpBounded) {
+        lb += value * (colsol - colLower);
+        return 0;
+      }
+      else
+        if(colLoBounded && pos && rowNotLoBounded) {
+          ub += value * (colsol - colLower);
+          return 0;
+        }
+  //can not remove coefficient 
+  return 1;
+}
+
+/** Get the outer approximation constraints at the point x.
+*/
+void
+OsiTMINLPInterface::getOuterApproximation(OsiCuts &cs, const double * x, 
+                                          int getObj, const double * x2,
+                                          double theta, bool global)
+{
+  if(IsValid(linearizer_) && x2 == NULL){
+    linearizer_->get_oas(cs, x, getObj, global);
+    return;
+  }
+  int n,m, nnz_jac_g, nnz_h_lag;
+  TNLP::IndexStyleEnum index_style;
+  problem_to_optimize_->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+  if(jRow_ == NULL || jCol_ == NULL || jValues_ == NULL)
+    initializeJacobianArrays();
+  assert(jRow_ != NULL);
+  assert(jCol_ != NULL);
+  vector<double> g(m);
+  problem_to_optimize_->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL, jValues_);
+  problem_to_optimize_->eval_g(n,x,1,m,g());
+  //As jacobian is stored by cols fill OsiCuts with cuts
+  vector<CoinPackedVector>  cuts(nNonLinear_ + 1);
+  vector<double> lb(nNonLinear_ + 1);
+  vector<double> ub(nNonLinear_ + 1);
+
+  vector<int> row2cutIdx(m,-1);//store correspondance between index of row and index of cut (some cuts are not generated for rows because linear, or not binding). -1 if constraint does not generate a cut, otherwise index in cuts.
+  int numCuts = 0;
+
+  const double * rowLower = getRowLower();
+  const double * rowUpper = getRowUpper();
+  const double * colLower = getColLower();
+  const double * colUpper = getColUpper();
+  const double * duals = getRowPrice() + 2 * n;
+  double infty = getInfinity();
+  
+  for(int rowIdx = 0; rowIdx < m ; rowIdx++) {
+    if(constTypes_[rowIdx] == TNLP::NON_LINEAR) {
+      row2cutIdx[rowIdx] = numCuts;
+      if(rowLower[rowIdx] > - infty_)
+        lb[numCuts] = rowLower[rowIdx] - g[rowIdx];
+      else
+        lb[numCuts] = - infty;
+      if(rowUpper[rowIdx] < infty_)
+        ub[numCuts] = rowUpper[rowIdx] - g[rowIdx];
+      else
+        ub[numCuts] = infty;
+      if(rowLower[rowIdx] > -infty && rowUpper[rowIdx] < infty)
+      {
+        if(duals[rowIdx] >= 0)// <= inequality
+          lb[numCuts] = - infty;
+        if(duals[rowIdx] <= 0)// >= inequality
+          ub[numCuts] = infty;
+      }
+      
+      numCuts++;
+    }
+  }
+
+
+  for(int i = 0 ; i < nnz_jac_g ; i++) {
+    const int &rowIdx = jRow_[i];
+    const int & cutIdx = row2cutIdx[ rowIdx ];
+    if(cutIdx != -1) {
+      const int &colIdx = jCol_[i];
+      //"clean" coefficient
+      if(cleanNnz(jValues_[i],colLower[colIdx], colUpper[colIdx],
+		  rowLower[rowIdx], rowUpper[rowIdx],
+		  x[colIdx],
+		  lb[cutIdx],
+		  ub[cutIdx], tiny_, veryTiny_, infty_)) {
+        cuts[cutIdx].insert(colIdx,jValues_[i]);
+        if(lb[cutIdx] > - infty)
+          lb[cutIdx] += jValues_[i] * x[colIdx];
+        if(ub[cutIdx] < infty)
+	  ub[cutIdx] += jValues_[i] * x[colIdx];
+      }
+    }
+  }
+
+  vector<int> cut2rowIdx(0);
+  if (IsValid(cutStrengthener_) || oaHandler_->logLevel() > 0) {
+    cut2rowIdx.resize(numCuts);// Store correspondance between indices of cut and indices of rows. For each cut
+    for(int rowIdx = 0 ; rowIdx < m ; rowIdx++){
+       if(row2cutIdx[rowIdx] >= 0){
+          cut2rowIdx[row2cutIdx[rowIdx]] = rowIdx;
+       }
+    }
+  }
+
+  for(int cutIdx = 0; cutIdx < numCuts; cutIdx++) {
+    //Compute cut violation
+    if(x2 != NULL) {
+      double rhs = cuts[cutIdx].dotProduct(x2);
+      double violation = 0.;
+      violation = std::max(violation, rhs - ub[cutIdx]);
+      violation = std::max(violation, lb[cutIdx] - rhs);
+      if(violation < theta && oaHandler_->logLevel() > 0) {
+          oaHandler_->message(CUT_NOT_VIOLATED_ENOUGH, oaMessages_)<<cut2rowIdx[cutIdx]<<violation<<CoinMessageEol;
+        continue;}
+      if(oaHandler_->logLevel() > 0)
+          oaHandler_->message(VIOLATED_OA_CUT_GENERATED, oaMessages_)<<cut2rowIdx[cutIdx]<<violation<<CoinMessageEol;
+    }
+  OsiRowCut newCut;
+    //    if(lb[i]>-1e20) assert (ub[i]>1e20);
+
+    if (IsValid(cutStrengthener_)) {
+      const int& rowIdx = cut2rowIdx[cutIdx];
+      bool retval =
+	cutStrengthener_->ComputeCuts(cs, GetRawPtr(tminlp_),
+				       GetRawPtr(problem_), rowIdx,
+				       cuts[cutIdx], lb[cutIdx], ub[cutIdx], g[rowIdx],
+				       rowLower[rowIdx], rowUpper[rowIdx],
+				       n, x, infty);
+      if (!retval) {
+	(*messageHandler()) << "error in cutStrengthener_->ComputeCuts\n";
+	//exit(-2);
+      }
+    }
+    if(global) {
+      newCut.setGloballyValidAsInteger(1);
+    }
+    if(lb[cutIdx] > infty) lb[cutIdx] -= rhsRelax_*std::max(fabs(lb[cutIdx]), 1.);
+    if(ub[cutIdx] < infty) ub[cutIdx] += rhsRelax_*std::max(fabs(ub[cutIdx]), 1.);
+    newCut.setLb(lb[cutIdx]);
+    newCut.setUb(ub[cutIdx]);
+    newCut.setRow(cuts[cutIdx]);
+    if(oaHandler_->logLevel()>2){
+      oaHandler_->print(newCut);}
+    cs.insert(newCut);
+  }
+
+  if(getObj == 2 || (getObj && !problem_->hasLinearObjective())) { // Get the objective cuts
+    vector<double> obj(n);
+    problem_to_optimize_->eval_grad_f(n, x, 1,obj());
+    double f;
+    problem_to_optimize_->eval_f(n, x, 1, f);
+
+    CoinPackedVector v;
+    v.reserve(n);
+    lb[nNonLinear_] = -f;
+    ub[nNonLinear_] = -f;
+    //double minCoeff = 1e50;
+    for(int i = 0; i<n ; i++) {
+      if(cleanNnz(obj[i],colLower[i], colUpper[i],
+          -getInfinity(), 0,
+          x[i],
+          lb[nNonLinear_],
+          ub[nNonLinear_],tiny_, 1e-15, infty_)) {
+        v.insert(i,obj[i]);
+        lb[nNonLinear_] += obj[i] * x[i];
+        ub[nNonLinear_] += obj[i] * x[i];
+      }
+    }
+    v.insert(n,-1);
+    //Compute cut violation
+    bool genCut = true;
+    if(x2 != NULL) {
+      double rhs = v.dotProduct(x2);
+      double violation = std::max(0., rhs - ub[nNonLinear_]);
+      if(violation < theta) genCut = false;
+    }
+    if(genCut) {
+      if (IsValid(cutStrengthener_)) {
+	lb[nNonLinear_] = -infty;
+	bool retval =
+	  cutStrengthener_->ComputeCuts(cs, GetRawPtr(tminlp_),
+					 GetRawPtr(problem_), -1,
+					 v, lb[nNonLinear_], ub[nNonLinear_],
+					 ub[nNonLinear_], -infty, 0.,
+					 n, x, infty);
+	if (!retval) {
+    (*handler_)<< "error in cutStrengthener_->ComputeCuts"<<CoinMessageEol;
+	  //exit(-2);
+	}
+      }
+      OsiRowCut newCut;
+      if(global)
+	newCut.setGloballyValidAsInteger(1);
+      //newCut.setEffectiveness(99.99e99);
+      newCut.setRow(v);
+      newCut.setLb(-COIN_DBL_MAX/*Infinity*/);
+      newCut.setUb(ub[nNonLinear_]);
+      cs.insert(newCut);
+    }
+    }
+}
+
+/** Get a benders cut from solution.*/
+void
+OsiTMINLPInterface::getBendersCut(OsiCuts &cs, 
+                                  bool global){
+  int n,m, nnz_jac_g, nnz_h_lag;
+  TNLP::IndexStyleEnum index_style;
+  problem_to_optimize_->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+  if(jRow_ == NULL || jCol_ == NULL || jValues_ == NULL)
+    initializeJacobianArrays();
+  assert(jRow_ != NULL);
+  assert(jCol_ != NULL);
+  vector<double> g(m);
+  const double * x = getColSolution();
+  problem_to_optimize_->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL, jValues_);
+  problem_to_optimize_->eval_g(n,x,1,m,g());
+  //As jacobian is stored by cols fill OsiCuts with cuts
+  vector<double> cut(n+1,0.);
+  vector<bool> keep(m+1,false);
+  double lb = 0;
+  double ub = 0;
+
+  const double * rowLower = getRowLower();
+  const double * rowUpper = getRowUpper();
+  const double * colLower = getColLower();
+  const double * colUpper = getColUpper();
+  const double * duals = getRowPrice() + 2 * n;
+  //double infty = getInfinity();
+  
+  for(int rowIdx = 0; rowIdx < m ; rowIdx++) {
+    if(constTypes_[rowIdx] == TNLP::NON_LINEAR && fabs(duals[rowIdx]) > 1e-06)
+    {
+      const double & lam = duals[rowIdx];
+      keep[rowIdx] = true;
+      assert(lam < 0 || rowUpper[rowIdx] < 1e10);
+      assert(lam > 0 || rowLower[rowIdx] > -1e10);
+      if(lam < 0){
+        assert(rowLower[rowIdx] > -1e10);
+        ub += lam*(rowLower[rowIdx] -g[rowIdx]);
+      }
+      else {
+        assert(rowUpper[rowIdx] < 1e10);
+        ub += lam*(rowUpper[rowIdx] -g[rowIdx]);
+      }
+    }
+  }
+
+
+  for(int i = 0 ; i < nnz_jac_g ; i++) {
+    const int &rowIdx = jRow_[i];
+    if (!keep[rowIdx]) continue;
+    const int &colIdx = jCol_[i];
+    //"clean" coefficient
+    const double & lam = duals[rowIdx];
+    double coeff = lam*jValues_[i];
+    if(cleanNnz(coeff,colLower[colIdx], colUpper[colIdx],
+      	  rowLower[rowIdx], rowUpper[rowIdx], x[colIdx], lb,
+      	  ub, tiny_, veryTiny_, infty_)) {
+      cut[colIdx] += coeff;
+      ub += coeff * x[colIdx];
+    }
+  }
+
+  CoinPackedVector v;
+  if(!problem_->hasLinearObjective() && 
+     isProvenOptimal()) { // Get the objective cuts
+    vector<double> obj(n);
+    problem_to_optimize_->eval_grad_f(n, x, 1,obj());
+    double f;
+    problem_to_optimize_->eval_f(n, x, 1, f);
+
+    ub = -f;
+    //double minCoeff = 1e50;
+    for(int i = 0; i<n ; i++) {
+      if(cleanNnz(obj[i],colLower[i], colUpper[i], -getInfinity(), 0,
+          x[i], lb, ub,tiny_, 1e-15, infty_)) {
+        cut[i] += obj[i];
+        ub += obj[i] * x[i];
+      }
+    }
+  v.insert(n,-1);
+  }
+  for(int i = 0 ; i < n ; i++){
+    if(fabs(cut[i])>1e-020){
+      v.insert(i, cut[i]);
+    }
+  }
+  OsiRowCut newCut;
+  if(global)
+    newCut.setGloballyValidAsInteger(1);
+  newCut.setLb(-COIN_DBL_MAX/*Infinity*/);
+  newCut.setUb(ub);
+  newCut.setRow(v);
+  cs.insert(newCut);
+}
+
+/** Get the outer approximation of a single constraint at the point x.
+*/
+void
+OsiTMINLPInterface::getConstraintOuterApproximation(OsiCuts &cs, int rowIdx, 
+                                                    const double * x, 
+                                                    const double * x2, bool global)
+{
+  double g;
+  int * indices = new int[getNumCols()];
+  double * values = new double[getNumCols()];
+  int nnz;
+  problem_->eval_grad_gi(getNumCols(), x, 1, rowIdx, nnz, indices, values);
+  problem_->eval_gi(getNumCols(),x,1, rowIdx, g);
+
+  CoinPackedVector cut;
+  double lb;
+  double ub;
+
+
+  const double rowLower = getRowLower()[rowIdx];
+  const double rowUpper = getRowUpper()[rowIdx];
+  const double * colLower = getColLower();
+  const double * colUpper = getColUpper();
+  const double dual = (getRowPrice() + 2 * getNumCols())[rowIdx];
+  double infty = getInfinity();
+  
+  if(rowLower > - infty_)
+    lb = rowLower - g;
+  else
+    lb = - infty;
+  if(rowUpper < infty_)
+    ub = rowUpper - g;
+  else
+    ub = infty;
+  if(rowLower > -infty && rowUpper < infty)
+  {
+    if(dual >= 0)// <= inequality
+      lb = - infty;
+    if(dual <= 0)// >= inequality
+      ub = infty;
+  }
+
+  for(int i = 0 ; i < nnz; i++) {
+     const int &colIdx = indices[i];
+      //"clean" coefficient
+      if(cleanNnz(values[i],colLower[colIdx], colUpper[colIdx],
+		  rowLower, rowUpper,
+		  x[colIdx],
+		  lb,
+		  ub, tiny_, veryTiny_, infty_)) {
+        cut.insert(colIdx,values[i]);
+        if(lb > - infty)
+          lb += values[i] * x[colIdx];
+        if(ub < infty)
+	  ub += values[i] * x[colIdx];
+    }
+  }
+
+  OsiRowCut newCut;
+
+  if(global) {
+    newCut.setGloballyValidAsInteger(1);
+  }
+  //newCut.setEffectiveness(99.99e99);
+  newCut.setLb(lb);
+  newCut.setUb(ub);
+  newCut.setRow(cut);
+  cs.insert(newCut);
+
+  delete [] indices;
+  delete [] values;
+}
+
+void
+OsiTMINLPInterface::switchToFeasibilityProblem(size_t n,const double * x_bar,const int *inds,
+                                            double a, double s, int L){
+  if(! IsValid(feasibilityProblem_)) {
+    throw SimpleError("No feasibility problem","getFeasibilityOuterApproximation");
+  }
+  feasibilityProblem_->set_use_feasibility_pump_objective(true);
+  feasibilityProblem_->set_dist_to_point_obj(n,(const Number *) x_bar,(const Index *) inds);
+  feasibilityProblem_->setLambda(a);
+  feasibilityProblem_->setSigma(s);
+  feasibilityProblem_->setNorm(L);
+  feasibilityProblem_->set_use_cutoff_constraint(false);
+  feasibilityProblem_->set_use_local_branching_constraint(false);  
+  problem_to_optimize_ = GetRawPtr(feasibilityProblem_);
+  feasibility_mode_ = true;
+}
+
+void
+OsiTMINLPInterface::switchToFeasibilityProblem(size_t n,const double * x_bar,const int *inds,
+					       double rhs_local_branching_constraint){
+  if(! IsValid(feasibilityProblem_)) {
+    throw SimpleError("No feasibility problem","getFeasibilityOuterApproximation");
+  }
+  feasibilityProblem_->set_use_feasibility_pump_objective(false);
+  feasibilityProblem_->set_dist_to_point_obj(n,(const Number *) x_bar,(const Index *) inds);
+  feasibilityProblem_->set_use_cutoff_constraint(false);
+  feasibilityProblem_->set_use_local_branching_constraint(true);  
+  feasibilityProblem_->set_rhs_local_branching_constraint(rhs_local_branching_constraint);  
+  problem_to_optimize_ = GetRawPtr(feasibilityProblem_);
+  feasibility_mode_ = true;
+}
+
+void
+OsiTMINLPInterface::switchToOriginalProblem(){
+  problem_to_optimize_ = GetRawPtr(problem_);
+  feasibility_mode_ = false;
+}
+
+double
+OsiTMINLPInterface::solveFeasibilityProblem(size_t n,const double * x_bar,const int *inds, 
+                                            double a, double s, int L)
+{
+  if(! IsValid(feasibilityProblem_)) {
+    throw SimpleError("No feasibility problem","getFeasibilityOuterApproximation");
+  }
+  feasibilityProblem_->set_use_feasibility_pump_objective(true);
+  feasibilityProblem_->set_dist_to_point_obj(n,(const Number *) x_bar,(const Index *) inds);
+  feasibilityProblem_->setLambda(a);
+  feasibilityProblem_->setSigma(s);
+  feasibilityProblem_->setNorm(L);
+  feasibilityProblem_->set_use_cutoff_constraint(false);
+  feasibilityProblem_->set_use_local_branching_constraint(false);  
+  nCallOptimizeTNLP_++;
+  totalNlpSolveTime_-=CoinCpuTime();
+  SmartPtr<TNLPSolver> app2 = app_->clone();
+  app2->options()->SetIntegerValue("print_level", (Index) 0);
+  optimizationStatus_ = app2->OptimizeTNLP(GetRawPtr(feasibilityProblem_));
+  totalNlpSolveTime_+=CoinCpuTime();
+  hasBeenOptimized_=true;
+  return getObjValue();
+}
+
+double
+OsiTMINLPInterface::solveFeasibilityProblem(size_t n,const double * x_bar,const int *inds, 
+                                            int L, double cutoff)
+{
+  if(! IsValid(feasibilityProblem_)) {
+    throw SimpleError("No feasibility problem","getFeasibilityOuterApproximation");
+  }
+  feasibilityProblem_->set_use_feasibility_pump_objective(true);
+  feasibilityProblem_->set_dist_to_point_obj(n,(const Number *) x_bar,(const Index *) inds);
+  feasibilityProblem_->setLambda(1.0);
+  feasibilityProblem_->setSigma(0.0);
+  feasibilityProblem_->setNorm(L);
+  feasibilityProblem_->set_use_cutoff_constraint(true);
+  feasibilityProblem_->set_cutoff(cutoff);
+  feasibilityProblem_->set_use_local_branching_constraint(false);  
+  nCallOptimizeTNLP_++;
+  totalNlpSolveTime_-=CoinCpuTime();
+  SmartPtr<TNLPSolver> app2 = app_->clone();
+  app2->options()->SetIntegerValue("print_level", (Index) 0);
+  optimizationStatus_ = app2->OptimizeTNLP(GetRawPtr(feasibilityProblem_));
+  totalNlpSolveTime_+=CoinCpuTime();
+  hasBeenOptimized_=true;
+  return getObjValue();
+}
+
+#if 0
+double
+OsiTMINLPInterface::getFeasibilityOuterApproximation(int n,const double * x_bar,const int *inds, OsiCuts &cs, bool addOnlyViolated, bool global)
+{
+  double ret_val = solveFeasibilityProblem(n, x_bar, inds, 1, 0, 2);
+  getOuterApproximation(cs, getColSolution(), 0, (addOnlyViolated? x_bar:NULL)
+			, global);
+  return ret_val;
+}
+#endif
+
+static bool WarnedForNonConvexOa=false;
+
+void
+OsiTMINLPInterface::extractLinearRelaxation(OsiSolverInterface &si, 
+                                            const double * x, bool getObj
+                                            )
+{
+  if(IsValid(linearizer_)){
+    linearizer_->extract(&si, x, getObj);
+    return;
+  }
+  int n;
+  int m;
+  int nnz_jac_g;
+  int nnz_h_lag;
+  TNLP::IndexStyleEnum index_style;
+  //Get problem information
+  problem_to_optimize_->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+
+  //if not allocated allocate spaced for stroring jacobian
+  //if(jRow_ == NULL || jCol_ == NULL || jValues_ == NULL)
+    initializeJacobianArrays();
+
+  //get Jacobian
+  problem_to_optimize_->eval_jac_g(n, x, 1, m, nnz_jac_g, NULL, NULL, jValues_);
+
+
+  vector<double> g(m);
+  problem_to_optimize_->eval_g(n, x, 1, m, g());
+
+  vector<double> rowLow(m);
+  vector<double> rowUp(m);
+  vector<int> nonBindings(m);;//store non binding constraints (which are to be removed from OA)
+  int numNonBindings = 0;
+  const double * rowLower = getRowLower();
+  const double * rowUpper = getRowUpper();
+  vector<double> colLower(n); 
+  vector<double> colUpper(n); 
+  std::copy(getColLower(), getColLower() + n, colLower.begin()); 
+  std::copy(getColUpper(), getColUpper() + n, colUpper.begin()); 
+  const double * duals = getRowPrice() + 2*n;
+  assert(m==getNumRows());
+  double infty = si.getInfinity();
+  for(int i = 0 ; i < m ; i++) {
+    if(constTypes_[i] == TNLP::NON_LINEAR) {
+      //If constraint is range not binding prepare to remove it
+      if(rowLower[i] > -infty_ && rowUpper[i] < infty_ && fabs(duals[i]) == 0.)
+      {
+        nonBindings[numNonBindings++] = i;
+        continue;
+      }
+      else
+        if(rowLower[i] > - infty_){
+          rowLow[i] = (rowLower[i] - g[i]) - 1e-07;
+          if(! WarnedForNonConvexOa && rowUpper[i] < infty_){
+             messageHandler()->message(WARNING_NON_CONVEX_OA, messages_)<<CoinMessageEol;
+             WarnedForNonConvexOa = true;
+          }
+        }
+      else
+        rowLow[i] = - infty;
+      if(rowUpper[i] < infty_)
+        rowUp[i] =  (rowUpper[i] - g[i]) + 1e-07;
+      else
+        rowUp[i] = infty;
+      
+      //If equality or ranged constraint only add one side by looking at sign of dual multiplier
+      if(rowLower[i] > -infty_ && rowUpper[i] < infty_)
+      {
+        if(duals[i] >= 0.)// <= inequality
+          rowLow[i] = - infty;
+        if(duals[i] <= 0.)// >= inequality
+          rowUp[i] = infty;
+      }
+    }
+    else {
+      if(rowLower[i] > -infty_){
+         rowLow[i] = (rowLower[i]);
+      }
+      else
+        rowLow[i] = - infty;
+      if(rowUpper[i] < infty_){
+         rowUp[i] =  (rowUpper[i]);
+      }
+      else
+        rowUp[i] = infty;
+    }
+  }
+
+  
+  
+  //Then convert everything to a CoinPackedMatrix
+  //Go through values, clean coefficients and fix bounds
+  for(int i = 0 ; i < nnz_jac_g ; i++) {
+    if(constTypes_[jRow_[i]] != TNLP::LINEAR){//For linear just copy is fine.
+       if(//For other clean tinys
+       cleanNnz(jValues_[i],colLower[jCol_[i]], colUpper[jCol_[i]],
+                rowLower[jRow_[i]], rowUpper[jRow_[i]],
+                x[jCol_[i]],
+                rowLow[jRow_[i]],
+                rowUp[jRow_[i]], tiny_, veryTiny_, infty_)) { 
+          if(rowLow[jRow_[i]] > - infty)
+          rowLow[jRow_[i]] += jValues_[i] * x[jCol_ [i]];
+          if(rowUp[jRow_[i]] < infty)
+          rowUp[jRow_[i]] += jValues_[i] *x[jCol_[i]];
+       }
+    }
+    else {
+      //double value = jValues_[i] * x[jCol_[i]];
+      //rowLow[jRow_[i]] += value;
+      //rowUp[jRow_[i]] += value;
+    } 
+  }
+
+
+  CoinPackedMatrix mat(true, jRow_, jCol_, jValues_, nnz_jac_g);
+  mat.setDimensions(m,n); // In case matrix was empty, this should be enough
+  
+  //remove non-bindings equality constraints
+  mat.deleteRows(numNonBindings, nonBindings());
+
+  int numcols=getNumCols();
+  vector<double> obj(numcols);
+  for(int i = 0 ; i < numcols ; i++){
+    obj[i] = 0.;
+    if(colLower[i] <= - infty_) colLower[i] = - infty;
+    if(colUpper[i] >= infty_) colUpper[i] = infty;
+  }
+  
+
+  //Relax rhs's by tiny_
+  for(size_t i = 0 ; i < rowLow.size() ; i++){
+     if(rowLow[i] > infty) rowLow[i] -= rhsRelax_*std::max(fabs(rowLow[i]), 1.);
+     if(rowUp[i] < infty) rowUp[i] += rhsRelax_*std::max(fabs(rowUp[i]), 1.);
+  }
+
+  si.loadProblem(mat, colLower(), colUpper(), obj(), rowLow(), rowUp());
+  for(int i = 0 ; i < numcols ; i++) {
+    if(isInteger(i))
+      si.setInteger(i);
+  }
+  if(getObj) {
+     bool addObjVar = false;
+     if(problem_->hasLinearObjective()){
+       double zero;
+       vector<double> x0(n,0.);
+       problem_to_optimize_->eval_f(n, x0(), 1, zero);
+       si.setDblParam(OsiObjOffset, -zero);
+       //Copy the linear objective and don't create a dummy variable.
+       problem_to_optimize_->eval_grad_f(n, x, 1,obj());
+       si.setObjective(obj());
+    }
+    else {
+      addObjVar = true;
+   }
+   
+   if(addObjVar){
+      addObjectiveFunction(si, x);
+    }
+  }
+
+  //si.writeMpsNative("Toto.mps", NULL, NULL, 1);
+}
+
+void 
+OsiTMINLPInterface::addObjectiveFunction(OsiSolverInterface &si, 
+                                         const double *x){
+  const double * colLower = getColLower();
+  const double * colUpper = getColUpper();
+  int numcols = getNumCols();
+  assert(numcols == si.getNumCols() );
+  vector<double> obj(numcols);
+  problem_to_optimize_->eval_grad_f(numcols, x, 1,obj());
+  //add variable alpha
+  //(alpha should be empty in the matrix with a coefficient of -1 and unbounded)
+  CoinPackedVector a;
+  si.addCol(a,-si.getInfinity(), si.getInfinity(), 1.);
+  
+  // Now get the objective cuts
+  // get the gradient, pack it and add the cut
+  double ub;
+  problem_to_optimize_->eval_f(numcols, x, 1, ub);
+  ub*=-1;
+  double lb = -1e300;
+  CoinPackedVector objCut;
+  CoinPackedVector * v = &objCut;
+  v->reserve(numcols+1);
+  for(int i = 0; i<numcols ; i++) {
+    if(si.getNumRows())
+    {
+     if(cleanNnz(obj[i],colLower[i], colUpper[i],
+         -getInfinity(), 0,
+         x[i],
+         lb,
+         ub, tiny_, veryTiny_, infty_)) {
+       v->insert(i,obj[i]);
+       lb += obj[i] * x[i];
+       ub += obj[i] * x[i];
+     }
+    }
+    else //Unconstrained problem can not put clean coefficient
+    {
+       if(cleanNnz(obj[i],colLower[i], colUpper[i],
+        -getInfinity(), 0,
+        x[i],
+        lb,
+        ub, 1e-03, 1e-08, infty_)) {
+      v->insert(i,obj[i]);
+      lb += obj[i] * x[i];
+      ub += obj[i] * x[i];
+       }
+    }
+  }
+  v->insert(numcols,-1);
+  si.addRow(objCut, lb, ub);
+}
+
+/** Add a collection of linear cuts to problem formulation.*/
+void 
+OsiTMINLPInterface::applyRowCuts(int numberCuts, const OsiRowCut * cuts)
+{ 
+  if(numberCuts)
+    freeCachedRowRim();
+  const OsiRowCut ** cutsPtrs = new const OsiRowCut*[numberCuts];
+  for(int i = 0 ; i < numberCuts ; i++)
+  {
+    cutsPtrs[i] = &cuts[i];
+  }
+  problem_->addCuts(numberCuts, cutsPtrs);
+  delete [] cutsPtrs;
+}
+
+void
+OsiTMINLPInterface::solveAndCheckErrors(bool warmStarted, bool throwOnFailure,
+    const char * whereFrom)
+{
+  if (BonminAbortAll == true) return;
+  totalNlpSolveTime_-=CoinCpuTime();
+  if(warmStarted)
+    optimizationStatus_ = app_->ReOptimizeTNLP(GetRawPtr(problem_to_optimize_));
+  else
+    optimizationStatus_ = app_->OptimizeTNLP(GetRawPtr(problem_to_optimize_));
+  totalNlpSolveTime_+=CoinCpuTime();
+  nCallOptimizeTNLP_++;
+  hasBeenOptimized_ = true;
+ 
+   if(getRowCutDebugger()){
+      //printf("On the optimal path %g < %g?\n", getObjValue(),  getRowCutDebugger()->optimalValue());
+      if(! (isProvenOptimal() && getObjValue() <= getRowCutDebugger()->optimalValue())){
+         std::string probName;
+         getStrParam(OsiProbName, probName);
+         fprintf(stderr, "Problem on optimal path is infeasible!\n");
+         throw newUnsolvedError(app_->errorCode(), problem_, probName);
+      }
+   }
+
+  //Options should have been printed if not done already turn off Ipopt output
+  if(!hasPrintedOptions) {
+    hasPrintedOptions = 1;
+    //app_->Options()->SetIntegerValue("print_level",0, true, true);
+    app_->options()->SetStringValue("print_user_options","no", false, true);
+  }
+  
+  bool otherDisagree = false ;
+    if(!app_->isRecoverable(optimizationStatus_))//Solver failed and the error can not be recovered, throw it
+    {
+      std::string probName;
+      getStrParam(OsiProbName, probName);
+      throw newUnsolvedError(app_->errorCode(), problem_, probName);
+    }
+    else if(testOthers_ && !app_->isError(optimizationStatus_)){
+      Ipopt::SmartPtr<TMINLP2TNLP> problem_copy = problem_->clone();
+      //Try other solvers and see if they agree
+      int f =1;
+      for(std::list<Ipopt::SmartPtr<TNLPSolver> >::iterator i = debug_apps_.begin();
+          i != debug_apps_.end() ; i++){
+        TNLPSolver::ReturnStatus otherStatus = (*i)->OptimizeTNLP(GetRawPtr(problem_copy));
+       messageHandler()->message(LOG_LINE, messages_)
+         <<'d'<<f++<<statusAsString(otherStatus)<<problem_copy->obj_value()
+         <<(*i)->IterationCount()<<(*i)->CPUTime()<<"retry with "+(*i)->solverName()<<CoinMessageEol;
+        if(!(*i)->isError(otherStatus)){
+           CoinRelFltEq eq(1e-05);
+           if(otherStatus != optimizationStatus_){
+             otherDisagree = true;
+             messageHandler()->message(SOLVER_DISAGREE_STATUS, messages_)
+             <<app_->solverName()<<statusAsString()
+             <<(*i)->solverName()<<statusAsString(otherStatus)<<CoinMessageEol; 
+           }
+           else if(isProvenOptimal() && !eq(problem_->obj_value(),problem_copy->obj_value()))
+           {
+             otherDisagree = true;
+             messageHandler()->message(SOLVER_DISAGREE_VALUE, messages_)
+             <<app_->solverName()<<problem_->obj_value()
+             <<(*i)->solverName()<<problem_copy->obj_value()<<CoinMessageEol; 
+           }
+        }
+     }
+  }
+  else if(app_->isError(optimizationStatus_) && ! debug_apps_.empty()){
+      int f =1;
+      for(std::list<Ipopt::SmartPtr<TNLPSolver> >::iterator i = debug_apps_.begin();
+          i != debug_apps_.end() && app_->isError(optimizationStatus_) ; i++){
+        optimizationStatus_ = (*i)->OptimizeTNLP(GetRawPtr(problem_));
+        messageHandler()->message(LOG_LINE, messages_)
+          <<'d'<<f++<<statusAsString(optimizationStatus_)<<problem_->obj_value()
+          <<(*i)->IterationCount()<<(*i)->CPUTime()<<"retry with "+(*i)->solverName()<<CoinMessageEol;
+      }
+  }
+  try{
+    totalIterations_ += app_->IterationCount();
+  }
+  catch(SimpleError &E)
+  {
+    if (throwOnFailure)//something failed throw
+    {
+      throw SimpleError("No statistics available from Ipopt",whereFrom);
+    }
+    else {
+      return;
+    }
+  }
+  if(problem_->hasUpperBoundingObjective()){//Check if solution is integer and recompute objective value using alternative objective function
+    const double * sol = getColSolution();
+    bool integerSol = true;
+    double intTol = 1e-08;
+    if(objects()){
+      int nObjects = numberObjects();
+      OsiObject ** object = objects();
+      for(int i = 0 ; i< nObjects ; i++){
+        int dummy;
+        if(object[i]->infeasibility(this,dummy) > intTol)
+        {
+          integerSol=false;
+          break;
+        }
+      }
+    }
+    else{//Only works for integer constraints
+      int numcols = getNumCols();
+      for(int i = 0 ; i < numcols ; i++){
+        if(isInteger(i) || isBinary(i)){
+          if(fabs(sol[i] - floor(sol[i]+0.5)) > intTol){
+            integerSol = false;
+            break;
+          }
+        }
+      }
+    }
+    if(integerSol&&isProvenOptimal()){
+      double help= problem_->evaluateUpperBoundingFunction(sol);
+     
+
+      OsiAuxInfo * auxInfo = getAuxiliaryInfo();
+      Bonmin::AuxInfo * bonInfo = dynamic_cast<Bonmin::AuxInfo *>(auxInfo);
+      if(bonInfo!=0)
+      {
+	
+        if(help<bonInfo->bestObj2())
+        {
+          bonInfo->setBestObj2(help);
+          bonInfo->setBestSolution2(getNumCols(), const_cast<double *>(getColSolution()));
+
+           messageHandler()->message(ALTERNATE_OBJECTIVE, messages_)
+           <<help<<CoinMessageEol;
+        }
+      }
+      else {
+        printf("\nWARNING: the algorithm selected does not consider the second objective function\n");
+      }
+    }
+  }
+
+  messageHandler()->message(IPOPT_SUMMARY, messages_)
+    <<whereFrom<<optimizationStatus_<<app_->IterationCount()<<app_->CPUTime()<<CoinMessageEol;
+  
+  if((nCallOptimizeTNLP_ % 20) == 1)
+    messageHandler()->message(LOG_HEAD, messages_)<<CoinMessageEol;
+  
+  
+  if ( (numIterationSuspect_ >= 0 && (getIterationCount()>numIterationSuspect_ || isAbandoned())) ||
+       ( otherDisagree )){
+    messageHandler()->message(SUSPECT_PROBLEM,
+                              messages_)<<nCallOptimizeTNLP_<<CoinMessageEol;
+    std::string subProbName;
+    getStrParam(OsiProbName, subProbName);
+    std::ostringstream os;
+    os<<"_"<<nCallOptimizeTNLP_;
+    subProbName+=os.str();
+    problem_->outputDiffs(subProbName, NULL/*getVarNames()*/);
+  }
+  
+}
+
+////////////////////////////////////////////////////////////////////
+// Solve Methods                                                  //
+////////////////////////////////////////////////////////////////////
+void OsiTMINLPInterface::initialSolve()
+{
+   initialSolve("");
+}
+
+////////////////////////////////////////////////////////////////////
+// Solve Methods                                                  //
+////////////////////////////////////////////////////////////////////
+void OsiTMINLPInterface::initialSolve(const char * whereFrom)
+{
+  assert(IsValid(app_));
+  assert(IsValid(problem_));
+
+  if (BonminAbortAll == true) return;
+  // Discard warmstart_ if we had one
+  delete warmstart_;
+  warmstart_ = NULL;
+  
+  if(!hasPrintedOptions) {
+    int printOptions;
+    app_->options()->GetEnumValue("print_user_options",printOptions,app_->prefix());
+    if(printOptions)
+      app_->options()->SetStringValue("print_user_options","yes",true,true);
+  }
+  if(warmStartMode_ >= Optimum)
+    app_->disableWarmStart(); 
+  solveAndCheckErrors(0,1,"initialSolve");
+  
+  //Options should have been printed if not done already turn off Ipopt output
+  if(!hasPrintedOptions) {
+    hasPrintedOptions = 1;
+    app_->options()->SetStringValue("print_user_options","no");
+    app_->options()->SetIntegerValue("print_level",0);
+  }
+  
+  messageHandler()->message(LOG_LINE, messages_)<<' '<<nCallOptimizeTNLP_
+						      <<statusAsString()
+                                                      <<getObjValue()
+                                                      <<app_->IterationCount()
+                                                      <<app_->CPUTime()
+                                                      <<whereFrom<<CoinMessageEol;
+  
+  if(BonminAbortAll){
+    return;
+  }
+  int numRetry = firstSolve_ ? numRetryInitial_ : numRetryResolve_;
+  if(isAbandoned() ||
+    ( isProvenPrimalInfeasible() && getObjValue() < infeasibility_epsilon_)) {
+    resolveForRobustness(numRetryUnsolved_);
+  }
+  else if(numRetry)
+    {
+      resolveForCost(numRetry, numRetryInitial_ > 0);
+      /** Only do it once at the root.*/
+      numRetryInitial_ = 0;
+    }
+  firstSolve_ = false;
+
+  // if warmstart_ is not empty then had to use resolveFor... and that created
+  // the warmstart at the end, and we have nothing to do here. Otherwise...
+  if (! warmstart_ && ! isAbandoned()) {
+    if (warmStartMode_ >= Optimum) {
+      warmstart_ = app_->getWarmStart(problem_);
+    }
+  }
+}
+
+/** Resolve the continuous relaxation after problem modification. */
+void
+OsiTMINLPInterface::resolve(){
+   resolve("");
+}
+/** Resolve the continuous relaxation after problem modification.
+ * \note for Ipopt, same as resolve */
+void
+OsiTMINLPInterface::resolve(const char * whereFrom)
+{
+  assert(IsValid(app_));
+  assert(IsValid(problem_));
+  if (BonminAbortAll == true) return;
+  int has_warmstart = warmstart_ == NULL ? 0 : 1;
+  if(warmstart_ == NULL) has_warmstart = 0;
+  else if(!app_->warmStartIsValid(warmstart_)) has_warmstart = 1;
+  else has_warmstart = 2;
+  if (has_warmstart < 2) {
+    // empty (or unrecognized) warmstart
+    initialSolve(whereFrom);
+    return;
+  }
+  app_->setWarmStart(warmstart_, problem_);
+  delete warmstart_;
+  warmstart_ = NULL;
+
+  if (INT_BIAS > 0.) {
+    app_->options()->SetStringValue("warm_start_same_structure", "yes");
+  }
+  else {
+    app_->options()->SetStringValue("warm_start_same_structure", "no");
+  }
+
+  if(problem_->duals_init() != NULL)
+    app_->enableWarmStart();
+  else app_->disableWarmStart();
+  solveAndCheckErrors(1,1,"resolve");
+  
+  messageHandler()->message(LOG_LINE, messages_)<<' '<<nCallOptimizeTNLP_
+						<<statusAsString()
+                                                <<getObjValue()
+                                                <<app_->IterationCount()
+                                                <<app_->CPUTime()
+                                                <<whereFrom
+                                                <<"totot"
+                                                <<CoinMessageEol;
+  
+  if(isAbandoned() ||
+    ( (getObjValue() < 1e-06) && isProvenPrimalInfeasible())) {
+    resolveForRobustness(numRetryUnsolved_);
+  }
+  else if(numRetryResolve_ ||
+	  (numRetryInfeasibles_ && isProvenPrimalInfeasible() ))
+    resolveForCost(std::max(numRetryResolve_, numRetryInfeasibles_), 0);
+
+  // if warmstart_ is not empty then had to use resolveFor... and that created
+  // the warmstart at the end, and we have nothing to do here. Otherwise...
+  if (! warmstart_ && ! isAbandoned()) {
+    if (warmStartMode_ >= Optimum) {
+      warmstart_ = app_->getWarmStart(problem_);
+    }
+  }
+}
+
+
+////////////////////////////////////////////////////////////////
+// Methods returning info on how the solution process terminated  //
+////////////////////////////////////////////////////////////////
+/// Are there a numerical difficulties?
+bool OsiTMINLPInterface::isAbandoned() const
+{
+  if (pretendSucceededNext_)
+    return false;
+  pretendSucceededNext_ = false;
+  return ( 
+        (optimizationStatus_==TNLPSolver::iterationLimit)||
+        (optimizationStatus_==TNLPSolver::computationError)||
+        (optimizationStatus_==TNLPSolver::illDefinedProblem)||
+        (optimizationStatus_==TNLPSolver::illegalOption)||
+        (optimizationStatus_==TNLPSolver::externalException)|
+        (optimizationStatus_==TNLPSolver::exception)
+      );
+}
+
+/// Is optimality proven?
+bool OsiTMINLPInterface::isProvenOptimal() const
+{
+  return (optimizationStatus_==TNLPSolver::solvedOptimal) ||
+	  (optimizationStatus_==TNLPSolver::solvedOptimalTol);
+}
+/// Is primal infeasiblity proven?
+bool OsiTMINLPInterface::isProvenPrimalInfeasible() const
+{
+  return (optimizationStatus_ == TNLPSolver::provenInfeasible);
+}
+/// Is dual infeasiblity proven?
+bool OsiTMINLPInterface::isProvenDualInfeasible() const
+{
+  return (optimizationStatus_ == TNLPSolver::unbounded);
+}
+/// Is the given primal objective limit reached?
+bool OsiTMINLPInterface::isPrimalObjectiveLimitReached() const
+{
+  (*handler_)<<"Warning : isPrimalObjectiveLimitReached not implemented yet"<<CoinMessageEol;
+  return 0;
+}
+/// Is the given dual objective limit reached?
+bool OsiTMINLPInterface::isDualObjectiveLimitReached() const
+{
+  //  (*messageHandler_)<<"Warning : isDualObjectiveLimitReached not implemented yet"<<CoinMessageEol;
+  return (optimizationStatus_==TNLPSolver::unbounded);
+
+}
+/// Iteration limit reached?
+bool OsiTMINLPInterface::isIterationLimitReached() const
+{
+  return (optimizationStatus_==TNLPSolver::iterationLimit);
+}
+
+void
+OsiTMINLPInterface::extractInterfaceParams()
+{
+  if (IsValid(app_)) {
+    int logLevel;
+    app_->options()->GetIntegerValue("nlp_log_level", logLevel,app_->prefix());
+    messageHandler()->setLogLevel(logLevel);
+
+#ifdef COIN_HAS_FILTERSQP
+    FilterSolver * filter = dynamic_cast<FilterSolver *>(GetRawPtr(app_));
+
+    bool is_given =
+#endif
+      app_->options()->GetNumericValue("max_random_point_radius",maxRandomRadius_,app_->prefix());
+
+#ifdef COIN_HAS_FILTERSQP
+    if(filter && !is_given){
+      // overwriting default for filter
+      maxRandomRadius_ = 10.;
+    }
+#endif
+   
+   int oaCgLogLevel = 0;
+   app_->options()->GetIntegerValue("oa_cuts_log_level", oaCgLogLevel,app_->prefix());
+   oaHandler_->setLogLevel(oaCgLogLevel); 
+	
+    int buffy;
+    app_->options()->GetEnumValue("warm_start", buffy, app_->prefix());
+    warmStartMode_ = (WarmStartModes) buffy;   
+ 
+    app_->options()->GetIntegerValue("num_retry_unsolved_random_point", numRetryUnsolved_,app_->prefix());
+    app_->options()->GetIntegerValue("num_resolve_at_root", numRetryInitial_,app_->prefix());
+    app_->options()->GetIntegerValue("num_resolve_at_node", numRetryResolve_,app_->prefix());
+    app_->options()->GetIntegerValue("num_resolve_at_infeasibles", numRetryInfeasibles_,app_->prefix());
+    app_->options()->GetIntegerValue("num_iterations_suspect", numIterationSuspect_,app_->prefix());
+    app_->options()->GetEnumValue("nlp_failure_behavior",pretendFailIsInfeasible_,app_->prefix());
+    app_->options()->GetNumericValue
+    ("warm_start_bound_frac" ,pushValue_,app_->prefix());
+    app_->options()->GetNumericValue("tiny_element",tiny_,app_->prefix());
+    app_->options()->GetNumericValue("very_tiny_element",veryTiny_,app_->prefix());
+    app_->options()->GetNumericValue("oa_rhs_relax",rhsRelax_,app_->prefix());
+    app_->options()->GetNumericValue("random_point_perturbation_interval",max_perturbation_,app_->prefix());
+    app_->options()->GetEnumValue("random_point_type",randomGenerationType_,app_->prefix());
+    int cut_strengthening_type;
+    app_->options()->GetEnumValue("cut_strengthening_type", cut_strengthening_type,app_->prefix());
+    double lo_inf, up_inf;
+    app_->options()->GetNumericValue("nlp_lower_bound_inf",lo_inf, app_->prefix());
+    app_->options()->GetNumericValue("nlp_upper_bound_inf",up_inf, app_->prefix());
+    infty_ = std::min(fabs(lo_inf), fabs(up_inf));
+
+#ifdef COIN_HAS_FILTERSQP
+    is_given =
+#endif
+    app_->options()->GetNumericValue("resolve_on_small_infeasibility", infeasibility_epsilon_, app_->prefix());
+
+#ifdef COIN_HAS_FILTERSQP
+    if(filter && !is_given){
+      // overwriting default for filter
+      infeasibility_epsilon_ = 1e-06;
+      std::string o_name = app_->prefix();
+      o_name += "resolve_on_small_infeasibility";
+      app_->options()->SetNumericValue(o_name.c_str(), infeasibility_epsilon_, true, true);
+    }
+#endif
+    if (cut_strengthening_type != CS_None) {
+      // TNLP solver to be used in the cut strengthener
+      cutStrengthener_ = new CutStrengthener(app_->clone(), app_->options());
+    }
+  }
+}
+
+void
+OsiTMINLPInterface::SetStrongBrachingSolver(SmartPtr<StrongBranchingSolver> strong_branching_solver)
+{
+  strong_branching_solver_ = strong_branching_solver;
+}
+
+  //#define STRONG_COMPARE
+#ifdef STRONG_COMPARE
+  static double objorig;
+#endif
+
+void
+OsiTMINLPInterface::markHotStart()
+{
+  if (IsValid(strong_branching_solver_)) {
+#ifdef STRONG_COMPARE
+    // AWDEBUG
+    OsiSolverInterface::markHotStart();
+    objorig = getObjValue();
+#endif
+    optimizationStatusBeforeHotStart_ = optimizationStatus_;
+    strong_branching_solver_->markHotStart(this);
+  }
+  else {
+    // Default Implementation
+    OsiSolverInterface::markHotStart();
+  }
+}
+
+void
+OsiTMINLPInterface::solveFromHotStart()
+{
+  if (IsValid(strong_branching_solver_)) {
+#ifdef STRONG_COMPARE
+    // AWDEBUG
+    OsiSolverInterface::solveFromHotStart();
+    double obj_nlp = getObjValue() - objorig;
+#endif
+    optimizationStatus_ = strong_branching_solver_->solveFromHotStart(this);
+    hasBeenOptimized_ = true;
+#ifdef STRONG_COMPARE
+    double obj_other = getObjValue() - objorig;
+    printf("AWDEBUG: Strong Branching results: NLP = %15.8e Other = %15.8e\n",
+	   obj_nlp, obj_other);
+#endif
+  }
+  else {
+    // Default Implementation
+    OsiSolverInterface::solveFromHotStart();
+  }
+}
+
+void
+OsiTMINLPInterface::unmarkHotStart()
+{
+  if (IsValid(strong_branching_solver_)) {
+#ifdef STRONG_COMPARE
+    // AWDEBUG
+    OsiSolverInterface::unmarkHotStart();
+#endif
+    strong_branching_solver_->unmarkHotStart(this);
+    optimizationStatus_ = optimizationStatusBeforeHotStart_;
+  }
+  else {
+    // Default Implementation
+    OsiSolverInterface::unmarkHotStart();
+  }
+}
+
+const double * OsiTMINLPInterface::getObjCoefficients() const
+{
+  const int n = getNumCols();
+  delete [] obj_;
+  obj_ = NULL;
+  obj_ = new double[n];
+
+  bool new_x = true;
+  const double* x_sol = problem_->x_sol();
+  bool retval = problem_->eval_grad_f(n, x_sol, new_x, obj_);
+  
+  if (!retval) {
+    // Let's see if that happens - it will cause a crash
+    fprintf(stderr, "ERROR WHILE EVALUATING GRAD_F in OsiTMINLPInterface::getObjCoefficients()\n");
+    delete [] obj_;
+    obj_ = NULL;
+  }
+
+  return obj_;
+}
+
+  /** Sets the TMINLP2TNLP to be used by the interface.*/
+  void 
+  OsiTMINLPInterface::use(Ipopt::SmartPtr<TMINLP2TNLP> tminlp2tnlp){
+     problem_ = tminlp2tnlp;
+     problem_to_optimize_ = GetRawPtr(problem_);
+     feasibilityProblem_->use(GetRawPtr(tminlp2tnlp));}
+
+}/** end namespace Bonmin*/
+
diff --git a/src/Interfaces/BonOsiTMINLPInterface.hpp b/src/Interfaces/BonOsiTMINLPInterface.hpp
new file mode 100644
index 0000000..a823c8b
--- /dev/null
+++ b/src/Interfaces/BonOsiTMINLPInterface.hpp
@@ -0,0 +1,1342 @@
+// (C) Copyright International Business Machines Corporation, Carnegie Mellon University 2004, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Carl D. Laird, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 12/01/2004
+
+
+#ifndef OsiTMINLPInterface_H
+#define OsiTMINLPInterface_H
+
+#define INT_BIAS 0e-8
+
+#include <string>
+#include <iostream>
+
+#include "OsiSolverInterface.hpp"
+#include "CoinWarmStartBasis.hpp"
+
+#include "BonCutStrengthener.hpp"
+//#include "BonRegisteredOptions.hpp"
+
+namespace Bonmin {
+  class TMINLP;
+  class TMINLP2TNLP;
+  class TMINLP2OsiLP;
+  class TNLP2FPNLP;
+  class TNLPSolver;
+  class RegisteredOptions;
+  class StrongBranchingSolver;
+
+  /** Solvers for solving nonlinear programs.*/
+  enum Solver{
+    EIpopt=0 /** <a href="http://projects.coin-or.org/Ipopt"> Ipopt </a> interior point algorithm.*/,
+    EFilterSQP /** <a href="http://www-unix.mcs.anl.gov/~leyffer/solvers.html"> filterSQP </a> Sequential Quadratic Programming algorithm.*/,
+    EAll/** Use all solvers.*/
+  };
+/**
+   This is class provides an Osi interface for a Mixed Integer Linear Program
+   expressed as a TMINLP
+   (so that we can use it for example as the continuous solver in Cbc).
+*/
+
+class OsiTMINLPInterface : public OsiSolverInterface
+{
+  friend class BonminParam;
+
+public:
+
+  //#############################################################################
+
+  /**Error class to throw exceptions from OsiTMINLPInterface.
+   * Inherited from CoinError, we just want to have a different class to be able to catch
+   * errors thrown by OsiTMINLPInterface.
+  */
+class SimpleError : public CoinError
+  {
+  private:
+    SimpleError();
+
+  public:
+    ///Alternate constructor using strings
+    SimpleError(std::string message,
+        std::string methodName,
+	std::string f = std::string(),
+	int l = -1)
+        :
+        CoinError(message,methodName,std::string("OsiTMINLPInterface"), f, l)
+    {}
+  }
+  ;
+
+#ifdef __LINE__
+#define SimpleError(x, y) SimpleError((x), (y), __FILE__, __LINE__)
+#endif
+
+  // Error when problem is not solved
+  TNLPSolver::UnsolvedError * newUnsolvedError(int num, Ipopt::SmartPtr<TMINLP2TNLP> problem, std::string name){
+    return app_->newUnsolvedError(num, problem, name);
+  }
+  //#############################################################################
+
+  enum WarmStartModes{
+   None,
+   FakeBasis,
+   Optimum,
+   InteriorPoint};
+
+  /** Type of the messages specifically written by OsiTMINLPInterface.*/
+  enum MessagesTypes{
+    SOLUTION_FOUND/**found a feasible solution*/,
+    INFEASIBLE_SOLUTION_FOUND/**found an infeasible problem*/,
+    UNSOLVED_PROBLEM_FOUND/**found an unsolved problem*/,
+    WARNING_RESOLVING /** Warn that a problem is resolved*/,
+    WARN_SUCCESS_WS/** Problem not solved with warm start but solved without*/,
+    WARN_SUCCESS_RANDOM/** Subproblem not solve with warm start but solved with random point*/,
+    WARN_CONTINUING_ON_FAILURE/** a failure occured but is continuing*/,
+    SUSPECT_PROBLEM/** Output the number of the problem.*/,
+    SUSPECT_PROBLEM2/** Output the number of the problem.*/,
+    IPOPT_SUMMARY /** Output summary statistics on Ipopt solution.*/,
+    BETTER_SOL /** Found a better solution with random values.*/,
+    LOG_HEAD/** Head of "civilized" log.*/,
+    LOG_FIRST_LINE/** First line (first solve) of log.*/,
+    LOG_LINE/**standard line (retry solving) of log.*/,
+    ALTERNATE_OBJECTIVE/** Recomputed integer feasible with alternate objective function*/,
+    WARN_RESOLVE_BEFORE_INITIAL_SOLVE /** resolve() has been called but there
+                                              was no previous call to initialSolve().
+                                         */,
+    ERROR_NO_TNLPSOLVER /** Trying to access non-existent TNLPSolver*/,
+    WARNING_NON_CONVEX_OA /** Warn that there are equality or ranged constraints and OA may works bad.*/,
+    SOLVER_DISAGREE_STATUS /** Different solver gives different status for problem.*/,
+    SOLVER_DISAGREE_VALUE /** Different solver gives different optimal value for problem.*/,
+    OSITMINLPINTERFACE_DUMMY_END
+  };
+
+  //#############################################################################
+
+
+  /** Messages written by an OsiTMINLPInterface. */
+class Messages : public CoinMessages
+  {
+  public:
+    /// Constructor
+    Messages();
+  };
+
+
+  //#############################################################################
+
+
+  /**@name Constructors and destructors */
+  //@{
+  /// Default Constructor
+  OsiTMINLPInterface();
+
+  /** Facilitator to initialize interface. */
+  void initialize(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+                  Ipopt::SmartPtr<Ipopt::OptionsList> options,
+                  Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+                  const std::string & prefix,
+                  Ipopt::SmartPtr<TMINLP> tminlp);
+
+  /** Facilitator to initialize interface. */
+  void initialize(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+                  Ipopt::SmartPtr<Ipopt::OptionsList> options,
+                  Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+                  Ipopt::SmartPtr<TMINLP> tminlp){
+     initialize(roptions, options, journalist, "bonmin.", tminlp);
+  }
+
+  /** Set the model to be solved by interface.*/
+  void setModel(Ipopt::SmartPtr<TMINLP> tminlp);
+  /** Set the solver to be used by interface.*/
+  void setSolver(Ipopt::SmartPtr<TNLPSolver> app);
+  /** Sets the TMINLP2TNLP to be used by the interface.*/
+  void use(Ipopt::SmartPtr<TMINLP2TNLP> tminlp2tnlp);
+  /** Copy constructor
+  */
+  OsiTMINLPInterface (const OsiTMINLPInterface &);
+
+  /** Virtual copy constructor */
+  OsiSolverInterface * clone(bool copyData = true) const;
+
+  /// Assignment operator
+  OsiTMINLPInterface & operator=(const OsiTMINLPInterface& rhs);
+
+  /// Destructor
+  virtual ~OsiTMINLPInterface ();
+
+
+  /// Read parameter file
+  void readOptionFile(const std::string & fileName);
+
+  /// Retrieve OsiTMINLPApplication option list
+  const Ipopt::SmartPtr<Ipopt::OptionsList> options() const;
+  /// Retrieve OsiTMINLPApplication option list
+  Ipopt::SmartPtr<Ipopt::OptionsList> options();
+
+  const char * prefix() const{
+  if(!IsValid(app_)) {
+    messageHandler()->message(ERROR_NO_TNLPSOLVER, messages_)<<CoinMessageEol;
+    return NULL;
+  }
+  else
+    return app_->prefix();
+  }
+  //@}
+  //---------------------------------------------------------------------------
+  /**@name Solve methods */
+  //@{
+  /// Solve initial continuous relaxation
+  virtual void initialSolve();
+
+  /// Solve initial continuous relaxation (precising from where)
+  virtual void initialSolve(const char * whereFrom);
+
+  /** Resolve the continuous relaxation after problem modification.
+      initialSolve may or may not have been called before this is called. In
+      any case, this must solve the problem, and speed the process up if it
+      can reuse any remnants of data that might exist from a previous solve.
+   */
+  virtual void resolve();
+
+  /** Resolve the continuous relaxation after problem modification.
+      initialSolve may or may not have been called before this is called. In
+      any case, this must solve the problem, and speed the process up if it
+      can reuse any remnants of data that might exist from a previous solve.
+   */
+  virtual void resolve(const char * whereFrom);
+
+  /** Resolve the problem with different random starting points to try to find
+      a better solution (only makes sense for a non-convex problem.*/
+  virtual void resolveForCost(int numretry, bool keepWs);
+
+  /** Method to be called when a problem has failed to be solved. Will try
+      to resolve it with different settings.
+  */
+  virtual void resolveForRobustness(int numretry);
+
+  /// Nescessary for compatibility with OsiSolverInterface but does nothing.
+  virtual void branchAndBound()
+  {
+    throw SimpleError("Function not implemented for OsiTMINLPInterface","branchAndBound()");
+  }
+  //@}
+
+
+
+  //---------------------------------------------------------------------------
+  ///@name Methods returning info on how the solution process terminated
+  //@{
+  /// Are there a numerical difficulties?
+  virtual bool isAbandoned() const;
+  /// Is optimality proven?
+  virtual bool isProvenOptimal() const;
+  /// Is primal infeasiblity proven?
+  virtual bool isProvenPrimalInfeasible() const;
+  /// Is dual infeasiblity proven?
+  virtual bool isProvenDualInfeasible() const;
+  /// Is the given primal objective limit reached?
+  virtual bool isPrimalObjectiveLimitReached() const;
+  /// Is the given dual objective limit reached?
+  virtual bool isDualObjectiveLimitReached() const;
+  /// Iteration limit reached?
+  virtual bool isIterationLimitReached() const;
+
+  ///Warn solver that branch-and-bound is continuing after a failure
+  void continuingOnAFailure()
+  {
+    hasContinuedAfterNlpFailure_ = true;
+  }
+
+
+  //Added by Claudia
+  
+  double getNewCutoffDecr()
+  {
+    return newCutoffDecr;
+  }
+
+  void setNewCutoffDecr(double d)
+  {
+    newCutoffDecr = d;
+  }
+
+
+  /// Did we continue on a failure
+  bool hasContinuedOnAFailure()
+  {
+    return hasContinuedAfterNlpFailure_;
+  }
+  /// tell to ignore the failures (don't throw, don't fathom, don't report)
+  void ignoreFailures()
+  {
+    pretendFailIsInfeasible_ = 2;
+  }
+  /// Force current solution to be infeasible
+  void forceInfeasible()
+  {
+    problem_->set_obj_value(1e200);
+  }
+  /// Force current solution to be branched on (make it fractionnal with small objective)
+  void forceBranchable()
+  {
+    problem_->set_obj_value(-1e200);
+    problem_->force_fractionnal_sol();
+  }
+  //@}
+
+
+  //---------------------------------------------------------------------------
+  /**@name Parameter set/get methods
+
+     The set methods return true if the parameter was set to the given value,
+     false otherwise. There can be various reasons for failure: the given
+     parameter is not applicable for the solver (e.g., refactorization
+     frequency for the clp algorithm), the parameter is not yet implemented
+     for the solver or simply the value of the parameter is out of the range
+     the solver accepts. If a parameter setting call returns false check the
+     details of your solver.
+
+     The get methods return true if the given parameter is applicable for the
+     solver and is implemented. In this case the value of the parameter is
+     returned in the second argument. Otherwise they return false.
+  */
+  //@{
+  // Set an integer parameter
+  bool setIntParam(OsiIntParam key, int value);
+  // Set an double parameter
+  bool setDblParam(OsiDblParam key, double value);
+  // Set a string parameter
+  bool setStrParam(OsiStrParam key, const std::string & value);
+  // Get an integer parameter
+  bool getIntParam(OsiIntParam key, int& value) const;
+  // Get an double parameter
+  bool getDblParam(OsiDblParam key, double& value) const;
+  // Get a string parameter
+  bool getStrParam(OsiStrParam key, std::string& value) const;
+
+  // Get the push values for starting point
+  inline double getPushFact() const
+  {
+    return pushValue_;
+  }
+
+  //@}
+
+
+  //---------------------------------------------------------------------------
+  /**@name Problem information methods
+
+     These methods call the solver's query routines to return
+     information about the problem referred to by the current object.
+     Querying a problem that has no data associated with it result in
+     zeros for the number of rows and columns, and NULL pointers from
+     the methods that return vectors.
+
+     Const pointers returned from any data-query method are valid as
+     long as the data is unchanged and the solver is not called.
+  */
+  //@{
+  /// Get number of columns
+  virtual int getNumCols() const;
+
+  /// Get number of rows
+  virtual int getNumRows() const;
+
+  ///get name of variables
+  const OsiSolverInterface::OsiNameVec& getVarNames() ;
+  /// Get pointer to array[getNumCols()] of column lower bounds
+  virtual const double * getColLower() const;
+
+  /// Get pointer to array[getNumCols()] of column upper bounds
+  virtual const double * getColUpper() const;
+
+  /** Get pointer to array[getNumRows()] of row constraint senses.
+      <ul>
+      <li>'L': <= constraint
+      <li>'E': =  constraint
+      <li>'G': >= constraint
+      <li>'R': ranged constraint
+      <li>'N': free constraint
+      </ul>
+  */
+  virtual const char * getRowSense() const;
+
+  /** Get pointer to array[getNumRows()] of rows right-hand sides
+      <ul>
+      <li> if rowsense()[i] == 'L' then rhs()[i] == rowupper()[i]
+      <li> if rowsense()[i] == 'G' then rhs()[i] == rowlower()[i]
+      <li> if rowsense()[i] == 'R' then rhs()[i] == rowupper()[i]
+      <li> if rowsense()[i] == 'N' then rhs()[i] == 0.0
+      </ul>
+  */
+  virtual const double * getRightHandSide() const;
+
+  /** Get pointer to array[getNumRows()] of row ranges.
+      <ul>
+      <li> if rowsense()[i] == 'R' then
+      rowrange()[i] == rowupper()[i] - rowlower()[i]
+      <li> if rowsense()[i] != 'R' then
+      rowrange()[i] is 0.0
+      </ul>
+  */
+  virtual const double * getRowRange() const;
+
+  /// Get pointer to array[getNumRows()] of row lower bounds
+  virtual const double * getRowLower() const;
+
+  /// Get pointer to array[getNumRows()] of row upper bounds
+  virtual const double * getRowUpper() const;
+
+  /** Get objective function sense (1 for min (default), -1 for max)
+   * Always minimizes */
+  virtual double getObjSense() const
+  {
+    return 1;
+  }
+
+  /// Return true if column is continuous
+  virtual bool isContinuous(int colNumber) const;
+
+  /// Return true if column is binary
+  virtual bool isBinary(int columnNumber) const;
+
+  /** Return true if column is integer.
+      Note: This function returns true if the the column
+      is binary or a general integer.
+  */
+  virtual bool isInteger(int columnNumber) const;
+
+  /// Return true if column is general integer
+  virtual bool isIntegerNonBinary(int columnNumber) const;
+
+  /// Return true if column is binary and not fixed at either bound
+  virtual bool isFreeBinary(int columnNumber) const;
+
+  /// Get solver's value for infinity
+  virtual double getInfinity() const;
+
+  ///Get priorities on integer variables.
+  const int * getPriorities() const
+  {
+    const TMINLP::BranchingInfo * branch = tminlp_->branchingInfo();
+    if(branch)
+      return branch->priorities;
+    else return NULL;
+  }
+  ///get prefered branching directions
+  const int * getBranchingDirections() const
+  {
+    const TMINLP::BranchingInfo * branch = tminlp_->branchingInfo();
+    if(branch)
+      return branch->branchingDirections;
+    else return NULL;
+  }
+  const double * getUpPsCosts() const
+  {
+    const TMINLP::BranchingInfo * branch = tminlp_->branchingInfo();
+    if(branch)
+    return branch->upPsCosts;
+    else return NULL;
+  }
+  const double * getDownPsCosts() const
+  {
+    const TMINLP::BranchingInfo * branch = tminlp_->branchingInfo();
+    if(branch)
+    return branch->downPsCosts;
+    else return NULL;
+  }
+
+
+  //@}
+
+  /**@name Methods related to querying the solution */
+  //@{
+  /// Get pointer to array[getNumCols()] of primal solution vector
+  virtual const double * getColSolution() const;
+
+  /// Get pointer to array[getNumRows()] of dual prices
+  virtual const double * getRowPrice() const;
+
+  /// Get a pointer to array[getNumCols()] of reduced costs
+  virtual const double * getReducedCost() const;
+
+  /** Get pointer to array[getNumRows()] of row activity levels (constraint
+      matrix times the solution vector */
+  virtual const double * getRowActivity() const;
+
+
+  /** Get how many iterations it took to solve the problem (whatever
+      "iteration" mean to the solver.
+      * \todo Figure out what it could mean for Ipopt.
+      */
+  virtual int getIterationCount() const;
+
+  /** get total number of calls to solve.*/
+  int nCallOptimizeTNLP()
+  {
+    return nCallOptimizeTNLP_;
+  }
+  /** get total time taken to solve NLP's. */
+  double totalNlpSolveTime()
+  {
+    return totalNlpSolveTime_;
+  }
+  /** get total number of iterations */
+  int totalIterations()
+  {
+    return totalIterations_;
+  }
+
+
+  //@}
+  //-------------------------------------------------------------------------
+  /**@name Methods to modify the objective, bounds, and solution
+  */
+  //@{
+
+  /** Set a single column lower bound.
+      Use -getInfinity() for -infinity. */
+  virtual void setColLower( int elementIndex, double elementValue );
+
+  /** Set a single column upper bound.
+      Use getInfinity() for infinity. */
+  virtual void setColUpper( int elementIndex, double elementValue );
+
+  /** Set the lower bounds for all columns
+      array [getNumCols()] is an array of values for the objective.
+  */
+  virtual void setColLower(const double * array);
+
+  /** Set the upper bounds for all columns
+      array [getNumCols()] is an array of values for the objective.
+  */
+  virtual void setColUpper(const double * array);
+
+
+  /** Set a single row lower bound.
+      Use -getInfinity() for -infinity. */
+  virtual void setRowLower( int elementIndex, double elementValue );
+
+  /** Set a single row upper bound.
+      Use getInfinity() for infinity. */
+  virtual void setRowUpper( int elementIndex, double elementValue );
+
+  /** Set the type of a single row */
+  virtual void setRowType(int index, char sense, double rightHandSide,
+      double range);
+
+
+  /** \brief Set the objective function sense (disabled).
+   * (1 for min (default), -1 for max)
+   \todo Make it work.
+   \bug Can not treat maximisation problems. */
+  virtual void setObjSense(double s);
+
+  /** Set the primal solution variable values
+      Set the values for the starting point.
+      \warning getColSolution will never return this vector (unless it is optimal).
+  */
+  virtual void setColSolution(const double *colsol);
+
+  /** Set dual solution variable values.
+      set the values for the starting point.
+      \warning getRowPrice will never return this vector (unless it is optimal).
+  */
+  virtual void setRowPrice(const double * rowprice);
+
+  //@}
+
+
+  //---------------------------------------------------------------------------
+  /**@name WarmStart related methods (those should really do nothing for the moment)*/
+  //@{
+
+  /*! \brief Get an empty warm start object
+
+  This routine returns an empty CoinWarmStartBasis object. Its purpose is
+  to provide a way to give a client a warm start basis object of the
+  appropriate type, which can resized and modified as desired.
+  */
+  virtual CoinWarmStart *getEmptyWarmStart () const;
+
+  /** Get warmstarting information */
+  virtual CoinWarmStart* getWarmStart() const;
+
+  /** Set warmstarting information. Return true/false depending on whether
+      the warmstart information was accepted or not. */
+  virtual bool setWarmStart(const CoinWarmStart* warmstart);
+
+  void setWarmStartMode(int mode) {
+    warmStartMode_ = (WarmStartModes) mode;
+  }
+  WarmStartModes getWarmStartMode() {
+    return warmStartMode_;
+  }
+
+  void randomStartingPoint();
+
+  //Returns true if a basis is available
+  virtual bool basisIsAvailable() const
+  {
+    // Throw an exception
+    throw SimpleError("Needs coding for this interface", "basisIsAvailable");
+  }
+
+
+  //@}
+
+  //-------------------------------------------------------------------------
+  /**@name Methods to set variable type */
+  //@{
+  /** Set the index-th variable to be a continuous variable */
+  virtual void setContinuous(int index);
+  /** Set the index-th variable to be an integer variable */
+  virtual void setInteger(int index);
+  //@}
+
+  //Set numIterationSuspect_
+  void setNumIterationSuspect(int value)
+  {
+    numIterationSuspect_ = value;
+  }
+
+  /**@name Dummy functions
+   * Functions which have to be implemented in an OsiSolverInterface,
+   * but which do not do anything (but throwing exceptions) here in the case of a
+   * minlp solved using an nlp solver for continuous relaxations */
+  //@{
+
+  /** Cbc will understand that no matrix exsits if return -1
+  */
+  virtual int getNumElements() const
+  {
+    return -1;
+  }
+
+
+  /** This returns the objective function gradient at the current
+   *  point.  It seems to be required for Cbc's pseudo cost
+   *  initialization
+  */
+  virtual const double * getObjCoefficients() const;
+
+  /** We have to keep this but it will return NULL.
+   */
+  virtual const CoinPackedMatrix * getMatrixByRow() const
+  {
+      return NULL;
+  }
+
+
+  /** We have to keep this but it will return NULL.
+   */
+  virtual const CoinPackedMatrix * getMatrixByCol() const
+  {
+      return NULL;
+  }
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void setObjCoeff( int elementIndex, double elementValue )
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "setObjCoeff");
+  }
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void addCol(const CoinPackedVectorBase& vec,
+      const double collb, const double colub,
+      const double obj)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "addCol");
+  }
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void deleteCols(const int num, const int * colIndices)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "deleteCols");
+  }
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void addRow(const CoinPackedVectorBase& vec,
+      const double rowlb, const double rowub)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "addRow");
+  }
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void addRow(const CoinPackedVectorBase& vec,
+      const char rowsen, const double rowrhs,
+      const double rowrng)
+  {
+    throw SimpleError("OsiTMINLPInterface model does not implement this function.",
+        "addRow");
+  }
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void deleteRows(const int num, const int * rowIndices)
+  {
+    if(num)
+      freeCachedRowRim();
+     problem_->removeCuts(num, rowIndices);
+  }
+
+
+  /** We have to keep this but it will throw an error
+  */
+  virtual void loadProblem(const CoinPackedMatrix& matrix,
+      const double* collb, const double* colub,
+      const double* obj,
+      const double* rowlb, const double* rowub)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "loadProblem");
+  }
+
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void assignProblem(CoinPackedMatrix*& matrix,
+      double*& collb, double*& colub, double*& obj,
+      double*& rowlb, double*& rowub)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "assignProblem");
+  }
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void loadProblem(const CoinPackedMatrix& matrix,
+      const double* collb, const double* colub,
+      const double* obj,
+      const char* rowsen, const double* rowrhs,
+      const double* rowrng)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "loadProblem");
+  }
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void assignProblem(CoinPackedMatrix*& matrix,
+      double*& collb, double*& colub, double*& obj,
+      char*& rowsen, double*& rowrhs,
+      double*& rowrng)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "assignProblem");
+  }
+
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void loadProblem(const int numcols, const int numrows,
+      const int* start, const int* index,
+      const double* value,
+      const double* collb, const double* colub,
+      const double* obj,
+      const double* rowlb, const double* rowub)
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "loadProblem");
+  }
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void loadProblem(const int numcols, const int numrows,
+      const int* start, const int* index,
+      const double* value,
+      const double* collb, const double* colub,
+      const double* obj,
+      const char* rowsen, const double* rowrhs,
+      const double* rowrng)
+  {
+    throw SimpleError("OsiTMINLPInterface model does not implement this function.",
+        "loadProblem");
+  }
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual int readMps(const char *filename,
+      const char *extension = "mps")
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "readMps");
+  }
+
+
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void writeMps(const char *filename,
+      const char *extension = "mps",
+      double objSense=0.0) const
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "writeMps");
+  }
+
+  /** Throws an error */
+  virtual std::vector<double*> getDualRays(int maxNumRays, bool fullRay = false) const
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "getDualRays");
+  }
+
+  /** Throws an error */
+  virtual std::vector<double*> getPrimalRays(int maxNumRays) const
+  {
+    throw SimpleError("OsiTMINLPInterface does not implement this function.",
+        "getPrimalRays");
+  }
+
+  //@}
+
+
+  
+  //---------------------------------------------------------------------------
+
+
+
+  /**@name Control of Ipopt output
+   */
+  //@{
+  void setSolverOutputToDefault(){
+  app_->setOutputToDefault();}
+  void forceSolverOutput(int log_level){
+  app_->forceSolverOutput(log_level);}
+  //@}
+
+  /**@name Sets and Getss */
+  //@{
+  /// Get objective function value (can't use default)
+  virtual double getObjValue() const;
+
+  //@}
+
+  /** get pointer to the TMINLP2TNLP adapter */
+  const TMINLP2TNLP * problem() const
+  {
+    return GetRawPtr(problem_);
+  }
+
+  TMINLP2TNLP * problem()
+  {
+    return GetRawPtr(problem_);
+  }
+
+  const TMINLP * model() const
+  {
+    return GetRawPtr(tminlp_);
+  }
+  
+  Bonmin::TMINLP * model()
+  {
+    return GetRawPtr(tminlp_);
+  }
+  
+  const Bonmin::TNLPSolver * solver() const
+  {
+    return GetRawPtr(app_);
+  } 
+ 
+  const std::list<Ipopt::SmartPtr<TNLPSolver> >& debug_apps() const{
+    return debug_apps_;
+  }
+
+  TNLPSolver * solver()
+  {
+    return GetRawPtr(app_);
+  } 
+  /** \name Methods to build outer approximations */
+  //@{
+  /** \name Methods to build outer approximations */
+  //@{
+  /** \brief Extract a linear relaxation of the MINLP.
+   * Use user-provided point to build first-order outer-approximation constraints at the optimum.
+   * And put it in an OsiSolverInterface.
+   */
+  virtual void extractLinearRelaxation(OsiSolverInterface &si, const double *x, 
+                                       bool getObj = 1);
+
+  /** Add constraint corresponding to objective function.*/
+  virtual void addObjectiveFunction(OsiSolverInterface &si, const double * x);
+#if 1
+  /** \brief Extract a linear relaxation of the MINLP.
+   * Solve the continuous relaxation and takes first-order outer-approximation constraints at the optimum.
+   * The put everything in an OsiSolverInterface.
+   */
+  virtual void extractLinearRelaxation(OsiSolverInterface &si, bool getObj = 1,
+                                       bool solveNlp = 1){
+     if(solveNlp)
+       initialSolve("build initial OA");
+     extractLinearRelaxation(si, getColSolution(), getObj); 
+     if(solveNlp){
+        app_->enableWarmStart();
+        setColSolution(problem()->x_sol());
+        setRowPrice(problem()->duals_sol());
+     }
+   }
+#endif
+  /** Get the outer approximation constraints at the current optimal point.
+      If x2 is different from NULL only add cuts violated by x2.
+   (Only get outer-approximations of nonlinear constraints of the problem.)*/
+  void getOuterApproximation(OsiCuts &cs, int getObj, const double * x2, bool global)
+{
+  getOuterApproximation(cs, getColSolution(), getObj, x2, global);
+}
+
+  /** Get the outer approximation constraints at provided point.
+      If x2 is different from NULL only add cuts violated by x2.
+   (Only get outer-approximations of nonlinear constraints of the problem.)*/
+  void getOuterApproximation(OsiCuts &cs, const double * x, int getObj, const double * x2, bool global){
+    getOuterApproximation(cs, x, getObj, x2, 0., global);}
+
+  /** Get the outer approximation constraints at provided point.
+      If x2 is different from NULL only add cuts violated by x2 by more than delta.
+   (Only get outer-approximations of nonlinear constraints of the problem.)*/
+  virtual void getOuterApproximation(OsiCuts &cs, const double * x, int getObj, const double * x2,
+                                     double theta, bool global);
+
+ /** Get the outer approximation at provided point for given constraint. */
+  virtual void getConstraintOuterApproximation(OsiCuts & cs, int constraintNumber,
+                                               const double * x, 
+                                               const double * x2, bool global);
+
+ /** Get the outer approximation at current optimal point for given constraint. */
+  void getConstraintOuterApproximation(OsiCuts & cs, int constraintNumber,
+                                       const double * x2, bool global){
+     getConstraintOuterApproximation(cs, constraintNumber, getColSolution(),x2,global);
+  }
+
+
+/** Get a benders cut from solution.*/
+void getBendersCut(OsiCuts &cs, bool global);
+
+  /** Given a point x_bar this solves the problem of finding the point which minimize a convex 
+    *combination between the distance to  x_bar and the original objective function f(x):
+   * \f$ min a * (\sum\limits_{i=1}^n  ||x_{ind[i]} -\overline{x}_i)||_L) + (1 - a)* s *f(x) \f$
+   * \return Distance between feasibility set a x_bar on components in ind
+   * \param n number of elements in array x_bar and ind
+   * \param s scaling of the original objective.
+   * \param a Combination to take between feasibility and original objective (must be between 0 and 1).
+   * \param L L-norm to use (can be either 1 or 2).
+   */
+  double solveFeasibilityProblem(size_t n, const double * x_bar, const int* ind, double a, double s, int L);
+
+  /** Given a point x_bar this solves the problem of finding the point which minimize
+    * the distance to x_bar while satisfying the additional cutoff constraint:
+   * \f$ min \sum\limits_{i=1}^n  ||x_{ind[i]} -\overline{x}_i)||_L$
+   * \return Distance between feasibility set a x_bar on components in ind
+   * \param n number of elements in array x_bar and ind
+   * \param L L-norm to use (can be either 1 or 2).
+   * \param cutoff objective function value of a known integer feasible solution
+   */
+  double solveFeasibilityProblem(size_t n, const double * x_bar, const int* ind, int L, double cutoff);
+
+  /** Given a point x_bar setup feasibility problem and switch so that every call to initialSolve or resolve will
+      solve it.*/
+  void switchToFeasibilityProblem(size_t n, const double * x_bar, const int* ind, double a, double s, int L);
+
+  /** Given a point x_bar setup feasibility problem and switch so that every call to initialSolve or resolve will
+      solve it. This is to be used in the local branching heuristic */
+  void switchToFeasibilityProblem(size_t n, const double * x_bar, const int* ind,
+				  double rhs_local_branching_constraint);
+
+  /** switch back to solving original problem.*/
+  void switchToOriginalProblem();
+  
+  /** round solution and check its feasibility.*/
+  void round_and_check(double tolerance,
+                       OsiObject ** objects = 0, int nObjects = -1){
+    if(!problem_->check_solution(objects, nObjects)){
+      optimizationStatus_ = TNLPSolver::provenInfeasible;
+    }
+  }
+  //@}
+
+  /** \name output for OA cut generation
+       \todo All OA code here should be moved to a separate class sometime.*/
+  //@{
+  /** OA Messages types.*/
+  enum OaMessagesTypes {
+    CUT_NOT_VIOLATED_ENOUGH = 0/** Says that one cut has been generarted, where from, which is the violation.*/,
+    VIOLATED_OA_CUT_GENERATED/** Cut is not violated enough, give violation.*/,
+    OA_CUT_GENERATED/** Print the cut which has been generated.*/,
+    OA_MESSAGES_DUMMY_END/** Dummy end.*/};
+  /** Class to store OA Messages.*/
+  class OaMessages :public CoinMessages{
+     public:
+     /** Default constructor.*/
+     OaMessages();
+  };
+  /** Like a CoinMessageHandler but can print a cut also.*/
+  class OaMessageHandler : public CoinMessageHandler{
+    public:
+    /** Default constructor.*/
+    OaMessageHandler():CoinMessageHandler(){
+    }
+    /** Constructor to put to file pointer (fp won't be closed).*/
+    OaMessageHandler(FILE * fp):CoinMessageHandler(fp){
+    }
+    /** Destructor.*/
+    virtual ~OaMessageHandler(){
+    }
+    /** Copy constructor.*/
+    OaMessageHandler(const OaMessageHandler &other):
+    CoinMessageHandler(other){}
+    /** Constructor from a regular CoinMessageHandler.*/
+    OaMessageHandler(const CoinMessageHandler &other):
+    CoinMessageHandler(other){}
+    /** Assignment operator.*/
+    OaMessageHandler & operator=(const OaMessageHandler &rhs){
+       CoinMessageHandler::operator=(rhs);
+       return *this;}
+    /** Virtual copy */
+    virtual CoinMessageHandler* clone() const{
+      return new OaMessageHandler(*this);}
+    /** print an OsiRowCut.*/
+    void print(OsiRowCut &row);
+  };
+  void setOaMessageHandler(const CoinMessageHandler &handler){
+    delete oaHandler_;
+    oaHandler_ = new OaMessageHandler(handler);
+  }
+  //@}
+
+    //-----------------------------------------------------------------------
+    /** Apply a collection of cuts.
+    */
+    virtual ApplyCutsReturnCode applyCuts(const OsiCuts & cs,
+					  double effectivenessLb = 0.0){
+       freeCachedRowRim();
+      problem_->addCuts(cs);
+      ApplyCutsReturnCode rc;
+      return rc;}
+
+   /** Add a collection of linear cuts to problem formulation.*/
+  virtual void applyRowCuts(int numberCuts, const OsiRowCut * cuts);
+
+
+  /** Add a collection of linear cuts to the problem formulation */
+  virtual void applyRowCuts(int numberCuts, const OsiRowCut ** cuts)
+  {
+    if(numberCuts)
+      freeCachedRowRim();
+    problem_->addCuts(numberCuts, cuts);
+  }
+
+ /** Get infinity norm of constraint violation for x. Put into
+     obj the objective value of x.*/
+ double getConstraintsViolation(const double * x, double & obj);
+
+  /** Get infinity norm of constraint violation for x and error in objective
+      value where obj is the estimated objective value of x.*/
+  double getNonLinearitiesViolation(const double *x, const double obj);
+
+//---------------------------------------------------------------------------
+
+  void extractInterfaceParams();
+
+
+  /** To set some application specific defaults. */
+  virtual void setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options);
+
+  /** Register all possible options to Bonmin */
+  static void registerOptions (Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+  
+  Ipopt::SmartPtr<Bonmin::RegisteredOptions> regOptions(){
+    if(IsValid(app_))
+      return app_->roptions();
+    else
+      return NULL;
+  }
+
+  /** @name Methods related to strong branching */
+  //@{
+  /// Set the strong branching solver
+  void SetStrongBrachingSolver(Ipopt::SmartPtr<StrongBranchingSolver> strong_branching_solver);
+  /// Create a hot start snapshot of the optimization process.  In our
+  /// case, we initialize the StrongBrachingSolver.
+  virtual void markHotStart();
+  /// Optimize starting from the hot start snapshot. In our case, we
+  /// call the StrongBranchingSolver to give us an approximate
+  /// solution for the current state of the bounds
+  virtual void solveFromHotStart();
+  /// Delete the hot start snapshot. In our case we deactivate the
+  /// StrongBrachingSolver.
+  virtual void unmarkHotStart();
+  //@}
+
+  /// Get values of tiny_ and very_tiny_
+  void get_tolerances(double &tiny, double&very_tiny, double &rhsRelax, double &infty){
+    tiny = tiny_;
+    very_tiny = veryTiny_;
+    rhsRelax = rhsRelax_;
+    infty = infty_;
+  }
+
+  void set_linearizer(Ipopt::SmartPtr<TMINLP2OsiLP> linearizer);
+
+  Ipopt::SmartPtr<TMINLP2OsiLP> linearizer();
+protected:
+  
+  //@}
+
+  enum RandomGenerationType{
+    uniform =0, perturb=1, perturb_suffix=2};
+  /// Initialize data structures for storing the jacobian
+  int initializeJacobianArrays();
+
+  ///@name Virtual callbacks for application specific stuff
+  //@{
+  virtual std::string  appName()
+  {
+    return "bonmin";
+  }
+  //@}
+  ///@name Protected methods
+  //@{
+
+  /** Call Ipopt to solve or resolve the problem and check for errors.*/
+  void solveAndCheckErrors(bool doResolve, bool throwOnFailure,
+      const char * whereFrom);
+
+
+  /** Add a linear cut to the problem formulation.
+  */
+  virtual void applyRowCut( const OsiRowCut & rc )
+  {
+    const OsiRowCut * cut = &rc;
+    problem_->addCuts(1, &cut);
+  }
+  /** We have to keep this but it will throw an error.
+  */
+  virtual void applyColCut( const OsiColCut & cc )
+  {
+    throw SimpleError("Ipopt model does not implement this function.",
+        "applyColCut");
+  }
+
+//  /** Read the name of the variables in an ampl .col file. */
+//  void readVarNames() const;
+
+  //@}
+
+  /**@name Model and solver */
+  //@{
+  /** TMINLP model.*/
+  Ipopt::SmartPtr<TMINLP> tminlp_;
+  /** Adapter for a MINLP to a NLP */
+  Ipopt::SmartPtr<TMINLP2TNLP> problem_;
+  /** Problem currently optimized (may be problem_ or feasibilityProblem_)*/
+  Ipopt::SmartPtr<Ipopt::TNLP> problem_to_optimize_;
+  /** Is true if and only if in feasibility mode.*/
+  bool feasibility_mode_;
+  /** Solver for a TMINLP. */
+  Ipopt::SmartPtr<TNLPSolver> app_;
+
+  /** Alternate solvers for TMINLP.*/
+  std::list<Ipopt::SmartPtr<TNLPSolver> > debug_apps_;
+  /** Do we use the other solvers?*/
+  bool testOthers_;
+  //@}
+
+  /** Warmstart information for reoptimization */
+  CoinWarmStart* warmstart_;
+
+  /**@name Cached information on the problem */
+  //@{
+  /** Free cached data relative to variables */
+  void freeCachedColRim();
+  /** Free cached data relative to constraints */
+  void freeCachedRowRim();
+  /** Free all cached data*/
+  void freeCachedData();
+  /** Extract rowsense_ vector rhs_ vector and rowrange_ vector from the lower and upper bounds
+   *  on the constraints */
+  void extractSenseRhsAndRange() const;
+  /// Pointer to dense vector of row sense indicators
+  mutable char    *rowsense_;
+
+  /// Pointer to dense vector of row right-hand side values
+  mutable double  *rhs_;
+
+  /// Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows)
+  mutable double  *rowrange_;
+  /** Pointer to dense vector of reduced costs
+      \warning Always 0. with Ipopt*/
+  mutable double  *reducedCosts_;
+  /** DualObjectiveLimit is used to store the cutoff in Cbc*/
+  double OsiDualObjectiveLimit_;
+  /** does the file variable names exists (will check automatically).*/
+  mutable bool hasVarNamesFile_;
+  //@}
+  /// number of time NLP has been solved
+  int nCallOptimizeTNLP_;
+  /// Total solution time of NLP
+  double totalNlpSolveTime_;
+  /// toatal number of iterations
+  int totalIterations_;
+  /// max radius for random point
+  double maxRandomRadius_;
+  /// Method to pick a random starting point.
+  int randomGenerationType_;
+  /// Maximum perturbation value
+  double max_perturbation_;
+  /// Ipopt value for pushing initial point inside the bounds
+  double pushValue_;
+  /// Number of times problem will be resolved in initialSolve (root node)
+  int numRetryInitial_;
+  /// Number of times problem will be resolved in resolve
+  int numRetryResolve_;
+  /// Number of times infeasible problem will be resolved.
+  int numRetryInfeasibles_;
+  /// Number of times problem will be resolved in case of a failure
+  int numRetryUnsolved_;
+  /// If infeasibility for a problem is less than this, let's be carrefull. It might be feasible
+  double infeasibility_epsilon_;
+
+
+  //Added by Claudia
+  /// Dynamic cutOff_
+  int dynamicCutOff_;
+  /// coeff_var_threshold_
+  double coeff_var_threshold_;
+  /// first_perc_for_cutoff_decr_
+  double first_perc_for_cutoff_decr_;
+  /// second_perc_for_cutoff_decr_
+  double second_perc_for_cutoff_decr_;
+ 
+
+  /** Messages specific to an OsiTMINLPInterface. */
+  Messages messages_;
+  /** If not 0 when a problem is not solved (failed to be solved)
+      will pretend that it is infeasible. If == 1 will care
+      (i.e. record the fact issue messages to user), if ==2 don't care (somebody else will) */
+  int pretendFailIsInfeasible_;
+
+  mutable int pretendSucceededNext_;
+
+  /** did we ever continue optimization ignoring a failure. */
+  bool hasContinuedAfterNlpFailure_;
+  /** number iterations above which a problem is considered suspect (-1 is considered \f$+ \infty \f$).
+  	If in a call to solve a problem takes more than that number of iterations it will be output to files.*/
+  int numIterationSuspect_ ;
+  /** Has problem been optimized since last change (include setColSolution).
+     If yes getColSolution will return Ipopt point, otherwise will return
+     initial point.*/
+  bool hasBeenOptimized_;
+  /** A fake objective function (all variables to 1) to please Cbc
+      pseudo costs initialization.  AW: I changed this, it will now be
+      the objective gradient at current point. */
+  mutable double * obj_;
+  /** flag to say wether options have been printed or not.*/
+  static bool hasPrintedOptions;
+
+  /** Adapter for TNLP to a feasibility problem */
+  Ipopt::SmartPtr<TNLP2FPNLP> feasibilityProblem_;
+
+  /** Adapter for TMINLP to an Osi LP  */
+  Ipopt::SmartPtr<TMINLP2OsiLP> linearizer_;
+
+  /** \name Arrays to store Jacobian matrix */
+  //@{
+  /** Row indices.*/
+  int * jRow_;
+  /** Column indices.*/
+  int * jCol_;
+  /** Values */
+  double * jValues_;
+  /** Number of elements.*/
+  int nnz_jac;
+  //@}
+
+  ///Store the types of the constraints (linear and nonlinear).
+  Ipopt::TNLP::LinearityType * constTypes_;
+  /** Number of nonlinear constraint
+   */
+  int nNonLinear_;
+  /** Value for small non-zero element which we will try to remove cleanly in OA cuts.*/
+  double tiny_;
+  /** Value for small non-zero element which we will take the risk to ignore in OA cuts.*/
+  double veryTiny_;
+  /** Amount by which to relax OA constraints RHSes*/
+  double rhsRelax_;
+  /** Value for infinity. */
+  double infty_;
+  /** status of last optimization. */
+  TNLPSolver::ReturnStatus optimizationStatus_;
+  /** Flag indicating if the warm start methods actually do something.*/
+  WarmStartModes warmStartMode_;
+  /** Is it the first solve (for random starting point at root options).*/
+  bool firstSolve_;
+  /** Object for strengthening cuts */
+  Ipopt::SmartPtr<CutStrengthener> cutStrengthener_;
+
+  /** \name output for OA cut generation
+       \todo All OA code here should be moved to a separate class sometime.*/
+  //@{
+  /** OA Messages.*/
+  OaMessages oaMessages_;
+  /** OA Message handler. */
+  OaMessageHandler * oaHandler_;
+  //@}
+
+  double newCutoffDecr;
+protected:
+  /** Facilitator to create an application. */
+  void createApplication(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+                         Ipopt::SmartPtr<Ipopt::OptionsList> options,
+                         Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+                         const std::string & prefix);
+  ///Constructor without model only for derived classes
+  OsiTMINLPInterface(Ipopt::SmartPtr<TNLPSolver> app);
+
+  /** Internal set warm start.*/
+  bool internal_setWarmStart(const CoinWarmStart* ws);
+
+  /** internal get warm start.*/
+  CoinWarmStart* internal_getWarmStart() const; 
+
+  /** Procedure that builds a fake basis. Only tries to make basis consistent with constraints activity.*/
+  CoinWarmStart* build_fake_basis() const; 
+private:
+
+  /** solver to be used for all strong branching solves */
+  Ipopt::SmartPtr<StrongBranchingSolver> strong_branching_solver_;
+  /** status of last optimization before hot start was marked. */
+  TNLPSolver::ReturnStatus optimizationStatusBeforeHotStart_;
+static const char * OPT_SYMB;
+static const char * FAILED_SYMB;
+static const char * INFEAS_SYMB;
+static const char * TIME_SYMB;
+static const char * UNBOUND_SYMB;
+  /** Get status as a char * for log.*/
+  const char * statusAsString(TNLPSolver::ReturnStatus r){
+    if(r == TNLPSolver::solvedOptimal || r == TNLPSolver::solvedOptimalTol){
+      return OPT_SYMB;} 
+    else if(r == TNLPSolver::provenInfeasible){
+      return INFEAS_SYMB;}
+    else if(r == TNLPSolver::unbounded){
+      return UNBOUND_SYMB;}
+    else if(r == TNLPSolver::timeLimit){
+      return TIME_SYMB;}
+    else return FAILED_SYMB;
+  }
+  const char * statusAsString(){
+    return statusAsString(optimizationStatus_);}
+};
+}
+#endif
diff --git a/src/Interfaces/BonRegisteredOptions.cpp b/src/Interfaces/BonRegisteredOptions.cpp
new file mode 100644
index 0000000..3c605d4
--- /dev/null
+++ b/src/Interfaces/BonRegisteredOptions.cpp
@@ -0,0 +1,368 @@
+// (C) Copyright International Business Machines Corporation 2007
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines,
+//
+// Date : 27/08/2007
+
+#include "BonRegisteredOptions.hpp"
+#include <IpSmartPtr.hpp>
+#include <sstream>
+#include <climits>
+#include <cfloat>
+
+namespace Bonmin{
+  struct optionsCmp{
+  bool operator()( Ipopt::RegisteredOption * a,
+                   Ipopt::RegisteredOption * b){
+    if(a->RegisteringCategory() == b->RegisteringCategory()){
+       return a->Name() < b->Name();
+    }
+    return a->RegisteringCategory() < b->RegisteringCategory(); 
+  }
+  };
+
+
+  static std::string makeLatex(const std::string &s){
+    std::string ret_val;
+    std::string::const_iterator i = s.begin();
+    for(; i != s.end() ; i++){
+       switch (*i) {
+         case '_':
+         case '-':
+           ret_val +='\\';
+         default:
+           ret_val += *i;
+       }
+    }
+   return ret_val;
+  }
+
+  static std::string makeSpaceLess(const std::string &s){
+    std::string ret_val;
+    std::string::const_iterator i = s.begin();
+    for(; i != s.end() ; i++){
+       switch (*i) {
+         case ' ':
+         case '\t':
+         case '_':
+           //ret_val +='_';
+           break;
+         default:
+           ret_val += *i;
+       }
+    }
+   return ret_val;
+  }
+
+#if 0
+  static std::string makeLatex(double value){
+    std::string ret_val = "$";
+    std::stringstream s_val;
+    s_val<<value;
+    
+    unsigned int i = s_val.str().find_first_of('e');
+    if(i != s_val.str().size()){
+      ret_val += s_val.str().substr(0,i-1);
+      ret_val += " \\cdot 10^{";
+      ret_val += s_val.str().substr(i+1);
+      ret_val += '}';
+    }
+    else ret_val += s_val.str();
+    ret_val += '$';
+    return ret_val;
+  }
+#endif
+
+  static std::string makeString(int value){
+    std::string ret_val;
+    if(value >= INT_MAX){
+     ret_val="INT_MAX";}
+    else if(value <= - INT_MAX){
+      ret_val="-INT_MAX";}
+    else{
+      std::stringstream s_val;
+      s_val<<value;
+      ret_val = s_val.str();
+    }
+    return ret_val;
+  }
+
+  static std::string makeString(double value){
+    std::string ret_val;
+    if(value >= DBL_MAX){
+     ret_val="DBL_MAX";}
+    else if(value <= - DBL_MAX){
+      ret_val="-DBL_MAX";}
+    else{
+      std::stringstream s_val;
+      s_val<<value;
+      ret_val = s_val.str();
+    }
+    return ret_val;
+  }
+
+ static std::string makeNumber(std::string value){
+   if(value == "DBL_MAX") {
+     std::stringstream s_val;
+     s_val<<DBL_MAX;
+     return s_val.str();
+   }
+   if(value == "-DBL_MAX") {
+     std::stringstream s_val;
+     s_val<<-DBL_MAX;
+     return s_val.str();
+   }
+   if(value == "INT_MAX") {
+     std::stringstream s_val;
+     s_val<<INT_MAX;
+     return s_val.str();
+   }
+   if(value == "-INT_MAX") {
+     std::stringstream s_val;
+     s_val<<-INT_MAX;
+     return s_val.str();
+   }
+   return value;
+ }
+#if 0
+  static std::string makeLatex(int value){
+    std::string ret_val = "$";
+    std::stringstream s_val;
+    s_val<<value;
+    ret_val += s_val.str();
+    ret_val += "$";
+    return ret_val;
+  }
+#endif
+
+  static char OptionType2Char(const Ipopt::RegisteredOptionType &T){
+    switch(T){
+      case Ipopt::OT_Number: return 'F';
+      case Ipopt::OT_Integer: return 'I';
+      case Ipopt::OT_String: return 'S';
+      case Ipopt::OT_Unknown: 
+      default: return 'U';
+    }
+  }
+
+  static std::string defaultAsString(Ipopt::SmartPtr< Ipopt::RegisteredOption > opt){
+    Ipopt::RegisteredOptionType T = opt->Type();
+    switch(T){
+      case Ipopt::OT_Number: return makeString(opt->DefaultNumber());
+      case Ipopt::OT_Integer: return makeString(opt->DefaultInteger());
+      case Ipopt::OT_String: return (opt->DefaultString());
+      case Ipopt::OT_Unknown: 
+      default:
+         return "Unknown type of option";
+    }
+  }
+  /** Output Latex table of options.*/
+  void 
+  RegisteredOptions::writeLatexOptionsTable(std::ostream &of, ExtraCategoriesInfo which){
+  std::map<std::string, Ipopt::SmartPtr<Ipopt::RegisteredOption> > 
+           registered_options = RegisteredOptionsList();
+
+  //Print table header
+  //of<<"\\begin{threeparttable}"<<std::endl
+  of<<"\\topcaption{\\label{tab:options} "<<std::endl
+    <<"List of options and compatibility with the different algorithms."<<std::endl
+    <<"}"<<std::endl;
+  of<<"\\tablehead{\\hline "<<std::endl
+    <<"Option & type & ";
+  //of<<" default & ";
+  of<<"{\\tt B-BB} & {\\tt B-OA} & {\\tt B-QG} & {\\tt B-Hyb} & {\\tt B-Ecp} & {\\tt B-iFP} & {\\tt Cbc\\_Par} \\\\"<<std::endl
+    <<"\\hline"<<std::endl
+    <<"\\hline}"<<std::endl;
+  of<<"\\tabletail{\\hline \\multicolumn{9}{|c|}{continued on next page}\\\\"
+    <<"\\hline}"<<std::endl; 
+  of<<"\\tablelasttail{\\hline}"<<std::endl;
+  of<<"{\\footnotesize"<<std::endl;
+  of<<"\\begin{xtabular}{@{}|@{\\;}l@{\\;}|@{\\;}r@{\\;}|@{\\;}c@{\\;}|@{\\;}c@{\\;}|@{\\;}c@{\\;}|@{\\;}c@{\\;}|@{\\;}c@{\\;}|@{\\;}c@{\\;}|@{\\;}c@{\\;}|@{}}"<<std::endl;
+
+  //sort options by categories and alphabetical order
+  std::list< Ipopt::RegisteredOption * > sortedOptions;
+ 
+  for(std::map<std::string, Ipopt::SmartPtr<Ipopt::RegisteredOption > >::iterator i = 
+          registered_options.begin(); i != registered_options.end() ; i++){
+     if(categoriesInfo(i->second->RegisteringCategory()) == which)
+     sortedOptions.push_back(GetRawPtr(i->second));
+     }
+
+   sortedOptions.sort(optionsCmp());
+   std::string registeringCategory = "";
+   for(std::list< Ipopt::RegisteredOption * >::iterator i = sortedOptions.begin();
+       i != sortedOptions.end() ; i++)
+   {
+     if((*i)->RegisteringCategory() != registeringCategory){
+     registeringCategory = (*i)->RegisteringCategory();
+     of<<"\\hline"<<std::endl
+       <<"\\multicolumn{1}{|c}{} & \\multicolumn{8}{l|}{"
+       <<registeringCategory<<"}\\\\"<<std::endl
+       <<"\\hline"<<std::endl;
+     }
+     
+     of<<makeLatex((*i)->Name())<<"& "<<OptionType2Char((*i)->Type())//<<"& "
+       //<<makeLatex(defaultAsString(*i))
+       <<"& "<<( (isValidForBBB((*i)->Name()))? "$\\surd$" : "-" )
+       <<"& "<<( (isValidForBOA((*i)->Name()))? "$\\surd$" : "-" )
+       <<"& "<<( (isValidForBQG((*i)->Name()))? "$\\surd$" : "-" )
+       <<"& "<<( (isValidForHybrid((*i)->Name()))? "$\\surd$" : "-" )
+       <<"& "<<( (isValidForBEcp((*i)->Name()))? "$\\surd$" : "-" )
+       <<"& "<<( (isValidForBiFP((*i)->Name()))? "$\\surd$" : "-" )
+       <<"& "<<( (isValidForCbc((*i)->Name()))? "$\\surd$" : "-" )
+       <<"\\\\"<<std::endl;
+   }
+   //Print table end
+  of<<"\\hline"<<std::endl
+    <<"\\end{xtabular}"<<std::endl;
+  of<<"}"<<std::endl;
+#if 0
+  of<<"\\begin{tablenotes}"<<std::endl
+    <<"\\item $\\strut^*$ option is available"<<std::endl
+    <<"        for MILP subsolver (it is only passed if the {\\tt milp\\_subsolver} optio"<<std::endl
+    <<"        see Subsection \\ref{sec:milp_opt})."<<std::endl
+    <<"       \\item $\\strut^1$ disabled for stability reasons."<<std::endl
+    <<"\\end{tablenotes}"<<std::endl
+    <<"\\end{threeparttable} "<<std::endl;
+#endif
+  }
+
+  /** choose options.*/
+  void 
+  RegisteredOptions::chooseOptions(ExtraCategoriesInfo which,
+                                            std::list< Ipopt::RegisteredOption * >& sortedOptions)
+  {
+  std::map<std::string, Ipopt::SmartPtr<Ipopt::RegisteredOption> > 
+           registered_options = RegisteredOptionsList();
+
+  for(std::map<std::string, Ipopt::SmartPtr<Ipopt::RegisteredOption > >::iterator i = 
+          registered_options.begin(); i != registered_options.end() ; i++){
+     if(categoriesInfo(i->second->RegisteringCategory()) == which)
+     sortedOptions.push_back(GetRawPtr(i->second));
+     }
+   sortedOptions.sort(optionsCmp());
+  }
+  /** Output html table of options.*/
+  void 
+  RegisteredOptions::writeHtmlOptionsTable(std::ostream &of, ExtraCategoriesInfo which){
+
+  //Print table header
+  of<<"<table border=\"1\">"<<std::endl;
+  //sort options by categories and alphabetical order
+  std::list< Ipopt::RegisteredOption * > sortedOptions;
+  chooseOptions(which, sortedOptions); 
+  writeHtmlOptionsTable(of, sortedOptions);
+  }
+
+   
+   /** Output html table of options.*/
+   void 
+   RegisteredOptions::writeHtmlOptionsTable(std::ostream &os, std::list<Ipopt::RegisteredOption *> &options)
+   {
+   os<<"<table border=\"1\">"<<std::endl;
+   os<<"<tr>"<<std::endl;
+   os<<"<td>Option </td>"<<std::endl;
+   os<<"<td> type </td>"<<std::endl;
+   //os<<"<td> default </td>"<<std::endl;
+   os<<"<td> B-BB</td>"<<std::endl;
+   os<<"<td> B-OA</td>"<<std::endl;
+   os<<"<td> B-QG</td>"<<std::endl;
+   os<<"<td> B-Hyb</td>"<<std::endl;
+   os<<"</tr>"<<std::endl;
+   std::string registeringCategory = "";
+   for(std::list< Ipopt::RegisteredOption * >::iterator i = options.begin();
+       i != options.end() ; i++)
+   {
+     if((*i)->RegisteringCategory() != registeringCategory){
+     registeringCategory = (*i)->RegisteringCategory();
+     os<<"<tr>"
+       <<"   <th colspan=9>"
+       <<" <a href=\"#sec:"<<makeSpaceLess(registeringCategory)<<"\">"
+       <<registeringCategory<<"</a> </th>"<<std::endl
+       <<"</tr>"<<std::endl;
+     }
+     
+     os<<"<tr>"<<std::endl
+       <<"<td>"<<((*i)->Name())<<"</td>"<<std::endl
+       <<"<td>"<<OptionType2Char((*i)->Type())<<"</td>"<<std::endl
+       //<<"<td>"<<defaultAsString(*i)<<"</td>"<<std::endl
+       <<"<td> "<<( (isValidForBBB((*i)->Name()))? '+' : '-' )<<"</td>"<<std::endl
+       <<"<td>"<<( (isValidForBOA((*i)->Name()))? '+' : '-' )<<"</td>"<<std::endl
+       <<"<td>"<<( (isValidForBQG((*i)->Name()))? '+' : '-' )<<"</td>"<<std::endl
+       <<"<td>"<<( (isValidForHybrid((*i)->Name()))? '+' : '-' )<<"</td>"<<std::endl
+       <<"</tr>"<<std::endl;
+   }
+   //Print table end
+  os<<"</tr>"<<std::endl
+    <<"</table>"<<std::endl;
+  }
+
+   /** Output Latex/Html options documentation.*/
+   void 
+   RegisteredOptions::writeLatexHtmlDoc(std::ostream &os, ExtraCategoriesInfo which){
+      std::list< Ipopt::RegisteredOption * > options;
+      chooseOptions(which, options);
+      os<<"\\latexhtml{}{"<<std::endl;
+      os<<"\\HCode{"<<std::endl;
+      writeHtmlOptionsTable(os, options);
+      os<<"}\n}"<<std::endl;
+
+      //Create journalist to write to os
+      Ipopt::Journalist jnlst;
+      Ipopt::SmartPtr<Ipopt::StreamJournal> J = new Ipopt::StreamJournal("options_journal", Ipopt::J_ALL);
+      J->SetOutputStream(&os);
+      J->SetPrintLevel(Ipopt::J_DOCUMENTATION, Ipopt::J_SUMMARY);
+      jnlst.AddJournal(GetRawPtr(J));
+
+      std::string registeringCategory = "";
+      for(std::list< Ipopt::RegisteredOption * >::iterator i = options.begin();
+           i != options.end() ; i++)
+       {
+          if((*i)->RegisteringCategory() != registeringCategory){
+           registeringCategory = (*i)->RegisteringCategory();
+             os<<"\\subsection{"<<registeringCategory<<"}"<<std::endl;      
+             os<<"\\label{sec:"<<makeSpaceLess(registeringCategory)<<"}"<<std::endl;
+             os<<"\\htmlanchor{sec:"<<makeSpaceLess(registeringCategory)<<"}"<<std::endl;
+           }
+       
+           (*i)->OutputLatexDescription(jnlst);
+       }
+    }
+
+  /** Ouptut a bonmin.opt file with options default values and short descritpions.*/
+  void
+  RegisteredOptions::writeBonminOpt(std::ostream &os, ExtraCategoriesInfo which){
+      std::list< Ipopt::RegisteredOption * > options;
+      chooseOptions(which, options);
+
+      //Create journalist to write to os
+      Ipopt::Journalist jnlst;
+      Ipopt::SmartPtr<Ipopt::StreamJournal> J = new Ipopt::StreamJournal("options_journal", Ipopt::J_ALL);
+      J->SetOutputStream(&os);
+      J->SetPrintLevel(Ipopt::J_DOCUMENTATION, Ipopt::J_SUMMARY);
+      jnlst.AddJournal(GetRawPtr(J));
+
+      std::string registeringCategory = "";
+      for(std::list< Ipopt::RegisteredOption * >::iterator i = options.begin();
+           i != options.end() ; i++)
+       {
+          if((*i)->RegisteringCategory() != registeringCategory){
+           registeringCategory = (*i)->RegisteringCategory();
+             os<<std::endl<<"# registering category: "<<registeringCategory<<std::endl<<std::endl;
+           }
+           os<<"bonmin.";
+           os.setf(std::ios::left);
+           os.width(37);
+           os<<(*i)->Name()<<" ";
+           os.width(10);
+           os<<makeNumber(defaultAsString(*i))<<"\t#";
+           os<<(*i)->ShortDescription();
+           os<<std::endl;            
+       }
+    }
+
+}/*Ends bonmin namespace.*/
diff --git a/src/Interfaces/BonRegisteredOptions.hpp b/src/Interfaces/BonRegisteredOptions.hpp
new file mode 100644
index 0000000..1bff64d
--- /dev/null
+++ b/src/Interfaces/BonRegisteredOptions.hpp
@@ -0,0 +1,225 @@
+// (C) Copyright International Business Machines Corporation 2007
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 27/08/2007
+
+#ifndef BonRegisteredOptions_H
+#define BonRegisteredOptions_H
+
+#include "IpRegOptions.hpp"
+#include "IpException.hpp"
+#include "CoinError.hpp"
+#include "IpTypes.hpp"
+#include <iostream>
+
+/* Forward declaration, the function will be defined in BonAmplTMINLP.cpp, if ASL is available */
+namespace Ipopt {
+  class AmplOptionsList;
+}
+
+namespace Bonmin {
+/** Class to add a few more information to Ipopt::RegisteredOptions.
+    In particular, it allows to store code to indicate in which algorithm
+    option is available. It also allows to table summing up all the options
+    both in LaTex and html.*/
+class RegisteredOptions: public Ipopt::RegisteredOptions{
+  public:
+    enum ExtraOptInfosBits{
+    validInHybrid=0/** Say that option is valid in Hybrid method (1).*/,
+    validInQG/** Say that option is valid in Quesada Grossmann method (2).*/,
+    validInOA/**Say that option is valid in outer approximation dec (4).*/,
+    validInBBB/** Say that option is valid in the pure branch-and-bound (8).*/,
+    validInEcp/** Say that option is valid in the Ecp (16).*/,
+    validIniFP/** Say that option is valid in the iFP (32).*/,
+    validInCbc/** Say that option is valid when using Cbc_Par (64).*/
+   };
+
+
+/* Table of values
+ * only B-Hyb 1
+ * B-Hyb & B-QG 3
+ * B-Hyb & B-OA 5
+ * B-Hyb & B-QG & B-OA & B-ECP 23
+ */
+
+
+
+   enum ExtraCategoriesInfo{
+    BonminCategory = 0/** Option category is for Bonmin.*/,
+    IpoptCategory /** Option category for Ipopt.*/,
+    FilterCategory /** Option category for FilterSqp.*/,
+    BqpdCategory /** Option category for Bqpd.*/,
+    CouenneCategory /** Option category for Couenne.*/,
+    UndocumentedCategory /**For undocumented options.*/
+   };
+    /** Standard constructor.*/
+    RegisteredOptions():
+       Ipopt::RegisteredOptions(){
+    }
+
+    /** Standard destructor.*/
+    ~RegisteredOptions(){
+    }
+
+   //DECLARE_STD_EXCEPTION(OPTION_NOT_REGISTERED); 
+   /** Set registering category with extra information.*/
+   void SetRegisteringCategory (const std::string &registering_category,
+                                const ExtraCategoriesInfo extra){
+      Ipopt::RegisteredOptions::SetRegisteringCategory(registering_category);
+      categoriesInfos_[registering_category] = extra;}
+ 
+   /** throw if option does not exists.*/
+   inline void optionExists(const std::string & option){
+     if(!IsValid(GetOption(option))){
+       std::string msg = "Try to access option: "+option;
+       msg += "\n Option is not registered.\n";
+       throw CoinError("Bonmin::RegisteredOption","optionExists",msg);
+     }
+   }
+
+   /**Set extra information for option.*/
+   inline void setOptionExtraInfo(const std::string & option, int code){
+      optionExists(option);
+      bonOptInfos_[option] = code;
+   }
+
+   /** Set that option is valid for hybrid.*/
+   inline void optionValidForHybrid(const std::string &option){
+      optionExists(option);
+     bonOptInfos_[option] |= 1 << validInHybrid;}
+
+   /** Set that option is valid for QuesadaGrossmann.*/
+   inline void optionValidForBQG(const std::string &option){
+     optionExists(option);
+     bonOptInfos_[option] |= 1 << validInQG;}
+   
+   /** Set that option is valid for Outer approximation.*/
+   inline void optionValidForBOA(const std::string &option){
+     optionExists(option);
+     bonOptInfos_[option] |= 1 << validInOA;}
+   
+   /** Set that option is valid for pure branch-and-bound.*/
+   inline void optionValidForBBB(const std::string &option){
+     optionExists(option);
+     bonOptInfos_[option] |= 1 << validInBBB;}
+   
+   /** Set that option is valid for B-Ecp.*/
+   inline void optionValidForBEcp(const std::string &option){
+     optionExists(option);
+     bonOptInfos_[option] |= 1 << validInEcp;}
+   
+   /** Set that option is valid for B-iFP.*/
+   inline void optionValidForBiFP(const std::string &option){
+     optionExists(option);
+     bonOptInfos_[option] |= 1 << validIniFP;}
+   
+   /** Set that option is valid for Cbc.*/
+   inline void optionValidForCbc(const std::string &option){
+     optionExists(option);
+     bonOptInfos_[option] |= 1 << validInCbc;}
+
+
+    /** Say if option is valid for hybrid.*/
+   inline bool isValidForHybrid(const std::string &option){
+      optionExists(option);
+     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
+     if(i != bonOptInfos_.end()) 
+     return (i->second) & (1 << validInHybrid);
+     else return true;}
+
+   /** Say if option is valid for QuesadaGrossmann.*/
+   inline bool isValidForBQG(const std::string &option){
+     optionExists(option);
+     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
+     if(i != bonOptInfos_.end()) 
+       return (i->second) & (1 << validInQG);
+     else return true;}
+   
+   /** Say if option is valid for Outer approximation.*/
+   inline bool isValidForBOA(const std::string &option){
+     optionExists(option);
+     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
+     if(i != bonOptInfos_.end()) 
+     return (i->second) & (1 << validInOA);
+     return true;}
+   
+   /** Say if option is valid for pure branch-and-bound.*/
+   inline bool isValidForBBB(const std::string &option){
+     optionExists(option);
+     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
+     if(i != bonOptInfos_.end()) 
+     return (i->second) & (1 << validInBBB);
+     return true;}
+
+   
+   /** Say if option is valid for B-Ecp.*/
+   inline bool isValidForBEcp(const std::string &option){
+     optionExists(option);
+     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
+     if(i != bonOptInfos_.end()) 
+     return (i->second) & (1 << validInEcp);
+     return true;}
+
+   
+   /** Say if option is valid for B-iFP.*/
+   inline bool isValidForBiFP(const std::string &option){
+     optionExists(option);
+     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
+     if(i != bonOptInfos_.end()) 
+     return (i->second) & (1 << validIniFP);
+     return true;}
+
+   
+   /** Say if option is valid for Cbc.*/
+   inline bool isValidForCbc(const std::string &option){
+     optionExists(option);
+     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
+     if(i != bonOptInfos_.end()) 
+     return (i->second) & (1 << validInCbc);
+     return true;}
+
+
+   /** Output Latex table of options.*/
+   void writeLatexOptionsTable(std::ostream &of, ExtraCategoriesInfo which);
+
+   /** Output html table of options.*/
+   void writeHtmlOptionsTable(std::ostream &of, ExtraCategoriesInfo which);
+
+
+   /** Output Latex/Html ooptions documentation.*/
+   void writeLatexHtmlDoc(std::ostream &of, ExtraCategoriesInfo which);
+  /** Ouptut a bonmin.opt file with options default values and short descriptions.*/
+  void writeBonminOpt(std::ostream &os, ExtraCategoriesInfo which);
+
+   /** Get info about what a category is taking care of (e.g., Ipopt, Bonmin, FilterSQP,...) .*/
+   ExtraCategoriesInfo categoriesInfo(const std::string &s)
+   {
+      std::map<std::string, ExtraCategoriesInfo>::iterator i = categoriesInfos_.find(s);
+      if(i == categoriesInfos_.end())
+        return IpoptCategory;
+      return i->second;
+   }
+  
+   /* Forward declaration, the function will be defined in BonAmplTMINLP.cpp*/
+   void fillAmplOptionList(ExtraCategoriesInfo which, Ipopt::AmplOptionsList * amplOptList);
+
+   private:
+   /** Output Latex table of options.*/
+   void chooseOptions(ExtraCategoriesInfo which, std::list<Ipopt::RegisteredOption *> &options);
+   /** Output html table of options.*/
+   void writeHtmlOptionsTable(std::ostream & os, std::list<Ipopt::RegisteredOption *> &options);
+   /** Store extra Informations on Bonmin options.*/
+   std::map<std::string, int> bonOptInfos_;
+   /** Store extra Informations on Registering categories
+       (is bonmin, filterSqp...).*/
+   std::map<std::string, ExtraCategoriesInfo> categoriesInfos_;
+};
+
+}/*Ends namespace Bonmin.*/
+#endif
+
diff --git a/src/Interfaces/BonStartPointReader.cpp b/src/Interfaces/BonStartPointReader.cpp
new file mode 100644
index 0000000..6fca1d3
--- /dev/null
+++ b/src/Interfaces/BonStartPointReader.cpp
@@ -0,0 +1,54 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 26/05/2005
+#include "BonStartPointReader.hpp"
+
+
+namespace Bonmin {
+
+  bool StartPointReader::readFile()
+  {
+    std::ifstream inFile(fileName_.c_str());
+    if(!inFile.is_open()) {
+      std::cerr<<"Error in opening initial point file";
+      return false;
+    }
+    int numPrimals;
+    int numDuals;
+    inFile>>numPrimals>>numDuals;
+    gutsOfDestructor();
+    primals_ = new double [numPrimals];
+    duals_ = new double[numDuals];
+    for(int i = 0; i < numPrimals ; i++) {
+      inFile>>primals_[i];
+    }
+    for(int i = 0; i < numDuals ; i++) {
+      inFile>>duals_[i];
+    }
+    return true;
+  }
+
+  bool StartPointReader::readAndApply(OsiTMINLPInterface * solver)
+  {
+    readFile();
+    solver->solver()->enableWarmStart();
+    if(primals_)
+      solver->setColSolution(primals_);
+    else {
+      std::cerr<<"No warm start info ???"<<std::endl;
+      return 0;
+    }
+    if(duals_)
+      solver->setRowPrice(duals_);
+    else {
+      std::cerr<<"No warm start info ???"<<std::endl;
+      return 0;
+    }
+    return 1;
+  }
+}
diff --git a/src/Interfaces/BonStartPointReader.hpp b/src/Interfaces/BonStartPointReader.hpp
new file mode 100644
index 0000000..bfcbdc3
--- /dev/null
+++ b/src/Interfaces/BonStartPointReader.hpp
@@ -0,0 +1,85 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 26/05/2005
+
+#ifndef _BONSTARTPOINTREADER_H_
+#define _BONSTARTPOINTREADER_H_
+#include <string>
+#include <list>
+#include <fstream>
+#include <iostream>
+#include "BonOsiTMINLPInterface.hpp"
+
+
+
+namespace Bonmin {
+/** This class reads a file with a starting point for Ipopt initalization. File format is number of primals number of duals then values one after another
+ * Numbering of variables is first variables, then duals on lower bounds duals on upper bounds and to finish duals on constraints */
+class StartPointReader
+{
+public:
+  /** Constructor with fileName_ given by a string (and default) */
+  StartPointReader(std::string fileName = ""):
+      fileName_(fileName),
+      primals_(NULL),
+      duals_(NULL)
+  {}
+  /** Constructor with fileName_ given by a const char * */
+  StartPointReader(const char * fileName):
+      fileName_(fileName),
+      primals_(NULL),
+      duals_(NULL)
+  {}
+
+  /** Reads the .initP file*/
+  bool readFile();
+  /** Reads the .initP file fileName*/
+  bool readFile(const std::string &fileName)
+  {
+    fileName_=fileName;
+    return readFile();
+  }
+  /** Read warmstart info and apply to an IpoptInterface */
+  bool readAndApply(OsiTMINLPInterface * solver);
+  ~StartPointReader()
+  {
+    gutsOfDestructor();
+  }
+
+
+  /// Dealocate arrays
+  void gutsOfDestructor()
+  {
+    if(primals_!=NULL)
+      delete[] primals_;
+    if(duals_!=NULL)
+      delete[] duals_;
+  }
+
+  /// Access primal variables values.
+  const double * getPrimals()
+  {
+    return primals_;
+  }
+  /// Access dual variables values.
+  const double * getDuals()
+  {
+    return duals_;
+  }
+private:
+  /** Name of the file with initial point */
+  std::string fileName_;
+
+  /// Primal variables values.
+  double * primals_;
+  /// Dual variables values.
+  double * duals_;
+};
+
+}
+#endif /*_IPCBCINITPOINTREADER_H_*/
diff --git a/src/Interfaces/BonStrongBranchingSolver.cpp b/src/Interfaces/BonStrongBranchingSolver.cpp
new file mode 100644
index 0000000..e07a944
--- /dev/null
+++ b/src/Interfaces/BonStrongBranchingSolver.cpp
@@ -0,0 +1,46 @@
+// Copyright (C) 2007, 2008 International Business Machines
+// Corporation and others.  All Rights Reserved.
+//
+// Author:  Andreas Waechter      2007-08-20    IBM
+//
+
+#include "BonStrongBranchingSolver.hpp"
+
+namespace Bonmin {
+
+StrongBranchingSolver::StrongBranchingSolver(OsiTMINLPInterface * tminlp_interface)
+{
+  jnlst_ = tminlp_interface->solver()->journalist();
+  DBG_ASSERT(IsValid(jnlst_));
+  options_ = tminlp_interface->solver()->options();
+  DBG_ASSERT(IsValid(options_));
+  reg_options_ = tminlp_interface->solver()->roptions();
+  DBG_ASSERT(IsValid(reg_options_));
+
+  options_->GetIntegerValue("bb_log_level", bb_log_level_, tminlp_interface->prefix());
+}
+
+StrongBranchingSolver::StrongBranchingSolver(const StrongBranchingSolver & rhs)
+{
+  jnlst_ = rhs.jnlst_;
+  options_ = rhs.options_;
+  reg_options_ = rhs.reg_options_;
+  bb_log_level_ = rhs.bb_log_level_;
+}
+
+StrongBranchingSolver &
+StrongBranchingSolver::operator=(const StrongBranchingSolver & rhs)
+{
+  if (this != &rhs) {
+    jnlst_ = rhs.jnlst_;
+    options_ = rhs.options_;
+    reg_options_ = rhs.reg_options_;
+    bb_log_level_ = rhs.bb_log_level_;
+  }
+  return *this;
+}
+
+StrongBranchingSolver::~StrongBranchingSolver ()
+{}
+
+}/* Ends Bonmin's namespace.*/
diff --git a/src/Interfaces/BonStrongBranchingSolver.hpp b/src/Interfaces/BonStrongBranchingSolver.hpp
new file mode 100644
index 0000000..087d2e7
--- /dev/null
+++ b/src/Interfaces/BonStrongBranchingSolver.hpp
@@ -0,0 +1,69 @@
+// Copyright (C) 2007, International Business Machines
+// Corporation and others.  All Rights Reserved.
+//
+// Author:  Andreas Waechter      2007-08-20    IBM
+//
+#ifndef BonStrongBranchingSolver_H
+#define BonStrongBranchingSolver_H
+
+#include "BonOsiTMINLPInterface.hpp"
+#include "BonRegisteredOptions.hpp"
+namespace Bonmin {
+
+/** This class is the base class for a solver that can be used in
+ *  BonOsiSolverInterface to perform the strong branching solves.
+*/
+
+class StrongBranchingSolver : public Ipopt::ReferencedObject  {
+ 
+public:
+
+  /// Constructor from solver
+  StrongBranchingSolver (OsiTMINLPInterface * solver);
+
+  /// Assignment operator 
+  StrongBranchingSolver & operator= (const StrongBranchingSolver& rhs);
+  /// Copy constructor
+  StrongBranchingSolver(const StrongBranchingSolver& rhs);
+
+  /// Destructor
+  virtual ~StrongBranchingSolver ();
+
+  /// Called to initialize solver before a bunch of strong branching
+  /// solves
+  virtual void markHotStart(OsiTMINLPInterface* tminlp_interface) = 0;
+
+  /// Called to solve the current TMINLP (with changed bound information)
+  virtual TNLPSolver::ReturnStatus solveFromHotStart(OsiTMINLPInterface* tminlp_interface) = 0;
+
+  /// Called after all strong branching solves in a node
+  virtual void unmarkHotStart(OsiTMINLPInterface* tminlp_interface) = 0;
+
+protected:
+
+  inline Ipopt::SmartPtr<Ipopt::Journalist>& Jnlst()
+  {
+    return jnlst_;
+  }
+  inline Ipopt::SmartPtr<Ipopt::OptionsList>& Options()
+  {
+    return options_;
+  }
+  inline Ipopt::SmartPtr<RegisteredOptions>& RegOptions()
+  {
+    return reg_options_;
+  }
+private:
+  /** Default Constructor, forbiden for some reason.*/
+  StrongBranchingSolver ();
+
+  Ipopt::SmartPtr<Ipopt::Journalist> jnlst_;
+  Ipopt::SmartPtr<Ipopt::OptionsList> options_;
+  Ipopt::SmartPtr<Bonmin::RegisteredOptions> reg_options_;
+
+  int bb_log_level_;
+
+};
+
+}
+#endif
diff --git a/src/Interfaces/BonTMINLP.cpp b/src/Interfaces/BonTMINLP.cpp
new file mode 100644
index 0000000..4b57e8e
--- /dev/null
+++ b/src/Interfaces/BonTMINLP.cpp
@@ -0,0 +1,134 @@
+// (C) Copyright International Business Machines (IBM) 2005, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, IBM
+//
+// Date : 26/09/2006
+
+#include "BonTMINLP.hpp"
+#include "IpBlas.hpp"
+#include "BonTypes.hpp"
+
+namespace Bonmin{
+
+/** default constructor for Sos constraints */
+TMINLP::SosInfo::SosInfo():
+        num(0), 
+        types(NULL), 
+        priorities(NULL), 
+        numNz(0), 
+        starts(NULL),
+        indices(NULL), 
+        weights(NULL)
+{}
+
+/** Copy constructor.*/
+TMINLP::SosInfo::SosInfo(const SosInfo & source):
+        num(source.num), 
+        types(NULL), 
+        priorities(NULL), 
+        numNz(source.numNz), 
+        starts(NULL),
+        indices(NULL),
+        weights(NULL)
+{
+
+  if(num > 0) {
+    assert(source.types!=NULL);
+    assert(source.priorities!=NULL);
+    assert(source.starts!=NULL);
+    assert(source.indices!=NULL);
+    assert(source.weights!=NULL);
+    types = new char[num];
+    priorities = new int[num];
+    starts = new int[num + 1];
+    indices = new int[numNz];
+    weights = new double[numNz];
+    for(int i = 0 ; i < num ; i++) {
+      source.types[i] = types[i];
+      source.priorities[i] = priorities[i];
+      source.starts[i] = starts[i];
+    }
+    for(int i = 0 ; i < numNz ; i++) {
+      source.indices[i] = indices[i];
+      source.weights[i] = weights[i];
+    }
+  }
+  else {
+    assert(source.types==NULL);
+    assert(source.priorities==NULL);
+    assert(source.starts==NULL);
+    assert(source.indices==NULL);
+    assert(source.weights==NULL);
+  }
+
+}
+
+
+/** Reset information */
+void 
+TMINLP::SosInfo::gutsOfDestructor()
+{
+  num = 0;
+  numNz = 0;
+  if(types) delete [] types;
+  types = NULL;
+  if(starts) delete [] starts;
+  starts = NULL;
+  if(indices) delete [] indices;
+  indices = NULL;
+  if(priorities) delete [] priorities;
+  priorities = NULL;
+  if(weights) delete [] weights;
+  weights = NULL;
+}
+
+
+void TMINLP::PerturbInfo::SetPerturbationArray(Ipopt::Index numvars, const double* perturb_radius) {
+  delete [] perturb_radius_;
+  if (perturb_radius) {
+    perturb_radius_ = new double[numvars];
+    for(int i=0; i<numvars; i++) {
+      perturb_radius_[i] = perturb_radius[i];
+    }
+  }
+}
+
+TMINLP::TMINLP()
+{}
+
+TMINLP::TMINLP(const TMINLP & source)
+{
+}
+     
+/** Default destructor */
+TMINLP::~TMINLP()
+{
+}
+
+/** Say if has general integer variables.*/
+bool
+TMINLP::hasGeneralInteger(){
+   int n, m, nnz_j, nnz_h;
+   Ipopt::TNLP::IndexStyleEnum dummy;
+   get_nlp_info(n, m, nnz_j, nnz_h, dummy);
+   vector<double> x_lb(n);
+   vector<double> x_ub(n);
+   vector<double> g_lb(m);
+   vector<double> g_ub(m);
+   vector<VariableType> v_t(n);
+   get_variables_types(n, v_t());
+   get_bounds_info(n, x_lb(), x_ub(), m, g_lb(), g_ub());
+   for(int i = 0 ; i < n ; i++){
+      if(v_t[i] == INTEGER && 
+         (x_lb[i] < - 0.99 || x_lb[i] > 0.99 || 
+         x_ub[i] <0.01 || x_ub[i] > 1.99) ){
+         return true;
+      }
+   }
+   return false;
+}
+
+}
diff --git a/src/Interfaces/BonTMINLP.hpp b/src/Interfaces/BonTMINLP.hpp
new file mode 100644
index 0000000..01ddcfb
--- /dev/null
+++ b/src/Interfaces/BonTMINLP.hpp
@@ -0,0 +1,420 @@
+// (C) Copyright International Business Machines Corporation and
+// Carnegie Mellon University 2004, 2007
+//
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Carl D. Laird, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 12/01/2004
+
+#ifndef __TMINLP_HPP__
+#define __TMINLP_HPP__
+
+#include "IpUtils.hpp"
+#include "IpReferenced.hpp"
+#include "IpException.hpp"
+#include "IpAlgTypes.hpp"
+#include "CoinPackedMatrix.hpp"
+#include "OsiCuts.hpp"
+#include "IpTNLP.hpp"
+#include "CoinError.hpp"
+#include "CoinHelperFunctions.hpp"
+
+namespace Bonmin
+{
+  DECLARE_STD_EXCEPTION(TMINLP_INVALID);
+  DECLARE_STD_EXCEPTION(TMINLP_INVALID_VARIABLE_BOUNDS);
+
+  /** Base class for all MINLPs that use a standard triplet matrix form
+   *  and dense vectors.
+   *  The class TMINLP2TNLP allows the caller to produce a viable TNLP
+   *  from the MINLP (by relaxing binary and/or integers, or by
+   *  fixing them), which can then be solved by Ipopt.
+   *
+   *  This interface presents the problem form:
+   *  \f[
+   *  \begin{array}{rl}
+   *     &min f(x)\\
+   *
+   *     \mbox{s.t.}&\\
+   *      &   g^L <= g(x) <= g^U\\
+   *
+   *       &   x^L <=  x   <= x^U\\
+   *   \end{array}
+   *  \f]
+   *  Where each x_i is either a continuous, binary, or integer variable.
+   *  If x_i is binary, the bounds [xL,xU] are assumed to be [0,1].
+   *  In order to specify an equality constraint, set gL_i = gU_i =
+   *  rhs.  The value that indicates "infinity" for the bounds
+   *  (i.e. the variable or constraint has no lower bound (-infinity)
+   *  or upper bound (+infinity)) is set through the option
+   *  nlp_lower_bound_inf and nlp_upper_bound_inf.  To indicate that a
+   *  variable has no upper or lower bound, set the bound to
+   *  -ipopt_inf or +ipopt_inf respectively
+   */
+  class TMINLP : public Ipopt::ReferencedObject
+  {
+  public:
+    friend class TMINLP2TNLP;
+    /** Return statuses of algorithm.*/
+    enum SolverReturn{
+      SUCCESS,
+      INFEASIBLE,
+      CONTINUOUS_UNBOUNDED,
+      LIMIT_EXCEEDED,
+      USER_INTERRUPT,
+      MINLP_ERROR};
+    /** Class to store sos constraints for model */
+    struct SosInfo
+    {
+      /** Number of SOS constraints.*/
+      int num;
+      /** Type of sos. At present Only type '1' SOS are supported by Cbc*/
+      char * types;
+      /** priorities of sos constraints.*/
+      int * priorities;
+      
+      /** \name Sparse storage of the elements of the SOS constraints.*/
+      /** @{ */
+      /** Total number of non zeroes in SOS constraints.*/
+      int numNz;
+      /** For 0 <= i < nums, start[i] gives the indice of indices and weights arrays at which the description of constraints i begins..*/ 
+      int * starts;
+      /** indices of elements belonging to the SOS.*/
+      int * indices;
+      /** weights of the elements of the SOS.*/
+      double * weights;
+      /** @} */
+      /** default constructor. */
+      SosInfo();
+      /** Copy constructor.*/
+      SosInfo(const SosInfo & source);
+      
+
+      /** destructor*/
+      ~SosInfo()
+      {
+        gutsOfDestructor();
+      }
+
+
+      /** Reset information */
+      void gutsOfDestructor();
+
+    };
+
+    /** Stores branching priorities information. */
+    struct BranchingInfo
+    {
+      /**number of variables*/
+      int size;
+      /** User set priorities on variables. */
+      int * priorities;
+      /** User set preferered branching direction. */
+      int * branchingDirections;
+      /** User set up pseudo costs.*/
+      double * upPsCosts;
+      /** User set down pseudo costs.*/
+      double * downPsCosts;
+      BranchingInfo():
+      size(0),
+      priorities(NULL),
+      branchingDirections(NULL),
+      upPsCosts(NULL),
+      downPsCosts(NULL)
+      {}
+      BranchingInfo(const BranchingInfo &other)
+      {
+        gutsOfDestructor();
+        size = other.size;
+        priorities = CoinCopyOfArray(other.priorities, size);
+        branchingDirections = CoinCopyOfArray(other.branchingDirections, size);
+        upPsCosts = CoinCopyOfArray(other.upPsCosts, size);
+        downPsCosts = CoinCopyOfArray(other.downPsCosts, size);
+      }
+      void gutsOfDestructor()
+      {
+      if (priorities != NULL) delete [] priorities;
+      priorities = NULL;
+      if (branchingDirections != NULL) delete [] branchingDirections;  
+      branchingDirections = NULL;
+      if (upPsCosts != NULL) delete [] upPsCosts;
+      upPsCosts = NULL;
+      if (downPsCosts != NULL) delete [] downPsCosts;
+      downPsCosts = NULL;
+      }
+      ~BranchingInfo()
+      {
+	gutsOfDestructor();
+      }
+    };
+
+    /** Class to store perturbation radii for variables in the model */
+    class PerturbInfo
+    {
+    public:
+      /** default constructor. */
+      PerturbInfo() :
+	perturb_radius_(NULL)
+      {}
+
+      /** destructor*/
+      ~PerturbInfo()
+      {
+        delete [] perturb_radius_;
+      }
+
+      /** Method for setting the perturbation radii. */
+      void SetPerturbationArray(Ipopt::Index numvars, const double* perturb_radius);
+
+      /** Method for getting the array for the perturbation radii in
+       *  order to use the values. */
+      const double* GetPerturbationArray() const {
+	return perturb_radius_;
+      }
+
+    private:
+      /** Copy constructor.*/
+      PerturbInfo(const PerturbInfo & source);
+
+      /** Perturbation radii for all variables.  A negative value
+       *  means that the radius has not been given. If the pointer is
+       *  NULL, then no variables have been assigned a perturbation
+       *  radius. */
+      double* perturb_radius_;
+    };
+
+    /** Type of the variables.*/
+    enum VariableType
+    {
+      CONTINUOUS,
+      BINARY,
+      INTEGER
+    };
+
+    /**@name Constructors/Destructors */
+    //@{
+    TMINLP();
+
+    /** Default destructor */
+    virtual ~TMINLP();
+    //@}
+
+    /**@name methods to gather information about the MINLP */
+    //@{
+    /** overload this method to return the number of variables
+     *  and constraints, and the number of non-zeros in the jacobian and
+     *  the hessian. */
+    virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+        Ipopt::Index& nnz_h_lag, Ipopt::TNLP::IndexStyleEnum& index_style)=0;
+
+    /** overload this method to return scaling parameters. This is
+     *  only called if the options are set to retrieve user scaling.
+     *  There, use_x_scaling (or use_g_scaling) should get set to true
+     *  only if the variables (or constraints) are to be scaled.  This
+     *  method should return true only if the scaling parameters could
+     *  be provided.
+     */
+    virtual bool get_scaling_parameters(Ipopt::Number& obj_scaling,
+                                        bool& use_x_scaling, Ipopt::Index n,
+                                        Ipopt::Number* x_scaling,
+                                        bool& use_g_scaling, Ipopt::Index m,
+                                        Ipopt::Number* g_scaling)
+    {
+      return false;
+    }
+
+
+    /** overload this method to provide the variables types. The var_types
+     *  array will be allocated with length n. */
+    virtual bool get_variables_types(Ipopt::Index n, VariableType* var_types)=0;
+
+    /** overload this method to provide the variables linearity.
+     * array should be allocated with length at least n.*/
+    virtual bool get_variables_linearity(Ipopt::Index n, 
+					   Ipopt::TNLP::LinearityType* var_types) = 0;
+
+    /** overload this method to provide the constraint linearity.
+     * array should be allocated with length at least m.*/
+    virtual bool get_constraints_linearity(Ipopt::Index m, 
+					   Ipopt::TNLP::LinearityType* const_types) = 0;
+
+    /** overload this method to return the information about the bound
+     *  on the variables and constraints. The value that indicates
+     *  that a bound does not exist is specified in the parameters
+     *  nlp_lower_bound_inf and nlp_upper_bound_inf.  By default,
+     *  nlp_lower_bound_inf is -1e19 and nlp_upper_bound_inf is
+     *  1e19.
+     *  An exception will be thrown if x_l and x_u are not 0,1 for binary variables
+     */
+    virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+        Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u)=0;
+
+    /** overload this method to return the starting point. The bools
+     *  init_x and init_lambda are both inputs and outputs. As inputs,
+     *  they indicate whether or not the algorithm wants you to
+     *  initialize x and lambda respectively. If, for some reason, the
+     *  algorithm wants you to initialize these and you cannot, set
+     *  the respective bool to false.
+     */
+    virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+                                    bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+        Ipopt::Index m, bool init_lambda,
+        Ipopt::Number* lambda)=0;
+
+    /** overload this method to return the value of the objective function */
+    virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number& obj_value)=0;
+
+    /** overload this method to return the vector of the gradient of
+     *  the objective w.r.t. x */
+    virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number* grad_f)=0;
+
+    /** overload this method to return the vector of constraint values */
+    virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Number* g)=0;
+
+    /** overload this method to return the jacobian of the
+     *  constraints. The vectors iRow and jCol only need to be set
+     *  once. The first call is used to set the structure only (iRow
+     *  and jCol will be non-NULL, and values will be NULL) For
+     *  subsequent calls, iRow and jCol will be NULL. */
+    virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
+        Ipopt::Index *jCol, Ipopt::Number* values)=0;
+
+    /** overload this method to return the hessian of the
+     *  lagrangian. The vectors iRow and jCol only need to be set once
+     *  (during the first call). The first call is used to set the
+     *  structure only (iRow and jCol will be non-NULL, and values
+     *  will be NULL) For subsequent calls, iRow and jCol will be
+     *  NULL. This matrix is symmetric - specify the lower diagonal
+     *  only */
+    virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+        bool new_lambda, Ipopt::Index nele_hess,
+        Ipopt::Index* iRow, Ipopt::Index* jCol, Ipopt::Number* values)=0;
+    /** Compute the value of a single constraint. The constraint
+     *  number is i (starting counting from 0. */
+    virtual bool eval_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			 Ipopt::Index i, Ipopt::Number& gi)
+    {
+      std::cerr << "Method eval_gi not overloaded from TMINLP\n";
+      throw -1;
+    }
+    /** Compute the structure or values of the gradient for one
+     *  constraint. The constraint * number is i (starting counting
+     *  from 0.  Other things are like with eval_jac_g. */
+    virtual bool eval_grad_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			      Ipopt::Index i, Ipopt::Index& nele_grad_gi, Ipopt::Index* jCol,
+			      Ipopt::Number* values)
+    {
+      std::cerr << "Method eval_grad_gi not overloaded from TMINLP\n";
+      throw -1;
+    }
+    //@}
+
+    /** @name Solution Methods */
+    //@{
+    /** This method is called when the algorithm is complete so the TNLP can store/write the solution */
+    virtual void finalize_solution(TMINLP::SolverReturn status,
+                                   Ipopt::Index n, const Ipopt::Number* x, Ipopt::Number obj_value) =0;
+    //@}
+    
+    virtual const BranchingInfo * branchingInfo() const = 0;
+
+    virtual const SosInfo * sosConstraints() const = 0;
+
+    virtual const PerturbInfo* perturbInfo() const
+    {
+      return NULL;
+    }
+
+    /** Say if has a specific function to compute upper bounds*/
+    virtual bool hasUpperBoundingObjective(){
+      return false;}
+    
+    /** overload this method to return the value of an alternative objective function for
+      upper bounding (to use it hasUpperBoundingObjective should return true).*/
+    virtual bool eval_upper_bound_f(Ipopt::Index n, const Ipopt::Number* x,
+                                    Ipopt::Number& obj_value){ return false; }
+
+   /** Used to mark constraints of the problem.*/
+   enum Convexity {
+     Convex/** Constraint is convex.*/,
+     NonConvex/** Constraint is non-convex.*/,
+     SimpleConcave/** Constraint is concave of the simple form y >= F(x).*/};
+
+   /** Structure for marked non-convex constraints. With possibility of
+       storing index of a constraint relaxing the non-convex constraint*/
+   struct MarkedNonConvex {
+      /** Default constructor gives "safe" values.*/
+	 MarkedNonConvex():
+	 cIdx(-1), cRelaxIdx(-1){}
+	 /** Index of the nonconvex constraint.*/
+      int cIdx;
+	 /** Index of constraint relaxing the nonconvex constraint.*/
+	 int cRelaxIdx;};
+   /** Structure which describes a constraints of the form
+       $f[ y \gt F(x) \f]
+	  with \f$ F(x) \f$ a concave function.*/
+   struct SimpleConcaveConstraint{
+      /** Default constructor gives "safe" values.*/
+	 SimpleConcaveConstraint():
+	   xIdx(-1), yIdx(-1), cIdx(-1){}
+      /** Index of the variable x.*/
+      int xIdx;
+      /** Index of the variable y.*/
+	 int yIdx;
+      /** Index of the constraint.*/
+	 int cIdx;};
+    /** Get accest to constraint convexities.*/
+    virtual bool get_constraint_convexities(int m, TMINLP::Convexity * constraints_convexities)const {
+      CoinFillN(constraints_convexities, m, TMINLP::Convex);
+      return true;}
+  /** Get dimension information on nonconvex constraints.*/
+  virtual bool get_number_nonconvex(int & number_non_conv, int & number_concave) const{
+    number_non_conv = 0;
+    number_concave = 0;
+    return true;} 
+  /** Get array describing the constraints marked nonconvex in the model.*/
+  virtual bool get_constraint_convexities(int number_non_conv, MarkedNonConvex * non_convs) const{
+    assert(number_non_conv == 0);
+    return true;}
+  /** Fill array containing indices of simple concave constraints.*/ 
+  virtual bool get_simple_concave_constraints(int number_concave, SimpleConcaveConstraint * simple_concave) const{
+    assert(number_concave == 0);
+    return true;}
+
+  /** Say if problem has a linear objective (for OA) */
+  virtual bool hasLinearObjective(){return false;}
+
+  /** Say if problem has general integer variables.*/
+  bool hasGeneralInteger();
+
+  /** Access array describing constraint to which perspectives should be applied.*/
+  virtual const int * get_const_xtra_id() const{
+    return NULL;
+  }
+  protected:
+    /** Copy constructor */
+    //@{
+    /** Copy Constructor */
+    TMINLP(const TMINLP&);
+
+    /** Overloaded Equals Operator */
+    void operator=(const TMINLP&);
+    //@}
+
+  private:
+  };
+
+} // namespace Ipopt
+
+#endif
+
diff --git a/src/Interfaces/BonTMINLP2OsiLP.cpp b/src/Interfaces/BonTMINLP2OsiLP.cpp
new file mode 100644
index 0000000..cf054e2
--- /dev/null
+++ b/src/Interfaces/BonTMINLP2OsiLP.cpp
@@ -0,0 +1,51 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/16/2007
+#include "BonTMINLP2OsiLP.hpp"
+#include "BonTypes.hpp"
+#include "OsiSolverInterface.hpp"
+#include "BonTMINLP2TNLP.hpp"
+#include "CoinPackedMatrix.hpp"
+
+#include <vector>
+#include <sstream>
+#include <climits>
+
+using namespace Ipopt;
+
+namespace Bonmin {
+
+
+   void 
+   TMINLP2OsiLP::initialize_jac_storage(){
+     assert(IsValid(model_));
+     int n;
+     int m;
+     int nnz_jac_g;
+     int nnz_h_lag;
+     TNLP::IndexStyleEnum index_style;
+     //Get problem information
+     model_->get_nlp_info( n, m, nnz_jac_g, nnz_h_lag, index_style);
+     jCol_.resize(nnz_jac_g);
+     iRow_.resize(nnz_jac_g);
+     value_.resize(nnz_jac_g);
+
+     model_->eval_jac_g(n, NULL, 0, m, nnz_jac_g, iRow_(), jCol_(), NULL);
+     if(index_style == TNLP::FORTRAN_STYLE){
+       for(size_t i = 0 ; i < iRow_.size() ; i++){
+         iRow_[i]--; jCol_[i]--;
+       }
+     }
+
+     const_types_.resize(m);
+     model_->get_constraints_linearity(m, const_types_());
+
+   }
+
+}
+
diff --git a/src/Interfaces/BonTMINLP2OsiLP.hpp b/src/Interfaces/BonTMINLP2OsiLP.hpp
new file mode 100644
index 0000000..19f3136
--- /dev/null
+++ b/src/Interfaces/BonTMINLP2OsiLP.hpp
@@ -0,0 +1,164 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/16/2007
+#ifndef BonminTMINLP2OsiLP_H
+#define BonminTMINLP2OsiLP_H
+
+#include <cmath>
+#include <cstdio>
+#include "IpSmartPtr.hpp"
+#include "IpTNLP.hpp"
+#include "BonTypes.hpp"
+
+class OsiSolverInterface;
+class OsiCuts;
+
+namespace Bonmin {
+  class TMINLP2TNLP;
+  class BabSetupBase;
+
+  /** A transformer class to build outer approximations i.e. transfomrs nonlinear programs into linear programs.*/
+  class TMINLP2OsiLP: public Ipopt::ReferencedObject {
+
+  public:
+
+   /** Default constructor.*/
+   TMINLP2OsiLP():
+    tiny_(-0.),
+    very_tiny_(-0.)
+   {}
+
+   /** Copy constructor.*/
+   TMINLP2OsiLP(const TMINLP2OsiLP & other):
+    tiny_(other.tiny_),
+    very_tiny_(other.very_tiny_),
+    model_(other.model_){
+    }
+
+    /** virtual copy constructor*/
+    virtual TMINLP2OsiLP * clone() const = 0;
+
+   void set_tols(double tiny, double very_tiny, double rhs_relax, double infty){
+     tiny_ = tiny;
+     very_tiny_ = very_tiny;
+     rhs_relax_ = rhs_relax;
+     infty_ = infty;
+   }
+
+   void set_model(Bonmin::TMINLP2TNLP * model){
+     model_ = model;
+     initialize_jac_storage();
+   }
+
+   /** Assignment operator.*/
+   TMINLP2OsiLP & operator=(const TMINLP2OsiLP& rhs){
+    if(this != & rhs){
+      tiny_ = rhs.tiny_;
+      very_tiny_ = rhs.very_tiny_;
+      model_ = rhs.model_;
+    }
+    return (*this);
+   }
+
+   /** Destructor.*/
+   ~TMINLP2OsiLP(){}
+
+   /** Build the Outer approximation of model_ in x and put it in si.*/
+   virtual void extract(OsiSolverInterface *si, 
+                const double * x, bool getObj) = 0;
+
+   
+/** Get OAs of nonlinear constraints in x.*/
+   virtual void get_refined_oa(OsiCuts & cs
+                ) const = 0;
+
+/** Get OAs of nonlinear constraints in x.*/
+   virtual void get_oas(OsiCuts & cs, 
+                const double * x, bool getObj, bool global) const = 0;
+
+
+   
+   protected:
+   /** Facilitator to clean up coefficient.*/
+  inline bool cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny) const;
+   /** If constraint coefficient is below this, we try to remove it.*/
+   double tiny_;
+   /** If constraint coefficient is below this, we neglect it.*/
+   double very_tiny_;
+   /** Amount by which to relax OA constraints RHSes*/
+   double rhs_relax_;
+   /** infinity.*/
+   double infty_;
+   /** Count the number of linear outer approximations taken.*/
+   static int nTimesCalled;
+
+   /** Cache Jacobian matrix*/
+   /** Columns of jacobian.*/
+   mutable vector<int> jCol_;
+   /** Rows of jacobian.*/
+   mutable vector<int> iRow_;
+   /** Values of jacobian.*/
+   mutable vector<double> value_;
+
+   vector<Ipopt::TNLP::LinearityType> const_types_;
+ 
+   void initialize_jac_storage();
+
+   Ipopt::SmartPtr<Bonmin::TMINLP2TNLP> model_;
+  };
+
+//A procedure to try to remove small coefficients in OA cuts (or make it non small
+inline
+bool 
+TMINLP2OsiLP::cleanNnz(double &value, double colLower, double colUpper,
+    double rowLower, double rowUpper, double colsol,
+    double & lb, double &ub, double tiny, double veryTiny) const
+{
+  if(fabs(value)>= tiny) return 1;
+  //fprintf(stderr, "Warning: small coefficient %g\n", tiny);
+
+  if(fabs(value)<veryTiny) return 0;//Take the risk?
+
+  //try and remove
+  double infty = 1e20;
+  bool colUpBounded = colUpper < 10000;
+  bool colLoBounded = colLower > -10000;
+  bool rowNotLoBounded =  rowLower <= - infty;
+  bool rowNotUpBounded = rowUpper >= infty;
+  bool pos =  value > 0;
+
+  if(colLoBounded && !pos && rowNotUpBounded) {
+    lb += value * (colsol - colLower);
+    return 0;
+  }
+  else
+    if(colLoBounded && pos && rowNotLoBounded) {
+      ub += value * (colsol - colLower);
+      return 0;
+    }
+    else
+      if(colUpBounded && pos && rowNotUpBounded) {
+        lb += value * (colsol - colUpper);
+        return 0;
+      }
+      else
+        if(colUpBounded && !pos && rowNotLoBounded) {
+          ub += value * (colsol - colUpper);
+          return 0;
+        }
+  //can not remove coefficient 
+  return 1;
+}
+
+
+}
+
+#endif
+
diff --git a/src/Interfaces/BonTMINLP2TNLP.cpp b/src/Interfaces/BonTMINLP2TNLP.cpp
new file mode 100644
index 0000000..0f28caa
--- /dev/null
+++ b/src/Interfaces/BonTMINLP2TNLP.cpp
@@ -0,0 +1,698 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2004, 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Carl D. Laird, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 12/01/2004
+
+
+#include "BonTMINLP2TNLP.hpp"
+#include "IpBlas.hpp"
+#include "IpAlgTypes.hpp"
+#include "IpIpoptCalculatedQuantities.hpp"
+#include <climits>
+#include <string>
+#include <fstream>
+#include <sstream>
+#include "Ipopt/BonIpoptInteriorWarmStarter.hpp"
+#include "OsiBranchingObject.hpp"
+
+using namespace Ipopt;
+
+extern bool BonminAbortAll;
+class OsiObject;
+namespace Bonmin
+{
+
+  TMINLP2TNLP::TMINLP2TNLP(const SmartPtr<TMINLP> tminlp
+#ifdef WARM_STARTER
+       ,
+      const OptionsList& options
+#endif
+       )
+      :
+      var_types_(),
+      x_l_(),
+      x_u_(),
+      orig_x_l_(),
+      orig_x_u_(),
+      g_l_(),
+      g_u_(),
+      x_init_(),
+      duals_init_(NULL),
+      x_init_user_(),
+      x_sol_(),
+      g_sol_(),
+      duals_sol_(),
+      tminlp_(tminlp),
+      nnz_jac_g_(0),
+      nnz_h_lag_(0),
+      index_style_(TNLP::FORTRAN_STYLE),
+      obj_value_(1e100),
+      curr_warm_starter_(),
+      nlp_lower_bound_inf_(-DBL_MAX),
+      nlp_upper_bound_inf_(DBL_MAX),
+      warm_start_entire_iterate_(true),
+      need_new_warm_starter_(true)
+  {
+    // read the nlp size and bounds information from
+    // the TMINLP and keep an internal copy. This way the
+    // caller can modify the bounds that are sent to Ipopt;
+    assert(IsValid(tminlp_));
+    Index n,m;
+    bool retval =
+      tminlp_->get_nlp_info(n, m, nnz_jac_g_, nnz_h_lag_, index_style_);
+
+    ASSERT_EXCEPTION(retval, TMINLP_INVALID,
+		     "get_nlp_info of TMINLP returns false.");
+
+    // Allocate space for the variable types vector
+    var_types_.resize(n);
+
+    // retrieve the variable types
+    tminlp_->get_variables_types(n, var_types_());
+
+    // Allocate space for the internal copy of the variable bounds
+    x_l_.resize(n);
+    x_u_.resize(n);
+    orig_x_l_.resize(n);
+    orig_x_u_.resize(n);
+
+    g_l_.resize(m);
+    g_u_.resize(m);
+
+    // retrieve the variable bounds
+    if(m){
+      tminlp_->get_bounds_info(n, x_l_(), x_u_(), m, g_l_(), g_u_());
+    }
+    else {
+      tminlp_->get_bounds_info(n, x_l_(), x_u_(), m, NULL, NULL);
+    }
+    IpBlasDcopy(n, x_l_(), 1, orig_x_l_(), 1);
+    IpBlasDcopy(n, x_u_(), 1, orig_x_u_(), 1);
+
+
+    // Allocate space for the initial point
+    x_init_user_.resize(n);
+    tminlp_->get_starting_point(n, true, x_init_user_(), false, NULL, NULL,
+        m, false, NULL);
+
+#ifdef WARM_STARTER
+    // Get values for parameters
+    options.GetNumericValue("nlp_lower_bound_inf", nlp_lower_bound_inf_, "");
+    options.GetNumericValue("nlp_upper_bound_inf", nlp_upper_bound_inf_, "");
+    options.GetBoolValue("warm_start_entire_iterate",
+        warm_start_entire_iterate_, "");
+#endif
+  }
+
+  TMINLP2TNLP::TMINLP2TNLP(const TMINLP2TNLP& other)
+    :
+    var_types_(),
+    x_l_(),
+    x_u_(),
+    orig_x_l_(),
+    orig_x_u_(),
+    g_l_(),
+    g_u_(),
+    x_init_(),
+    duals_init_(NULL),
+    x_init_user_(),
+    x_sol_(),
+    g_sol_(),
+    duals_sol_(),
+    tminlp_(other.tminlp_),
+    nnz_jac_g_(other.nnz_jac_g_),
+    nnz_h_lag_(other.nnz_h_lag_),
+    index_style_(other.index_style_),
+    return_status_(other.return_status_),
+    obj_value_(other.obj_value_),
+    curr_warm_starter_(other.curr_warm_starter_),
+    nlp_lower_bound_inf_(other.nlp_lower_bound_inf_),
+    nlp_upper_bound_inf_(other.nlp_upper_bound_inf_),
+    warm_start_entire_iterate_(other.warm_start_entire_iterate_),
+    need_new_warm_starter_(other.need_new_warm_starter_)
+  {
+    gutsOfCopy(other);
+  }
+
+  /** Overloaded Equals Operator */
+  TMINLP2TNLP &
+  TMINLP2TNLP::operator=(const TMINLP2TNLP& rhs){
+    if(this != &rhs){
+      tminlp_ = rhs.tminlp_;
+      nnz_jac_g_ = rhs.nnz_jac_g_;
+      nnz_h_lag_ = rhs.nnz_h_lag_;
+      index_style_ = rhs.index_style_;
+      return_status_ = rhs.return_status_;
+      obj_value_ = rhs.obj_value_;
+      curr_warm_starter_ = rhs.curr_warm_starter_;
+      nlp_lower_bound_inf_ = rhs.nlp_lower_bound_inf_;
+      nlp_upper_bound_inf_ = rhs.nlp_upper_bound_inf_;
+      warm_start_entire_iterate_ = rhs.warm_start_entire_iterate_;
+      need_new_warm_starter_ = rhs.need_new_warm_starter_;
+  
+      gutsOfDelete(); 
+      gutsOfCopy(rhs);
+
+    }
+    return (*this);
+  }
+
+  TMINLP2TNLP::~TMINLP2TNLP()
+  {
+    gutsOfDelete();
+  }
+
+  void
+  TMINLP2TNLP::gutsOfDelete(){
+  }
+
+  /** Copies all the arrays. 
+      \warning this and other should be two instances of the same problem
+      \warning AW: I am trying to mimic a copy construction for Cbc
+      use with great care not safe.
+  */
+  void
+  TMINLP2TNLP::gutsOfCopy(const TMINLP2TNLP& other)
+  {
+    Index n = other.num_variables();
+    Index m = other.num_constraints();
+
+    if(n > 0){//Copies all the arrays in n_
+      var_types_ = other.var_types_;
+
+      x_l_.resize(n);
+      x_u_.resize(n); // Those are copied in copyUserModification
+      IpBlasDcopy(n, other.x_l_(), 1, x_l_(), 1);
+      IpBlasDcopy(n, other.x_u_(), 1, x_u_(), 1);
+
+      orig_x_l_.resize(n);
+      orig_x_u_.resize(n);
+      IpBlasDcopy(n, other.orig_x_l_(), 1, orig_x_l_(), 1);
+      IpBlasDcopy(n, other.orig_x_u_(), 1, orig_x_u_(), 1);
+      x_init_user_.resize(n);
+      IpBlasDcopy(n, other.x_init_user_(), 1, x_init_user_(), 1);
+      if(!other.x_sol_.empty()) {
+        Set_x_sol(n,other.x_sol_());
+      }
+   }
+
+  if(!other.g_l_.empty()){
+      const size_t& size = other.g_l_.size();
+      g_l_.resize(size);
+      g_u_.resize(size);
+   }
+
+   if(m > 0){//Copies all the arrays in m_
+      IpBlasDcopy(m, other.g_l_(), 1, g_l_(), 1);
+      IpBlasDcopy(m, other.g_u_(), 1, g_u_(), 1);
+      if(!other.g_sol_.empty()) {
+        g_sol_.resize(m);
+        IpBlasDcopy(m, other.g_sol_(), 1, g_sol_(), 1);
+      }
+    }
+
+
+      x_init_ = other.x_init_;
+
+      if(other.duals_init_) {
+        duals_init_ = x_init_() + n;
+      }
+      else
+        duals_init_ = NULL;
+
+
+    if(!other.duals_sol_.empty()) {
+      duals_sol_.resize(m + 2*n);
+      IpBlasDcopy((int) duals_sol_.size(), other.duals_sol_(), 1, duals_sol_(), 1);
+    }
+
+}
+
+  void TMINLP2TNLP::SetVariablesBounds(Index n,
+                                       const Number * x_l,
+                                       const Number * x_u)
+  {
+    assert(n==num_variables());
+    IpBlasDcopy(n, x_l, 1, x_l_(), 1);
+    IpBlasDcopy(n, x_u, 1, x_u_(), 1);
+  }
+
+   void TMINLP2TNLP::SetVariablesLowerBounds(Index n,
+                                       const Number * x_l)
+  {
+    assert(n==num_variables());
+    IpBlasDcopy(n, x_l, 1, x_l_(), 1);
+  }
+
+   void TMINLP2TNLP::SetVariablesUpperBounds(Index n,
+                                       const Number * x_u)
+  {
+    assert(n==num_variables());
+    IpBlasDcopy(n, x_u, 1, x_u_(), 1);
+  }
+
+  void TMINLP2TNLP::SetVariableBounds(Index var_no, Number x_l, Number x_u)
+  {
+    assert(var_no >= 0 && var_no < num_variables());
+    x_l_[var_no] = x_l;
+    x_u_[var_no] = x_u;
+  }
+
+  void TMINLP2TNLP::SetVariableLowerBound(Index var_no, Number x_l)
+  {
+    assert(var_no >= 0 && var_no < num_variables());
+    x_l_[var_no] = x_l;
+  }
+
+  void TMINLP2TNLP::SetVariableUpperBound(Index var_no, Number x_u)
+  {
+    assert(var_no >= 0 && var_no < num_variables());
+    x_u_[var_no] = x_u;
+  }
+
+  void TMINLP2TNLP::resetStartingPoint()
+  {
+    curr_warm_starter_ = NULL;
+    x_init_.clear();
+  }
+
+  void TMINLP2TNLP::setxInit(Index n,const Number* x_init)
+  {
+    assert(n == num_variables());
+    if((int)x_init_.size() < n)
+      x_init_.resize(n);
+    IpBlasDcopy(n, x_init, 1, x_init_(), 1);
+  }
+
+  void TMINLP2TNLP::setDualsInit(Index m, const Number* duals_init)
+  {
+    assert(m == num_variables() * 2 + num_constraints() );
+    x_init_.resize(num_variables() * 3 + num_constraints(), 0.);
+    duals_init_ = x_init_() + num_variables();
+
+    if(m >0)
+      IpBlasDcopy(m, duals_init, 1, duals_init_, 1);
+
+  }
+
+  /** Set the contiuous solution */
+  void TMINLP2TNLP::Set_x_sol(Index n, const Number* x_sol)
+  {
+    assert(n == num_variables());
+    if (x_sol_.empty()) {
+      x_sol_.resize(n);
+    }
+    assert(n == (int) x_sol_.size());
+    IpBlasDcopy(n, x_sol, 1, x_sol_(), 1);
+  }
+
+  /** Set the contiuous dual solution */
+  void TMINLP2TNLP::Set_dual_sol(Index n, const Number* dual_sol)
+  {
+    assert(n == num_variables() *2 + num_constraints());
+    if (duals_sol_.empty()) {
+      duals_sol_.resize(n);
+    }
+    assert(n == (int) duals_sol_.size());
+    IpBlasDcopy(n, dual_sol, 1, duals_sol_(), 1);
+  }
+
+  /** Change the type of the variable */
+  void TMINLP2TNLP::SetVariableType(Index n, TMINLP::VariableType type)
+  {
+    assert(n >= 0 && n < num_variables());
+    var_types_[n] = type;
+  }
+
+  bool TMINLP2TNLP::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
+      Index& nnz_h_lag, TNLP::IndexStyleEnum& index_style)
+  {
+    n = num_variables();
+    m = num_constraints();
+    nnz_jac_g = nnz_jac_g_;
+    nnz_h_lag = nnz_h_lag_;
+    index_style = index_style_;
+     //printf("Been there and said %i\n", nnz_jac_g_);
+    return true;
+  }
+
+  bool TMINLP2TNLP::get_bounds_info(Index n, Number* x_l, Number* x_u,
+      Index m, Number* g_l, Number* g_u)
+  {
+    assert(n==num_variables());
+    assert(m==num_constraints());
+    IpBlasDcopy(n, x_l_(), 1, x_l, 1);
+    IpBlasDcopy(n, x_u_(), 1, x_u, 1);
+    if (m > 0){
+      IpBlasDcopy(m, g_l_(), 1, g_l, 1);
+      IpBlasDcopy(m, g_u_(), 1, g_u, 1);
+    }
+    return true;
+  }
+
+  bool TMINLP2TNLP::get_starting_point(Index n, bool init_x, Number* x,
+      bool init_z, Number* z_L, Number* z_U,
+      Index m, bool init_lambda,
+      Number* lambda)
+  {
+    assert(m==num_constraints());
+    assert(n==num_variables());
+#if 0
+    x_init_.resize(3*n + m, 0.);
+    duals_init_ = x_init_() + n;
+#endif
+    if (init_x == true) {
+      if(x_init_.empty()){
+        assert(x_init_user_.size() >= n);
+        IpBlasDcopy(n, x_init_user_(), 1, x, 1);
+      }
+      else
+        IpBlasDcopy(n, x_init_(), 1, x, 1);
+    }
+    if (init_z == true) {
+      if(duals_init_ == NULL)
+        return false;
+      assert(x_init_.size() == 3*n + m && duals_init_ == x_init_() + n); 
+      IpBlasDcopy(n, duals_init_, 1, z_L, 1);
+      IpBlasDcopy(n, duals_init_ + n, 1, z_U, 1);
+
+    }
+    if(init_lambda == true) {
+      if(duals_init_ == NULL)
+        return false;
+      assert(x_init_.size() == 3*n + m && duals_init_ == x_init_() + n); 
+      if(m > 0)
+        IpBlasDcopy(m, duals_init_ + 2*n , 1, lambda, 1);
+    }
+
+    need_new_warm_starter_ = true;
+    return true;
+  }
+
+  bool TMINLP2TNLP::get_warm_start_iterate(IteratesVector& warm_start_iterate)
+  {
+    if (IsNull(curr_warm_starter_)) {
+      return false;
+    }
+
+    bool retval = curr_warm_starter_->WarmStartIterate(num_variables(), x_l_(), x_u_(),
+        warm_start_iterate);
+
+    need_new_warm_starter_ = true;
+    return retval;
+  }
+
+  bool TMINLP2TNLP::eval_f(Index n, const Number* x, bool new_x,
+      Number& obj_value)
+  {
+    return tminlp_->eval_f(n, x, new_x, obj_value);
+  }
+
+  bool TMINLP2TNLP::eval_grad_f(Index n, const Number* x, bool new_x,
+      Number* grad_f)
+  {
+    grad_f[n-1] = 0;
+    return tminlp_->eval_grad_f(n, x, new_x, grad_f);
+  }
+
+  bool TMINLP2TNLP::eval_g(Index n, const Number* x, bool new_x,
+      Index m, Number* g)
+  {
+    int return_code = tminlp_->eval_g(n, x, new_x, m, g);
+    return return_code;
+  }
+
+  bool TMINLP2TNLP::eval_jac_g(Index n, const Number* x, bool new_x,
+      Index m, Index nele_jac, Index* iRow,
+      Index *jCol, Number* values)
+  {
+    bool return_code =
+      tminlp_->eval_jac_g(n, x, new_x, m, nele_jac,
+			  iRow, jCol, values);
+    if(iRow != NULL){
+      Index buf;
+      for(Index k = 0; k < nele_jac ; k++){
+        buf = iRow[k];
+        iRow[k] = -1;
+        iRow[k] = buf;
+      }
+    }
+    return return_code;
+  }
+
+  bool TMINLP2TNLP::eval_h(Index n, const Number* x, bool new_x,
+      Number obj_factor, Index m, const Number* lambda,
+      bool new_lambda, Index nele_hess,
+      Index* iRow, Index* jCol, Number* values)
+  {
+    return tminlp_->eval_h(n, x, new_x, obj_factor, m, lambda,
+        new_lambda, nele_hess,
+        iRow, jCol, values);
+  }
+
+
+  bool TMINLP2TNLP::eval_gi(Index n, const Number* x, bool new_x,
+                           Index i, Number& gi)
+  {
+    return tminlp_->eval_gi(n, x, new_x, i, gi);
+  }
+  
+  bool TMINLP2TNLP::eval_grad_gi(Index n, const Number* x, bool new_x,
+                                Index i, Index& nele_grad_gi, Index* jCol,
+                                Number* values)
+  {
+    return tminlp_->eval_grad_gi(n, x, new_x, i, nele_grad_gi, jCol, values);
+  }
+
+  void TMINLP2TNLP::finalize_solution(SolverReturn status,
+      Index n, const Number* x, const Number* z_L, const Number* z_U,
+      Index m, const Number* g, const Number* lambda,
+      Number obj_value,
+      const IpoptData* ip_data,
+      IpoptCalculatedQuantities* ip_cq)
+  {
+    assert(n == (Index) num_variables());
+    assert(m == (Index) num_constraints());
+    x_sol_.resize(n);
+    
+    IpBlasDcopy(n, x, 1, x_sol_(), 1);
+    
+    if(m > 0){
+    g_sol_.resize(m);
+    IpBlasDcopy(m, g, 1, g_sol_(), 1);
+    }
+    duals_sol_.resize(m + 2*n);
+    if(lambda){
+      if(m > 0)
+      IpBlasDcopy(m, lambda, 1, duals_sol_() + 2*n, 1);
+      
+      IpBlasDcopy(n, z_L, 1 , duals_sol_() , 1);
+      IpBlasDcopy(n, z_U, 1 , duals_sol_() + n, 1);
+    }
+
+    return_status_ = status;
+    obj_value_ = obj_value;
+
+    if(status == Ipopt::LOCAL_INFEASIBILITY  && ip_cq != NULL){
+      obj_value_ = ip_cq->curr_nlp_constraint_violation(NORM_MAX);
+    }
+    if (IsValid(curr_warm_starter_)) {
+      curr_warm_starter_->Finalize();
+    }
+  }
+
+
+  bool TMINLP2TNLP::intermediate_callback(AlgorithmMode mode,
+      Index iter, Number obj_value,
+      Number inf_pr, Number inf_du,
+      Number mu, Number d_norm,
+      Number regularization_size,
+      Number alpha_du, Number alpha_pr,
+      Index ls_trials,
+      const IpoptData* ip_data,
+      IpoptCalculatedQuantities* ip_cq)
+  {
+    if (BonminAbortAll) return false;
+#if WARM_STARTER
+    // If we don't have this swtiched on, we assume that also the
+    // "warm_start" option for bonmin is set not to refer to the
+    // interior warm start object
+    if (!warm_start_entire_iterate_) {
+      return true;
+    }
+    if (need_new_warm_starter_) {
+      // Create a new object for later warm start information
+      curr_warm_starter_ = new IpoptInteriorWarmStarter(n_, x_l_, x_u_,
+          nlp_lower_bound_inf_,
+          nlp_upper_bound_inf_,
+          warm_start_entire_iterate_);
+      need_new_warm_starter_ = false;
+    }
+
+    return curr_warm_starter_->UpdateStoredIterates(mode, *ip_data, *ip_cq);
+#else 
+    return true;
+#endif
+  }
+
+
+  /** Procedure to ouptut relevant informations to reproduce a sub-problem.
+  Compare the current problem to the problem to solve
+  and writes files with bounds which have changed and current starting point.
+
+  */
+  void
+  TMINLP2TNLP::outputDiffs(const std::string& probName, const std::string * varNames)
+  {
+    const int &numcols = num_variables();
+    const int &numrows = num_constraints();
+
+    const double * currentLower = x_l();
+    const double * currentUpper = x_u();
+
+    const double * originalLower = orig_x_l();
+    const double * originalUpper = orig_x_u();
+    CoinRelFltEq eq;
+    std::string fBoundsName = probName;
+    std::ostringstream os;
+    fBoundsName+=".bounds";
+    std::string fModName = probName;
+    fModName+= ".mod";
+    std::ofstream fBounds;
+    std::ofstream fMod;
+    bool hasVarNames = 0;
+
+    if(varNames!=NULL )
+      hasVarNames=1;
+    if(hasVarNames)
+      fMod.open(fModName.c_str());
+    fBounds.open(fBoundsName.c_str());
+
+    for(int i = 0 ; i < numcols ; i++) {
+      if(!eq(currentLower[i],originalLower[i])) {
+        if(hasVarNames)
+          fMod<<"bounds"<<i<<": "
+          <<varNames[i]<<" >= "
+          <<currentLower[i]<<";\n";
+
+
+        fBounds<<"LO"<<"\t"<<i<<"\t"<<currentLower[i]<<std::endl;
+      }
+      if(!eq(currentUpper[i],originalUpper[i])) {
+        if(hasVarNames)
+          fMod<<"bounds"<<i<<": "
+          <<varNames[i]<<" <= "
+          <<currentUpper[i]<<";\n";
+
+        fBounds<<"UP"<<"\t"<<i<<"\t"<<currentUpper[i]<<std::endl;
+      }
+    }
+
+    //write a file with starting point
+    std::string fStartPointName=probName;
+    fStartPointName+=".start";
+
+    std::ofstream fStartPoint(fStartPointName.c_str());
+    const double * primals = x_init();
+    const double * duals = duals_init();
+    fStartPoint.precision(17);
+    fStartPoint<<numcols<<"\t"<<2*numcols+numrows<<std::endl;
+    for(int i = 0 ; i < numcols ; i++)
+      fStartPoint<<primals[i]<<std::endl;
+    int end = 2*numcols + numrows;
+    if(duals) {
+      for(int i = 0 ; i < end; i++)
+        fStartPoint<<duals[i]<<std::endl;
+    }
+
+  }
+
+  /** force solution to be fractionnal.*/
+  void
+  TMINLP2TNLP::force_fractionnal_sol()
+  {
+    for(int i=0 ; i < num_variables() ; i++) {
+      if( ( var_types_[i] == TMINLP::INTEGER ||
+          var_types_[i] == TMINLP::BINARY )&&
+          x_l_[i] < x_u_[i] + 0.5)//not fixed
+      {
+        x_sol_[i] = ceil(x_l_[i]) + 0.5;//make it integer infeasible
+      }
+    }
+  }
+
+  bool 
+  TMINLP2TNLP::get_scaling_parameters(Number& obj_scaling,
+                                        bool& use_x_scaling, Index n,
+                                        Number* x_scaling,
+                                        bool& use_g_scaling, Index m,
+                                        Number* g_scaling)
+  {
+    return tminlp_->get_scaling_parameters(obj_scaling, use_x_scaling, n,
+				  x_scaling,
+				  use_g_scaling, m, g_scaling);
+  }
+				  
+
+    /** Method called to check wether a problem has still some variable not fixed. If there are no more
+        unfixed vars, checks wether the solution given by the bounds is feasible.*/
+
+    /** @name Methods for setting and getting the warm starter */
+  void 
+  TMINLP2TNLP::SetWarmStarter(SmartPtr<IpoptInteriorWarmStarter> warm_starter)
+    {
+      curr_warm_starter_ = warm_starter;
+    }
+  SmartPtr<IpoptInteriorWarmStarter> 
+  TMINLP2TNLP::GetWarmStarter()
+    {
+      return curr_warm_starter_;
+    }
+
+
+  /** Evaluate the upper bounding function at given point and store the result.*/
+  double 
+  TMINLP2TNLP::evaluateUpperBoundingFunction(const double * x){
+    Number help;
+    tminlp_->eval_upper_bound_f(num_variables(), x, help);
+    return help;
+  }
+
+  double
+  TMINLP2TNLP::check_solution(OsiObject ** objects, int nObjects){
+    assert(x_sol_.size() == num_variables());
+    assert(g_sol_.size() == num_constraints());
+    if (objects) {
+      for (int i = 0 ; i < nObjects ; i++) {
+        OsiSimpleInteger * obj = dynamic_cast<OsiSimpleInteger *>(objects[i]);
+        if(obj){
+          int colNumber = obj->columnNumber();
+          x_sol_[colNumber] = floor(x_sol_[colNumber]+0.5);
+        }
+      }
+    }
+    else {
+      for (unsigned int i = 0; i < x_sol_.size() ; i++) {
+        if (var_types_[i] == TMINLP::INTEGER || var_types_[i] == TMINLP::BINARY) {
+          x_sol_[i] = floor(x_sol_[i]+0.5);
+        }
+      }
+    }
+    eval_g((int)x_sol_.size(), x_sol_(), true, (int)g_sol_.size(), g_sol_());
+    eval_f((int)x_sol_.size(), x_sol_(), false, obj_value_);
+    double error = 0;
+    for(unsigned int i = 0 ; i < g_sol_.size() ; i++){
+      error = std::max(error, std::max(0., g_l_[i] - g_sol_[i]));
+      error = std::max(error, std::max(0., - g_u_[i] + g_sol_[i]));
+    }
+    return error;
+  }
+
+}// namespace Bonmin
+
diff --git a/src/Interfaces/BonTMINLP2TNLP.hpp b/src/Interfaces/BonTMINLP2TNLP.hpp
new file mode 100644
index 0000000..35055d5
--- /dev/null
+++ b/src/Interfaces/BonTMINLP2TNLP.hpp
@@ -0,0 +1,509 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2004, 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Carl D. Laird, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 12/01/2004
+
+#ifndef __TMINLP2TNLP_HPP__
+#define __TMINLP2TNLP_HPP__
+
+#include "IpTNLP.hpp"
+#include "BonTMINLP.hpp"
+#include "IpSmartPtr.hpp"
+#include "IpIpoptApplication.hpp"
+#include "IpOptionsList.hpp"
+#include "BonTypes.hpp"
+
+namespace Bonmin
+{
+  class IpoptInteriorWarmStarter;
+
+  /** This is an adapter class that converts a TMINLP to
+   *  a TNLP to be solved by Ipopt. It allows an external
+   *  caller to modify the bounds of variables, allowing
+   *  the treatment of binary and integer variables as
+   *  relaxed, or fixed
+   */
+  class TMINLP2TNLP : public Ipopt::TNLP
+  {
+  public:
+    /**@name Constructors/Destructors */
+    //@{
+    TMINLP2TNLP(const Ipopt::SmartPtr<TMINLP> tminlp
+#ifdef WARM_STARTER
+        ,
+        const OptionsList& options
+#endif
+        );
+
+    /** Copy Constructor 
+      * \warning source and copy point to the same tminlp_.
+      */
+    TMINLP2TNLP(const TMINLP2TNLP&);
+
+    /** virtual copy .*/
+    virtual TMINLP2TNLP * clone() const{
+       return new TMINLP2TNLP(*this);}
+
+    /** Default destructor */
+    virtual ~TMINLP2TNLP();
+    //@}
+
+    /**@name Methods to modify the MINLP and form the NLP */
+    //@{
+
+    /** Get the number of variables */
+    inline Ipopt::Index num_variables() const
+    {
+      assert(x_l_.size() == x_u_.size());
+      return static_cast<int>(x_l_.size());
+    }
+
+    /** Get the number of constraints */
+    inline Ipopt::Index num_constraints() const
+    {
+      assert(g_l_.size() == g_u_.size());
+      return static_cast<int>(g_l_.size());
+    }
+    /** Get the nomber of nz in hessian */
+    Ipopt::Index nnz_h_lag()
+    {
+      return nnz_h_lag_;
+    }
+    /** Get the variable types */
+    const TMINLP::VariableType* var_types()
+    {
+      return &var_types_[0];
+    }
+
+    /** Get the current values for the lower bounds */
+    const Ipopt::Number* x_l()
+    {
+      return &x_l_[0];
+    }
+    /** Get the current values for the upper bounds */
+    const Ipopt::Number* x_u()
+    {
+      return &x_u_[0];
+    }
+
+    /** Get the original values for the lower bounds */
+    const Ipopt::Number* orig_x_l() const
+    {
+      return &orig_x_l_[0];
+    }
+    /** Get the original values for the upper bounds */
+    const Ipopt::Number* orig_x_u() const
+    {
+      return orig_x_u_();
+    }
+
+    /** Get the current values for constraints lower bounds */
+    const Ipopt::Number* g_l()
+    {
+      return g_l_();
+    }
+    /** Get the current values for constraints upper bounds */
+    const Ipopt::Number* g_u()
+    {
+      return g_u_();
+    }
+
+    /** get the starting primal point */
+    const Ipopt::Number * x_init() const
+    {
+      return x_init_();
+    }
+
+    /** get the user provided starting primal point */
+    const Ipopt::Number * x_init_user() const
+    {
+      return x_init_user_();
+    }
+
+    /** get the starting dual point */
+    const Ipopt::Number * duals_init() const
+    {
+      return duals_init_;
+    }
+
+    /** get the solution values */
+    const Ipopt::Number* x_sol() const
+    {
+      return x_sol_();
+    }
+
+    /** get the g solution (activities) */
+    const Ipopt::Number* g_sol() const
+    {
+      return g_sol_();
+    }
+
+    /** get the dual values */
+    const Ipopt::Number* duals_sol() const
+    {
+      return duals_sol_();
+    }
+
+    /** Get Optimization status */
+    Ipopt::SolverReturn optimization_status() const
+    {
+      return return_status_;
+    }
+
+    /** Get the objective value */
+    Ipopt::Number obj_value() const
+    {
+      return obj_value_;
+    }
+
+    /** Manually set objective value. */
+    void set_obj_value(Ipopt::Number value)
+    {
+      obj_value_ = value;
+    }
+
+    /** force solution to be fractionnal.*/
+    void force_fractionnal_sol();
+
+    /** Change the bounds on the variables */
+    void SetVariablesBounds(Ipopt::Index n,
+                            const Ipopt::Number * x_l,
+                            const Ipopt::Number * x_u);
+
+    /** Change the lower bound on the variables */
+    void SetVariablesLowerBounds(Ipopt::Index n,
+                               const Ipopt::Number * x_l);
+
+    /** Change the upper bound on the variable */
+    void SetVariablesUpperBounds(Ipopt::Index n,
+                                const Ipopt::Number * x_u);
+
+    /** Change the bounds on the variable */
+    void SetVariableBounds(Ipopt::Index var_no, Ipopt::Number x_l, Ipopt::Number x_u);
+
+    /** Change the lower bound on the variable */
+    void SetVariableLowerBound(Ipopt::Index var_no, Ipopt::Number x_l);
+
+    /** Change the upper bound on the variable */
+    void SetVariableUpperBound(Ipopt::Index var_no, Ipopt::Number x_u);
+
+    /** reset the starting point to original one. */
+    void resetStartingPoint();
+
+    /** set the starting point to x_init */
+    void setxInit(Ipopt::Index n,const Ipopt::Number* x_init);
+
+    /** set the dual starting point to duals_init */
+    void setDualsInit(Ipopt::Index n, const Ipopt::Number* duals_init);
+
+    /** xInit has been set?
+      * \return 0 if not, 1 if only primal 2 if primal dual.*/
+    int has_x_init(){
+      if(x_init_.empty()) return 0;
+      if(duals_init_) return 2;
+      return 1;
+    }
+    /** Set the contiuous solution */
+    void Set_x_sol(Ipopt::Index n, const Ipopt::Number* x_sol);
+
+    /** Set the contiuous dual solution */
+    void Set_dual_sol(Ipopt::Index n, const Ipopt::Number* dual_sol);
+
+    /** Change the type of the variable */
+    void SetVariableType(Ipopt::Index n, TMINLP::VariableType type);
+    //@}
+    /** Procedure to ouptut relevant informations to reproduce a sub-problem.
+      Compare the current problem to the problem to solve
+      and writes files with bounds which have changed and current starting point.
+      */
+    void outputDiffs(const std::string& probName, const std::string* varNames);
+
+    /**@name methods to gather information about the NLP */
+    //@{
+    /** This call is just passed onto the TMINLP object */
+    virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+        Ipopt::Index& nnz_h_lag,
+        TNLP::IndexStyleEnum& index_style);
+
+    /** The caller is allowed to modify the bounds, so this
+     *  method returns the internal bounds information
+     */
+    virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+        Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
+
+    /** Returns the constraint linearity.
+     * array should be alocated with length at least m..*/
+    virtual bool get_constraints_linearity(Ipopt::Index m, LinearityType* const_types)
+    {
+      return tminlp_->get_constraints_linearity(m, const_types);
+    }
+
+    /** Returns the variables linearity.
+     * array should be alocated with length at least n..*/
+    virtual bool get_variables_linearity(Ipopt::Index n, LinearityType* var_types)
+    {
+      return tminlp_->get_variables_linearity(n, var_types);
+    }
+
+    /** returns true if objective is linear.*/
+    virtual bool hasLinearObjective(){return tminlp_->hasLinearObjective();}
+    /** Method called by Ipopt to get the starting point. The bools
+     *  init_x and init_lambda are both inputs and outputs. As inputs,
+     *  they indicate whether or not the algorithm wants you to
+     *  initialize x and lambda respectively. If, for some reason, the
+     *  algorithm wants you to initialize these and you cannot, set
+     *  the respective bool to false.
+     */
+    virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+        bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+        Ipopt::Index m, bool init_lambda,
+        Ipopt::Number* lambda);
+
+    /** Method that returns scaling parameters. 
+     */
+    virtual bool get_scaling_parameters(Ipopt::Number& obj_scaling,
+                                        bool& use_x_scaling, Ipopt::Index n,
+                                        Ipopt::Number* x_scaling,
+                                        bool& use_g_scaling, Ipopt::Index m,
+                                        Ipopt::Number* g_scaling);
+
+
+    /** Methat that returns an Ipopt IteratesVector that has the
+     *  starting point for all internal varibles. */
+    virtual bool get_warm_start_iterate(Ipopt::IteratesVector& warm_start_iterate);
+
+    /** Returns the value of the objective function in x*/
+    virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number& obj_value);
+
+    /** Returns the vector of the gradient of
+     *  the objective w.r.t. x */
+    virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number* grad_f);
+
+    /** Returns the vector of constraint values in x*/
+    virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Number* g);
+
+    /** Returns the jacobian of the
+     *  constraints. The vectors iRow and jCol only need to be set
+     *  once. The first call is used to set the structure only (iRow
+     *  and jCol will be non-NULL, and values will be NULL) For
+     *  subsequent calls, iRow and jCol will be NULL. */
+    virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
+        Ipopt::Index *jCol, Ipopt::Number* values);
+
+    /** compute the value of a single constraint */
+    virtual bool eval_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			 Ipopt::Index i, Ipopt::Number& gi);
+    /** compute the structure or values of the gradient for one
+	constraint */
+    virtual bool eval_grad_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			      Ipopt::Index i, Ipopt::Index& nele_grad_gi, Ipopt::Index* jCol,
+			      Ipopt::Number* values);
+
+    /** Return the hessian of the
+     *  lagrangian. The vectors iRow and jCol only need to be set once
+     *  (during the first call). The first call is used to set the
+     *  structure only (iRow and jCol will be non-NULL, and values
+     *  will be NULL) For subsequent calls, iRow and jCol will be
+     *  NULL. This matrix is symmetric - specify the lower diagonal
+     *  only */
+    virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+        bool new_lambda, Ipopt::Index nele_hess,
+        Ipopt::Index* iRow, Ipopt::Index* jCol, Ipopt::Number* values);
+    //@}
+
+    /** @name Solution Methods */
+    //@{
+    /** This method is called when the algorithm is complete so the TNLP can store/write the solution */
+    virtual void finalize_solution(Ipopt::SolverReturn status,
+        Ipopt::Index n, const Ipopt::Number* x, const Ipopt::Number* z_L, const Ipopt::Number* z_U,
+        Ipopt::Index m, const Ipopt::Number* g, const Ipopt::Number* lambda,
+        Ipopt::Number obj_value,
+        const Ipopt::IpoptData* ip_data,
+        Ipopt::IpoptCalculatedQuantities* ip_cq);
+    /** Intermediate Callback method for the user.  Providing dummy
+     *  default implementation.  For details see IntermediateCallBack
+     *  in IpNLP.hpp. */
+    virtual bool intermediate_callback(Ipopt::AlgorithmMode mode,
+        Ipopt::Index iter, Ipopt::Number obj_value,
+        Ipopt::Number inf_pr, Ipopt::Number inf_du,
+        Ipopt::Number mu, Ipopt::Number d_norm,
+        Ipopt::Number regularization_size,
+        Ipopt::Number alpha_du, Ipopt::Number alpha_pr,
+        Ipopt::Index ls_trials,
+        const Ipopt::IpoptData* ip_data,
+        Ipopt::IpoptCalculatedQuantities* ip_cq);
+    //@}
+
+    /** Method called to check wether a problem has still some variable not fixed. If there are no more
+        unfixed vars, checks wether the solution given by the bounds is feasible.*/
+
+    /** @name Methods for setting and getting the warm starter */
+    //@{
+    void SetWarmStarter(Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter);
+
+      Ipopt::SmartPtr<IpoptInteriorWarmStarter> GetWarmStarter();
+
+    //@}
+      
+      /** Say if has a specific function to compute upper bounds*/
+      virtual bool hasUpperBoundingObjective(){
+        return tminlp_->hasUpperBoundingObjective();}
+
+      /** Evaluate the upper bounding function at given point and store the result.*/
+    double evaluateUpperBoundingFunction(const double * x);
+    
+    /** \name Cuts management. */
+    /** Methods are not implemented at this point. But I need the interface.*/
+    //@{
+
+
+    /** Add some linear cuts to the problem formulation (not implemented yet in base class).*/
+   virtual void addCuts(unsigned int numberCuts, const OsiRowCut ** cuts){
+    if(numberCuts > 0)
+    throw CoinError("BonTMINLP2TNLP", "addCuts", "Not implemented");}
+
+
+  /** Add some cuts to the problem formulaiton (handles Quadratics).*/
+  virtual void addCuts(const OsiCuts &cuts){
+    if(cuts.sizeRowCuts() > 0 || cuts.sizeColCuts() > 0)
+    throw CoinError("BonTMINLP2TNLP", "addCuts", "Not implemented");}
+
+  /** Remove some cuts to the formulation */
+  virtual void removeCuts(unsigned int number ,const int * toRemove){
+    if(number > 0)
+    throw CoinError("BonTMINLP2TNLP", "removeCuts", "Not implemented");}
+
+    //@}
+
+
+  /** Access array describing constraint to which perspectives should be applied.*/
+  virtual const int * get_const_xtra_id() const{
+     return tminlp_->get_const_xtra_id();
+  }
+
+    /** Round and check the current solution, return norm inf of constraint violation.*/
+    double check_solution(OsiObject ** objects = 0, int nObjects = -1);
+   protected:
+   /** \name These should be modified in derived class to always maintain there corecteness.
+             They are directly queried by OsiTMINLPInterface without virtual function for 
+             speed.*/
+    /** @{ */
+    /// Types of the variable (TMINLP::CONTINUOUS, TMINLP::INTEGER, TMINLP::BINARY).
+    vector<TMINLP::VariableType> var_types_;
+    /// Current lower bounds on variables
+    vector<Ipopt::Number> x_l_;
+    /// Current upper bounds on variables
+    vector<Ipopt::Number> x_u_;
+    /// Original lower bounds on variables
+    vector<Ipopt::Number> orig_x_l_;
+    /// Original upper bounds on variables
+    vector<Ipopt::Number> orig_x_u_;
+    /// Lower bounds on constraints values
+    vector<Ipopt::Number> g_l_; 
+    /// Upper bounds on constraints values
+    vector<Ipopt::Number> g_u_;
+    /// Initial primal point
+    vector<Ipopt::Number> x_init_;
+    /** Initial values for all dual multipliers (constraints then lower bounds then upper bounds) */
+    Ipopt::Number * duals_init_;
+    /// User-provideed initial prmal point
+    vector<Ipopt::Number> x_init_user_;
+    /// Optimal solution
+    vector<Ipopt::Number> x_sol_;
+    /// Activities of constraint g( x_sol_)
+    vector<Ipopt::Number> g_sol_;
+    /** Dual multipliers of constraints and bounds*/
+    vector<Ipopt::Number> duals_sol_;
+    /** @} */
+
+    /** Access number of entries in tminlp_ hessian*/
+    Ipopt::Index nnz_h_lag() const{
+     return nnz_h_lag_;}
+    /** Access number of entries in tminlp_ hessian*/
+    Ipopt::Index nnz_jac_g() const{
+     return nnz_jac_g_;}
+
+    /** Acces index_style.*/
+     TNLP::IndexStyleEnum index_style() const{
+       return index_style_;}
+  private:
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+    /** Default Constructor */
+    TMINLP2TNLP();
+
+    /** Overloaded Equals Operator */
+    TMINLP2TNLP& operator=(const TMINLP2TNLP&);
+    //@}
+
+    /** pointer to the tminlp that is being adapted */
+    Ipopt::SmartPtr<TMINLP> tminlp_;
+
+    /** @name Internal copies of data allowing caller to modify the MINLP */
+    //@{
+    /// Number of non-zeroes in the constraints jacobian.
+    Ipopt::Index nnz_jac_g_;
+    /// Number of non-zeroes in the lagrangian hessian
+    Ipopt::Index nnz_h_lag_;
+    /**index style (fortran or C)*/
+    TNLP::IndexStyleEnum index_style_;
+
+    /** Return status of the optimization process*/
+    Ipopt::SolverReturn return_status_;
+    /** Value of the optimal solution found by Ipopt */
+    Ipopt::Number obj_value_;
+    //@}
+
+    /** @name Warmstart object and related data */
+    //@{
+    /** Pointer to object that holds warmstart information */
+    Ipopt::SmartPtr<IpoptInteriorWarmStarter> curr_warm_starter_;
+    /** Value for a lower bound that denotes -infinity */
+    Ipopt::Number nlp_lower_bound_inf_;
+    /** Value for a upper bound that denotes infinity */
+    Ipopt::Number nlp_upper_bound_inf_;
+    /** Option from Ipopt - we currently use it to see if we want to
+     *  use some clever warm start or just the last iterate from the
+     *  previous run */
+    bool warm_start_entire_iterate_;
+    /** Do we need a new warm starter object */
+    bool need_new_warm_starter_;
+    //@}
+
+
+    /** Private method that throws an exception if the variable bounds
+     * are not consistent with the variable type */
+    void throw_exception_on_bad_variable_bound(Ipopt::Index i);
+    
+    private:
+    // Delete all arrays
+    void gutsOfDelete();
+    
+  /** Copies all the arrays. 
+      \warning this and other should be two instances of the same problem
+      \warning AW: I am trying to mimic a copy construction for Cbc
+      use with great care not safe.
+  */
+    void gutsOfCopy(const TMINLP2TNLP &source);
+  };
+
+} // namespace Ipopt
+
+#endif
diff --git a/src/Interfaces/BonTNLP2FPNLP.cpp b/src/Interfaces/BonTNLP2FPNLP.cpp
new file mode 100644
index 0000000..9437394
--- /dev/null
+++ b/src/Interfaces/BonTNLP2FPNLP.cpp
@@ -0,0 +1,461 @@
+// (C) Copyright Carnegie Mellon University 2005
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+//
+// Date : 05/25/2005
+
+
+#include "BonTNLP2FPNLP.hpp"
+
+using namespace Ipopt;
+
+namespace Bonmin
+{
+  TNLP2FPNLP::TNLP2FPNLP(const SmartPtr<TNLP> tnlp, double objectiveScalingFactor):
+      tnlp_(tnlp),
+      inds_(),
+      vals_(),
+      lambda_(1.),
+      sigma_(1.),
+      norm_(2),
+      objectiveScalingFactor_(objectiveScalingFactor),
+      use_feasibility_pump_objective_(false),
+      use_cutoff_constraint_(false),
+      use_local_branching_constraint_(false),
+      cutoff_(COIN_DBL_MAX),
+      rhs_local_branching_constraint_(COIN_DBL_MAX),
+      index_style_(TNLP::C_STYLE)
+  {}
+
+  TNLP2FPNLP::TNLP2FPNLP(const SmartPtr<TNLP> tnlp, const SmartPtr<TNLP2FPNLP> other):
+      tnlp_(tnlp),
+      inds_(other->inds_),
+      vals_(other->vals_),
+      lambda_(other->lambda_),
+      sigma_(other->sigma_),
+      norm_(other->norm_),
+      objectiveScalingFactor_(other->objectiveScalingFactor_),
+      use_feasibility_pump_objective_(other->use_feasibility_pump_objective_),
+      use_cutoff_constraint_(other->use_cutoff_constraint_),
+      use_local_branching_constraint_(other->use_local_branching_constraint_),
+      cutoff_(other->cutoff_),
+      rhs_local_branching_constraint_(other->rhs_local_branching_constraint_),
+      index_style_(other->index_style_)
+  {}
+
+  TNLP2FPNLP::~TNLP2FPNLP()
+  {
+  }
+
+  void
+  TNLP2FPNLP::set_cutoff(Number cutoff)
+  {
+    Number epsilon = 1.0e-6;
+    if(cutoff > 1.0e-8)
+      cutoff_ = (1-epsilon) * cutoff;
+    else if(cutoff < -1.0e-8)
+      cutoff_ = (1+epsilon) * cutoff;
+    else
+      cutoff_ = - epsilon;
+  }
+
+  void
+  TNLP2FPNLP::set_dist_to_point_obj(size_t n, const Number * vals, const Index * inds)
+  {
+    inds_.resize(n);
+    vals_.resize(n);
+    std::copy(vals, vals + n, vals_.begin());
+    std::copy(inds, inds + n, inds_.begin());
+  }
+
+  /** Compute the distance to the current point to which distance is minimized. */
+  double
+  TNLP2FPNLP::dist_to_point(const Number *x)
+  {
+    double ret_val = 0;
+    assert(vals_.size() == inds_.size());
+    if(norm_ == 2){
+      for(unsigned int i = 0; i < vals_.size() ; i++) {
+        ret_val += ( x[inds_[i]] - vals_[i] ) * ( x[inds_[i]] - vals_[i] );
+      }
+    }
+    else if(norm_ == 1){
+      for(unsigned int i = 0 ; i < vals_.size() ; i++) {
+        if(vals_[i] <= 0.1)
+         ret_val += x[inds_[i]];
+        else{
+	  ret_val += (1.0 - x[inds_[i]]);
+	 //         ret_val -= x[inds_[i]];
+        }
+      }
+    }
+    return ret_val;
+  }
+
+  bool
+  TNLP2FPNLP::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
+      Index& nnz_h_lag,
+      TNLP::IndexStyleEnum& index_style)
+  {
+    bool ret_code = tnlp_->get_nlp_info(n, m , nnz_jac_g, nnz_h_lag,
+        index_style);
+
+    index_style_ = index_style; // this function is called before any
+                                // other that uses index_style_
+
+    if(use_feasibility_pump_objective_ && norm_ == 2)
+      nnz_h_lag += (int)vals_.size();
+
+    if(use_cutoff_constraint_ && use_local_branching_constraint_) {
+      m += 2;
+      nnz_jac_g += (n + (int)vals_.size());
+    }
+    else if(use_cutoff_constraint_) {
+      m++;
+      nnz_jac_g += n;
+    }
+    else if(use_local_branching_constraint_) {
+      m++;
+      nnz_jac_g += (int)vals_.size();
+    }
+
+    return ret_code;
+  }
+
+  bool 
+  TNLP2FPNLP::get_bounds_info(Index n, Number* x_l, Number* x_u,
+			      Index m, Number* g_l, Number* g_u)
+  {
+    bool ret_code;
+
+    if(use_cutoff_constraint_ && use_local_branching_constraint_) {
+      ret_code = tnlp_->get_bounds_info(n, x_l , x_u, m-2, g_l, g_u);
+      g_l[m-2] = - COIN_DBL_MAX;
+      g_u[m-2] = cutoff_;
+      g_l[m-1] = - COIN_DBL_MAX;
+      g_u[m-1] = rhs_local_branching_constraint_;
+    }
+    else if(use_cutoff_constraint_) {
+      ret_code = tnlp_->get_bounds_info(n, x_l , x_u, m-1, g_l, g_u);
+      g_l[m-1] = - COIN_DBL_MAX;
+      g_u[m-1] = cutoff_;
+    }
+    else if(use_local_branching_constraint_) {
+      ret_code = tnlp_->get_bounds_info(n, x_l , x_u, m-1, g_l, g_u);
+      g_l[m-1] = - COIN_DBL_MAX;
+      g_u[m-1] = rhs_local_branching_constraint_;
+    }
+    else
+      ret_code = tnlp_->get_bounds_info(n, x_l , x_u, m, g_l, g_u);
+
+    return ret_code;
+  }
+
+  bool
+  TNLP2FPNLP::eval_f(Index n, const Number* x, bool new_x,
+      Number& obj_value)
+  {
+    bool ret_code = tnlp_->eval_f(n, x, new_x, obj_value);//for new_x
+
+    if(use_feasibility_pump_objective_) {
+      obj_value *= (1 - lambda_) * sigma_;
+      obj_value += objectiveScalingFactor_*lambda_*dist_to_point(x);
+    }
+
+    return ret_code;
+  }
+
+  bool
+  TNLP2FPNLP::eval_grad_f(Index n, const Number* x, bool new_x,
+      Number* grad_f)
+  {
+    bool ret_code = tnlp_->eval_grad_f(n, x, new_x, grad_f);
+
+    if(use_feasibility_pump_objective_) {
+      for(int i = 0 ; i < n ; i++) {
+	grad_f[i] *= (1-lambda_) * sigma_;
+      }
+      if(norm_ ==2){
+	for(unsigned int i = 0 ; i < inds_.size() ; i++) {
+	  grad_f[inds_[i]] += objectiveScalingFactor_*2*lambda_*( x[inds_[i]] - vals_[i] );
+	}
+      }
+      else{
+	for(unsigned int i = 0 ; i < inds_.size() ; i++) {
+	  if(vals_[i] <= 0.1)
+	    grad_f[inds_[i]] += objectiveScalingFactor_*lambda_;
+	  else
+	    grad_f[inds_[i]] -= objectiveScalingFactor_*lambda_;
+	}
+      }
+    }
+   
+    return ret_code;
+  }
+
+  bool
+  TNLP2FPNLP::eval_g(Index n, const Number* x, bool new_x,
+		     Index m, Number* g)
+  {
+    bool ret_code;
+
+    if(use_cutoff_constraint_ && use_local_branching_constraint_) {
+      ret_code = tnlp_->eval_g(n, x, new_x, m-2, g);
+      // compute the value of the cutoff constraint
+      Number obj_value;
+      if(eval_f(n, x, new_x, obj_value))
+	g[m-2] = obj_value;
+      else
+	ret_code = false;
+      // compute the value of the local branching constraint
+      Number g_local_branching = 0.0;
+      for(unsigned int i = 0 ; i < vals_.size() ; i++) {
+        if(vals_[i] <= 0.1)
+          g_local_branching += x[inds_[i]];
+        else
+	  g_local_branching += (1.0 - x[inds_[i]]);
+      }
+      g[m-1] = g_local_branching;
+    }
+    else if(use_cutoff_constraint_) {
+      ret_code = tnlp_->eval_g(n, x, new_x, m-1, g);
+      Number obj_value;
+      if(eval_f(n, x, new_x, obj_value))
+	g[m-1] = obj_value;
+      else
+	ret_code = false;
+    }
+    else if(use_local_branching_constraint_) {
+      ret_code = tnlp_->eval_g(n, x, new_x, m-1, g);
+      Number g_local_branching = 0.0;
+      for(unsigned int i = 0 ; i < vals_.size() ; i++) {
+        if(vals_[i] <= 0.1)
+          g_local_branching += x[inds_[i]];
+        else
+	  g_local_branching += (1.0 - x[inds_[i]]);
+      }
+      g[m-1] = g_local_branching;
+    }
+    else
+      ret_code = tnlp_->eval_g(n, x, new_x, m, g);
+    
+    return ret_code;
+  }
+
+  bool
+  TNLP2FPNLP::eval_jac_g(Index n, const Number* x, bool new_x,
+			 Index m, Index nele_jac, Index* iRow,
+			 Index *jCol, Number* values)
+  {
+    bool ret_code;
+
+    if(use_cutoff_constraint_ && use_local_branching_constraint_) {
+      int n_integers = (int)vals_.size();
+      ret_code = tnlp_->eval_jac_g(n, x, new_x, m, nele_jac - n - n_integers, 
+				   iRow, jCol, values);
+
+      if (iRow && jCol && !values) { //Initialization phase 
+	int index_correction = (index_style_ == TNLP::C_STYLE) ? 0 : 1;
+	// compute the jacobian contribution of the cutoff constraint
+	int k = nele_jac - n - n_integers;
+	iRow += k;
+	jCol += k;
+	for(int i = 0; i< n; i++) {
+	  iRow[i] = m - 2 + index_correction;
+	  jCol[i] = i + index_correction;
+	}
+	// compute the jacobian contribution of the local branching constraint
+	k = nele_jac - n_integers;
+	iRow += k;
+	jCol += k;
+	for(int i = 0; i< n_integers; i++) {
+	  iRow[i] = m - 1 + index_correction;
+	  jCol[i] = inds_[i] + index_correction;
+	}
+      }
+      else if (!iRow & !jCol && values) { //computation phase
+	// compute the jacobian contribution of the cutoff constraint
+	Number* grad_f = new Number[n];
+	bool ret_code_grad_f = eval_grad_f(n, x, new_x, grad_f);
+	if(ret_code_grad_f) {
+	  int k = nele_jac - n - n_integers;
+	  values += k;
+	  for(int i = 0; i< n; i++) {
+	    values[i] = grad_f[i];
+	  }
+	}
+	else
+	  ret_code = false;
+	delete [] grad_f;
+	// compute the jacobian contribution of the local branching constraint
+	int k = nele_jac - n_integers;
+	values += k;
+	for(int i = 0; i< n_integers; i++) {
+	  if(vals_[i] <= 0.1)
+	    values[i] = 1.0;
+	  else
+	    values[i] = -1.0;
+	}
+      }	  
+      else { //error phase
+	DBG_ASSERT(false && "Invalid combination of iRow, jCol, and values pointers");
+      }
+    }
+    else if(use_cutoff_constraint_) {
+      ret_code = tnlp_->eval_jac_g(n, x, new_x, m, nele_jac - n, 
+				   iRow, jCol, values);
+      
+      if (iRow && jCol && !values) { //Initialization phase 
+	int index_correction = (index_style_ == TNLP::C_STYLE) ? 0 : 1;
+	int k = nele_jac - n;
+	iRow += k;
+	jCol += k;
+	for(int i = 0; i< n; i++) {
+	  iRow[i] = m - 1 + index_correction;
+	  jCol[i] = i + index_correction;
+	}
+      }
+      else if (!iRow & !jCol && values) { //computation phase
+	Number* grad_f = new Number[n];
+	bool ret_code_grad_f = eval_grad_f(n, x, new_x, grad_f);
+	if(ret_code_grad_f) {
+	  int k = nele_jac - n;
+	  values += k;
+	  for(int i = 0; i< n; i++) {
+	    values[i] = grad_f[i];
+	  }
+	}
+	else
+	  ret_code = false;
+	delete [] grad_f;
+      }	  
+      else { //error phase
+	DBG_ASSERT(false && "Invalid combination of iRow, jCol, and values pointers");
+      }
+    }
+    else if(use_local_branching_constraint_) {
+      int n_integers = (int)vals_.size();
+      ret_code = tnlp_->eval_jac_g(n, x, new_x, m, nele_jac - n_integers, 
+				   iRow, jCol, values);
+      
+      if (iRow && jCol && !values) { //Initialization phase 
+	int index_correction = (index_style_ == TNLP::C_STYLE) ? 0 : 1;
+	int k = nele_jac - n_integers;
+	iRow += k;
+	jCol += k;
+	for(int i = 0; i< n_integers; i++) {
+	  iRow[i] = m - 1 + index_correction;
+	  jCol[i] = inds_[i] + index_correction;
+	}
+      }
+      else if (!iRow & !jCol && values) { //computation phase
+	int k = nele_jac - n_integers;
+	values += k;
+	for(int i = 0; i< n_integers; i++) {
+	  if(vals_[i] <= 0.1)
+	    values[i] = 1.0;
+	  else
+	    values[i] = -1.0;
+	}
+      }	  
+      else { //error phase
+	DBG_ASSERT(false && "Invalid combination of iRow, jCol, and values pointers");
+      }
+    }
+    else
+      ret_code = tnlp_->eval_jac_g(n, x, new_x, m, nele_jac, 
+				   iRow, jCol, values);
+    
+    return ret_code;
+  }
+
+  bool
+  TNLP2FPNLP::eval_h(Index n, const Number* x, bool new_x,
+		     Number obj_factor, Index m, const Number* lambda,
+		     bool new_lambda, Index nele_hess,
+		     Index* iRow, Index* jCol, Number* values)
+  {
+    bool ret_code;
+
+    int  nnz_obj_h = (norm_ == 2) ? (int)inds_.size() : 0;
+
+    if(use_cutoff_constraint_ && use_local_branching_constraint_) {
+      double coef_obj = (iRow != NULL)?0 : lambda[m - 2];
+      ret_code = tnlp_->eval_h(n, x, new_x, obj_factor*(1-lambda_)*sigma_ + coef_obj, 
+			       m - 2, lambda, new_lambda, nele_hess - nnz_obj_h, 
+			       iRow, jCol, values);
+    }
+    else if(use_cutoff_constraint_) {
+      double coef_obj = (iRow != NULL)?0 : lambda[m - 1];
+      ret_code = tnlp_->eval_h(n, x, new_x, obj_factor*(1-lambda_)*sigma_ + coef_obj, 
+			       m - 1, lambda, new_lambda, nele_hess - nnz_obj_h, 
+			       iRow, jCol, values);
+    }
+    else if(use_local_branching_constraint_) {
+      ret_code = tnlp_->eval_h(n, x, new_x, obj_factor*(1-lambda_)*sigma_, 
+			       m - 1, lambda, new_lambda, nele_hess - nnz_obj_h, 
+			       iRow, jCol, values);
+    }
+    else { // this is the original feasibility pump implementation
+      ret_code = tnlp_->eval_h(n, x, new_x, obj_factor*(1-lambda_)*sigma_, 
+			       m, lambda, new_lambda, nele_hess - nnz_obj_h, 
+			       iRow, jCol, values);
+    }
+
+    //Now add extra elements corresponding to the hessian of the distance
+    if(use_feasibility_pump_objective_ && norm_ == 2){
+      if (iRow && jCol && !values) //Initialization phase
+	{
+    int index_correction = (index_style_ == TNLP::C_STYLE) ? 0 : 1;
+	  int k = nele_hess - nnz_obj_h;
+	  iRow += k;
+	  jCol += k;
+	  for(unsigned int i = 0; i < inds_.size() ; i++)
+	    {
+	      iRow[i] = inds_[i] + index_correction;
+	      jCol[i] = inds_[i] + index_correction;
+	    }
+	  DBG_ASSERT(k==nele_hess);
+	}
+      else if (!iRow & !jCol && values) //computation phase
+	{
+	  int k = nele_hess - nnz_obj_h;
+	  values += k;
+	  for(unsigned int i = 0; i < inds_.size() ; i++)
+	    {
+	      values[i] = 2* objectiveScalingFactor_* lambda_* obj_factor;
+	    }
+	  DBG_ASSERT(k==nele_hess);
+	}
+      else //error phase
+	{
+	  DBG_ASSERT(false && "Invalid combination of iRow, jCol, and values pointers");
+	}
+    }
+
+    return ret_code;
+  }
+
+  void
+  TNLP2FPNLP::finalize_solution(SolverReturn status,
+      Index n, const Number* x, const Number* z_L, const Number* z_U,
+      Index m, const Number* g, const Number* lambda,
+      Number obj_value,
+      const IpoptData* ip_data,
+      IpoptCalculatedQuantities* ip_cq)
+  {
+      int m2 = m;
+      if(use_cutoff_constraint_) {
+        m2--;
+      }
+      if(use_local_branching_constraint_) {
+        m2--;
+      }
+    tnlp_->finalize_solution(status,n, x, z_L, z_U,m2, g, lambda, obj_value,
+			     ip_data, ip_cq);
+  }
+}
+
diff --git a/src/Interfaces/BonTNLP2FPNLP.hpp b/src/Interfaces/BonTNLP2FPNLP.hpp
new file mode 100644
index 0000000..2baf3c3
--- /dev/null
+++ b/src/Interfaces/BonTNLP2FPNLP.hpp
@@ -0,0 +1,264 @@
+// Copyright (C) 2004, International Business Machines and others.
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+//
+// Authors:  Pierre Bonami 06/10/2005
+
+#ifndef _TNLP2FPNLP_HPP_
+#define _TNLP2FPNLP_HPP_
+
+#include "IpTNLP.hpp"
+#include "BonTMINLP.hpp"
+#include "IpSmartPtr.hpp"
+#include "BonTypes.hpp"
+
+namespace Bonmin
+{
+  /** This is an adapter class to convert an NLP to a Feasibility Pump NLP
+   *  by changing the objective function to the (2-norm) distance to a point.
+   * The extra function is set_dist_to_point_obj(size_t n, const double *, const int *)
+   */
+  class TNLP2FPNLP : public Ipopt::TNLP
+  {
+  public:
+    /**@name Constructors/Destructors */
+    //@{
+    /** Build using tnlp as source problem.*/
+    TNLP2FPNLP(const Ipopt::SmartPtr<Ipopt::TNLP> tnlp, double objectiveScalingFactor = 100);
+
+    /** Build using tnlp as source problem and using other for all other parameters..*/
+    TNLP2FPNLP(const Ipopt::SmartPtr<TNLP> tnlp, const Ipopt::SmartPtr<TNLP2FPNLP> other);
+
+    /** Default destructor */
+    virtual ~TNLP2FPNLP();
+    //@}
+    void use(Ipopt::SmartPtr<TNLP> tnlp){
+      tnlp_ = GetRawPtr(tnlp);}
+    /**@name Methods to select the objective function and extra constraints*/
+    //@{
+    /// Flag to indicate that we want to use the feasibility pump objective
+    void set_use_feasibility_pump_objective(bool use_feasibility_pump_objective) 
+    { use_feasibility_pump_objective_ = use_feasibility_pump_objective; }
+
+    /** Flag to indicate that we want to use a cutoff constraint
+     *	This constraint has the form f(x) <= (1-epsilon) f(x') */ 
+    void set_use_cutoff_constraint(bool use_cutoff_constraint)
+    { use_cutoff_constraint_ = use_cutoff_constraint; }
+
+    /// Flag to indicate that we want to use a local branching constraint
+    void set_use_local_branching_constraint(bool use_local_branching_constraint)
+    { use_local_branching_constraint_ = use_local_branching_constraint; }
+    //@}
+
+    /**@name Methods to provide the rhs of the extra constraints*/
+    //@{
+    /// Set the cutoff value to use in the cutoff constraint
+    void set_cutoff(Ipopt::Number cutoff);
+
+    /// Set the rhs of the local branching constraint
+    void set_rhs_local_branching_constraint(double rhs_local_branching_constraint)
+    { assert(rhs_local_branching_constraint >= 0);
+      rhs_local_branching_constraint_ = rhs_local_branching_constraint; }
+    //@}
+
+    /**@name Methods to change the objective function*/
+    //@{
+    /** \brief Set the point to which distance is minimized.
+    * The distance is minimize in a subspace define by a subset of coordinates
+     * \param n number of coordinates on which distance is minimized
+     * \param inds indices of the coordinates on which distance is minimized
+     * \param vals values of the point for coordinates in ind
+     */
+    void set_dist_to_point_obj(size_t n, const Ipopt::Number * vals, const Ipopt::Index * inds);
+
+     /** Set the value for sigma */
+     void setSigma(double sigma){
+       assert(sigma >= 0.);
+       sigma_ = sigma;}
+     /** Set the value for lambda*/
+     void setLambda(double lambda){
+       assert(lambda >= 0. && lambda <= 1.);
+       lambda_ = lambda;}
+     /** Set the value for simgma */
+     void setNorm(int norm){
+       assert(norm >0 && norm < 3);
+       norm_ = norm;}
+    //@}
+
+    /**@name methods to gather information about the NLP */
+    //@{
+    /** get info from nlp_ and add hessian information */
+    virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
+        Ipopt::Index& nnz_h_lag, Ipopt::TNLP::IndexStyleEnum& index_style);
+
+    /** This call is just passed onto tnlp_
+     */
+    virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
+				 Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
+
+    /** Passed onto tnlp_
+     */
+    virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
+        bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
+        Ipopt::Index m, bool init_lambda,
+        Ipopt::Number* lambda)
+    {
+      int m2 = m;
+      if(use_cutoff_constraint_) {
+        m2--;
+        if(lambda!=NULL)lambda[m2] = 0;
+      }
+      if(use_local_branching_constraint_) {
+        m2--;
+        if(lambda!= NULL)lambda[m2] = 0;
+      }
+      int ret_code = tnlp_->get_starting_point(n, init_x, x,
+          init_z, z_L, z_U, m2, init_lambda, lambda);
+      return ret_code;
+    }
+
+    /** overloaded to return the value of the objective function */
+    virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number& obj_value);
+
+    /** overload this method to return the vector of the gradient of
+     *  the objective w.r.t. x */
+    virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number* grad_f);
+
+    /** overload to return the values of the left-hand side of the
+        constraints */
+    virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			Ipopt::Index m, Ipopt::Number* g);
+
+    /** overload to return the jacobian of g */
+    virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+			    Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
+			    Ipopt::Index *jCol, Ipopt::Number* values);
+
+    /** Evaluate the modified Hessian of the Lagrangian*/
+    virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
+        Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
+        bool new_lambda, Ipopt::Index nele_hess,
+        Ipopt::Index* iRow, Ipopt::Index* jCol, Ipopt::Number* values);
+    //@}
+
+    /** @name Solution Methods */
+    //@{
+    /** This method is called when the algorithm is complete so the TNLP can store/write the solution */
+    virtual void finalize_solution(Ipopt::SolverReturn status,
+        Ipopt::Index n, const Ipopt::Number* x, const Ipopt::Number* z_L, const Ipopt::Number* z_U,
+        Ipopt::Index m, const Ipopt::Number* g, const Ipopt::Number* lambda,
+        Ipopt::Number obj_value,
+        const Ipopt::IpoptData* ip_data,
+        Ipopt::IpoptCalculatedQuantities* ip_cq);
+    //@}
+
+    virtual bool get_variables_linearity(Ipopt::Index n, LinearityType* var_types)
+    {
+      return tnlp_->get_variables_linearity(n, var_types);;
+    }
+
+    /** overload this method to return the constraint linearity.
+     * array should be alocated with length at least n. (default implementation
+     *  just return false and does not fill the array).*/
+    virtual bool get_constraints_linearity(Ipopt::Index m, LinearityType* const_types)
+    {
+      int m2 = m;
+      if(use_cutoff_constraint_) {
+        m2--;
+        const_types[m2] = Ipopt::TNLP::NON_LINEAR;
+      } 
+      if(use_local_branching_constraint_) {
+        m2--;
+        const_types[m2] = Ipopt::TNLP::LINEAR;
+      }
+      return tnlp_->get_constraints_linearity(m2, const_types);
+    }
+    /** @name Scaling of the objective function */
+    //@{
+    void setObjectiveScaling(double value)
+    {
+      objectiveScalingFactor_ = value;
+    }
+    double getObjectiveScaling() const
+    {
+      return objectiveScalingFactor_;
+    }
+
+  private:
+    /** @name Internal methods to help compute the distance, its gradient and hessian */
+    //@{
+    /** Compute the norm-2 distance to the current point to which distance is minimized. */
+    double dist_to_point(const Ipopt::Number *x);
+    //@}
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+    /** Default Constructor */
+    TNLP2FPNLP();
+
+    /** Copy Constructor */
+    TNLP2FPNLP(const TNLP2FPNLP&);
+
+    /** Overloaded Equals Operator */
+    void operator=(const TNLP2FPNLP&);
+    //@}
+
+    /** pointer to the tminlp that is being adapted */
+    Ipopt::SmartPtr<TNLP> tnlp_;
+
+    /** @name Data for storing the point the distance to which is minimized */
+    //@{
+    /// Indices of the variables for which distance is minimized (i.e. indices of integer variables in a feasibility pump setting)
+    vector<Ipopt::Index> inds_;
+    /// Values of the point to which we separate (if x is the point vals_[i] should be x[inds_[i]] )
+    vector<Ipopt::Number> vals_;
+    /** value for the convex combination to take between original objective and distance function.
+      * ( take lambda_ * distance + (1-lambda) sigma f(x).*/
+    double lambda_;
+    /** Scaling for the original objective.*/
+    double sigma_;
+   /** Norm to use (L_1 or L_2).*/
+   int norm_;
+    //@}
+
+    /// Scaling factor for the objective
+    double objectiveScalingFactor_;
+
+    /**@name Flags to  select the objective function and extra constraints*/
+    //@{
+    /// Flag to indicate that we want to use the feasibility pump objective
+    bool use_feasibility_pump_objective_;
+
+    /** Flag to indicate that we want to use a cutoff constraint
+     *	This constraint has the form f(x) <= (1-epsilon) f(x') */ 
+    bool use_cutoff_constraint_;    
+
+    /// Flag to indicate that we want to use a local branching constraint
+    bool use_local_branching_constraint_;
+    //@}
+
+    /**@name Data for storing the rhs of the extra constraints*/
+    //@{
+    /// Value of best solution known
+    double cutoff_;
+
+    /// RHS of local branching constraint
+    double rhs_local_branching_constraint_;
+    //@}
+
+    /// Ipopt::Index style (C++ or Fortran)
+    Ipopt::TNLP::IndexStyleEnum index_style_;
+
+  };
+
+} // namespace Ipopt
+
+#endif /*_TNLP2FPNLP_HPP_*/
diff --git a/src/Interfaces/BonTNLPSolver.cpp b/src/Interfaces/BonTNLPSolver.cpp
new file mode 100644
index 0000000..c23cad9
--- /dev/null
+++ b/src/Interfaces/BonTNLPSolver.cpp
@@ -0,0 +1,293 @@
+// (C) Copyright International Business Machines Corporation, 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/02/2006
+
+//Bonmin includes
+#include "BonTNLPSolver.hpp"
+
+//Ipopt includes
+#include "IpBlas.hpp"
+
+//Standard includes
+#include <fstream>
+
+#include "BonColReader.hpp"
+
+
+namespace Bonmin{
+  using namespace Ipopt;
+
+  
+#if 0
+  string TNLPSolver::returnCodes[TNLPSolver::numReturnCodes] = {
+    "Hit iteration limit" /**iterationLimit*/,
+    "Some error was made in computations." /**computationError*/,
+    "Problem has more equations than free variables." /** notEnoughFreedom*/,
+    "Problem is not well defined."/**illDefinedProblem*/,
+    "Illegal option set."/**illegalOption*/,
+    "Exception in some the third-party code used by solver." /**externalException*/,
+    "Unrecognized exception."/**exception*/,
+    "Problem solved to optimality"/**solvedOptimal*/,
+    "Problem solvedd to acceptable level of tolerance"/**solvedOptimalTol*/,
+    "Problem is infeasible" /**provenInfeasible*/,
+    "Problem is unbounded", /**unbounded*/};
+#endif
+    
+    
+  TNLPSolver::TNLPSolver():
+    start_time_(0),
+    time_limit_(DBL_MAX)
+  {
+    initializeOptionsAndJournalist();
+  }
+
+  TNLPSolver::TNLPSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+    Ipopt::SmartPtr<Ipopt::OptionsList> options,
+    Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+    const std::string & prefix):
+    journalist_(journalist),
+    options_(options),
+    roptions_(roptions),
+    prefix_(prefix),
+    start_time_(0),
+    time_limit_(DBL_MAX)
+  {
+  }
+
+  TNLPSolver::TNLPSolver(const TNLPSolver &other):
+    journalist_(other.journalist_),
+    options_(NULL),
+    roptions_(other.roptions_),
+    prefix_(other.prefix_),
+    start_time_(other.start_time_),
+    time_limit_(other.time_limit_){
+      options_ = new Ipopt::OptionsList();
+      *options_ = *other.options_;
+  }
+  
+  TNLPSolver::~TNLPSolver()
+  {}
+
+
+  bool
+  TNLPSolver::zeroDimension(const Ipopt::SmartPtr<Ipopt::TNLP>& tnlp, ReturnStatus &optimizationStatus)
+  {
+
+    int n,m,dum1, dum2;
+    Ipopt::TNLP::IndexStyleEnum dum3;
+    tnlp->get_nlp_info(n,m,dum1, dum2, dum3);
+    double * x_l = new double[n];
+    double * x_u = new double[n];
+   
+    double * g_l = (m>0) ? new double[m] : NULL;
+    double * g_u = (m >0) ? new double[m] : NULL;
+    
+    tnlp->get_bounds_info(n, x_l, x_u, m, g_l , g_u);
+    
+
+    for(int i = 0 ; i < n ; i++) {
+      if(x_u[i] - x_l[i] > 1e-5)
+	{
+	  delete [] x_l;
+	  delete [] x_u;
+          if(m > 0){
+	    delete [] g_l;
+	    delete [] g_u;
+          }
+	  return 0;
+	}
+    }
+
+    //Problem has no variables just check if the unique solution given by the bounds is
+    // feasible or not.
+    double obj_value;
+
+    tnlp->eval_f(n, x_l, true, obj_value);
+
+    double * x_sol = new double[n];
+
+      
+    IpBlasDcopy(n, x_l, 1, x_sol, 1);
+
+    delete [] x_l;
+    delete [] x_u;
+
+    double * g_sol = (m > 0) ? new double [m] : NULL;
+
+    tnlp->eval_g(n, x_sol, true, m, g_sol);
+    
+    optimizationStatus = solvedOptimal;
+    for(int i = 0 ; i < m ; i++) {
+      if(g_sol[i] - g_l[i] <  - 1e-07 || g_sol[i] - g_u[i] > 1e-07) {
+        optimizationStatus = provenInfeasible;
+	
+	delete [] g_l;
+	delete [] g_u;
+	double * lam = (m > 0) ? new double[m]: NULL;
+	CoinFillN(lam,m,0.);
+	double * z = new double[n];
+	CoinFillN(z,n,0.);
+	tnlp->finalize_solution(Ipopt::LOCAL_INFEASIBILITY,
+			       n, x_sol, NULL, NULL, 
+			       m, g_sol, NULL, obj_value, NULL, NULL);
+	if (m > 0) delete [] lam;
+	delete [] z;
+	if (m > 0) delete [] g_sol;
+	delete [] x_sol;
+
+        return 1;
+      }
+    }
+    if (m > 0) delete [] g_l;
+    if (m > 0) delete [] g_u;
+
+    double * lam = (m > 0) ? new double[m] : NULL;
+    CoinFillN(lam,m,0.);
+    double * z = new double[n];
+    CoinFillN(z,n,0.);
+    tnlp->finalize_solution(Ipopt::SUCCESS,
+			   n, x_sol, z, z,
+			   m, g_sol, lam, obj_value, NULL, NULL);
+    if (m > 0) delete [] lam;
+    delete [] z;
+    if (m > 0) delete [] g_sol;
+    delete [] x_sol;
+    return 1;
+  }
+
+void
+TNLPSolver::UnsolvedError::printError(std::ostream &os)
+{
+  os<<solverName()<<" exited with error code "<<errorNum_<<" "<<errorName()<<std::endl;
+}
+
+void
+TNLPSolver::UnsolvedError::writeDiffFiles(const std::string prefix) const{
+  const int numcols = model_->num_variables();
+  const int numrows = model_->num_constraints();
+  
+  const double * currentLower = model_->x_l();
+  const double * currentUpper = model_->x_u();
+
+  const double * originalLower = model_->orig_x_l();
+  const double * originalUpper = model_->orig_x_u();
+  CoinRelFltEq eq;
+  std::string fBoundsName = prefix + name_;
+  fBoundsName+="_bounds";
+  
+  std::string fModName = fBoundsName + ".mod";
+  std::ofstream fBounds;
+  std::ofstream fMod;
+
+  /** Reader variables names.*/
+  bool hasVarNames = 0;
+  NamesReader reader(name_,".col");
+  
+  if(reader.readFile())
+      hasVarNames=1;
+  if(hasVarNames)
+    fMod.open(fModName.c_str());
+  fBounds.open(fBoundsName.c_str());
+    
+  for(int i = 0 ; i < numcols ; i++)
+    {    
+    if(!eq(currentLower[i],originalLower[i]))
+      {
+        if(hasVarNames)
+          fMod<<"bounds"<<i<<": "
+	      <<reader.name(i)<<" >= "
+	      <<currentLower[i]<<";\n";
+
+
+	fBounds<<"LO"<<"\t"<<i<<"\t"<<currentLower[i]<<std::endl;
+    }
+    if(!eq(currentUpper[i],originalUpper[i]))
+      {
+	if(hasVarNames)
+	  fMod<<"bounds"<<i<<": "
+	      <<reader.name(i)<<" <= "
+	      <<currentUpper[i]<<";\n";
+	
+        fBounds<<"UP"<<"\t"<<i<<"\t"<<currentUpper[i]<<std::endl;
+      }
+    }
+  
+    //write a file with starting point
+    std::string fStartPointName = name_;
+    fStartPointName+="_start";
+
+
+
+    const double * primals = model_->x_init();
+    const double * duals = model_->duals_init();
+
+    if(!primals)//No starting point no output
+      {
+	std::cerr<<"A failure has occured but no starting point exists"<<std::endl;
+	return;
+      }
+
+    std::ofstream fStartPoint(fStartPointName.c_str());
+    fStartPoint.precision(17);
+    fStartPoint<<numcols<<"\t"<<2*numcols+numrows<<std::endl;
+    for(int i = 0 ; i < numcols ; i++)
+    fStartPoint<<primals[i]<<std::endl;
+    int end = 2*numcols + numrows;
+    if(duals)
+      {
+	for(int i = 0 ; i < end; i++)
+	  fStartPoint<<duals[i]<<std::endl;
+      }
+
+ 
+}
+
+  /** Say if an optimization status for a problem which failed is recoverable
+      (problem may be solvable).*/
+  bool 
+  TNLPSolver::isRecoverable(ReturnStatus &r){
+    return (r >=0 || (r != illDefinedProblem && r != illegalOption && r != computationError && r != timeLimit) );
+  }
+
+/** Initialize the options and the journalist.*/
+void 
+TNLPSolver::initializeOptionsAndJournalist(){
+  prefix_ = "bonmin.";
+  options_ = new Ipopt::OptionsList();
+  
+  journalist_= new Ipopt::Journalist();
+  roptions_ = new Bonmin::RegisteredOptions();
+  
+  try{
+    Ipopt::SmartPtr<Ipopt::Journal> stdout_journal =
+    journalist_->AddFileJournal("console", "stdout", Ipopt::J_ITERSUMMARY);
+    
+    options_->SetJournalist(journalist_);
+    options_->SetRegisteredOptions(GetRawPtr(roptions_));
+  }
+  catch (Ipopt::IpoptException &E){
+    E.ReportException(*journalist_);
+    throw E;
+  }
+  catch(std::bad_alloc){
+    journalist_->Printf(Ipopt::J_ERROR, Ipopt::J_MAIN, "\n Not enough memory .... EXIT\n");
+    throw CoinError("TNLPSolver", "initializeOptionsAndJournalist", "Not enough memory");
+  }
+#ifndef NO_CATCH_ALL
+  catch(...){
+    Ipopt::IpoptException E("Uncaught exception in FilterSolver::FilterSolver()",
+                            "BonFilterSolver.cpp",-1);
+    throw E;
+  }
+#endif
+  
+}
+
+
+}//end namespace Bonmin
+
diff --git a/src/Interfaces/BonTNLPSolver.hpp b/src/Interfaces/BonTNLPSolver.hpp
new file mode 100644
index 0000000..322b9bd
--- /dev/null
+++ b/src/Interfaces/BonTNLPSolver.hpp
@@ -0,0 +1,241 @@
+// (C) Copyright International Business Machines (IBM) 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, IBM
+//
+// Date : 26/09/2006
+
+
+#ifndef TNLPSolver_H
+#define TNLPSolver_H
+#include "IpTNLP.hpp"
+#include "BonTMINLP2TNLP.hpp"
+
+//Some declarations
+#include "IpOptionsList.hpp"
+#include "CoinWarmStart.hpp"
+#include "BonRegisteredOptions.hpp"
+#include "CoinTime.hpp"
+namespace Bonmin  {
+/** This is a generic class for calling an NLP solver to solve a TNLP.
+    A TNLPSolver is able to solve and resolve a problem, it has some options (stored
+    with Ipopt OptionList structure and registeredOptions) it produces some statistics (in SolveStatisctics and sometimes some errorCodes.
+*/
+class TNLPSolver: public Ipopt::ReferencedObject{
+ public:
+
+  enum ReturnStatus /** Standard return statuses for a solver*/{
+    iterationLimit = -3/** Solver reached iteration limit. */,
+    timeLimit = 5/** Solver reached iteration limit. */,
+    doesNotConverge = -8/** Algorithm does not converge.*/,
+    computationError = -2/** Some error was made in the computations. */,
+    notEnoughFreedom = -1/** not enough degrees of freedom.*/,
+    illDefinedProblem = -4/** The solver finds that the problem is not well defined. */,
+    illegalOption =-5/** An option is not valid. */,
+    externalException =-6/** Some unrecovered exception occured in an external tool used by the solver. */,
+    exception =-7/** Some unrocevered exception */,
+    solvedOptimal = 1/** Problem solved to an optimal solution.*/,
+    solvedOptimalTol =2/** Problem solved to "acceptable level of tolerance. */,
+    provenInfeasible =3/** Infeasibility Proven. */,
+    unbounded = 4/** Problem is unbounded.*/,
+    numReturnCodes/**Fake member to know size*/
+  };
+
+
+
+//#############################################################################
+
+  /** We will throw this error when a problem is not solved.
+      Eventually store the error code from solver*/
+  class UnsolvedError
+  {
+  public:
+    /** Constructor */
+    UnsolvedError(int errorNum = -10000, 
+                  Ipopt::SmartPtr<TMINLP2TNLP> model = NULL,
+                  std::string name="")
+    :
+     errorNum_(errorNum),
+     model_(model),
+     name_(name)
+    {if(name_=="") 
+{
+#ifndef NDEBUG
+	std::cerr<<"FIXME"<<std::endl;
+#endif
+}}
+    /** Print error message.*/
+    void printError(std::ostream & os);
+    /** Get the string corresponding to error.*/
+    virtual const std::string& errorName() const = 0;
+    /** Return the name of the solver. */
+    virtual const std::string& solverName() const = 0;
+    /** Return error number. */
+    int errorNum() const{
+    return errorNum_;}
+    /** destructor. */
+    virtual ~UnsolvedError(){}
+    /** write files with differences between input model and
+        this one */
+    void writeDiffFiles(const std::string prefix=std::string()) const;
+  private:
+    /** Error code (solver dependent). */
+    int errorNum_;
+
+    /** model_ on which error occured*/
+    Ipopt::SmartPtr< TMINLP2TNLP > model_;
+
+    /** name of the model on which error occured. */
+    std::string name_;
+  }
+  ;
+
+  virtual UnsolvedError * newUnsolvedError(int num,
+					   Ipopt::SmartPtr<TMINLP2TNLP> problem,
+					   std::string name) = 0;
+ 
+
+
+  /// default Constructor
+   TNLPSolver();
+
+  ///Constructor with options initialization
+TNLPSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+           Ipopt::SmartPtr<Ipopt::OptionsList> options,
+           Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+           const std::string & prefix);
+
+  ///virtual copy constructor
+  virtual Ipopt::SmartPtr<TNLPSolver> clone() = 0;
+
+   /// Virtual destructor
+   virtual ~TNLPSolver();
+
+   /** Initialize the TNLPSolver (read options from params_file)
+   */
+   virtual bool Initialize(std::string params_file) = 0;
+
+   /** Initialize the TNLPSolver (read options from istream is)
+   */
+   virtual bool Initialize(std::istream& is) = 0;
+
+   /** @name Solve methods */
+   //@{
+   /// Solves a problem expresses as a TNLP 
+   virtual ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp) = 0;
+
+   /// Resolves a problem expresses as a TNLP 
+   virtual ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp) = 0;
+
+  /// Set the warm start in the solver
+  virtual bool setWarmStart(const CoinWarmStart * warm, 
+                            Ipopt::SmartPtr<TMINLP2TNLP> tnlp) = 0;
+
+/// Get warm start used in last optimization
+  virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const = 0;
+
+  /// Get the warm start form the solver
+  virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const = 0;
+
+  virtual CoinWarmStart * getEmptyWarmStart() const = 0;
+
+  /** Check that warm start object is valid.*/
+  virtual bool warmStartIsValid(const CoinWarmStart * ws) const = 0;  
+
+  /// Enable the warm start options in the solver
+  virtual void enableWarmStart() = 0;
+
+  /// Disable the warm start options in the solver
+  virtual void disableWarmStart() = 0;
+   //@}
+
+  ///Get a pointer to a journalist
+  Ipopt::SmartPtr<Ipopt::Journalist> journalist(){
+    return journalist_;}
+
+   ///Get a pointer to RegisteredOptions (generally used to add new ones)
+   Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions(){
+     return roptions_;}
+
+   /// Get the options (for getting their values).
+   Ipopt::SmartPtr<const Ipopt::OptionsList> options() const {
+     return ConstPtr(options_);}
+
+   /// Get the options (for getting and setting their values).
+   Ipopt::SmartPtr<Ipopt::OptionsList> options() {
+     return options_;}
+
+  /// Get the prefix
+  const char * prefix(){
+    return prefix_.c_str();
+  }
+   /// Register this solver options into passed roptions
+static void RegisterOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){}
+
+   /// Get the CpuTime of the last optimization.
+   virtual double CPUTime() = 0;
+
+   /// Get the iteration count of the last optimization.
+   virtual int IterationCount() = 0;
+
+
+  /// turn off all output from the solver 
+  virtual void setOutputToDefault() = 0 ;
+  /// turn on all output from the solver
+  virtual void forceSolverOutput(int log_level) = 0;
+  /// Get the solver name
+  virtual std::string & solverName() = 0;
+
+    /** Say if an optimization status for a problem which failed is recoverable
+        (problem may be solvable).*/
+  bool isRecoverable(ReturnStatus &r);
+
+  /** Setup for a global time limit for solver.*/
+  void setup_global_time_limit(double time_limit){
+    time_limit_ = time_limit + 5;
+    start_time_ = CoinCpuTime();
+  }
+
+  /** Say if return status is an error.*/
+  bool isError(ReturnStatus &r){
+    return r < 0;}
+  /** Error code (solver specific).*/
+virtual int errorCode() const = 0;
+protected:
+   /** Determine if problem is of dimension zero and if it is check if solution
+       is feasible.*/
+   bool zeroDimension(const Ipopt::SmartPtr<Ipopt::TNLP> &tnlp, 
+		     ReturnStatus &optimization_status);
+
+   /** Initializes options and journalist.*/
+   void initializeOptionsAndJournalist();
+
+    /** Storage of Journalist for output */
+    Ipopt::SmartPtr<Ipopt::Journalist> journalist_;
+    
+    /** List of Options */
+    Ipopt::SmartPtr<Ipopt::OptionsList> options_;
+    
+    /** Registered Options */
+    Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions_;
+   
+    /** Prefix to use for reading bonmin's options.*/
+   std::string prefix_;
+   /** Global start time.*/
+   double start_time_;
+
+   /** Global time limit.*/
+   double time_limit_;
+
+   /** To record default log level.*/
+   int default_log_level_;
+  /// Copy Constructor
+  TNLPSolver(const TNLPSolver & other);
+
+};
+}
+#endif
+
+
diff --git a/src/Interfaces/BonTypes.hpp b/src/Interfaces/BonTypes.hpp
new file mode 100644
index 0000000..2924dfa
--- /dev/null
+++ b/src/Interfaces/BonTypes.hpp
@@ -0,0 +1,102 @@
+#ifndef __BonTypes_H_
+#define __BonTypes_H_
+#include<vector>
+#include "CoinSmartPtr.hpp"
+
+namespace Bonmin {
+/** A small wrap around std::vector to give easy access to array for interfacing with fortran code.*/
+template<typename T>
+class vector : public std::vector<T>{
+public:
+  /** Default constructor.*/
+  vector(): std::vector<T>(){}
+  /** Constructor with initialization.*/
+  vector(size_t n, const T& v): std::vector<T>(n,v){}
+  /** Copy constructor.*/
+  vector(const vector<T>& other): std::vector<T>(other){}
+  /** Copy constructor.*/
+  vector(const std::vector<T>& other): std::vector<T>(other){}
+  /** constructor with size.*/
+  vector(size_t n): std::vector<T>(n){}
+  /** Assignment.*/
+  vector<T>& operator=(const vector<T>& other){
+     std::vector<T>::operator=(other);
+     return (*this);}
+  /** Assignment.*/
+  vector<T>& operator=(const std::vector<T>& other){
+     return std::vector<T>::operator=(other);
+     return (*this);}
+
+/** Access pointer to first element of storage.*/
+inline T* operator()(){
+#if defined(_MSC_VER)
+  if (std::vector<T>::size() == 0)
+    return NULL;
+#endif
+return &std::vector<T>::front();}
+/** Access pointer to first element of storage.*/
+inline const T* operator()() const {
+#if defined(_MSC_VER)
+  if (std::vector<T>::size() == 0)
+    return NULL;
+#endif
+return &std::vector<T>::front();
+}
+};
+
+//structure to store an object of class X in a Coin::ReferencedObject
+template<class X>
+struct SimpleReferenced : public Coin::ReferencedObject {
+ /** The object.*/
+ X object;
+
+ const X& operator()() const{
+   return object;}
+
+ X& operator()() {
+   return object;}
+
+};
+//structure to store a pointer to an object of class X in a 
+// Coin::ReferencedObject
+template<class X>
+struct SimpleReferencedPtr : public Coin::ReferencedObject {
+ /** The object.*/
+ X * object;
+
+ SimpleReferencedPtr():
+   object(NULL){}
+
+ ~SimpleReferencedPtr(){
+   delete object;}
+
+ const X& operator()() const{
+   return *object;}
+
+ X& operator()() {
+   return *object;}
+
+ const X* ptr() const{
+    return object;}
+
+ X* ptr(){
+    return object;}
+};
+
+template <class X>
+SimpleReferenced<X> * make_referenced(X other){
+  SimpleReferenced<X> * ret_val = new SimpleReferenced<X>;
+  ret_val->object = other;
+  return ret_val;
+}
+template <class X>
+SimpleReferencedPtr<X> * make_referenced(X* other){
+  SimpleReferencedPtr <X> * ret_val = new SimpleReferencedPtr<X>;
+  ret_val->object = other;
+  return ret_val;
+}
+
+
+}
+#endif
+
diff --git a/src/Interfaces/BonminConfig.h b/src/Interfaces/BonminConfig.h
new file mode 100644
index 0000000..7f72a32
--- /dev/null
+++ b/src/Interfaces/BonminConfig.h
@@ -0,0 +1,45 @@
+/* Copyright (C) 2011
+ * All Rights Reserved.
+ * This code is published under the Eclipse Public License.
+ *
+ * $Id: BonminConfig.h 1847 2011-06-09 14:16:29Z stefan $
+ *
+ * Include file for the configuration of Bonmin.
+ *
+ * On systems where the code is configured with the configure script
+ * (i.e., compilation is always done with HAVE_CONFIG_H defined), this
+ * header file includes the automatically generated header file, and
+ * undefines macros that might configure with other Config.h files.
+ *
+ * On systems that are compiled in other ways (e.g., with the
+ * Developer Studio), a header files is included to define those
+ * macros that depend on the operating system and the compiler.  The
+ * macros that define the configuration of the particular user setting
+ * (e.g., presence of other COIN-OR packages or third party code) are set
+ * by the files config_*default.h. The project maintainer needs to remember
+ * to update these file and choose reasonable defines.
+ * A user can modify the default setting by editing the config_*default.h files.
+ *
+ */
+
+#ifndef __BONMINCONFIG_H__
+#define __BONMINCONFIG_H__
+
+#ifdef HAVE_CONFIG_H
+#ifdef BONMIN_BUILD
+#include "config.h"
+#else
+#include "config_bonmin.h"
+#endif
+
+#else /* HAVE_CONFIG_H */
+
+#ifdef BONMIN_BUILD
+#include "config_default.h"
+#else
+#include "config_bonmin_default.h"
+#endif
+
+#endif /* HAVE_CONFIG_H */
+
+#endif /*__BONMINCONFIG_H__*/
diff --git a/src/Interfaces/Filter/BonBqpdSolver.cpp b/src/Interfaces/Filter/BonBqpdSolver.cpp
new file mode 100644
index 0000000..28504fd
--- /dev/null
+++ b/src/Interfaces/Filter/BonBqpdSolver.cpp
@@ -0,0 +1,957 @@
+// (C) Copyright International Business Machines Corporation 2007, 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+//                    based on BonFilterSolver.cpp
+//
+// Date : 07/09/2007
+
+#include "BonminConfig.h"
+
+#include "BonBqpdSolver.hpp"
+#include "BonBqpdWarmStart.hpp"
+
+#include "CoinTime.hpp"
+#include <algorithm>
+
+#define InitializeAll
+
+typedef Bonmin::BqpdSolver::fint fint;
+typedef Bonmin::BqpdSolver::real real;
+int Bonmin::BqpdSolver::reinit_freq_ = 0;
+int Bonmin::BqpdSolver::m0de_ = 6;
+extern "C"
+{
+  void F77_FUNC(bqpd,BQPD)(fint* n, fint* m, fint* k, fint* kmax,
+      real* a, fint* la, real* x, real* bl, real* bu,
+      real* f, real* fmin, real* g, real* r, real* w,
+      real* e, fint* ls, real* alp, fint* lp, fint* mlp,
+      fint* peq, real* ws, fint* lws, fint* m0de,
+      fint* ifail, fint* info, fint* iprint, fint* nout);
+
+  //Access to filter common blocks
+  extern struct {
+      fint kk,ll,kkk,lll,mxws,mxlws;
+    }
+  F77_FUNC(wsc,WSC);
+
+  extern struct {
+      real eps,tol,emin;
+    }
+  F77_FUNC(epsc,EPSC);
+
+  extern struct {
+      real sgnf;
+      fint nrep,npiv,nres;
+    }
+  F77_FUNC(repc,REPC);
+
+  extern struct {
+      fint nup,nfreq;
+    }
+  F77_FUNC(refactorc,REFACTORC);
+
+  extern struct {
+      real vstep;
+    }
+  F77_FUNC(vstepc,VSTEPC);
+
+  extern struct {
+      fint phl, phr, phc;
+    }
+  F77_FUNC(hessc,HESSC);
+
+  extern struct {
+      fint scale_mode, phe;
+    }
+  F77_FUNC(scalec,SCALEC);
+
+  extern struct {
+      fint irh1,na,na1,nb,nb1,ka1,kb1,kc1,irg1,lu1,lv,lv1,ll1;
+    }
+  F77_FUNC(bqpdc,BQPDC);
+
+  extern struct {
+      real alpha;
+    }
+  F77_FUNC(alphac,ALPHAC);
+
+  extern struct {
+      fint ns,ns1,nt,nt1,nu,nu1,nx,nx1,np,np1,nprof,lc;
+      fint lc1,li,li1,lm,lm1,lp_,lp1,lq,lq1,lr,lr1,ls_,ls1,lt,lt1;
+    }
+  F77_FUNC(sparsec,SPARSEC);
+
+  extern struct {
+      fint m1,m2,mp,mq,lastr,irow;
+    }
+  F77_FUNC(factorc,FACTORC);
+
+  extern struct {
+      fint mxm1;
+    }
+  F77_FUNC(mxm1c,MXM1C);
+
+  extern struct {
+      real c;
+    }
+  F77_FUNC(minorc,MINORS);
+}
+
+namespace Bonmin
+{
+
+  std::string BqpdSolver::solverName_ = "Bqpd QP";
+
+  void BqpdSolver::
+  registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("Bqpd options",RegisteredOptions::BqpdCategory);
+    roptions->AddLowerBoundedNumberOption("qp_fillin_factor", "Factor for estimating fill-in for factorization method in Bqpd", 0., true, 4.);
+    roptions->AddBoundedIntegerOption("hot_start_m0de", "Choice of the hot start option", 0, 6, 6);
+    roptions->AddLowerBoundedIntegerOption("reinit_freq", "Number of pivots before recopy hot start", 0, 0);
+  }
+
+  BqpdSolver::BqpdSolver(bool createEmpty /* = false */)
+      :
+      TNLPSolver(),
+      cached_(NULL)
+  {
+    if (createEmpty) return;
+  }
+
+  BqpdSolver::BqpdSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+      Ipopt::SmartPtr<Ipopt::OptionsList> options,
+      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+      const std::string & prefix)
+      :
+      TNLPSolver(roptions, options, journalist, prefix),
+      cached_(NULL)
+  {
+    options->GetNumericValue("qp_fillin_factor", fillin_factor_, "bqpd.");
+    options->GetIntegerValue("kmax", kmax_ipt_, "bqpd.");
+    options->GetIntegerValue("mlp", mlp_ipt_,"bqpd.");
+    options->GetIntegerValue("hot_start_m0de", m0de_,"bqpd.");
+    options->GetIntegerValue("reinit_freq", reinit_freq_,"bqpd.");
+     if(!options_->GetIntegerValue("print_level",default_log_level_,""))
+      default_log_level_ = 1;
+
+  }
+
+  Ipopt::SmartPtr <TNLPSolver>
+  BqpdSolver::clone()
+  {
+#ifdef TIME_BQPD
+    times().create -= CoinCpuTime();
+#endif
+    Ipopt::SmartPtr<BqpdSolver> retval = new BqpdSolver(true);
+    *retval->options_ = *options_; // Copy the options
+    retval->roptions_ = roptions_; // only copy pointers of registered options
+    retval->journalist_ = journalist_; // and journalist
+    retval->prefix_ = prefix_;
+    retval->fillin_factor_ = fillin_factor_;
+    retval->kmax_ipt_ = kmax_ipt_;
+    retval->mlp_ipt_ = mlp_ipt_;
+    retval->default_log_level_ = default_log_level_;
+    retval->reinit_freq_ = reinit_freq_;
+    retval->m0de_ = m0de_;
+#ifdef TIME_BQPD
+    times().create += CoinCpuTime();
+#endif
+    return GetRawPtr(retval);
+  }
+
+  BqpdSolver::~BqpdSolver()
+  {}
+
+  bool
+  BqpdSolver::Initialize(std::string optFile)
+  {
+    std::ifstream is;
+    if (optFile != "") {
+      try {
+        is.open(optFile.c_str());
+      }
+      catch (std::bad_alloc) {
+        journalist_->Printf(Ipopt::J_SUMMARY, Ipopt::J_MAIN, "\nEXIT: Not enough memory.\n");
+        return false;
+      }
+      catch (...) {
+        Ipopt::IpoptException E("Unknown Exception caught in ipopt", "Unknown File", -1);
+        E.ReportException(*journalist_);
+        return false;
+      }
+    }
+    bool retval = Initialize(is);
+    if (is) {
+      is.close();
+    }
+    if(!options_->GetIntegerValue("print_level",default_log_level_,""))
+      default_log_level_ = 1;
+    return retval;
+  }
+
+  bool
+  BqpdSolver::Initialize(std::istream &is)
+  {
+    if (is.good()) {
+      options_->ReadFromStream(*journalist_, is);
+    }
+    return true;
+  }
+
+  /// Solves a problem expressed as a TQP
+  TNLPSolver::ReturnStatus
+  BqpdSolver::OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP>& tnlp)
+  {
+    BranchingTQP* tqp = dynamic_cast<BranchingTQP*>(GetRawPtr(tnlp));
+    if (!tqp) {
+      Ipopt::IpoptException E("BqpdSolver called with object other than a BranchingTQP",
+          "BonBqpdSolver.cpp",-1);
+      throw E;
+    }
+    if (IsNull(cached_) || !cached_->use_warm_start_in_cache_) {
+      cached_ = new cachedInfo(tqp, options_, kmax_ipt_, mlp_ipt_,
+			       &fillin_factor_);
+    }
+#ifdef TIME_BQPD
+    times().solve -= CoinCpuTime();
+#endif
+    TNLPSolver::ReturnStatus r_val = callOptimizer();
+#ifdef TIME_BQPD
+    times().solve += CoinCpuTime();
+#endif
+    return r_val;
+  }
+
+/// Solves a problem expresses as a TNLP
+  TNLPSolver::ReturnStatus
+  BqpdSolver::ReOptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp)
+  {
+#ifndef NDEBUG
+    BranchingTQP* tqp = dynamic_cast<BranchingTQP*>(GetRawPtr(tnlp));
+    assert(tqp == GetRawPtr(cached_->tqp_));
+#endif
+    int n = cached_->n;
+    int m = cached_->m;
+    tnlp->get_bounds_info(n, cached_->bl, cached_->bu,
+        m, cached_->bl+n, cached_->bu+n);
+    // Make sure bounds are not infinity
+    for (int i=0; i<n+m; i++) {
+      cached_->bl[i] = std::max(cached_->bl[i], -1e50);
+      cached_->bu[i] = std::min(cached_->bu[i], 1e50);
+    }
+
+#if 1
+    cached_->use_warm_start_in_cache_ = true;  // Trying...
+    cached_->m0de = m0de_;
+#else
+    cached_->re_initialize();
+    cached_->use_warm_start_in_cache_ = true;  // Trying...
+#endif
+
+#ifdef TIME_BQPD
+    times().resolve -= CoinCpuTime();
+#endif
+    TNLPSolver::ReturnStatus r_val = callOptimizer();
+#ifdef TIME_BQPD
+    times().resolve += CoinCpuTime();
+#endif
+    return r_val;
+  }
+
+  void
+  BqpdSolver::cachedInfo::initialize(const Ipopt::SmartPtr<BranchingTQP> & tqp,
+				     Ipopt::SmartPtr<Ipopt::OptionsList>& options,
+				     int kmax_ipt,
+				     int mlp_ipt,
+				     double* fillin_factor)
+  {
+    // Maybe a dirty trick?  We want to change fillin_factor in calling object
+    fillin_factor_ = fillin_factor;
+
+    // In case BQPD's BLOCK DATA doesn't work, we initialize the COMMON
+    // BLOCKs explicitly here
+    F77_FUNC(epsc,EPSC).eps = 1111e-19;
+    F77_FUNC(epsc,EPSC).tol = 1e-12;
+    F77_FUNC(epsc,EPSC).emin = 1.;
+    F77_FUNC(repc,REPC).sgnf = 1e-4;
+    F77_FUNC(repc,REPC).nrep = 2;
+    F77_FUNC(repc,REPC).npiv = 3;
+    F77_FUNC(repc,REPC).nres = 2;
+    F77_FUNC(refactorc,REFACTORC).nfreq = 500;
+
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    Ipopt::Index nv, nc, nnz_jac_g, nnz_hess;
+    tqp->get_nlp_info(nv, nc, nnz_jac_g, nnz_hess, index_style);
+    n = nv;
+    m = nc;
+
+    if (kmax_ipt == -1) {
+      kmax = n;
+    }
+    else {
+      kmax = kmax_ipt;
+      kmax = std::min(kmax,n);
+    }
+    mlp = mlp_ipt;
+
+    use_warm_start_in_cache_ = false;
+
+    // Get space for arrays
+    x = new real[n];
+    bl = new real[n+m];
+    bu = new real[n+m];
+    g = new real[n];
+    r = new real[n+m];
+    w = new real[n+m];
+    e = new real[n+m];
+    ls = new fint[n+m];
+    alp = new real[mlp];
+    lp = new fint[mlp];
+
+    // Getting the bounds
+    tqp->get_bounds_info(n, bl, bu, m, bl+n, bu+n);
+
+    // Make sure bounds are not infinity
+    for (int i=0; i<n+m; i++) {
+      bl[i] = std::max(bl[i], -1e50);
+      bu[i] = std::min(bu[i], 1e50);
+    }
+
+    // Set up sparse matrix with objective gradient and constraint Jacobian
+
+    const Ipopt::Number* obj_grad = tqp->ObjGrad();
+    amax_ = nnz_jac_g;
+    for (int i = 0; i<n; i++) {
+      if (obj_grad[i]!=0.) {
+        amax_++;
+      }
+    }
+    int lamax = amax_+m+2;
+    a = new real[amax_];
+    la = new fint [1+lamax];
+
+    // Objective function gradient
+    int nnz_grad = 0;
+    for (int i = 0; i < n ; i++) {
+      if (obj_grad[i]!=0.) {
+        a[nnz_grad] = obj_grad[i];
+        la[++nnz_grad] = i+1;
+      }
+    }
+    la[amax_+1] = 1;
+
+    // Constraint Jacobian
+    const Ipopt::Number* JacVals = tqp->ConstrJacVals();
+    const Ipopt::Index* RowJac = tqp->ConstrJacIRow();
+    const Ipopt::Index* ColJac = tqp->ConstrJacJCol();
+
+    int* permutationJac = new int [nnz_jac_g];
+    FilterSolver::TMat2RowPMat(false, n, m, nnz_jac_g,  RowJac, ColJac, permutationJac,
+        la, nnz_grad, 1, Ipopt::TNLP::C_STYLE);
+    for (int i=0; i<nnz_jac_g; i++) {
+      const int& indice = permutationJac[i];
+      a[nnz_grad+i] = JacVals[indice];
+    }
+    delete [] permutationJac;
+#if 0
+//deleteme
+    printf("nnz_grad = %d nnz_jac = %d\n", nnz_grad, nnz_jac_g);
+    for (int i=0; i<1+lamax; i++) printf("la[%2d] = %d\n", i,la[i]);
+    for (int i=0; i<amax_; i++) printf("a[%3d] = %e\n",i,a[i]);
+#endif
+
+    // Setup workspaces
+    mxws = nnz_hess + ((kmax*(kmax+9))/2 + 2*n + m) + (5*n + (int)(*fillin_factor_*(double)amax_));
+    mxlws = (nnz_hess + n + 2) + kmax + (9*n + m);
+
+    ws = new real[mxws];
+    lws = new fint[mxlws];
+
+#ifdef InitializeAll
+    for (int i=0; i<mxws; i++) {
+      ws[i] = 42.;
+    }
+    for (int i=0; i<mxlws; i++) {
+      lws[i] = 55;
+    }
+#endif
+
+    // Now setup Hessian
+    const Ipopt::Number* HessVals = tqp->ObjHessVals();
+    const Ipopt::Index* RowHess = tqp->ObjHessIRow();
+    const Ipopt::Index* ColHess = tqp->ObjHessJCol();
+
+    kk = nnz_hess;
+    ll = nnz_hess + n + 2;
+    int* permutationHess = new int[nnz_hess];
+
+    FilterSolver::TMat2RowPMat(true, n, n, nnz_hess, RowHess, ColHess,
+        permutationHess, lws, 0, 0, Ipopt::TNLP::C_STYLE);
+    for (int i=0; i<nnz_hess; i++) {
+      ws[i] = HessVals[permutationHess[i]];
+    }
+    delete [] permutationHess;
+#if 0
+//deleteme
+    printf("nnz_hess = %d\n", nnz_hess);
+    for (int i=0; i<ll; i++) printf("hess lws[%2d] = %d\n", i,lws[i]);
+    for (int i=0; i<kk; i++) printf("hess ws[%3d] = %e\n",i,ws[i]);
+#endif
+
+    Ipopt::Index bufy;
+    options->GetIntegerValue("iprint",bufy, "bqpd.");
+    iprint = bufy;
+    nout = 6;
+
+    tqp_ = tqp;
+  }
+
+  void
+  BqpdSolver::cachedInfo::re_initialize()
+  {
+    use_warm_start_in_cache_ = false;
+
+    // Setup workspaces
+    for (int i=0; i<mxws; i++) {
+      ws[i] = 42.;
+    }
+    for (int i=0; i<mxlws; i++) {
+      lws[i] = 55;
+    }
+  }
+
+/// Solves a problem expresses as a TNLP
+  TNLPSolver::ReturnStatus BqpdSolver::callOptimizer() {
+#ifdef TIME_BQPD
+    times().numsolve++;
+#endif
+    cached_->optimize();
+
+    TNLPSolver::ReturnStatus optimizationStatus = TNLPSolver::exception;
+    Ipopt::SolverReturn status = Ipopt::INTERNAL_ERROR;
+    fint ifail = cached_->ifail;
+    switch (ifail) {
+    case 0:
+      optimizationStatus = TNLPSolver::solvedOptimal;
+      status = Ipopt::SUCCESS;
+      break;
+    case 1:
+      optimizationStatus = TNLPSolver::unbounded;
+      status = Ipopt::DIVERGING_ITERATES;
+    case 2:
+    case 3:
+      optimizationStatus = TNLPSolver::provenInfeasible;
+      status = Ipopt::LOCAL_INFEASIBILITY;
+      break;
+    }
+
+    Ipopt::Index dummy_len = std::max(cached_->n,cached_->m);
+    Ipopt::Number* dummy = new Ipopt::Number[dummy_len];
+    for (int i=0; i<dummy_len; i++) {
+      dummy[i] = 0.;
+    }
+
+    cached_->tqp_->finalize_solution(status, cached_->n,
+        cached_->x, dummy, dummy,
+        cached_->m, dummy, dummy,
+        cached_->f, NULL, NULL);
+    delete [] dummy;
+    return optimizationStatus;
+  }
+
+  BqpdSolver::cachedInfo::~cachedInfo()
+  {
+    if (haveHotStart_) {
+      unmarkHotStart();
+    }
+    delete [] a;
+    delete [] la;
+    delete [] x;
+    delete [] bl;
+    delete [] bu;
+    delete [] g;
+    delete [] r;
+    delete [] w;
+    delete [] e;
+    delete [] ls;
+    delete [] alp;
+    delete [] lp;
+    delete [] ws;
+    delete [] lws;
+  }
+
+  bool
+  BqpdSolver::cachedInfo::markHotStart()
+  {
+     next_reinit_ = BqpdSolver::reinit_freq_; 
+#ifdef DISABLE_COPYING
+     return 1;
+#endif
+#ifdef TIME_BQPD
+    times_.warm_start -= CoinCpuTime();
+#endif
+    haveHotStart_ = true;
+    irh1 = F77_FUNC(bqpdc,BQPDC).irh1;
+    na = F77_FUNC(bqpdc,BQPDC).na;
+    na1 = F77_FUNC(bqpdc,BQPDC).na1;
+    nb = F77_FUNC(bqpdc,BQPDC).nb;
+    nb1 = F77_FUNC(bqpdc,BQPDC).nb1;
+    ka1 = F77_FUNC(bqpdc,BQPDC).ka1;
+    kb1 = F77_FUNC(bqpdc,BQPDC).kb1;
+    kc1 = F77_FUNC(bqpdc,BQPDC).kc1;
+    irg1 = F77_FUNC(bqpdc,BQPDC).irg1;
+    lu1 = F77_FUNC(bqpdc,BQPDC).lu1;
+    lv = F77_FUNC(bqpdc,BQPDC).lv;
+    lv1 = F77_FUNC(bqpdc,BQPDC).lv1;
+    ll1 = F77_FUNC(bqpdc,BQPDC).ll1;
+    eps = F77_FUNC(epsc,EPSC).eps;
+    tol = F77_FUNC(epsc,EPSC).tol;
+    emin = F77_FUNC(epsc,EPSC).emin;
+    vstep = F77_FUNC(vstepc,VSTEPC).vstep;
+    sgnf = F77_FUNC(repc,REPC).sgnf;
+    nrep = F77_FUNC(repc,REPC).nrep;
+    npiv = F77_FUNC(repc,REPC).npiv;
+    nres = F77_FUNC(repc,REPC).nres;
+    nup = F77_FUNC(refactorc,REFACTORC).nup;
+    nfreq = F77_FUNC(refactorc,REFACTORC).nfreq;
+    alpha = F77_FUNC(alphac,ALPHAC).alpha;
+
+    ns = F77_FUNC(sparsec,SPARSEC).ns;
+    ns1 = F77_FUNC(sparsec,SPARSEC).ns1;
+    nt = F77_FUNC(sparsec,SPARSEC).nt;
+    nt1 = F77_FUNC(sparsec,SPARSEC).nt1;
+    nu = F77_FUNC(sparsec,SPARSEC).nu;
+    nu1 = F77_FUNC(sparsec,SPARSEC).nu1;
+    nx = F77_FUNC(sparsec,SPARSEC).nx;
+    nx1 = F77_FUNC(sparsec,SPARSEC).nx1;
+    np = F77_FUNC(sparsec,SPARSEC).np;
+    np1 = F77_FUNC(sparsec,SPARSEC).np1;
+    nprof = F77_FUNC(sparsec,SPARSEC).nprof;
+    lc = F77_FUNC(sparsec,SPARSEC).lc;
+    lc1 = F77_FUNC(sparsec,SPARSEC).lc1;
+    li = F77_FUNC(sparsec,SPARSEC).li;
+    li1 = F77_FUNC(sparsec,SPARSEC).li1;
+    lm = F77_FUNC(sparsec,SPARSEC).lm;
+    lm1 = F77_FUNC(sparsec,SPARSEC).lm1;
+    lp_ = F77_FUNC(sparsec,SPARSEC).lp_;
+    lp1 = F77_FUNC(sparsec,SPARSEC).lp1;
+    lq = F77_FUNC(sparsec,SPARSEC).lq;
+    lq1 = F77_FUNC(sparsec,SPARSEC).lq1;
+    lr = F77_FUNC(sparsec,SPARSEC).lr;
+    lr1 = F77_FUNC(sparsec,SPARSEC).lr1;
+    ls_ = F77_FUNC(sparsec,SPARSEC).ls_;
+    ls1 = F77_FUNC(sparsec,SPARSEC).ls1;
+    lt = F77_FUNC(sparsec,SPARSEC).lt;
+    lt1 = F77_FUNC(sparsec,SPARSEC).lt1;
+
+    m1 = F77_FUNC(factorc,FACTORC).m1;
+    m2 = F77_FUNC(factorc,FACTORC).m2;
+    mp = F77_FUNC(factorc,FACTORC).mp;
+    mq = F77_FUNC(factorc,FACTORC).mq;
+    lastr = F77_FUNC(factorc,FACTORC).lastr;
+    irow = F77_FUNC(factorc,FACTORC).irow;
+
+    mxm1 = F77_FUNC(mxm1c,MXM1c).mxm1;
+    c = F77_FUNC(minorc,MINORC).c;
+
+    kkHot = F77_FUNC(wsc,WSC).kk;
+    kkkHot = F77_FUNC(wsc,WSC).kkk;
+    llHot = F77_FUNC(wsc,WSC).ll;
+    lllHot = F77_FUNC(wsc,WSC).lll;
+
+    kHot = k;
+    xHot = CoinCopyOfArray(x,n);
+    fHot = f;
+    gHot = CoinCopyOfArray(g,n);
+    rHot = CoinCopyOfArray(r,n+m);
+    wHot = CoinCopyOfArray(w,n+m);
+    eHot = CoinCopyOfArray(e,n+m);
+    lsHot = CoinCopyOfArray(ls,n+m);
+    alpHot = CoinCopyOfArray(alp,mlp);
+    lpHot = CoinCopyOfArray(lp,mlp);
+    peqHot = peq;
+    wsHot = CoinCopyOfArray(ws,mxws);
+    lwsHot = CoinCopyOfArray(lws,mxlws);
+    infoHot[0] = info[0];
+#ifdef TIME_BQPD
+    times_.warm_start += CoinCpuTime();
+#endif
+
+    return true;
+  }
+
+  void
+  BqpdSolver::cachedInfo::copyFromHotStart()
+  {
+#ifdef DISABLE_COPYING
+    return;
+#endif
+#ifdef TIME_BQPD
+    times_.warm_start -= CoinCpuTime();
+#endif
+    F77_FUNC(bqpdc,BQPDC).irh1 = irh1;
+    F77_FUNC(bqpdc,BQPDC).na = na;
+    F77_FUNC(bqpdc,BQPDC).na1 = na1;
+    F77_FUNC(bqpdc,BQPDC).nb = nb;
+    F77_FUNC(bqpdc,BQPDC).nb1 = nb1;
+    F77_FUNC(bqpdc,BQPDC).ka1 = ka1;
+    F77_FUNC(bqpdc,BQPDC).kb1 = kb1;
+    F77_FUNC(bqpdc,BQPDC).kc1 = kc1;
+    F77_FUNC(bqpdc,BQPDC).irg1 = irg1;
+    F77_FUNC(bqpdc,BQPDC).lu1 = lu1;
+    F77_FUNC(bqpdc,BQPDC).lv = lv;
+    F77_FUNC(bqpdc,BQPDC).lv1 = lv1;
+    F77_FUNC(bqpdc,BQPDC).ll1 = ll1;
+    F77_FUNC(epsc,EPSC).eps = eps;
+    F77_FUNC(epsc,EPSC).tol = tol;
+    F77_FUNC(epsc,EPSC).emin = emin;
+    F77_FUNC(vstepc,VSTEPC).vstep = vstep;
+    F77_FUNC(repc,REPC).sgnf = sgnf;
+    F77_FUNC(repc,REPC).nrep = nrep;
+    F77_FUNC(repc,REPC).npiv = npiv;
+    F77_FUNC(repc,REPC).nres = nres;
+    F77_FUNC(refactorc,REFACTORC).nup = nup;
+    F77_FUNC(refactorc,REFACTORC).nfreq = nfreq;
+    F77_FUNC(alphac,ALPHAC).alpha = alpha;
+
+    F77_FUNC(sparsec,SPARSEC).ns = ns;
+    F77_FUNC(sparsec,SPARSEC).ns1 = ns1;
+    F77_FUNC(sparsec,SPARSEC).nt = nt;
+    F77_FUNC(sparsec,SPARSEC).nt1 = nt1;
+    F77_FUNC(sparsec,SPARSEC).nu = nu;
+    F77_FUNC(sparsec,SPARSEC).nu1 = nu1;
+    F77_FUNC(sparsec,SPARSEC).nx = nx;
+    F77_FUNC(sparsec,SPARSEC).nx1 = nx1;
+    F77_FUNC(sparsec,SPARSEC).np = np;
+    F77_FUNC(sparsec,SPARSEC).np1 = np1;
+    F77_FUNC(sparsec,SPARSEC).nprof = nprof;
+    F77_FUNC(sparsec,SPARSEC).lc = lc;
+    F77_FUNC(sparsec,SPARSEC).lc1 = lc1;
+    F77_FUNC(sparsec,SPARSEC).li = li;
+    F77_FUNC(sparsec,SPARSEC).li1 = li1;
+    F77_FUNC(sparsec,SPARSEC).lm = lm;
+    F77_FUNC(sparsec,SPARSEC).lm1 = lm1;
+    F77_FUNC(sparsec,SPARSEC).lp_ = lp_;
+    F77_FUNC(sparsec,SPARSEC).lp1 = lp1;
+    F77_FUNC(sparsec,SPARSEC).lq = lq;
+    F77_FUNC(sparsec,SPARSEC).lq1 = lq1;
+    F77_FUNC(sparsec,SPARSEC).lr = lr;
+    F77_FUNC(sparsec,SPARSEC).lr1 = lr1;
+    F77_FUNC(sparsec,SPARSEC).ls_ = ls_;
+    F77_FUNC(sparsec,SPARSEC).ls1 = ls1;
+    F77_FUNC(sparsec,SPARSEC).lt = lt;
+    F77_FUNC(sparsec,SPARSEC).lt1 = lt1;
+
+    F77_FUNC(factorc,FACTORC).m1 = m1;
+    F77_FUNC(factorc,FACTORC).m2 = m2;
+    F77_FUNC(factorc,FACTORC).mp = mp;
+    F77_FUNC(factorc,FACTORC).mq = mq;
+    F77_FUNC(factorc,FACTORC).lastr = lastr;
+    F77_FUNC(factorc,FACTORC).irow = irow;
+
+    F77_FUNC(mxm1c,MXM1c).mxm1 = mxm1;
+    F77_FUNC(minorc,MINORC).c = c;
+
+    F77_FUNC(wsc,WSC).kk = kkHot;
+    F77_FUNC(wsc,WSC).kkk = kkkHot;
+    F77_FUNC(wsc,WSC).ll = llHot;
+    F77_FUNC(wsc,WSC).lll = lllHot;
+
+    k = kHot;
+    CoinCopyN(xHot,n,x);
+    f = fHot;
+    CoinCopyN(gHot,n,g);
+    CoinCopyN(rHot,n+m,r);
+    CoinCopyN(wHot,n+m,w);
+    CoinCopyN(eHot,n+m,e);
+    CoinCopyN(lsHot,n+m,ls);
+    CoinCopyN(alpHot,mlp,alp);
+    CoinCopyN(lpHot,mlp,lp);
+    CoinCopyN(wsHot,mxws,ws);
+    CoinCopyN(lwsHot,mxlws,lws);
+    info[0] = infoHot[0];
+    peq = peqHot;
+#ifdef TIME_BQPD
+    times_.warm_start += CoinCpuTime();
+#endif
+
+  }
+
+  void
+  BqpdSolver::cachedInfo::unmarkHotStart()
+  {
+    delete [] xHot;
+    delete [] gHot;
+    delete [] rHot;
+    delete [] wHot;
+    delete [] eHot;
+    delete [] lsHot;
+    delete [] alpHot;
+    delete [] lpHot;
+    delete [] wsHot;
+    delete [] lwsHot;
+    haveHotStart_ = false;
+  }
+
+  /** Optimize problem described by cache with Bqpd.*/
+  void
+  BqpdSolver::cachedInfo::optimize()
+  {
+    // Set up some common block stuff
+    F77_FUNC(scalec,SCALEC).scale_mode = 0;  // No scaling
+    F77_FUNC(scalec,SCALEC).phe = 0;  // No scaling
+    F77_FUNC(hessc,HESSC).phl = 1; // This is to tell gdotx to do the right thing
+    F77_FUNC(wsc,WSC).kk = kk;
+    F77_FUNC(wsc,WSC).ll = ll;
+    F77_FUNC(wsc,WSC).mxws = mxws;
+    F77_FUNC(wsc,WSC).mxlws = mxlws;
+
+    if (use_warm_start_in_cache_ && !bad_warm_start_info_) {
+      ifail = 0;
+      use_warm_start_in_cache_ = false;
+      if (haveHotStart_ && pivots_ > next_reinit_) {
+        //printf("Reinitialize hot start\n");
+        copyFromHotStart();
+        while (BqpdSolver::reinit_freq_ > 0&& next_reinit_ < pivots_)
+          next_reinit_ += BqpdSolver::reinit_freq_;
+      }
+    }
+    else {
+      m0de = 0;
+      tqp_->get_starting_point(n, 1, x, 0, NULL, NULL, m, 0, NULL);
+      ifail = 0;
+      bad_warm_start_info_ = false;
+    }
+
+#if 0
+    printf("========= 222222222222 =============\n");
+    printf("kk = %d ll = %d mxws = %d mxlws = %d\n", kk, ll, mxws, mxlws);
+    for (int i=0; i<n; i++) {
+      printf("xL[%3d] = %15.8e  xU[%3d] = %15.8e\n", i, bl[i], i, bu[i]);
+    }
+    for (int i=0; i<m; i++) {
+      printf("gL[%3d] = %15.8e  gU[%3d] = %15.8e\n", i, bl[n+i], i, bu[n+i]);
+    }
+#endif
+    cpuTime_ = - CoinCpuTime();
+    real fmin = -1e100;
+#if 0
+    for (int i=0; i<n; i++) {
+      printf("qxstart[%2d] = %23.16e\n", i, x[i]);
+    }
+#endif
+//#define WRITE_QPS
+#ifdef WRITE_QPS
+    if (m0de==0) {
+      FILE* fp = fopen("QPinit.dat", "w");
+      fprintf(fp, "n = %d\n", n);
+      fprintf(fp, "m = %d\n", m);
+      fprintf(fp, "kmax = %d\n", kmax);
+      fprintf(fp, "amax = %d\n" ,amax_);
+      for (int i=1; i<=amax_; i++) {
+        fprintf(fp, "a = %23.16e\n", a[i-1]);
+      }
+      int lamax = amax_ + m + 2;
+      fprintf(fp, "lamax = %d\n" ,lamax);
+      for (int i=1; i<=lamax+1; i++) {
+        fprintf(fp, "la = %6d\n", la[i-1]);
+      }
+      for (int i=1; i<=n; i++) {
+        fprintf(fp, "x = %23.16e\n", x[i-1]);
+      }
+      for (int i=1; i<=n+m; i++) {
+        fprintf(fp, "bl = %23.16e\n", bl[i-1]);
+      }
+      for (int i=1; i<=n+m; i++) {
+        fprintf(fp, "bu = %23.16e\n", bu[i-1]);
+      }
+      fprintf(fp, "fmin = %23.16e\n", fmin);
+      fprintf(fp, "mlp = %6d\n", mlp);
+      fprintf(fp, "mxws = %d\n", mxws);
+      fprintf(fp, "mxlws = %d\n", mxlws);
+      fclose(fp);
+    }
+    else {
+      FILE* fp = fopen("QPbounds.dat", "w");
+       fprintf(fp, "m0de = %d\n", m0de);
+      for (int i=1; i<=n+m; i++) {
+        fprintf(fp, "bl = %23.16e\n", bl[i-1]);
+      }
+      for (int i=1; i<=n+m; i++) {
+        fprintf(fp, "bu = %23.16e\n", bu[i-1]);
+      }
+      fclose(fp);
+    }
+#endif
+    F77_FUNC(bqpd,BQPD)(&n, &m, &k, &kmax, a, la, x, bl, bu, &f, &fmin,
+        g, r, w, e, ls, alp, lp, &mlp, &peq, ws, lws,
+        &m0de, &ifail, info, &iprint, &nout);
+#ifdef TIME_BQPD
+    times_.pivots += info[0];
+#endif
+    pivots_ += info[0];
+    if(BqpdSolver::reinit_freq_ > 0 && haveHotStart_ && (ifail == 7 || ifail == 8) && m0de == 6){
+      fprintf(stdout, "Reinitialize hot start...\n");
+      copyFromHotStart();
+      ifail = 0;
+      F77_FUNC(bqpd,BQPD)(&n, &m, &k, &kmax, a, la, x, bl, bu, &f, &fmin,
+			  g, r, w, e, ls, alp, lp, &mlp, &peq, ws, lws,
+			  &m0de, &ifail, info, &iprint, &nout);
+      printf("new ifail = %d\n", ifail);
+    }
+    if (ifail == 8 && BqpdSolver::m0de_ == 6) {
+      fprintf(stdout, "Restarting Bqpd...");
+      m0de = 0;
+      tqp_->get_starting_point(n, 1, x, 0, NULL, NULL, m, 0, NULL);
+      ifail = 0;
+      F77_FUNC(bqpd,BQPD)(&n, &m, &k, &kmax, a, la, x, bl, bu, &f, &fmin,
+			  g, r, w, e, ls, alp, lp, &mlp, &peq, ws, lws,
+			  &m0de, &ifail, info, &iprint, &nout);
+      printf("new ifail = %d\n", ifail);
+    }
+    while (ifail == 7) {
+      // FIXME: For now, we just disable hot starts in case they were active
+      if (haveHotStart_) unmarkHotStart();
+
+      printf("Increasing fillin_factor from %e ", *fillin_factor_);
+      *fillin_factor_ *= 2.;
+      printf("to %e\n", *fillin_factor_);
+      int mxws_new = kk + F77_FUNC(wsc,WSC).kkk + (5*n + (int)(*fillin_factor_*(double)amax_));
+      real* ws_new = new real[mxws_new];
+#ifdef InitializeAll
+      for (int i=0; i<mxws_new; i++) {
+	ws_new[i] = 42.;
+      }
+#endif
+      CoinCopyN(ws, kk, ws_new);
+      delete [] ws;
+      ws = ws_new;
+      mxws = mxws_new;
+      F77_FUNC(wsc,WSC).mxws = mxws;
+
+      m0de = 0;
+      tqp_->get_starting_point(n, 1, x, 0, NULL, NULL, m, 0, NULL);
+      ifail = 0;
+      F77_FUNC(bqpd,BQPD)(&n, &m, &k, &kmax, a, la, x, bl, bu, &f, &fmin,
+			  g, r, w, e, ls, alp, lp, &mlp, &peq, ws, lws,
+			  &m0de, &ifail, info, &iprint, &nout);
+    }
+    if (ifail == 8) bad_warm_start_info_ = true;
+#if 0
+    for (int i=0; i<n; i++) {
+      printf("qxsol[%2d] = %23.16e\n", i, x[i]);
+    }
+#endif
+#if 0
+    printf("ifail = %d\n", ifail);
+    printf("final f = %e\n", f);
+    printf("final f + obj_val = %e\n", f+tqp_->ObjVal());
+#endif
+#if 0
+    int kkk = F77_FUNC(wsc,WSC).kkk;
+    int lll = F77_FUNC(wsc,WSC).lll;
+    printf("========= 3333333333 =============\n");
+    printf("kk = %d ll = %d kkk = %d lll = %d mxws = %d mxlws = %d\n", kk, ll, kkk, lll, mxws, mxlws);
+    for (int i=0; i<kk+kkk; i++) {
+      printf("ws[%3d] = %15.8e\n ", i, ws[i]);
+    }
+    printf("--------\n");
+    for (int i=kk+kkk; i<mxws; i++) {
+      printf("ws[%3d] = %15.8e\n ", i, ws[i]);
+    }
+    for (int i=0; i<ll+lll; i++) {
+      printf("lws[%5d] = %8d\n", i, lws[i]);
+    }
+    printf("------\n");
+    for (int i=ll+lll; i<mxlws; i++) {
+      printf("lws[%5d] = %8d\n", i, lws[i]);
+    }
+#endif
+    cpuTime_ += CoinCpuTime();
+  }
+
+  std::string
+  BqpdSolver::UnsolvedBqpdError::errorNames_[1] =
+    {"Internal error in Filter SQP."};
+
+  std::string
+  BqpdSolver::UnsolvedBqpdError::solverName_ =
+    "filterSqp";
+
+  const std::string&
+  BqpdSolver::UnsolvedBqpdError::errorName() const
+  {
+    return errorNames_[0];
+  }
+
+  const std::string&
+  BqpdSolver::UnsolvedBqpdError::solverName() const
+  {
+    return solverName_;
+  }
+
+  bool
+  BqpdSolver::setWarmStart(const CoinWarmStart * warm,
+      Ipopt::SmartPtr<TMINLP2TNLP> tnlp)
+  {
+#if 0
+    if (IsNull(cached_)) {
+      cached_ = new cachedInfo(GetRawPtr(tnlp), options_);
+    }
+
+    const FilterWarmStart * warmF = dynamic_cast<const FilterWarmStart *> (warm);
+    //CoinCopyN(warmF->xArray(), warmF->xSize(), cached_->x);
+    const fint xsize = warmF->xSize();
+    real* x = cached_->x;
+    const real* xarray = warmF->xArray();
+    for (int i = 0; i<xsize; i++) {
+      x[i] = xarray[i];
+    }
+    CoinCopyN(warmF->lamArray(), warmF->lamSize(), cached_->lam);
+    CoinCopyN(warmF->lwsArray(), warmF->lwsSize(), cached_->lws);
+    for (int i = 0 ; i < 14 ; i ++) {
+      cached_->istat[i] = warmF->istat()[i];
+    }
+    cached_->use_warm_start_in_cache_ = true;
+#endif
+    printf("BqpdSolver::setWarmStart called!\n");
+    return true;
+  }
+
+  CoinWarmStart *
+  BqpdSolver::getWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const
+  {
+#if 0
+    return new FilterWarmStart(cached_->n, cached_->x,
+        cached_->n+cached_->m, cached_->lam,
+        cached_->maxiWk, cached_->lws, cached_->istat);
+#endif
+    printf("BqpdSolver::getWarmStart called!\n");
+    return NULL;
+  }
+
+  CoinWarmStart *
+  BqpdSolver::getEmptyWarmStart() const
+  {
+#if 0
+    return new FilterWarmStart;
+#endif
+    printf("BqpdSolver::getEmptyWarmStart called \n");
+    return NULL;
+  }
+
+  /** Check that warm start object is valid.*/
+  bool 
+  BqpdSolver::warmStartIsValid(const CoinWarmStart * ws) const{
+    const BqpdWarmStart* bws = dynamic_cast<const BqpdWarmStart*>(ws);
+    if (bws && ! bws->empty()) {
+      return true;
+    }
+    return false;
+  }
+
+}//end namespace Bonmin
diff --git a/src/Interfaces/Filter/BonBqpdSolver.hpp b/src/Interfaces/Filter/BonBqpdSolver.hpp
new file mode 100644
index 0000000..7e79bbc
--- /dev/null
+++ b/src/Interfaces/Filter/BonBqpdSolver.hpp
@@ -0,0 +1,423 @@
+// (C) Copyright International Business Machines Corporation, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+//                    based on BonFilterSolver.cpp
+//
+// Date : 07/09/2007
+
+#ifndef BonBqpdSolver_H
+#define BonBqpdSolver_H
+
+#include "BonTNLPSolver.hpp"
+#include "BonBranchingTQP.hpp"
+
+//#define TIME_BQPD
+namespace Bonmin
+{
+  class BqpdSolver : public TNLPSolver
+  {
+  public:
+    friend class FilterSolver;
+
+
+  class UnsolvedBqpdError: public TNLPSolver::UnsolvedError
+    {
+    public:
+      UnsolvedBqpdError(int errorNum,
+          Ipopt::SmartPtr<TMINLP2TNLP> model,
+          const std::string &name):
+          TNLPSolver::UnsolvedError(errorNum, model, name)
+      {}
+      virtual const std::string& errorName() const;
+
+      virtual const std::string& solverName() const;
+      virtual ~UnsolvedBqpdError()
+      {}
+
+    private:
+      static std::string errorNames_[1];
+      static std::string solverName_;
+    };
+
+    /** Fortran type for integer used in filter. */
+    typedef ipfint fint;
+    /** Fortran type for double.used in filter */
+    typedef double real;
+
+    virtual UnsolvedError*
+    newUnsolvedError(int num,
+        Ipopt::SmartPtr<TMINLP2TNLP> problem,
+        std::string name)
+    {
+      return new UnsolvedBqpdError(num, problem, name);
+    }
+
+    ///Default constructor
+    BqpdSolver(bool createEmpty = false);
+
+    /// Constructor with passed journalist, roptions, options.
+    BqpdSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+        const std::string & prefix
+              );
+
+    ///destructor
+    virtual ~BqpdSolver();
+
+    /** Initialize the TNLPSolver (read options from params_file)
+     */
+    virtual bool Initialize(std::string params_file);
+
+    /** Initialize the TNLPSolver (read options from istream is)
+     */
+    virtual bool Initialize(std::istream& is);
+
+    /** @name Solve methods */
+    //@{
+    /// Solves a problem expresses as a TNLP
+    virtual ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp);
+
+    /// Resolves a problem expresses as a TNLP
+    virtual ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp);
+
+    /// Set the warm start in the solver
+    virtual bool setWarmStart(const CoinWarmStart * warm,
+        Ipopt::SmartPtr<TMINLP2TNLP> tnlp);
+
+    /// Safe the current state (after most recent solve that must have
+    /// been successful) as hot start information and use that for all
+    /// further solves, until unmarkHotStart is called.
+    virtual bool markHotStart(){return cached_->markHotStart();}
+
+    /// Get warm start used in last optimization
+    virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const{
+      throw CoinError(__PRETTY_FUNCTION__,"","Not implemented");
+    }
+
+    /// Get the warm start form the solver
+    virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const;
+
+    virtual CoinWarmStart * getEmptyWarmStart() const;
+
+    /** Check that warm start object is valid.*/
+    virtual bool warmStartIsValid(const CoinWarmStart * ws) const;
+
+    virtual void enableWarmStart()
+    {//No options to be set
+    }
+    virtual void disableWarmStart()
+    {//No options to be set
+    }
+    //@}
+
+    /// Virtual copy constructor
+    virtual Ipopt::SmartPtr<TNLPSolver> clone();
+
+    /// Get the CpuTime of the last optimization.
+    virtual double CPUTime()
+    {
+      return (Ipopt::IsValid(cached_)) ? cached_->cpuTime_: 0.;
+    }
+
+    /// Get the iteration count of the last optimization.
+    virtual int IterationCount()
+    {
+      return 0;
+    }
+
+
+    // turn off all output from the solver
+    virtual void setOutputToDefault()
+    {
+      if (Ipopt::IsValid(cached_)) cached_->iprint = default_log_level_;
+    }
+    /// turn on all output from the solver
+    virtual void forceSolverOutput(int log_level)
+    {
+      if (Ipopt::IsValid(cached_)) cached_->iprint = log_level;
+    }
+    
+    /// Get the solver name
+    virtual std::string & solverName()
+    {
+      return solverName_;
+    }
+
+    /// Register this solver options into passed roptions
+    void registerOptions()
+    {
+      registerOptions(roptions_);
+    }
+
+    /** Error code (solver specific).*/
+    virtual int errorCode() const
+    {
+      return -1;
+    }
+#ifdef TIME_BQPD
+  struct Times {
+    int numsolve;
+    double create;
+    double solve;
+    double resolve;
+    double warm_start;
+    int pivots;
+    Times(): numsolve(0), create(0), solve(0), resolve(0), warm_start(0), pivots(0){
+    }
+
+    Times & operator +=(Times &rhs){
+      numsolve += rhs.numsolve;
+      create += rhs.create;
+      solve += rhs.solve;
+      resolve += rhs.resolve;
+      warm_start += rhs.warm_start;
+      pivots += rhs.pivots;
+      return *this;
+    }
+  };
+#endif
+
+    /// Register this solver options into passed roptions
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+  private:
+    /** @name Private function members. */
+    /** @{ */
+    /** Perform optimization using data structure in cache. */
+    TNLPSolver::ReturnStatus callOptimizer();
+    /** @} */
+
+    /** @name User options */
+    //@{
+    /** Fill-in factor for QP factorization */
+    double fillin_factor_;
+    int kmax_ipt_;
+    int mlp_ipt_;
+    /** Hot start m0de.*/
+    static int m0de_;
+    /** Hot start reinitialization fequency.*/
+    static int reinit_freq_;
+    //@}
+
+    /** Cached information for reoptimizing. */
+  struct cachedInfo : public Ipopt::ReferencedObject
+    {
+#ifdef TIME_BQPD
+  Times times_;
+#endif
+
+      fint n;
+      fint m;
+      fint k;
+      fint kmax;
+      real* a;
+      fint* la;
+      real* x;
+      real* bl;
+      real* bu;
+      real f;
+      real* g;
+      real* r;
+      real* w;
+      real* e;
+      fint* ls;
+      real* alp;
+      fint* lp;
+      fint mlp;
+      fint peq;
+      real* ws;
+      fint* lws;
+      fint m0de;
+      fint ifail;
+      fint info[1];
+      fint iprint;
+      fint nout;
+
+      /// wsc common block
+      fint kk,ll,mxws,mxlws;
+
+      /** indicates if we should start from a hotstart **/
+      bool haveHotStart_;
+      /** @name All remaining information from all common blocks for
+	  hot start **/
+      //@{
+      /// bqpdc common block
+      fint irh1,na,na1,nb,nb1,ka1,kb1,kc1,irg1,lu1,lv,lv1,ll1;
+      /// epsc common block
+      real eps,tol,emin;
+      /// vstepc common block
+      real vstep;
+      /// repc common block
+      real sgnf;
+      fint nrep,npiv,nres;
+      /// refactorc common block
+      fint nup,nfreq;
+      /// alphac common block
+      real alpha;
+      /// sparsec common block
+      fint ns,ns1,nt,nt1,nu,nu1,nx,nx1,np,np1,nprof,lc;
+      fint lc1,li,li1,lm,lm1,lp_,lp1,lq,lq1,lr,lr1,ls_,ls1,lt,lt1;
+      /// factorc common block
+      fint m1,m2,mp,mq,lastr,irow;
+      /// mxm1c common block
+      fint mxm1;
+      /// /minorc
+      real c;
+      //@}
+      fint kHot;
+      real* xHot;
+      real fHot;
+      real* gHot;
+      real* rHot;
+      real* wHot;
+      real* eHot;
+      fint* lsHot;
+      real* alpHot;
+      fint* lpHot;
+      fint peqHot;
+      real* wsHot;
+      fint* lwsHot;
+      fint infoHot[1];
+      fint kkkHot;
+      fint lllHot;
+      fint kkHot;
+      fint llHot;
+
+      Ipopt::SmartPtr<BranchingTQP> tqp_;
+      /** Elapsed CPU time in last optimization. */
+      double cpuTime_;
+      /** flag remembering if warm start information has been put into
+      cache */
+      bool use_warm_start_in_cache_;
+      bool bad_warm_start_info_;
+
+      /** Number of nonzeros in Jacobian and gradient */
+      int amax_;
+
+      /** Fill-in factor for QP factorization.  This is a pointer to
+	  the corresponding value in the BqpdSolver object, so that an
+	  increase is not forgotten. */
+      double* fillin_factor_;
+      //@}
+
+      /** next reinitialization of hot start.*/
+      int next_reinit_;
+      /** Number of pivots.*/
+      int pivots_;
+      /** Constructor.*/
+      cachedInfo()
+          :
+          a(NULL),
+          la(NULL),
+          x(NULL),
+          bl(NULL),
+          bu(NULL),
+          g(NULL),
+          r(NULL),
+          w(NULL),
+          e(NULL),
+          ls(NULL),
+          alp(NULL),
+          lp(NULL),
+          ws(NULL),
+          lws(NULL),
+	  haveHotStart_(false),
+	  xHot(NULL),
+	  gHot(NULL),
+	  rHot(NULL),
+	  wHot(NULL),
+	  eHot(NULL),
+	  lsHot(NULL),
+	  alpHot(NULL),
+	  lpHot(NULL),
+	  wsHot(NULL),
+	  lwsHot(NULL),
+          cpuTime_(0),
+          use_warm_start_in_cache_(false),
+	  bad_warm_start_info_(false),
+          next_reinit_(0),
+          pivots_(0)
+      {}
+
+      cachedInfo(const Ipopt::SmartPtr<BranchingTQP> &tqp,
+		 Ipopt::SmartPtr<Ipopt::OptionsList>& options,
+		 int kmax_ipt, int mlp_ipt, double* fillin_factor):
+          a(NULL),
+          la(NULL),
+          x(NULL),
+          bl(NULL),
+          bu(NULL),
+          g(NULL),
+          r(NULL),
+          w(NULL),
+          e(NULL),
+          ls(NULL),
+          alp(NULL),
+          lp(NULL),
+          ws(NULL),
+          lws(NULL),
+	  haveHotStart_(false),
+	  xHot(NULL),
+	  gHot(NULL),
+	  rHot(NULL),
+	  wHot(NULL),
+	  eHot(NULL),
+	  lsHot(NULL),
+	  alpHot(NULL),
+	  lpHot(NULL),
+	  wsHot(NULL),
+	  lwsHot(NULL),
+          tqp_(tqp),
+          cpuTime_(0),
+          use_warm_start_in_cache_(false),
+          bad_warm_start_info_(false),
+          next_reinit_(0),
+          pivots_(0)
+      {
+        initialize(tqp, options, kmax_ipt, mlp_ipt, fillin_factor);
+      }
+
+      /** Fill data structures for filter with info from tnlp. */
+      void initialize(const Ipopt::SmartPtr<BranchingTQP> &tqp,
+		      Ipopt::SmartPtr<Ipopt::OptionsList>& options,
+		      int kmax_ipt, int mlp_ipt, double* fillin_factor);
+
+      void re_initialize();
+      /** Optimize problem described by cache with filter.*/
+      void optimize();
+
+      /** Store most recent solution as hot start */
+      bool markHotStart();
+
+      /** Forget about the hot start info */
+      void unmarkHotStart();
+
+      /** Copy current values from hot start info */
+      void copyFromHotStart();
+
+      /** Destructor. */
+      ~cachedInfo();
+    };
+
+    /** Cached information on last problem optimized for reoptimization. */
+    Ipopt::SmartPtr<cachedInfo> cached_;
+
+    ///\name of solver (Bqpd)
+    static std::string  solverName_;
+
+    /** To record default log level.*/
+     int default_log_level_;
+
+    public:
+
+#ifdef TIME_BQPD
+    Times &times(){ return cached_->times_;}
+#endif
+
+  };
+
+}// end namespace Bonmin
+#endif
diff --git a/src/Interfaces/Filter/BonBqpdWarmStart.cpp b/src/Interfaces/Filter/BonBqpdWarmStart.cpp
new file mode 100644
index 0000000..2ada32a
--- /dev/null
+++ b/src/Interfaces/Filter/BonBqpdWarmStart.cpp
@@ -0,0 +1,97 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+//                    based on BonFilterWarmStart.cpp
+//
+// Date : 2007-08-03
+
+#include "BonBqpdWarmStart.hpp"
+
+
+namespace Bonmin{
+
+  BqpdWarmStart:: BqpdWarmStart(const fint xSize /*= 0*/,
+				const real* xArray /*= NULL*/,
+				const fint lamSize /*= 0*/,
+				const real* lamArray /*= NULL*/,
+				const fint lwsSize /*= 0*/,
+				const fint *lwsArray /*= NULL*/,
+				const fint istat[14] /*= def_istat*/)
+    :
+    CoinWarmStartPrimalDual(xSize, lamSize, xArray, lamArray),
+    CoinWarmStartBasis(),
+    lwsSize_(lwsSize),
+    lwsArray_(NULL),
+    empty_(false)
+  {
+    DBG_ASSERT(lwsSize > 0 || !lwsArray);
+    if (lwsSize_ > 0){
+      lwsArray_ = new fint[lwsSize];
+      DBG_ASSERT(lwsArray);
+      CoinCopyN(lwsArray, lwsSize, lwsArray_);
+    }
+    for(int i = 0 ; i < 14 ; i ++) {
+      istat_[i] = istat[i];
+    }
+  }
+
+  /* Copy constructor */
+  BqpdWarmStart::BqpdWarmStart(const BqpdWarmStart & other)
+    :
+    CoinWarmStartPrimalDual(other),
+    CoinWarmStartBasis(other),
+    lwsSize_(other.lwsSize_),
+    lwsArray_(NULL),
+    empty_(other.empty_)
+  {
+    DBG_ASSERT(lwsSize_ > 0 || !lwsArray_);
+    if (lwsSize_ > 0){
+      lwsArray_ = new fint[lwsSize_];
+      DBG_ASSERT(other.lwsArray_);
+      CoinCopyN(other.lwsArray_, lwsSize_, lwsArray_);
+    }
+    for(int i = 0 ; i < 14 ; i ++) {
+      istat_[i] = other.istat_[i];
+    }
+  }
+
+  BqpdWarmStart::~BqpdWarmStart()
+  {
+    delete [] lwsArray_;
+  }
+
+  CoinWarmStartDiff *
+  BqpdWarmStart::generateDiff(const CoinWarmStart * const oldOne) const
+  {
+    throw CoinError("Method not implemented",
+		    "generateDiffs",
+		    "BqpdWarmStart");
+    return NULL;
+  }
+
+
+  void
+  BqpdWarmStart::applyDiff(const CoinWarmStartDiff * diff){
+    
+    throw CoinError("Method not implemented",
+		    "applyDiff",
+		    "BqpdWarmStart");
+  }
+
+void
+BqpdWarmStart::flushPoint()
+{
+  CoinWarmStartPrimalDual::clear();
+  delete [] lwsArray_;
+
+  lwsArray_ = NULL;
+}
+
+FilterSolver::fint 
+BqpdWarmStart::def_istat[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+
+} /* End namespace Bonmin */
diff --git a/src/Interfaces/Filter/BonBqpdWarmStart.hpp b/src/Interfaces/Filter/BonBqpdWarmStart.hpp
new file mode 100644
index 0000000..e45a595
--- /dev/null
+++ b/src/Interfaces/Filter/BonBqpdWarmStart.hpp
@@ -0,0 +1,102 @@
+// (C) Copyright International Business Machines Corporation 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Andreas Waechter, International Business Machines Corporation
+//                    based on BonFilterWarmStart.hpp
+//
+// Date : 2007-08-03
+
+
+#ifndef BonBqpdWarmStart_H
+#define BonBqpdWarmStart_H
+
+#include "CoinWarmStartBasis.hpp"
+#include "CoinWarmStartPrimalDual.hpp"
+#include "BonFilterSolver.hpp" /* for types */
+
+#include <vector>
+
+namespace Bonmin{
+
+  /** Warm start for filter interface.
+   * Warm start for filter constists of a (possibly huge) array of integers.
+   * This class inherits from CoinWarmStartPrimalDual, because that's what
+   * this warmstart really is. <br>
+   * For practical reason (integration in Cbc) this class also inherits from
+   * CoinWarmStartBasis. <br>
+   */
+  class BqpdWarmStart :
+    public virtual CoinWarmStartPrimalDual, public virtual CoinWarmStartBasis,
+    public Coin::ReferencedObject
+  {
+    typedef FilterSolver::fint fint;
+    typedef FilterSolver::real real;
+    
+  public:
+    /** Default values for istat */
+    static fint def_istat[14];
+    /** Constructor */
+    BqpdWarmStart(const fint xSize = 0,
+		    const real* xArray = NULL,
+		    const fint lamSize = 0,
+		    const real* lamArray = NULL,
+		    const fint lwsSize = 0,
+		    const fint *lwsArray = NULL,
+		    const fint istat[14] = def_istat);
+
+    /** Copy constructor */
+    BqpdWarmStart(const BqpdWarmStart & other);
+
+    /** constructor from a CoinWarmStartPrimalDual */
+    BqpdWarmStart(const CoinWarmStartPrimalDual& pdws);
+
+    /** virtual copy */
+    virtual CoinWarmStart * clone() const
+    { return new BqpdWarmStart(*this);}
+
+    /** Destructor. */
+    virtual ~BqpdWarmStart();
+
+    /** Generate differences.*/
+    virtual CoinWarmStartDiff* generateDiff(const CoinWarmStart * const other) const;
+
+    /** Apply differences. */
+    virtual void applyDiff(const CoinWarmStartDiff * const cswDiff);
+
+    /** Access to lws array */
+    const fint *lwsArray() const{
+      return lwsArray_;
+    }
+
+    /** Access to lws size. */
+    fint lwsSize() const {
+      return lwsSize_;}
+
+    const fint* istat()const {
+      return istat_;}
+
+    void flushPoint();
+
+    ///Is this an empty warm start?
+    bool empty() const
+    {
+      return empty_;
+    }
+  private:
+    /** Size of fint lws array store. */
+    fint lwsSize_;
+
+    /** fint lws array to store */
+    fint* lwsArray_;
+
+    /** Filter's istat (AW: I think we only need first entry) */
+    fint istat_[14];
+    ///Say if warm start is empty
+    bool empty_;
+  };
+
+} /* end namespace Bonmin */
+#endif
+
diff --git a/src/Interfaces/Filter/BonFilterSolver.cpp b/src/Interfaces/Filter/BonFilterSolver.cpp
new file mode 100644
index 0000000..be6bafe
--- /dev/null
+++ b/src/Interfaces/Filter/BonFilterSolver.cpp
@@ -0,0 +1,782 @@
+// (C) Copyright International Business Machines Corporation, Carnegie Mellon University 2006, 2008
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/02/2006
+
+#include "BonminConfig.h"
+
+#include "BonFilterSolver.hpp"
+#include "BonFilterWarmStart.hpp"
+
+#include <fstream>
+
+#include "CoinTime.hpp"
+#include<algorithm>
+typedef Bonmin::FilterSolver::fint fint;
+typedef Bonmin::FilterSolver::real real;
+
+//#define InitializeAll
+
+
+typedef long ftnlen;
+extern "C"
+{
+  void F77_FUNC(filtersqp,FILTERSQP)(
+    fint *n, fint *m, fint *kmax, fint *maxa,
+    fint *maxf, fint *mlp, fint *mxwk, fint *mxiwk,
+    fint *iprint, fint *nout, fint *ifail, real *rho,
+    real *x, real *c, real *f, real *fmin, real *bl,
+    real *bu, real *s, real *a, fint *la, real *ws,
+    fint *lws, real *lam, char *cstype, real *user,
+    fint *iuser, fint *maxiter, fint *istat,
+    real *rstat, ftnlen cstype_len);
+}
+
+//Static variables
+static Ipopt::TNLP * tnlpSolved = NULL;
+static fint nnz_h = -1;
+
+static fint * hStruct = NULL;
+
+//Permutation to apply to jacobian in order to get it row ordered
+static int * permutationJac = NULL;
+static int * permutationHess = NULL;
+//static int * cache = NULL;
+
+
+extern "C"
+{
+//Access to filter common bloc
+  /* common block for problemname */
+  extern struct {
+      fint  char_l;
+      char pname[10];
+    }
+  F77_FUNC(cpname,CPNAME);
+
+  /* common block for Hessian storage set to 0, i.e. NO Hessian */
+  extern struct {
+      fint phl, phr, phc;
+    }
+  F77_FUNC(hessc,HESSC);
+
+  /* common block for upper bound on filter */
+  extern struct {
+      real ubd, tt;
+    }
+  F77_FUNC(ubdc,UBDC);
+
+  /* common block for infinity & epslon */
+  extern struct {
+      real infty, eps;
+    }
+  F77_FUNC_(nlp_eps_inf,NLP_EPS_INF);
+
+  /* common block for prfinting from QP solver */
+  extern struct {
+      fint n_bqpd_calls, n_bqpd_prfint;
+    }
+  F77_FUNC_(bqpd_count,BQPD_COUNT);
+
+  /* common for scaling: scale_mode = 0 (none), 1 (variables), 2 (vars+cons) */
+  extern struct {
+      fint scale_mode, phe;
+    }
+  F77_FUNC(scalec,SCALEC);
+}
+
+extern "C"
+{
+
+/// Objective function evaluation
+  void F77_FUNC(objfun,OBJFUN)(real *x, fint *n, real * f, real *user, fint * iuser, fint * errflag) {
+    (*errflag) = !tnlpSolved->eval_f(*n, x, 1, *f);
+  }
+
+  /** Constraint functions evaluation. */
+  void
+  F77_FUNC(confun,CONFUN)(real * x, fint * n , fint *m, real *c, real *a, fint * la, real * user, fint * iuser,
+      fint * errflag) {
+    (*errflag) = !tnlpSolved->eval_g(*n, x, 1, *m, c);
+  }
+
+  void
+  F77_FUNC(gradient,GRADIENT)(fint *n, fint *m, fint * mxa, real * x, real *a, fint * la,
+      fint * maxa, real * user, fint * iuser, fint * errflag) {
+    (*errflag) = !tnlpSolved->eval_grad_f(*n, x, 1, a);
+    /// ATTENTION: Filter expect the jacobian to be ordered by row
+    int nnz = la[0] - *n - 1;
+    double * values = new double [nnz];
+    (*errflag) = !tnlpSolved->eval_jac_g(*n, x, 1, *m, nnz, NULL, NULL, values) || (*errflag);
+    a+= *n;
+    for (int i = 0 ; i < nnz ; i++) {
+      int indice = permutationJac[i];
+      if (indice > nnz) {
+#ifndef NDEBUG
+        std::cout<<"Error in gradient computation, i: "<<i
+        <<" in row order "<<permutationJac[i]<<std::endl;
+#endif
+      }
+      *a++ = values[indice];
+    }
+    delete [] values;
+  }
+
+  /* evaluation of the Hessian of the Lagrangian */
+  void
+  F77_FUNC(hessian,HESSIAN)(real *x, fint *n, fint *m, fint *phase, real *lam,
+      real *ws, fint *lws, real *user, fint *iuser,
+      fint *l_hess, fint *li_hess, fint *errflag) {
+    Ipopt::Number obj_factor = (*phase == 1)? 0. : 1.;
+    fint  end = nnz_h + (*n)  + 2;
+
+    for (int i = 0 ; i < end ; i++) {
+      lws[i] = hStruct[i];
+    }
+    *l_hess = nnz_h;
+    *li_hess = nnz_h + *n + 3;
+    Ipopt::Number * mlam = NULL;
+    if (*m > 0) {
+      mlam = new Ipopt::Number[*m];
+    }
+    for (int i = 0; i<*m; i++) {
+      mlam[i] = -lam[*n+i];
+    }
+    Ipopt::Number * values = new Ipopt::Number [nnz_h];
+    (*errflag) = !tnlpSolved->eval_h(*n, x, 1, obj_factor, *m, mlam ,1, hStruct[0] - 1, NULL, NULL, values);
+    delete [] mlam;
+    for (int i = 0 ; i < nnz_h ; i++) ws[i] = values[permutationHess[i]];
+    delete [] values;
+  }
+
+}
+
+namespace Bonmin
+{
+
+  struct Transposer
+  {
+    const Ipopt::Index* rowIndices;
+    const Ipopt::Index* colIndices;
+    bool operator()(int i, int j)
+    {
+      return rowIndices[i]<rowIndices[j] ||
+          (rowIndices[i]==rowIndices[j] && colIndices[i] < colIndices[j]);
+    }
+  };
+
+  // Convert a sparse matrix from triplet format to row ordered packed matrix
+  void FilterSolver::TMat2RowPMat(bool symmetric, fint n, fint m, int nnz,
+      const Ipopt::Index* iRow,
+      const Ipopt::Index* iCol, int * permutation2,
+      fint * lws, int nnz_offset, int n_offset,
+      Ipopt::TNLP::IndexStyleEnum index_style)
+  {
+    for (int i = 0 ; i < nnz ; i++)
+      permutation2[i] = i;
+
+    Transposer lt;
+    if (symmetric) {
+      Ipopt::Index* tmpRow = new Ipopt::Index[nnz];
+      Ipopt::Index* tmpCol = new Ipopt::Index[nnz];
+      for (int i=0; i<nnz; i++) {
+        const Ipopt::Index& irow = iRow[i];
+        const Ipopt::Index& jcol = iCol[i];
+        if (irow > jcol) {
+          tmpRow[i] = irow;
+          tmpCol[i] = jcol;
+        }
+        else {
+          tmpRow[i] = jcol;
+          tmpCol[i] = irow;
+        }
+      }
+      lt.rowIndices = tmpRow;
+      lt.colIndices = tmpCol;
+    }
+    else {
+      lt.rowIndices = iRow;
+      lt.colIndices = iCol;
+    }
+
+    std::sort(permutation2, permutation2 + nnz, lt);
+
+    const int idx_offset = (index_style == Ipopt::TNLP::C_STYLE);
+    fint row = 1-idx_offset;
+    lws[0] = nnz + nnz_offset + 1;
+    fint * inds = lws + nnz_offset + 1;
+    fint * start = inds + nnz + n_offset;
+    *start++ = 1 + nnz_offset;
+    for (fint i = 0 ; i < nnz ; i++) {
+      inds[i] = lt.colIndices[permutation2[i]] + idx_offset;
+      //DBG_ASSERT(RowJac[permutation2[i]] >= row);
+      if (lt.rowIndices[permutation2[i]] > row) {
+        for (;row < lt.rowIndices[permutation2[i]] ; row++)
+          *start++ = i + nnz_offset + 1;
+      }
+    }
+    for (;row <= m-idx_offset ; row++)
+      *start++ = nnz + nnz_offset +1;
+
+#if 0
+    for (int i = 0; i<nnz_offset+1; i++)
+      printf("lws[%3d] = %3d\n", i, lws[i]);
+    for (int i = nnz_offset+1; i<nnz_offset+nnz+1; i++)
+      printf("lws[%3d] = %3d  [%3d,%3d]\n", i, lws[i], lt.rowIndices[permutation2[i-nnz_offset-1]], lt.colIndices[permutation2[i-nnz_offset-1]]);
+    for (int i = nnz_offset+nnz+1; i<lws[0]+m+2; i++)
+      printf("lws[%3d] = %3d\n", i, lws[i]);
+#endif
+
+    if (symmetric) {
+      delete [] lt.rowIndices;
+      delete [] lt.colIndices;
+    }
+
+
+  }
+
+
+
+  std::string FilterSolver::solverName_ = "filter SQP";
+
+  void
+  FilterSolver::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+  {
+    roptions->SetRegisteringCategory("FilterSQP options", RegisteredOptions::FilterCategory);
+    roptions->AddLowerBoundedNumberOption("eps", "Tolerance for SQP solver",
+        0., 1, 1e-08, "");
+    roptions->AddLowerBoundedNumberOption("infty", "A large number",0.,1, 1e20, "");
+    roptions->AddBoundedIntegerOption("iprint", "Print level (0=silent, 3=verbose)", 0,6,0);
+    roptions->AddLowerBoundedIntegerOption("kmax", "Dimension of null-space",
+        -1, -1, "");
+    roptions->AddLowerBoundedIntegerOption("maxf","Maximum filter length",0,100);
+    roptions->AddLowerBoundedIntegerOption("maxiter", "Maximum number of iterations",0,1000);
+    roptions->AddLowerBoundedIntegerOption("mlp","Maximum level for degeneracy (bqpd)",0, 1000);
+    roptions->AddLowerBoundedIntegerOption("mxlws", "FINTEGER workspace increment", 0, 500000);
+    roptions->AddLowerBoundedIntegerOption("mxws", "REAL workspace increment",
+        0,2000000);
+    roptions->AddLowerBoundedNumberOption("rho_init", "Initial trust region size",0,1,10.);
+    //  roption->AddLowerBoundedIntegerOption("timing", "whether to time evaluations (1 = yes)");
+    roptions->AddLowerBoundedNumberOption("tt", "Parameter for upper bound on filter",0,1, 125e-2);
+    roptions->AddLowerBoundedNumberOption("ubd", "Parameter for upper bound on filter", 0 , 1,1e2);
+
+  }
+
+
+  FilterSolver::FilterSolver(bool createEmpty /* = false */)
+      :
+      TNLPSolver(),
+      warmF_(NULL),
+      cached_(NULL)
+  {}
+
+  FilterSolver::FilterSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+      Ipopt::SmartPtr<Ipopt::OptionsList> options,
+      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+      const std::string & prefix):
+      TNLPSolver(roptions, options, journalist, prefix),
+      warmF_(NULL),
+      cached_(NULL)
+  {}
+
+  FilterSolver::FilterSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+      Ipopt::SmartPtr<Ipopt::OptionsList> options,
+      Ipopt::SmartPtr<Ipopt::Journalist> journalist):
+      TNLPSolver(roptions, options, journalist, "bonmin."),
+      warmF_(NULL),
+      cached_(NULL)
+  {}
+
+
+  FilterSolver::FilterSolver(const FilterSolver & other):
+      TNLPSolver(other),
+      warmF_(NULL),
+      cached_(NULL)
+  {
+    warmF_ = (other.warmF_.IsValid()) ? dynamic_cast<FilterWarmStart *>(other.warmF_->clone()):NULL;
+  }
+
+  Ipopt::SmartPtr <TNLPSolver>
+  FilterSolver::clone()
+  {
+    Ipopt::SmartPtr<FilterSolver> retval = new FilterSolver(*this);
+    return GetRawPtr(retval);
+  }
+
+  FilterSolver::~FilterSolver()
+  {}
+
+  bool
+  FilterSolver::Initialize(std::string optFile)
+  {
+    std::ifstream is;
+    if (optFile != "") {
+      try {
+        is.open(optFile.c_str());
+      }
+      catch (std::bad_alloc) {
+        journalist_->Printf(Ipopt::J_SUMMARY, Ipopt::J_MAIN, "\nEXIT: Not enough memory.\n");
+        return false;
+      }
+      catch (...) {
+        Ipopt::IpoptException E("Unknown Exception caught in ipopt", "Unknown File", -1);
+        E.ReportException(*journalist_);
+        return false;
+      }
+    }
+    bool retval = Initialize(is);
+    if (is) {
+      is.close();
+    }
+    if(!options_->GetIntegerValue("print_level",default_log_level_,""))
+      default_log_level_ = 1;
+    return retval;
+  }
+
+  bool
+  FilterSolver::Initialize(std::istream &is)
+  {
+
+    Ipopt::Index ivalue;
+    options_->GetIntegerValue("print_level", ivalue, "");
+    Ipopt::EJournalLevel print_level = (Ipopt::EJournalLevel)ivalue;
+    Ipopt::SmartPtr<Ipopt::Journal> stdout_jrnl = journalist_->GetJournal("console");
+    if (IsValid(stdout_jrnl)) {
+      // Set printlevel for stdout
+      stdout_jrnl->SetAllPrintLevels(print_level);
+      stdout_jrnl->SetPrintLevel(Ipopt::J_DBG, Ipopt::J_NONE);
+    }
+
+    if (is.good()) {
+      options_->ReadFromStream(*journalist_, is);
+    }
+    return true;
+  }
+
+/// Solves a problem expresses as a TNLP
+  TNLPSolver::ReturnStatus
+  FilterSolver::OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp)
+  {
+    if (cached_.IsNull() || !cached_->use_warm_start_in_cache_) {
+      cached_ = new cachedInfo(tnlp, options_);
+    }
+    cached_->load_ws(warmF_);
+    return callOptimizer();
+  }
+
+/// Solves a problem expressed as a TNLP
+  TNLPSolver::ReturnStatus
+  FilterSolver::ReOptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp)
+  {
+    assert(tnlp == cached_->tnlp_);
+    cached_->load_ws(warmF_);
+    //rescan bounds which may have changed
+    assert(cached_->bounds);
+    int n = cached_->n;
+    int m = cached_->m;
+    tnlp->get_bounds_info(n, cached_->bounds, &cached_->bounds[n+m],
+        m, &cached_->bounds[n], &cached_->bounds[2*n + m]);
+
+    tnlpSolved = static_cast<Ipopt::TNLP *>(Ipopt::GetRawPtr(tnlp));
+    nnz_h = cached_->nnz_h_;
+
+    hStruct = cached_->hStruct_;
+
+//Permutation to apply to jacobian in order to get it row ordered
+    permutationJac = cached_->permutationJac_;
+    permutationHess = cached_->permutationHess_;
+
+
+    return callOptimizer();
+  }
+
+
+
+  void
+  FilterSolver::cachedInfo::initialize(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp,
+      Ipopt::SmartPtr<Ipopt::OptionsList>& options)
+  {
+    // 1) Get some dimensions
+    // 1.a) First from ampl
+    int  nnz_jac_g;
+
+    Ipopt::TNLP::IndexStyleEnum index_style;
+    Ipopt::Index nv, nc, nnz_j, nnz_hess;
+    tnlp->get_nlp_info( nv, nc,
+        nnz_j, (Ipopt::Index&) nnz_hess,
+        index_style);
+    n = nv;
+    m = nc;
+    nnz_jac_g = nnz_j;
+    nnz_h_ = nnz_hess;
+
+    nnz_h = nnz_h_;
+
+
+    // 1.b) then from options
+    Ipopt::Index kmax_ipt;
+    options->GetIntegerValue("kmax", kmax_ipt, "filter.");
+    if (kmax_ipt == -1) {
+      kmax = n;
+    }
+    else {
+      kmax = kmax_ipt;
+      kmax = std::min(kmax,n);
+    }
+    Ipopt::Index mlp_ipt;
+    options->GetIntegerValue("mlp", mlp_ipt,"filter.");
+    mlp = mlp_ipt;
+
+    Ipopt::Index  maxf_ipt;
+    options->GetIntegerValue("maxf", maxf_ipt,"filter.");
+    maxf = maxf_ipt;
+
+    fint mxwk0;
+    Ipopt::Index mxwk0_ipt;
+    options->GetIntegerValue("mxws", mxwk0_ipt, "filter.");
+    mxwk0 = mxwk0_ipt;
+
+    fint mxiwk0;
+    Ipopt::Index mxiwk0_ipt;
+    options->GetIntegerValue("mxlws",  mxiwk0_ipt, "filter.");
+    mxiwk0 = mxiwk0_ipt;
+    // Setup storage for Filter
+    int nplusm = n + m;
+    //Starting point
+    x = new real [n];
+
+    //tnlp->get_starting_point(n, 1, x, 0, NULL, NULL, m, 0, NULL);
+    use_warm_start_in_cache_ = false;
+    //for(int i = 0 ; i < n ; i++) x[i] = 0;
+    lam = new real [n+m];
+    //#ifdef InitializeAll // This should be initialized
+    for (int i = 0 ; i < n+m ; i++) lam[i] = 0.;
+    //#endif
+    //bounds
+    bounds = new real [2*n + 2*m];
+
+    tnlp->get_bounds_info(n, bounds, bounds + nplusm, m, bounds + n, bounds + n + nplusm);
+
+#if 0
+    double infty = F77_FUNC_(nlp_eps_inf,NLP_EPS_INF).infty;
+    // AW: I don't think we need this, it isn't done for ReOptimize either
+    for (int i = 0 ; i < nplusm ; i++) {
+      if (bounds[i] < -infty) bounds[i] = - infty;
+    }
+
+    real * ubounds = bounds + nplusm;
+    for (int i = 0 ; i < nplusm ; i++) {
+      if (ubounds[i] > infty) ubounds[i] = infty;
+    }
+#endif
+    maxa = n + nnz_jac_g;
+    fint maxia = n + nnz_jac_g + m + 3;
+    a = new real[maxa];
+    la = new fint [maxia];
+
+    int * RowJac = new int [nnz_jac_g];
+    int * ColJac = new int [nnz_jac_g];
+
+    la[nnz_jac_g + n + 1] = 1;
+
+    for (fint i = 1; i <= n ; i++)
+      la[i] = i;// - (index_style == Ipopt::TNLP::C_STYLE);
+    tnlp->eval_jac_g(  nv, NULL, 0, nc , nnz_j,  RowJac,  ColJac, NULL);
+
+    permutationJac = permutationJac_ = new int [nnz_jac_g];
+    TMat2RowPMat(false, n, m, nnz_jac_g,  RowJac, ColJac, permutationJac,
+        la, n, 1, index_style);
+
+    delete [] RowJac;
+    delete [] ColJac;
+
+    // Now setup hessian
+    permutationHess = permutationHess_ = new int[nnz_h];
+    hStruct_ = new fint[nnz_h + n + 3];
+    int * cache = new int[2*nnz_h + 1];
+    F77_FUNC(hessc,HESSC).phl = 1;
+    tnlp->eval_h((Ipopt::Index&) n, NULL, 0, 1., (Ipopt::Index&) m, NULL, 0, (Ipopt::Index&) nnz_h, cache + nnz_h, cache  , NULL);
+
+    TMat2RowPMat(true, n, n, nnz_h, cache, cache + nnz_h, permutationHess,
+        hStruct_, 0, 0, index_style);
+
+    delete [] cache;
+    // work arrays
+    fint lh1 = nnz_h + 8 + 2 * n + m;
+    maxWk = 21*n + 8*m + mlp + 8*maxf + lh1 + kmax*(kmax+9)/2 + mxwk0;
+    maxiWk = 13*n + 4*m + mlp + lh1 + kmax + 113 + mxiwk0;
+
+    ws = new real[maxWk];
+    lws = new fint[maxiWk];
+#ifdef InitializeAll // ToDo: This shouldn't have to be initialized
+    for (int i = 0 ; i < maxWk ; i++) ws[i] = 0;
+    for (int i = 0 ; i < maxiWk ; i++) lws[i] = 0;
+#endif
+
+    // Setup global variables and static variables
+    hStruct = hStruct_;
+    tnlpSolved = static_cast<Ipopt::TNLP *>(Ipopt::GetRawPtr(tnlp));
+
+    options->GetNumericValue("ubd",F77_FUNC(ubdc,UBDC).ubd, "filter.");
+    options->GetNumericValue("tt", F77_FUNC(ubdc,UBDC).tt, "filter.");
+    options->GetNumericValue("eps", F77_FUNC_(nlp_eps_inf,NLP_EPS_INF).eps, "filter.");
+    options->GetNumericValue("infty", F77_FUNC_(nlp_eps_inf,NLP_EPS_INF).infty, "filter.");
+    rho = 10.;
+    maxiter = 1000;
+    options->GetIntegerValue("maxiter", (Ipopt::Index &) maxiter, "filter.");
+    options->GetNumericValue("rho_init",rho,"filter.");
+
+
+    // Set up scaling
+    F77_FUNC(scalec,SCALEC).scale_mode = 0;
+    s = new real [n+m];
+
+    istat = new fint[14];
+    rstat = new real[7];
+    //#ifdef InitializeAll ToDo: He will do that later
+    for (int i=0; i<14; i++) {
+      istat[0] = 43;
+    }
+    for (int i=0; i<7; i++) {
+      rstat[0] = 42.;
+    }
+    //#endif
+
+    fmin = -1e100;
+    Ipopt::Index bufy;
+    options->GetIntegerValue("iprint",bufy, "filter.");
+    iprint = bufy;
+    nout = 6;
+    cstype = new char[m];
+    Ipopt::TNLP::LinearityType * const_types =
+      new Ipopt::TNLP::LinearityType[m];
+    tnlp->get_constraints_linearity(m, const_types);
+    for (int i = 0 ; i < m ; i++) {
+      if (const_types[i] == Ipopt::TNLP::LINEAR) {
+        cstype[i] = 'L';
+      }
+      else
+        cstype[i] = 'N';
+    }
+    delete [] const_types;
+    c = new double[m];
+    tnlp_ = Ipopt::GetRawPtr(tnlp);
+  }
+
+/// Solves a problem expresses as a TNLP
+  TNLPSolver::ReturnStatus
+  FilterSolver::callOptimizer()
+  {
+    cached_->optimize();
+
+    TNLPSolver::ReturnStatus optimizationStatus = TNLPSolver::exception;
+    Ipopt::SolverReturn status = Ipopt::INTERNAL_ERROR;
+    fint ifail = cached_->ifail;
+    switch (ifail) {
+    case 0:
+      optimizationStatus = TNLPSolver::solvedOptimal;
+      status = Ipopt::SUCCESS;
+      break;
+    case 1:
+      optimizationStatus = TNLPSolver::unbounded;
+      status = Ipopt::DIVERGING_ITERATES;
+    case 2:
+    case 3:
+    case 4:
+      optimizationStatus = TNLPSolver::provenInfeasible;
+      status = Ipopt::LOCAL_INFEASIBILITY;
+      break;
+    case 5:
+    case 6:
+    case 8:
+      optimizationStatus = TNLPSolver::iterationLimit;
+      status = Ipopt::MAXITER_EXCEEDED;
+      break;
+    case 7:
+      optimizationStatus = TNLPSolver::externalException;
+      status = Ipopt::INTERNAL_ERROR;
+      break;
+    case 9:
+    case 10:
+      optimizationStatus = TNLPSolver::exception;
+      status = Ipopt::INTERNAL_ERROR;
+      break;
+    }
+
+    Ipopt::Number* mlam = NULL;
+    if (cached_->m>0) {
+      mlam = new Ipopt::Number[cached_->m];
+    }
+    for (int i = 0; i<cached_->m; i++) {
+      mlam[i] = -cached_->lam[cached_->n+i];
+    }
+    Ipopt::Number* z_L = new Ipopt::Number[cached_->n];
+    Ipopt::Number* z_U = new Ipopt::Number[cached_->n];
+    const int os = cached_->n+cached_->m;
+    for (int i=0; i<cached_->n; i++) {
+      if (cached_->x[i] == cached_->bounds[i]) {
+        z_L[i] = std::max(0.,cached_->lam[i]);
+      }
+      else {
+        z_L[i] = 0.;
+      }
+      if (cached_->x[i] == cached_->bounds[os+i]) {
+        z_U[i] = std::max(0.,-cached_->lam[i]);
+      }
+      else {
+        z_U[i] = 0.;
+      }
+    }
+    cached_->tnlp_->finalize_solution(status, cached_->n,
+                                      cached_->x, z_L, z_U,
+                                      cached_->m, cached_->c, mlam,
+                                      cached_->f, NULL, NULL);
+    delete [] mlam;
+    delete [] z_L;
+    delete [] z_U;
+    return optimizationStatus;
+  }
+  /** Load warm-start info into cache with filter.*/
+  void
+  FilterSolver::cachedInfo::load_ws(Coin::SmartPtr<FilterWarmStart> warmF){
+    if(!warmF.IsValid()) return;
+    const fint xsize = warmF->primalSize();
+    const real* xarray = warmF->primal();
+    for (int i = 0; i<xsize; i++) {
+      x[i] = xarray[i];
+    }
+    CoinCopyN(warmF->dual(), warmF->dualSize(), lam);
+    CoinCopyN(warmF->lwsArray(), warmF->lwsSize(), lws);
+    for (int i = 0 ; i < 14 ; i ++) {
+      istat[i] = warmF->istat()[i];
+    }
+    use_warm_start_in_cache_ = true;
+  }
+  /** Optimize problem described by cache with filter.*/
+  void
+  FilterSolver::cachedInfo::optimize()
+  {
+    if (use_warm_start_in_cache_) {
+      ifail = -1;
+      use_warm_start_in_cache_ = false;
+    }
+    else {
+      tnlp_->get_starting_point(n, 1, x, 0, NULL, NULL, m, 0, NULL);
+      ifail = 0;
+    }
+    cpuTime_ = - CoinCpuTime();
+    fint cstype_len = 1;
+    rho = 10;
+    //  rho = 1e6;
+    //  printf("rho = %e\n", rho);
+#if 0
+    printf("========= 3333333333333333 =============\n");
+    for (int i=0; i<n; i++) {
+      printf("xL[%3d] = %15.8e  xU[%3d] = %15.8e\n", i, bounds[i], i, bounds[m+n+i]);
+    }
+    for (int i=0; i<m; i++) {
+      printf("gL[%3d] = %15.8e  gU[%3d] = %15.8e\n", i, bounds[n+i], i, bounds[m+2*n+i]);
+    }
+#endif
+#if 0
+    for (int i=0; i<n; i++) {
+      printf("fxstart[%2d] = %23.16e\n", i, x[i]);
+    }
+#endif
+    F77_FUNC(filtersqp,FILTERSQP)(&n, &m, &kmax, & maxa, &maxf, &mlp, &maxWk,
+        &maxiWk, &iprint, &nout, &ifail, &rho, x,
+        c, &f, &fmin, bounds,
+        bounds + n + m,
+        s, a, la,
+        ws, lws, lam, cstype,
+        NULL, NULL,
+        &maxiter, istat, rstat,
+        cstype_len);
+#if 0
+    for (int i=0; i<n; i++) {
+      printf("fxsol[%2d] = %23.16e\n", i, x[i]);
+    }
+#endif
+#if 0
+    printf("final f = %e\n", f);
+    printf("ifail = %d\n", ifail);
+#endif
+    if(ifail == 3){
+      f = rstat[4];
+    }
+
+    cpuTime_ += CoinCpuTime();
+  }
+
+  std::string
+  FilterSolver::UnsolvedFilterError::errorNames_[1] =
+    {"Internal error in Filter SQP."};
+
+  std::string
+  FilterSolver::UnsolvedFilterError::solverName_ =
+    "filterSqp";
+
+  const std::string&
+  FilterSolver::UnsolvedFilterError::errorName() const
+  {
+    return errorNames_[0];
+  }
+
+  const std::string&
+  FilterSolver::UnsolvedFilterError::solverName() const
+  {
+    return solverName_;
+  }
+
+  bool
+  FilterSolver::setWarmStart(const CoinWarmStart * warm,
+      Ipopt::SmartPtr<TMINLP2TNLP> tnlp)
+  {
+    if (warm == NULL || cached_.IsNull()) {
+      cached_ = new cachedInfo(GetRawPtr(tnlp), options_);
+    }
+    if(warm == NULL) return 1;
+    const FilterWarmStart * warmF = dynamic_cast<const FilterWarmStart *> (warm);
+    assert(warmF);
+    if (warmF->empty())//reset initial point and leave
+    {
+      warmF_ = NULL;
+      disableWarmStart();
+      return 1;
+    }
+    enableWarmStart();
+    warmF_ = dynamic_cast<FilterWarmStart *> (warmF->clone());
+    return true;
+  }
+
+  CoinWarmStart *
+  FilterSolver::getWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const
+  {
+    return new FilterWarmStart(cached_->n, cached_->x,
+        cached_->n+cached_->m, cached_->lam,
+        cached_->maxiWk, cached_->lws, cached_->istat);
+  }
+
+  CoinWarmStart *
+  FilterSolver::getEmptyWarmStart() const
+  {
+    return new FilterWarmStart;
+  }
+
+
+  /** Check that warm start object is valid.*/
+  bool 
+  FilterSolver::warmStartIsValid(const CoinWarmStart * ws) const{
+    const FilterWarmStart* fws = dynamic_cast<const FilterWarmStart*>(ws);
+    if (fws && ! fws->empty()) {
+      return true;
+    }
+    return false;
+  }
+
+
+}//end namespace Bonmin
diff --git a/src/Interfaces/Filter/BonFilterSolver.hpp b/src/Interfaces/Filter/BonFilterSolver.hpp
new file mode 100644
index 0000000..4cc44a6
--- /dev/null
+++ b/src/Interfaces/Filter/BonFilterSolver.hpp
@@ -0,0 +1,348 @@
+// (C) Copyright International Business Machines Corporation, 2006, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 10/02/2006
+
+#ifndef FilterSolver_H
+#define FilterSolver_H
+
+#include "BonTNLPSolver.hpp"
+#include "BonFilterTypes.hpp"
+#include "BonBqpdSolver.hpp"
+#include "BonFilterWarmStart.hpp"
+
+namespace Bonmin
+{
+  class FilterSolver : public TNLPSolver
+  {
+  public:
+
+    friend struct BqpdSolver::cachedInfo;
+
+  class UnsolvedFilterError: public TNLPSolver::UnsolvedError
+    {
+    public:
+      UnsolvedFilterError(int errorNum,
+          Ipopt::SmartPtr<TMINLP2TNLP> model,
+          const std::string &name):
+          TNLPSolver::UnsolvedError(errorNum, model, name)
+      {}
+      virtual const std::string& errorName() const;
+
+      virtual const std::string& solverName() const;
+      virtual ~UnsolvedFilterError()
+      {}
+
+    private:
+      static std::string errorNames_[1];
+      static std::string solverName_;
+    };
+
+    /** Fortran type for integer used in filter. */
+    typedef FilterTypes::fint fint;
+    /** Fortran type for double.used in filter */
+    typedef FilterTypes::real real;
+
+
+    virtual UnsolvedError * newUnsolvedError(int num,
+        Ipopt::SmartPtr<TMINLP2TNLP> problem,
+        std::string name)
+    {
+      return new UnsolvedFilterError(num, problem, name);
+    }
+
+
+    ///Default constructor
+    FilterSolver(bool createEmpty = false);
+
+
+    /// Constructor with passed journalist, roptions, options.
+    FilterSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+        const std::string & prefix
+                );
+
+    /// Constructor with passed journalist, roptions, options.
+    FilterSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        Ipopt::SmartPtr<Ipopt::Journalist> journalist
+                );
+
+    /// Copy constructor
+    FilterSolver(const FilterSolver & other);
+    ///destructor
+    virtual ~FilterSolver();
+
+    /** Initialize the TNLPSolver (read options from params_file)
+     */
+    virtual bool Initialize(std::string params_file);
+
+    /** Initialize the TNLPSolver (read options from istream is)
+    */
+    virtual bool Initialize(std::istream& is);
+
+    /** @name Solve methods */
+    //@{
+    /// Solves a problem expresses as a TNLP
+    virtual ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp);
+
+    /// Resolves a problem expresses as a TNLP
+    virtual ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp);
+
+    /// Set the warm start in the solver
+    virtual bool setWarmStart(const CoinWarmStart * warm,
+        Ipopt::SmartPtr<TMINLP2TNLP> tnlp);
+
+   /// Get warm start used in last optimization
+   virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const{
+     if(warmF_.IsValid())
+       return new FilterWarmStart(*warmF_);
+     else return NULL;
+   }
+
+
+    /// Get the warm start form the solver
+    virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const;
+
+    virtual CoinWarmStart * getEmptyWarmStart() const;
+
+    /** Check that warm start object is valid.*/
+    virtual bool warmStartIsValid(const CoinWarmStart * ws) const;
+
+
+    virtual void enableWarmStart()
+    {//No options to be set
+    }
+    virtual void disableWarmStart()
+    {
+      warmF_ = NULL;
+     //No options to be set
+    }
+    //@}
+
+    /// Virtual copy constructor
+    virtual Ipopt::SmartPtr<TNLPSolver> clone();
+
+    /// Get the CpuTime of the last optimization.
+    virtual double CPUTime()
+    {
+      return (cached_.IsValid()) ? cached_->cpuTime_: 0.;
+    }
+
+    /// Get the iteration count of the last optimization.
+    virtual int IterationCount()
+    {
+      return (cached_.IsValid()) ? cached_->istat[1]:0;
+    }
+
+    /// turn off all output from the solver
+    virtual void setOutputToDefault()
+    {
+      if (cached_.IsValid()) cached_->iprint = default_log_level_;
+    }
+    /// turn on all output from the solver
+    virtual void forceSolverOutput(int log_level)
+    {
+      if (cached_.IsValid()) cached_->iprint = log_level;
+    }
+
+    /// Get the solver name
+    virtual std::string & solverName()
+    {
+      return solverName_;
+    }
+
+    /// Register this solver options into passed roptions
+    void registerOptions()
+    {
+      registerOptions(roptions_);
+    }
+
+    /** Error code (solver specific).*/
+    virtual int errorCode() const
+    {
+      return -1;
+    }
+    /// Register this solver options into passed roptions
+    static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
+  private:
+    /** @name Private function members. */
+    /** @{ */
+    /** Perform optimization using data structure in cache. */
+    TNLPSolver::ReturnStatus callOptimizer();
+    /** @} */
+    Coin::SmartPtr<FilterWarmStart> warmF_;
+
+    /** Cached information for reoptimizing. */
+  struct cachedInfo : public Coin::ReferencedObject
+    {
+      fint n;
+      fint m;
+      fint nnz_h_;
+      fint kmax;
+      fint maxa;
+      fint maxf;
+      fint mlp;
+      fint maxWk;
+      fint maxiWk;
+      fint iprint;
+      fint nout;
+      fint ifail;
+      real rho;
+      real * x;
+      real * c;
+      real f;
+      real fmin;
+      real * bounds;
+      real * s;
+      real * a;
+      fint * la;
+      real * ws;
+      fint * lws;
+      real * lam;
+      char * cstype;
+      fint maxiter;
+      fint * istat;
+      real * rstat;
+      Ipopt::TNLP * tnlp_;
+      fint * hStruct_;
+      int * permutationJac_;
+      int * permutationHess_;
+      /** Elapsed CPU time in last optimization. */
+      double cpuTime_;
+      /** flag remembering if warm start information has been put into
+      cache */
+      bool use_warm_start_in_cache_;
+
+
+      /** Constructor.*/
+      cachedInfo():
+          n(-1),
+          m(-1),
+          nnz_h_(-1),
+          kmax(-1),
+          maxa(-1),
+          maxf(-1),
+          mlp(-1),
+          maxWk(-1),
+          maxiWk(-1),
+          iprint(-1),
+          nout(6),
+          ifail(-100),
+          rho(0),
+          x(NULL),
+          c(NULL),
+          f(1e100),
+          fmin(-1e100),
+          bounds(NULL),
+          s(NULL),
+          a(NULL),
+          la(NULL),
+          ws(NULL),
+          lws(NULL),
+          lam(NULL),
+          cstype(NULL),
+          maxiter(1000),
+          istat(NULL),
+          rstat(NULL),
+          tnlp_(NULL),
+          hStruct_(NULL),
+          permutationJac_(NULL),
+          permutationHess_(NULL),
+          cpuTime_(0),
+          use_warm_start_in_cache_(false)
+      {}
+
+      cachedInfo(const Ipopt::SmartPtr<Ipopt::TNLP> &tnlp,
+          Ipopt::SmartPtr<Ipopt::OptionsList>& options):
+          n(-1),
+          m(-1),
+          nnz_h_(-1),
+          kmax(-1),
+          maxa(-1),
+          maxf(-1),
+          mlp(-1),
+          maxWk(-1),
+          maxiWk(-1),
+          iprint(-1),
+          nout(6),
+          ifail(0),
+          rho(0),
+          x(NULL),
+          c(NULL),
+          f(1e100),
+          fmin(-1e100),
+          bounds(NULL),
+          s(NULL),
+          a(NULL),
+          la(NULL),
+          ws(NULL),
+          lws(NULL),
+          lam(NULL),
+          cstype(NULL),
+          maxiter(1000),
+          istat(NULL),
+          rstat(NULL),
+          tnlp_(NULL),
+          hStruct_(NULL),
+          permutationJac_(NULL),
+          permutationHess_(NULL),
+          cpuTime_(0),
+          use_warm_start_in_cache_(false)
+      {
+        initialize(tnlp, options);
+      }
+
+      /** Fill data structures for filter with info from tnlp. */
+      void initialize(const Ipopt::SmartPtr<Ipopt::TNLP> &tnlp,
+          Ipopt::SmartPtr<Ipopt::OptionsList>& options);
+
+      /** Optimize problem described by cache with filter.*/
+      void optimize();
+
+      /** Destructor. */
+      ~cachedInfo()
+      {
+        delete [] x;
+        delete [] c;
+        delete [] bounds;
+        delete [] s;
+        delete [] a;
+        delete [] la;
+        delete [] ws;
+        delete [] lws;
+        delete [] lam;
+        delete [] cstype;
+        delete [] istat;
+        delete [] rstat;
+        delete [] permutationJac_;
+        delete [] permutationHess_;
+        delete [] hStruct_;
+        tnlp_ = NULL;
+      }
+
+      void load_ws(Coin::SmartPtr<FilterWarmStart>);
+    };
+
+    /** Cached information on last problem optimized for reoptimization. */
+    Coin::SmartPtr<cachedInfo> cached_;
+
+    //name of solver (Filter)
+    static std::string  solverName_;
+
+     /** To record default log level.*/
+     int default_log_level_;
+    /** Converting TMatrices into row-ordered matrices */
+    static void TMat2RowPMat(bool symmetric, fint n, fint m, int nnz, const Ipopt::Index* iRow,
+        const Ipopt::Index* iCol, int * permutation2,
+        fint * lws, int nnz_offset, int n_offset,
+        Ipopt::TNLP::IndexStyleEnum index_style);
+  };
+
+}// end namespace Bonmin
+#endif
diff --git a/src/Interfaces/Filter/BonFilterTypes.hpp b/src/Interfaces/Filter/BonFilterTypes.hpp
new file mode 100644
index 0000000..5e0239d
--- /dev/null
+++ b/src/Interfaces/Filter/BonFilterTypes.hpp
@@ -0,0 +1,10 @@
+#ifndef BonFilterTypes_H
+#define BonFilterTypes_H
+#include "IpoptConfig.h"
+namespace FilterTypes {
+    /** Fortran type for integer used in filter. */
+    typedef FORTRAN_INTEGER_TYPE fint;
+    /** Fortran type for double.used in filter */
+    typedef double real;
+}
+#endif
diff --git a/src/Interfaces/Filter/BonFilterWarmStart.cpp b/src/Interfaces/Filter/BonFilterWarmStart.cpp
new file mode 100644
index 0000000..e3bdfee
--- /dev/null
+++ b/src/Interfaces/Filter/BonFilterWarmStart.cpp
@@ -0,0 +1,141 @@
+// (C) Copyright International Business Machines Corporation, 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 11/21/2006
+
+#include "BonFilterWarmStart.hpp"
+
+
+namespace Bonmin
+{
+
+  FilterWarmStart:: FilterWarmStart(const fint xSize /*= 0*/,
+      const real* xArray /*= NULL*/,
+      const fint lamSize /*= 0*/,
+      const real* lamArray /*= NULL*/,
+      const fint lwsSize /*= 0*/,
+      const fint *lwsArray /*= NULL*/,
+      const fint istat[14] /*= def_istat*/)
+    :
+    CoinWarmStartPrimalDual(xSize, lamSize, xArray, lamArray),
+    CoinWarmStartBasis(),
+    lwsSize_(lwsSize),
+    lwsArray_(NULL),
+    empty_(false)
+  {
+    assert(lwsSize > 0 || !lwsArray);
+    if (lwsSize_ > 0) {
+      lwsArray_ = new fint[lwsSize];
+      assert(lwsArray);
+      CoinCopyN(lwsArray, lwsSize, lwsArray_);
+    }
+    for (int i = 0 ; i < 14 ; i ++) {
+      istat_[i] = istat[i];
+    }
+  }
+
+  /* Copy constructor */
+  FilterWarmStart::FilterWarmStart(const FilterWarmStart & other)
+    :
+    CoinWarmStartPrimalDual(other),
+    CoinWarmStartBasis(other),
+    lwsSize_(other.lwsSize_),
+    lwsArray_(NULL),
+    empty_(other.empty_)
+  {
+    assert(lwsSize_ > 0 || !lwsArray_);
+    if (lwsSize_ > 0) {
+      lwsArray_ = new fint[lwsSize_];
+      assert(other.lwsArray_);
+      CoinCopyN(other.lwsArray_, lwsSize_, lwsArray_);
+    }
+    for (int i = 0 ; i < 14 ; i ++) {
+      istat_[i] = other.istat_[i];
+    }
+  }
+
+  FilterWarmStart::~FilterWarmStart()
+  {
+    delete [] lwsArray_;
+  }
+
+  CoinWarmStartDiff *
+  FilterWarmStart::generateDiff(const CoinWarmStart * const oldOne) const
+  {
+    const FilterWarmStart * old =
+      dynamic_cast<const FilterWarmStart*> (oldOne);
+    assert(old);
+
+    CoinWarmStartDiff * diff = CoinWarmStartPrimalDual::generateDiff(old);
+
+    CoinWarmStartPrimalDualDiff * pdDiff =
+      dynamic_cast<CoinWarmStartPrimalDualDiff*>(diff);
+
+    FilterWarmStartDiff* retval =
+      new FilterWarmStartDiff(pdDiff, lwsSize_);
+    delete diff;
+
+    for (fint i = 0 ; i < lwsSize_ ; i++) {
+      if (lwsArray_[i] != old->lwsArray_[i]) {
+	retval->differences.push_back(FilterWarmStartDiff::OneDiff(i, lwsArray_[i] - old->lwsArray_[i]));
+      }
+    }
+
+    retval->differences.resize(retval->differences.size());
+
+    for (int i = 0 ; i < 14 ; i++) {
+      retval->istat_[i] = istat_[i];
+    }
+
+    return retval;
+  }
+
+  void
+  FilterWarmStart::applyDiff(const CoinWarmStartDiff * diff)
+  {
+    const FilterWarmStartDiff * diffF =
+      dynamic_cast<const FilterWarmStartDiff *>(diff);
+    assert(diffF);
+    CoinWarmStartPrimalDual::applyDiff(diffF);
+
+    fint end = static_cast<fint>(diffF->differences.size());
+    for (fint i = 0 ; i < end ; i++) {
+      lwsArray_[diffF->differences[i].first] += diffF->differences[i].second;
+    }
+
+    for (int i = 0 ; i < 14 ; i++)
+      istat_[i] = diffF->istat_[i];
+  }
+
+  void
+  FilterWarmStart::flushPoint()
+  {
+    delete [] lwsArray_;
+  }
+
+  FilterWarmStartDiff::FilterWarmStartDiff(CoinWarmStartPrimalDualDiff * diff,
+					   fint capacity)
+      :
+      CoinWarmStartPrimalDualDiff()
+  {
+    CoinWarmStartPrimalDualDiff::swap(*diff);
+    differences.reserve(capacity);
+  }
+
+  void
+  FilterWarmStartDiff::flushPoint()
+  {
+    CoinWarmStartPrimalDualDiff::clear();
+    differences.clear();
+  }
+
+  FilterTypes::fint
+  FilterWarmStart::def_istat[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+
+} /* End namespace Bonmin */
+
diff --git a/src/Interfaces/Filter/BonFilterWarmStart.hpp b/src/Interfaces/Filter/BonFilterWarmStart.hpp
new file mode 100644
index 0000000..4edbf67
--- /dev/null
+++ b/src/Interfaces/Filter/BonFilterWarmStart.hpp
@@ -0,0 +1,139 @@
+// (C) Copyright International Business Machines Corporation, 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, International Business Machines Corporation
+//
+// Date : 11/21/2006
+
+
+
+
+#ifndef BonFilterWarmStart_H
+#define BonFilterWarmStart_H
+
+#include "CoinWarmStartBasis.hpp"
+#include "CoinWarmStartPrimalDual.hpp"
+#include "BonFilterTypes.hpp" /* for types */
+#include "CoinSmartPtr.hpp"
+
+#include <vector>
+
+namespace Bonmin
+{
+
+  /** Warm start for filter interface.
+   * Warm start for filter constists of a (possibly huge) array of integers.
+   * This class inherits from CoinWarmStartPrimalDual, because that's what
+   * this warmstart really is. <br>
+   * For practical reason (integration in Cbc) this class also inherits from
+   * CoinWarmStartBasis. <br>
+  */
+  class FilterWarmStart :
+    public virtual CoinWarmStartPrimalDual, public virtual CoinWarmStartBasis,
+    public Coin::ReferencedObject
+  {
+    typedef FilterTypes::fint fint;
+    typedef FilterTypes::real real;
+
+  public:
+    /** Default values for istat */
+    static fint def_istat[14];
+    /** Constructor */
+    FilterWarmStart(const fint xSize = 0,
+        const real* xArray = NULL,
+        const fint lamSize = 0,
+        const real* lamArray = NULL,
+        const fint lwsSize = 0,
+        const fint *lwsArray = NULL,
+        const fint istat[14] = def_istat);
+
+    /** Copy constructor */
+    FilterWarmStart(const FilterWarmStart & other);
+
+    /** virtual copy */
+    virtual CoinWarmStart * clone() const
+    {
+      return new FilterWarmStart(*this);
+    }
+
+    /** Destructor. */
+    virtual ~FilterWarmStart();
+
+    /** Generate differences.*/
+    virtual CoinWarmStartDiff* generateDiff(const CoinWarmStart * const other) const;
+
+    /** Apply differences. */
+    virtual void applyDiff(const CoinWarmStartDiff * const cswDiff);
+
+    /** Access to lws array */
+    const fint *lwsArray() const
+    {
+      return lwsArray_;
+    }
+
+    /** Access to lws size. */
+    fint lwsSize() const
+    {
+      return lwsSize_;
+    }
+
+    const fint* istat()const
+    {
+      return istat_;
+    }
+
+    /// flush the starting point
+    void flushPoint();
+
+    ///Is this an empty warm start?
+    bool empty() const
+    {
+      return empty_;
+    }
+  private:
+    /** Size of fint lws array store. */
+    fint lwsSize_;
+
+    /** fint lws array to store */
+    fint* lwsArray_;
+
+    /** Filter's istat (AW: I think we only need first entry) */
+    fint istat_[14];
+
+    ///Say if warm start is empty
+    bool empty_;
+  };
+
+  class FilterWarmStartDiff : public CoinWarmStartPrimalDualDiff
+  {
+    typedef FilterTypes::fint fint;
+    typedef FilterTypes::real real;
+
+    friend class FilterWarmStart;
+
+  public:
+    FilterWarmStartDiff(CoinWarmStartPrimalDualDiff * diff,
+			fint capacity);
+
+    virtual ~FilterWarmStartDiff() {}
+
+    virtual CoinWarmStartDiff * clone() const
+    {
+      return new FilterWarmStartDiff(*this);
+    }
+
+    void flushPoint();
+  private:
+    /** One difference is two integers (indice and difference). */
+    typedef std::pair<fint, fint> OneDiff;
+    /** Vector of all the differences.*/
+    std::vector<OneDiff> differences;
+    /** istat */
+    fint istat_[14];
+  };
+
+} /* end namespace Bonmin */
+#endif
+
diff --git a/src/Interfaces/Filter/Makefile.am b/src/Interfaces/Filter/Makefile.am
new file mode 100644
index 0000000..565e3d1
--- /dev/null
+++ b/src/Interfaces/Filter/Makefile.am
@@ -0,0 +1,84 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 83 2006-10-23 16:53:13Z pbonami $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+# Source: Bonmin/src/IpoptInterface/Makefile.am
+# Modified for filterInterface
+#          P. Bonami                  IBM    2006-10-02
+
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libfilterinterface.la
+
+# List all source files, including headers
+libfilterinterface_la_SOURCES = \
+	BonBqpdSolver.cpp BonBqpdSolver.hpp \
+	BonBqpdWarmStart.cpp BonBqpdWarmStart.hpp \
+        BonFilterSolver.cpp BonFilterSolver.hpp \
+        BonFilterWarmStart.cpp BonFilterWarmStart.hpp
+
+# This is for libtool
+libfilterinterface_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/..` $(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+                  BonFilterSolver.hpp \
+                  BonBqpdSolver.hpp \
+                  BonFilterWarmStart.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+         BonFilterSolver.cppbak \
+         BonFilterSolver.hppbak \
+         BonFilterWarmStart.cppbak \
+         BonFilterWarmStart.hppbak \
+         BonBqpdSolver.hppbak \
+         BonBqpdSolver.cppbak \
+         BonBqpdWarmStart.hppbak \
+         BonBqpdWarmStart.cppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Interfaces/Filter/Makefile.in b/src/Interfaces/Filter/Makefile.in
new file mode 100644
index 0000000..0d17722
--- /dev/null
+++ b/src/Interfaces/Filter/Makefile.in
@@ -0,0 +1,651 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+# Source: Bonmin/src/IpoptInterface/Makefile.am
+# Modified for filterInterface
+#          P. Bonami                  IBM    2006-10-02
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/Interfaces/Filter
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libfilterinterface_la_LIBADD =
+am_libfilterinterface_la_OBJECTS = BonBqpdSolver.lo \
+	BonBqpdWarmStart.lo BonFilterSolver.lo BonFilterWarmStart.lo
+libfilterinterface_la_OBJECTS = $(am_libfilterinterface_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libfilterinterface_la_SOURCES)
+DIST_SOURCES = $(libfilterinterface_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libfilterinterface.la
+
+# List all source files, including headers
+libfilterinterface_la_SOURCES = \
+	BonBqpdSolver.cpp BonBqpdSolver.hpp \
+	BonBqpdWarmStart.cpp BonBqpdWarmStart.hpp \
+        BonFilterSolver.cpp BonFilterSolver.hpp \
+        BonFilterWarmStart.cpp BonFilterWarmStart.hpp
+
+
+# This is for libtool
+libfilterinterface_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/..` $(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+                  BonFilterSolver.hpp \
+                  BonBqpdSolver.hpp \
+                  BonFilterWarmStart.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+         BonFilterSolver.cppbak \
+         BonFilterSolver.hppbak \
+         BonFilterWarmStart.cppbak \
+         BonFilterWarmStart.hppbak \
+         BonBqpdSolver.hppbak \
+         BonBqpdSolver.cppbak \
+         BonBqpdWarmStart.hppbak \
+         BonBqpdWarmStart.cppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Interfaces/Filter/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Interfaces/Filter/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libfilterinterface.la: $(libfilterinterface_la_OBJECTS) $(libfilterinterface_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libfilterinterface_la_LDFLAGS) $(libfilterinterface_la_OBJECTS) $(libfilterinterface_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonBqpdSolver.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonBqpdWarmStart.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonFilterSolver.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonFilterWarmStart.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Interfaces/Ipopt/BonIpoptInteriorWarmStarter.cpp b/src/Interfaces/Ipopt/BonIpoptInteriorWarmStarter.cpp
new file mode 100644
index 0000000..ad42cfc
--- /dev/null
+++ b/src/Interfaces/Ipopt/BonIpoptInteriorWarmStarter.cpp
@@ -0,0 +1,221 @@
+// (C) Copyright International Business Machines Corporation 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// $Id: BonIpoptInteriorWarmStarter.cpp 1858 2011-06-18 20:13:40Z stefan $
+//
+// Authors:  Andreas Waechter          IBM    2006-03-09
+
+#include "BonIpoptInteriorWarmStarter.hpp"
+#include "IpDenseVector.hpp"
+#include "IpIpoptData.hpp"
+#include "IpIpoptCalculatedQuantities.hpp"
+
+#include <cassert>
+
+using namespace Ipopt;
+
+namespace Bonmin
+{
+  IpoptInteriorWarmStarter::
+  IpoptInteriorWarmStarter(Index n,
+      const Number* x_l, const Number* x_u,
+      Number nlp_lower_bound_inf,
+      Number nlp_upper_bound_inf,
+      bool store_several_iterates)
+      :
+      nlp_lower_bound_inf_(nlp_lower_bound_inf),
+      nlp_upper_bound_inf_(nlp_upper_bound_inf),
+      store_several_iterates_(store_several_iterates),
+      n_(n),
+      n_stored_iterates_(0)
+  {
+    x_l_prev_ = new double[n];
+    x_u_prev_ = new double[n];
+
+    for (Index i=0; i<n; i++) {
+      x_l_prev_[i] = x_l[i];
+      x_u_prev_[i] = x_u[i];
+    }
+  }
+
+  IpoptInteriorWarmStarter::
+  ~IpoptInteriorWarmStarter()
+  {
+    delete [] x_l_prev_;
+    delete [] x_u_prev_;
+  }
+
+  bool IpoptInteriorWarmStarter::
+  UpdateStoredIterates(AlgorithmMode mode,
+      const IpoptData& ip_data,
+      IpoptCalculatedQuantities& ip_cq)
+  {
+    // Don't store anything during the restoration phase
+    if (mode==RestorationPhaseMode) {
+      return true;
+    }
+
+    // Get some useful information out of the Ipopt objects
+    Index iter = ip_data.iter_count();
+    Number mu = ip_data.curr_mu();
+    Number nlp_error = ip_cq.curr_nlp_error();
+    Number primal_inf = ip_cq.curr_primal_infeasibility(NORM_MAX);
+    Number dual_inf = ip_cq.curr_dual_infeasibility(NORM_MAX);
+    Number complementarity = ip_cq.curr_complementarity(0., NORM_MAX);
+    if (store_several_iterates_ || n_stored_iterates_==0) {
+      // For now, we just store everything
+      n_stored_iterates_++;
+      stored_iter_.push_back(iter);
+      stored_iterates_.push_back(ip_data.curr());
+      stored_mu_.push_back(mu);
+      stored_nlp_error_.push_back(nlp_error);
+      stored_primal_inf_.push_back(primal_inf);
+      stored_dual_inf_.push_back(dual_inf);
+      stored_compl_.push_back(complementarity);
+    }
+    else {
+      stored_iter_[0] = iter;
+      stored_iterates_[0] = ip_data.curr();
+      stored_mu_[0] = mu;
+      stored_nlp_error_[0] = nlp_error;
+      stored_primal_inf_[0] = primal_inf;
+      stored_dual_inf_[0] = dual_inf;
+      stored_compl_[0] = complementarity;
+    }
+    return true;
+  }
+
+  bool IpoptInteriorWarmStarter::
+  Finalize()
+  {
+    // For now, nothing.  Later we could clean up, reduce storage etc.
+    return true;
+  }
+
+  bool IpoptInteriorWarmStarter::
+  WarmStartIterate(Index n, const Number* x_l_new,
+      const Number* x_u_new,
+      IteratesVector& warm_start_iterate)
+  {
+    assert(n==n_);
+
+    if (n_stored_iterates_==0) {
+      return false;
+    }
+
+    // For now let's just assume that we want to restore the 4-th latest
+    // iterate from the previous solve
+
+    Index iter_wanted = Max(0, n_stored_iterates_-5);
+
+    SmartPtr<const Vector> prev_x = stored_iterates_[iter_wanted]->x();
+    SmartPtr<const Vector> prev_s = stored_iterates_[iter_wanted]->s();
+    SmartPtr<const Vector> prev_z_L = stored_iterates_[iter_wanted]->z_L();
+    SmartPtr<const Vector> prev_z_U = stored_iterates_[iter_wanted]->z_U();
+    SmartPtr<const Vector> prev_y_c = stored_iterates_[iter_wanted]->y_c();
+    SmartPtr<const Vector> prev_y_d = stored_iterates_[iter_wanted]->y_d();
+    SmartPtr<const Vector> prev_v_L = stored_iterates_[iter_wanted]->v_L();
+    SmartPtr<const Vector> prev_v_U = stored_iterates_[iter_wanted]->v_U();
+
+    const DenseVector* d_x = dynamic_cast<const DenseVector*> (GetRawPtr(prev_x));
+    const DenseVector* d_s = dynamic_cast<const DenseVector*> (GetRawPtr(prev_s));
+    const DenseVector* d_z_L = dynamic_cast<const DenseVector*> (GetRawPtr(prev_z_L));
+    const DenseVector* d_z_U = dynamic_cast<const DenseVector*> (GetRawPtr(prev_z_U));
+    const DenseVector* d_y_c = dynamic_cast<const DenseVector*> (GetRawPtr(prev_y_c));
+    const DenseVector* d_y_d = dynamic_cast<const DenseVector*> (GetRawPtr(prev_y_d));
+    const DenseVector* d_v_L = dynamic_cast<const DenseVector*> (GetRawPtr(prev_v_L));
+    const DenseVector* d_v_U = dynamic_cast<const DenseVector*> (GetRawPtr(prev_v_U));
+
+    const Number* x_vals_prev = d_x->Values();
+    const Number* s_vals_prev = d_s->Values();
+    const Number* z_L_vals_prev = d_z_L->Values();
+    const Number* z_U_vals_prev = d_z_U->Values();
+    const Number* y_c_vals_prev = d_y_c->Values();
+    const Number* y_d_vals_prev = d_y_d->Values();
+    const Number* v_L_vals_prev = d_v_L->Values();
+    const Number* v_U_vals_prev = d_v_U->Values();
+
+    DenseVector* d_x_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.x_NonConst()));
+    DenseVector* d_s_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.s_NonConst()));
+    DenseVector* d_z_L_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.z_L_NonConst()));
+    DenseVector* d_z_U_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.z_U_NonConst()));
+    DenseVector* d_y_c_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.y_c_NonConst()));
+    DenseVector* d_y_d_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.y_d_NonConst()));
+    DenseVector* d_v_L_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.v_L_NonConst()));
+    DenseVector* d_v_U_new = dynamic_cast<DenseVector*> (GetRawPtr(warm_start_iterate.v_U_NonConst()));
+
+    Number* x_vals_new = d_x_new->Values();
+    Number* s_vals_new = d_s_new->Values();
+    Number* z_L_vals_new = d_z_L_new->Values();
+    Number* z_U_vals_new = d_z_U_new->Values();
+    Number* y_c_vals_new = d_y_c_new->Values();
+    Number* y_d_vals_new = d_y_d_new->Values();
+    Number* v_L_vals_new = d_v_L_new->Values();
+    Number* v_U_vals_new = d_v_U_new->Values();
+
+    // Now copy the primal variables from the old to the new problem;
+    // make sure that we take care of the fixed variables
+    Index ix_prev = 0;
+    Index ix_new = 0;
+    Index izL_prev = 0;
+    Index izL_new = 0;
+    Index izU_prev = 0;
+    Index izU_new = 0;
+    for (Index i=0; i<n_; i++) {
+      if (x_l_new[i]<x_u_new[i]) {
+        DBG_ASSERT(x_l_prev_[i]<x_u_prev_[i]);
+        x_vals_new[ix_new] = x_vals_prev[ix_prev];
+        ix_new++;
+        ix_prev++;
+        if (x_l_new[i]>nlp_lower_bound_inf_) {
+          DBG_ASSERT(x_l_prev_[i]>nlp_lower_bound_inf_);
+          z_L_vals_new[izL_new] = z_L_vals_prev[izL_prev];
+          izL_new++;
+          izL_prev++;
+        }
+        if (x_u_new[i]<nlp_upper_bound_inf_) {
+          DBG_ASSERT(x_u_prev_[i]<nlp_upper_bound_inf_);
+          z_U_vals_new[izU_new] = z_U_vals_prev[izU_prev];
+          izU_new++;
+          izU_prev++;
+        }
+      }
+      else if (x_l_prev_[i]<x_u_prev_[i]) {
+        ix_prev++;
+        izL_prev++;
+        izU_prev++;
+      }
+    }
+    DBG_ASSERT(ix_prev==prev_x->Dim());
+    DBG_ASSERT(izL_prev==prev_z_L->Dim());
+    DBG_ASSERT(izU_prev==prev_z_U->Dim());
+    DBG_ASSERT(ix_new==warm_start_iterate.x()->Dim());
+    DBG_ASSERT(izL_new==warm_start_iterate.z_L()->Dim());
+    DBG_ASSERT(izU_new==warm_start_iterate.z_U()->Dim());
+
+    // Now copy all the values for the iterates that don't change in dimension
+    DBG_ASSERT(prev_s->Dim()==warm_start_iterate.s()->Dim());
+    DBG_ASSERT(prev_y_d->Dim()==warm_start_iterate.s()->Dim());
+    DBG_ASSERT(prev_y_d->Dim()==warm_start_iterate.y_d()->Dim());
+    for (Index i=0; i<prev_s->Dim(); i++) {
+      s_vals_new[i] = s_vals_prev[i];
+      y_d_vals_new[i] = y_d_vals_prev[i];
+    }
+    DBG_ASSERT(prev_y_c->Dim()==warm_start_iterate.y_c()->Dim());
+    for (Index i=0; i<prev_y_c->Dim(); i++) {
+      y_c_vals_new[i] = y_c_vals_prev[i];
+    }
+    DBG_ASSERT(prev_v_L->Dim()==warm_start_iterate.v_L()->Dim());
+    for (Index i=0; i<prev_v_L->Dim(); i++) {
+      v_L_vals_new[i] = v_L_vals_prev[i];
+    }
+    DBG_ASSERT(prev_v_U->Dim()==warm_start_iterate.v_U()->Dim());
+    for (Index i=0; i<prev_v_U->Dim(); i++) {
+      v_U_vals_new[i] = v_U_vals_prev[i];
+    }
+
+    return true;
+  }
+}
+
diff --git a/src/Interfaces/Ipopt/BonIpoptInteriorWarmStarter.hpp b/src/Interfaces/Ipopt/BonIpoptInteriorWarmStarter.hpp
new file mode 100644
index 0000000..ae18ed5
--- /dev/null
+++ b/src/Interfaces/Ipopt/BonIpoptInteriorWarmStarter.hpp
@@ -0,0 +1,103 @@
+// (C) Copyright International Business Machines Corporation 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// $Id: BonIpoptInteriorWarmStarter.hpp 1858 2011-06-18 20:13:40Z stefan $
+//
+// Authors:  Andreas Waechter               IBM    2006-03-02
+
+#ifndef __IPOPTINTERIORWARMSTARTER_HPP__
+#define __IPOPTINTERIORWARMSTARTER_HPP__
+
+#include "IpSmartPtr.hpp"
+#include "IpNLP.hpp"
+#include <vector>
+
+namespace Bonmin
+{
+  class IpoptInteriorWarmStarter : public Ipopt::ReferencedObject
+  {
+  public:
+    /**@name Constructors/Destructors */
+    //@{
+    /** Constructor. We give it the values of the current bounds so that
+     *  it can figure out which variables are fixed for this NLP. */
+    IpoptInteriorWarmStarter(Ipopt::Index n, const Ipopt::Number* x_L, const Ipopt::Number* x_u,
+        Ipopt::Number nlp_lower_bound_inf,
+        Ipopt::Number nlp_upper_bound_inf,
+        bool store_several_iterates);
+
+    /** Default destructor */
+    ~IpoptInteriorWarmStarter();
+    //@}
+
+    /** Method for possibly storing another iterate during the current
+     *  optimizatin for possible use for a warm start for a new
+     *  problem */
+    bool UpdateStoredIterates(Ipopt::AlgorithmMode mode,
+        const Ipopt::IpoptData& ip_data,
+        Ipopt::IpoptCalculatedQuantities& ip_cq);
+
+    /** Method for doing whatever needs to be done after the parent NLP
+     *  has been solved */
+    bool Finalize();
+
+    /** Method for computing the initial point based on the stored
+     *  information */
+    bool WarmStartIterate(Ipopt::Index n, const Ipopt::Number* x_l_new, const Ipopt::Number* x_u_new,
+        Ipopt::IteratesVector& warm_start_iterate);
+
+  private:
+    /**@name Default Compiler Generated Methods
+     * (Hidden to avoid implicit creation/calling).
+     * These methods are not implemented and
+     * we do not want the compiler to implement
+     * them for us, so we declare them private
+     * and do not define them. This ensures that
+     * they will not be implicitly created/called. */
+    //@{
+    /** Default constructor. */
+    IpoptInteriorWarmStarter();
+
+    /** Copy Constructor */
+    IpoptInteriorWarmStarter(const IpoptInteriorWarmStarter&);
+
+    /** Overloaded Equals Operator */
+    void operator=(const IpoptInteriorWarmStarter&);
+    //@}
+
+    //@{
+    /** Value for a lower bound that denotes -infinity */
+    Ipopt::Number nlp_lower_bound_inf_;
+    /** Value for a upper bound that denotes infinity */
+    Ipopt::Number nlp_upper_bound_inf_;
+    /** Flag indicating whether more than one iterate is to be
+     *  stored. */
+    bool store_several_iterates_;
+    //@}
+
+    /** @name Copy of the bounds for the previously solved NLP.  This is
+     *  required to find out the remapping for fixed variables, and it
+     *  might also help to see how large the perturbation of the new
+     *  problem is. */
+    //@{
+    Ipopt::Index n_;
+    Ipopt::Number* x_l_prev_;
+    Ipopt::Number* x_u_prev_;
+    //@}
+
+    /** @name Selected Iterates and quantities from the previous
+     *  optimization */
+    //@{
+    Ipopt::Index n_stored_iterates_;
+    std::vector<Ipopt::Index> stored_iter_;
+    std::vector<Ipopt::SmartPtr<const Ipopt::IteratesVector> > stored_iterates_;
+    std::vector<Ipopt::Number> stored_mu_;
+    std::vector<Ipopt::Number> stored_nlp_error_;
+    std::vector<Ipopt::Number> stored_primal_inf_;
+    std::vector<Ipopt::Number> stored_dual_inf_;
+    std::vector<Ipopt::Number> stored_compl_;
+    //@}
+  };
+}
+#endif
diff --git a/src/Interfaces/Ipopt/BonIpoptSolver.cpp b/src/Interfaces/Ipopt/BonIpoptSolver.cpp
new file mode 100644
index 0000000..f2ce689
--- /dev/null
+++ b/src/Interfaces/Ipopt/BonIpoptSolver.cpp
@@ -0,0 +1,480 @@
+// (C) Copyright International Business Machines (IBM) 2005, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, IBM
+//
+// Date : 26/09/2006
+
+
+#include "BonIpoptSolver.hpp"
+#include "IpSolveStatistics.hpp"
+#include "CoinError.hpp"
+
+#include "BonIpoptInteriorWarmStarter.hpp"
+#include "BonIpoptWarmStart.hpp"
+
+
+extern bool BonminAbortAll;
+
+namespace Bonmin
+{
+
+  std::string IpoptSolver::solverName_ = "Ipopt";
+
+  /// Constructor
+  IpoptSolver::IpoptSolver(bool createEmpty /*= false*/):
+      TNLPSolver(),
+      problemHadZeroDimension_(false),
+      warmStartStrategy_(1),
+      enable_warm_start_(false),
+      optimized_before_(false)
+  {
+    if (createEmpty) return;
+    app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions_), options_, journalist_);
+  }
+
+  /// Constructor with Passed in journalist, registered options, options
+  IpoptSolver::IpoptSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+      Ipopt::SmartPtr<Ipopt::OptionsList> options,
+      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+      const std::string & prefix):
+      TNLPSolver(roptions, options, journalist, prefix),
+      problemHadZeroDimension_(false),
+      warmStartStrategy_(1),
+      enable_warm_start_(false),
+      optimized_before_(false)
+  {
+    roptions_ = roptions;
+    app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions), options, journalist);
+  }
+
+  /// Constructor with Passed in journalist, registered options, options
+  IpoptSolver::IpoptSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+      Ipopt::SmartPtr<Ipopt::OptionsList> options,
+      Ipopt::SmartPtr<Ipopt::Journalist> journalist):
+      TNLPSolver(roptions, options, journalist, "bonmin."),
+      problemHadZeroDimension_(false),
+      warmStartStrategy_(1),
+      enable_warm_start_(false),
+      optimized_before_(false)
+  {
+    roptions_ = roptions;
+    app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions), options, journalist);
+  }
+
+  IpoptSolver::~IpoptSolver()
+  {}
+
+  IpoptSolver::IpoptSolver(const IpoptSolver &other):
+    TNLPSolver(other),
+    optimizationStatus_(other.optimizationStatus_),
+    problemHadZeroDimension_(other.problemHadZeroDimension_),
+    warmStartStrategy_(other.warmStartStrategy_),
+    enable_warm_start_(false),
+    optimized_before_(false){
+      app_ = new Ipopt::IpoptApplication(GetRawPtr(roptions_), options_, journalist_);
+  }
+
+  ///virtual constructor
+  Ipopt::SmartPtr<TNLPSolver>
+  IpoptSolver::clone()
+  {
+    Ipopt::SmartPtr<IpoptSolver> retval = new IpoptSolver(*this);
+    retval->app_->Initialize("");
+    retval->default_log_level_ = default_log_level_;
+    return GetRawPtr(retval);
+  }
+
+
+  bool
+  IpoptSolver::Initialize(std::string params_file)
+  {
+    Ipopt::ApplicationReturnStatus status =
+      app_->Initialize(params_file);
+    if (status != Ipopt::Solve_Succeeded) {
+      return false;
+    }
+    options_->GetEnumValue("warm_start",warmStartStrategy_,prefix());
+    setMinlpDefaults(options_);
+    optimized_before_ = false;
+    return true;
+  }
+
+  bool
+  IpoptSolver::Initialize(std::istream &is)
+  {
+    Ipopt::ApplicationReturnStatus status =
+      app_->Initialize(is);
+    if (status != Ipopt::Solve_Succeeded) {
+      return false;
+    }
+    options_->GetEnumValue("warm_start",warmStartStrategy_,prefix());
+    setMinlpDefaults(app_->Options());
+    optimized_before_ = false;
+    return true;
+  }
+
+  TNLPSolver::ReturnStatus
+  IpoptSolver::OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> &tnlp)
+  {
+#if 0
+    printf("Global Time limit set to %g\n", time_limit_);
+    double local_time_limit = time_limit_ - 
+                              CoinCpuTime() + start_time_;
+    printf("Time limit set to %g\n", local_time_limit);
+    if(local_time_limit <= 0.){
+       optimizationStatus_ = Ipopt::Maximum_CpuTime_Exceeded;
+       return solverReturnStatus(optimizationStatus_);
+    }
+#endif
+    TNLPSolver::ReturnStatus ret_status;
+    if (!zeroDimension(tnlp, ret_status)) {
+#if 0
+      if(time_limit_ < DBL_MAX){
+           options_->SetNumericValue("max_cpu_time", local_time_limit,
+                                  true, true);
+      }
+#endif
+      if (enable_warm_start_ && optimized_before_) {
+        optimizationStatus_ = app_->ReOptimizeTNLP(tnlp);
+      }
+      else {
+        optimizationStatus_ = app_->OptimizeTNLP(tnlp);
+      }
+      optimized_before_ = true;
+      problemHadZeroDimension_ = false;
+    }
+    else {
+      problemHadZeroDimension_ = true;
+      if (ret_status == solvedOptimal)
+        optimizationStatus_ = Ipopt::Solve_Succeeded;
+      else if (ret_status == provenInfeasible)
+        optimizationStatus_ = Ipopt::Infeasible_Problem_Detected;
+    }
+
+    if (BonminAbortAll)
+      optimizationStatus_ = Ipopt::Infeasible_Problem_Detected;
+
+    return solverReturnStatus(optimizationStatus_);
+  }
+
+
+  TNLPSolver::ReturnStatus
+  IpoptSolver::ReOptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> &tnlp)
+  {
+#if 0
+    printf("Global Time limit set to %g\n", time_limit_);
+    double local_time_limit = time_limit_ - 
+                              CoinCpuTime() + start_time_;
+    printf("Time limit set to %g\n", local_time_limit);
+    if(local_time_limit <= 0.){
+       optimizationStatus_ = Ipopt::Maximum_CpuTime_Exceeded;
+       return solverReturnStatus(optimizationStatus_);
+    }
+#endif
+    TNLPSolver::ReturnStatus ret_status;
+    if (!zeroDimension(tnlp, ret_status)) {
+#if 0
+      if(time_limit_ < DBL_MAX){
+        options_->SetNumericValue("max_cpu_time", 
+                                  std::max(0., local_time_limit),
+                                  true, true);
+      }
+#endif
+      if (optimized_before_) {
+        optimizationStatus_ = app_->ReOptimizeTNLP(tnlp);
+      }
+      else {
+        optimizationStatus_ = app_->OptimizeTNLP(tnlp);
+      }
+      problemHadZeroDimension_ = false;
+      optimized_before_ = true;
+    }
+    else {
+      problemHadZeroDimension_ = true;
+      if (ret_status == solvedOptimal)
+        optimizationStatus_ = Ipopt::Solve_Succeeded;
+      else if (ret_status == provenInfeasible)
+        optimizationStatus_ = Ipopt::Infeasible_Problem_Detected;
+    }
+    if (BonminAbortAll)
+      optimizationStatus_ = Ipopt::Infeasible_Problem_Detected;
+    return solverReturnStatus(optimizationStatus_);
+  }
+
+  /// Get the CpuTime of the last optimization.
+  double
+  IpoptSolver::CPUTime()
+  {
+    if (problemHadZeroDimension_) {
+      return 0.;
+    }
+    else {
+      const Ipopt::SmartPtr<Ipopt::SolveStatistics>  stats = app_->Statistics();
+      if (IsValid(stats)) {
+        return stats->TotalCpuTime();
+      }
+      else {
+        app_->Jnlst()->Printf(Ipopt::J_WARNING, Ipopt::J_STATISTICS, "No statistics available from Ipopt in Bonmin::IpoptSolver::CPUTime\n");
+        return 0.;
+        //throw CoinError("No statistics available from Ipopt","CPUTime","Bonmin::IpoptSolver");
+      }
+    }
+  }
+
+  /// Get the iteration count of the last optimization.
+  int
+  IpoptSolver::IterationCount()
+  {
+    if (problemHadZeroDimension_) {
+      return 0;
+    }
+    else {
+      const Ipopt::SmartPtr<Ipopt::SolveStatistics>  stats = app_->Statistics();
+      if (IsValid(stats)) {
+        return stats->IterationCount();
+      }
+      else {
+        app_->Jnlst()->Printf(Ipopt::J_WARNING, Ipopt::J_STATISTICS, "No statistics available from Ipopt in Bonmin::IpoptSolver::IterationCount\n");
+        return 0;
+        //throw CoinError("No statistics available from Ipopt","IterationCount","Bonmin::IpoptSolver");
+      }
+
+    }
+  }
+
+
+  void
+  IpoptSolver::setMinlpDefaults(Ipopt::SmartPtr<Ipopt::OptionsList> Options)
+  {
+    bool set = false;
+    double dummy_dbl;
+    int dummy_int;
+    set = Options->GetNumericValue("gamma_phi", dummy_dbl, "");
+    if(!set)
+    Options->SetNumericValue("gamma_phi", 1e-8, true, true);
+    set = Options->GetNumericValue("gamma_theta", dummy_dbl, "");
+    if(!set)
+    Options->SetNumericValue("gamma_theta", 1e-4, true, true);
+    set = Options->GetNumericValue("required_infeasibility_reduction", dummy_dbl, "");
+    if(!set)
+    Options->SetNumericValue("required_infeasibility_reduction", 0.1, true, true);
+    set = Options->GetEnumValue("expect_infeasible_problem",dummy_int, "");
+    if(!set)
+    Options->SetStringValue("expect_infeasible_problem","yes", true, true);
+    set = Options->GetEnumValue("mu_strategy", dummy_int, "");
+    if(!set)
+    Options->SetStringValue("mu_strategy", "adaptive", true, true);
+    set = Options->GetEnumValue("mu_oracle",dummy_int, "");
+    if(!set)
+    Options->SetStringValue("mu_oracle","probing", true, true);
+    if(!Options->GetIntegerValue("print_level",default_log_level_,"")) {
+      default_log_level_ = 1;
+      Options->SetIntegerValue("print_level",1, true, true);
+    }
+  }
+
+
+  ////////////////////////////////////////////////////////////////////
+  // Methods returning info on how the solution process terminated  //
+  ////////////////////////////////////////////////////////////////////
+  /// Are there a numerical difficulties?
+  TNLPSolver::ReturnStatus IpoptSolver::solverReturnStatus(Ipopt::ApplicationReturnStatus optimization_status) const
+  {
+
+    switch (optimization_status) {
+    case Ipopt::Maximum_Iterations_Exceeded:
+    case Ipopt::User_Requested_Stop:
+    case Ipopt::Restoration_Failed:
+      return iterationLimit;
+    case Ipopt::Error_In_Step_Computation:
+    case Ipopt::Unrecoverable_Exception:
+    case Ipopt::Insufficient_Memory:
+      return computationError;
+    case Ipopt::Not_Enough_Degrees_Of_Freedom:
+      return notEnoughFreedom;
+    case Ipopt::Invalid_Problem_Definition:
+      return illDefinedProblem;
+    case Ipopt::Invalid_Option:
+    case Ipopt::Invalid_Number_Detected:
+      return illegalOption;
+    case Ipopt::NonIpopt_Exception_Thrown:
+      return externalException;
+    case Ipopt::Internal_Error:
+      return exception;
+    case Ipopt::Solve_Succeeded:
+    case Ipopt::Feasible_Point_Found:
+      return solvedOptimal;
+    case Ipopt::Search_Direction_Becomes_Too_Small:
+      return doesNotConverge;
+    case Ipopt::Solved_To_Acceptable_Level:
+      return solvedOptimalTol;
+    case Ipopt::Infeasible_Problem_Detected:
+      return provenInfeasible;
+    case Ipopt::Diverging_Iterates:
+      return unbounded;
+    case Ipopt::Maximum_CpuTime_Exceeded:
+      return timeLimit;
+    default:
+      return exception;
+    }
+  }
+
+/// Get warm start used in last optimization
+CoinWarmStart *
+IpoptSolver::getUsedWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const
+{
+  if(tnlp->x_init() == NULL || tnlp->duals_init() == NULL)
+    return NULL;
+  return  new IpoptWarmStart(tnlp->num_variables(),
+                             2*tnlp->num_variables() + 
+                             tnlp->num_constraints(),
+                             tnlp->x_init(), tnlp->duals_init());
+}
+/// Get warmstarting information
+  CoinWarmStart*
+  IpoptSolver::getWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const
+  {
+      if (warmStartStrategy_==2) {
+        Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter =
+          Ipopt::SmartPtr<IpoptInteriorWarmStarter>(tnlp->GetWarmStarter());
+        return new IpoptWarmStart(tnlp, warm_starter);
+      }
+      else  return new IpoptWarmStart(tnlp, NULL);
+  }
+
+
+  bool
+  IpoptSolver::setWarmStart(const CoinWarmStart* warmstart,
+      Ipopt::SmartPtr<TMINLP2TNLP> tnlp)
+  {
+    if (!warmstart && warmStartStrategy_)
+      return 0;
+    const IpoptWarmStart * ws = dynamic_cast<const IpoptWarmStart*> (warmstart);
+    if(ws == NULL) return 0;
+    if (ws->empty())//reset initial point and leave
+    {
+      disableWarmStart();
+      return 1;
+    }
+    if(ws->dualSize() > 0){
+      tnlp->setDualsInit(ws->dualSize(), ws->dual());
+      enableWarmStart();
+    }
+    else
+      disableWarmStart();
+#ifndef NDEBUG
+    int numcols = tnlp->num_variables();
+    int numrows = tnlp->num_constraints();
+#endif
+
+    assert(numcols == ws->primalSize());
+    assert(2*numcols + numrows == ws->dualSize());
+    tnlp->setxInit(ws->primalSize(), ws->primal());
+
+    if (IsValid(ws->warm_starter()))
+      tnlp->SetWarmStarter(ws->warm_starter());
+
+    return 1;
+  }
+
+  bool 
+  IpoptSolver::warmStartIsValid(const CoinWarmStart * ws) const{
+    const IpoptWarmStart* iws = dynamic_cast<const IpoptWarmStart*>(ws);
+    if (iws && !iws->empty()) {
+      return true;
+    }
+    return false;
+  }
+
+  CoinWarmStart *
+  IpoptSolver::getEmptyWarmStart() const
+  {
+    return new IpoptWarmStart(1);
+  }
+
+  void
+  IpoptSolver::enableWarmStart()
+  {
+    enable_warm_start_ = true;
+    options_->SetStringValue("warm_start_init_point", "yes");
+  }
+
+  void
+  IpoptSolver::disableWarmStart()
+  {
+    enable_warm_start_ = false;
+    options_->SetStringValue("warm_start_init_point", "no");
+  }
+
+
+  void
+  IpoptSolver::setOutputToDefault()
+  {
+     options_->SetIntegerValue("print_level", default_log_level_, true, true);
+  }
+
+
+  void
+  IpoptSolver::forceSolverOutput(int log_level)
+  {
+     options_->SetIntegerValue("print_level", log_level, true, true);
+  }
+
+
+  /*******************************************************************************/
+// Class for throwing errors reported from Ipopt
+  /******************************************************************************/
+
+  std::string
+  IpoptSolver::UnsolvedIpoptError::errorNames[17] ={"Solve succeeded",
+      "Solved to acceptable level",
+      "Infeasible problem detected",
+      "Search direction becomes too small",
+      "Diverging iterates",
+      "User requested stop",
+      "Maximum iterations exceeded",
+      "Restoration failed",
+      "Error in step computation",
+      "Not enough degrees of freedom",
+      "Invalid problem definition",
+      "Invalid option",
+      "Invalid number detected",
+      "Unrecoverable exception",
+      "NonIpopt exception thrown",
+      "Insufficient memory",
+      "Internal error"};
+
+  const std::string &
+  IpoptSolver::UnsolvedIpoptError::errorName() const
+  {
+    if (errorNum() >=0)
+      return errorNames[errorNum()];
+    if (errorNum() == -1) return errorNames[6];
+    else if (errorNum() == -2) return errorNames[7];
+    else if (errorNum() == -3) return errorNames[8];
+    else if (errorNum() == -10) return errorNames[9];
+    else if (errorNum() == -11) return errorNames[10];
+    else if (errorNum() == -12) return errorNames[11];
+    else if (errorNum() == -13) return errorNames[12];
+    else if (errorNum() == -100) return errorNames[13];
+    else if (errorNum() == -101) return errorNames[14];
+    else if (errorNum() == -102) return errorNames[15];
+    else if (errorNum() == -199) return errorNames[16];
+    throw CoinError("UnsolvedError", "UnsolvedError::errorName()","Unrecognized optimization status in ipopt.");
+  }
+
+  std::string IpoptSolver::UnsolvedIpoptError::solverName_ = "Ipopt";
+
+  const std::string &
+  IpoptSolver::UnsolvedIpoptError::solverName() const
+  {
+    return solverName_;
+  }
+
+
+
+
+}//end namespace Bonmin
diff --git a/src/Interfaces/Ipopt/BonIpoptSolver.hpp b/src/Interfaces/Ipopt/BonIpoptSolver.hpp
new file mode 100644
index 0000000..ca90a88
--- /dev/null
+++ b/src/Interfaces/Ipopt/BonIpoptSolver.hpp
@@ -0,0 +1,188 @@
+// (C) Copyright International Business Machines (IBM) 2005, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, IBM
+//
+// Date : 26/09/2006
+
+#ifndef IpoptSolver_HPP
+#define IpoptSolver_HPP
+#include "BonTNLPSolver.hpp"
+#include "IpIpoptApplication.hpp"
+
+
+namespace Bonmin
+{
+  class IpoptSolver: public TNLPSolver
+  {
+  public:
+  class UnsolvedIpoptError: public TNLPSolver::UnsolvedError
+    {
+    public:
+      UnsolvedIpoptError(int errorNum,
+          Ipopt::SmartPtr<TMINLP2TNLP> problem,
+          std::string name):
+          TNLPSolver::UnsolvedError(errorNum, problem, name)
+      {}
+      virtual const std::string& errorName() const;
+
+      virtual const std::string& solverName() const;
+      virtual ~UnsolvedIpoptError()
+      {}
+    private:
+      static std::string errorNames [17];
+      static std::string solverName_;
+    };
+
+    virtual UnsolvedError * newUnsolvedError(int num,
+        Ipopt::SmartPtr<TMINLP2TNLP> problem,
+        std::string name)
+    {
+      return new UnsolvedIpoptError(num, problem, name);
+    }
+
+
+
+    /// Constructor
+    IpoptSolver(bool createEmpty = false);
+
+/// Constructor with Passed in journalist, registered options, options
+    IpoptSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        Ipopt::SmartPtr<Ipopt::Journalist> journalist,
+        const std::string & prefix);
+
+/// Constructor with Passed in journalist, registered options, options
+    IpoptSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
+        Ipopt::SmartPtr<Ipopt::OptionsList> options,
+        Ipopt::SmartPtr<Ipopt::Journalist> journalist);
+
+    /// Copy constructor
+    IpoptSolver(const IpoptSolver &other);
+
+    ///virtual copy constructor
+    virtual Ipopt::SmartPtr<TNLPSolver> clone();
+
+    /// Virtual destructor
+    virtual ~IpoptSolver();
+
+    /** Initialize the TNLPSolver (read options from params_file)
+    */
+    virtual bool Initialize(std::string params_file);
+
+    /** Initialize the TNLPSolver (read options from istream is)
+    */
+    virtual bool Initialize(std::istream& is);
+
+    /** @name Solve methods */
+    //@{
+    /// Solves a problem expresses as a TNLP
+    virtual TNLPSolver::ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp);
+
+    /// Resolves a problem expresses as a TNLP
+    virtual TNLPSolver::ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr<Ipopt::TNLP> & tnlp);
+
+    /// Set the warm start in the solver
+    virtual bool setWarmStart(const CoinWarmStart * warm,
+        Ipopt::SmartPtr<TMINLP2TNLP> tnlp);
+
+   /// Get warm start used in last optimization
+   virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr<TMINLP2TNLP> tnlp) const;
+
+
+    /// Get the warm start form the solver
+    virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr<Bonmin::TMINLP2TNLP> tnlp) const;
+
+    virtual CoinWarmStart * getEmptyWarmStart() const;
+
+    /** Check that warm start object is valid.*/
+    virtual bool warmStartIsValid(const CoinWarmStart * ws) const;
+
+    /// Enable the warm start options in the solver
+    virtual void enableWarmStart();
+
+    /// Disable the warm start options in the solver
+    virtual void disableWarmStart();
+
+    //@}
+
+    /// Get the CpuTime of the last optimization.
+    virtual double CPUTime();
+
+    /// Get the iteration count of the last optimization.
+    virtual int IterationCount();
+
+    /// turn off all output from the solver
+    virtual void setOutputToDefault();
+    /// turn on all output from the solver
+    virtual void forceSolverOutput(int log_level);
+
+    /// Get the solver name
+    virtual std::string & solverName()
+    {
+      return solverName_;
+    }
+
+    /// Register this solver options into passed roptions
+    static void RegisterOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
+    {
+      Ipopt::IpoptApplication::RegisterAllIpoptOptions(GetRawPtr(roptions));
+    }
+
+
+
+    /// Return status of last optimization
+    Ipopt::ApplicationReturnStatus getOptStatus() const
+    {
+      return optimizationStatus_;
+    }
+
+    Ipopt::IpoptApplication& getIpoptApp()
+    {
+      return *app_;
+    }
+
+    virtual int errorCode() const
+    {
+      return (int) optimizationStatus_;
+    }
+  private:
+    /** Set default Ipopt parameters for use in a MINLP */
+    void setMinlpDefaults(Ipopt::SmartPtr< Ipopt::OptionsList> Options);
+
+    /** get Bonmin return status from Ipopt one. */
+    TNLPSolver::ReturnStatus solverReturnStatus(Ipopt::ApplicationReturnStatus optimization_status) const;
+
+    /** Ipopt application */
+    Ipopt::SmartPtr<Ipopt::IpoptApplication> app_;
+    /** return status of last optimization.*/
+    Ipopt::ApplicationReturnStatus optimizationStatus_;
+    //@}
+
+
+    /** Flag to indicate if last problem solved had 0 dimension. (in this case Ipopt was not called).*/
+    bool problemHadZeroDimension_;
+
+    /** Warm start strategy :
+    <ol>
+    <li> no warm start,</li>
+    <li> simple warm start (optimal point),</li>
+    <li> more elaborate strategies (interior point...).</li>
+    </ol>
+    */
+    int warmStartStrategy_;
+
+    /** flag remembering if we want to use warm start option */
+    bool enable_warm_start_;
+
+    /** flag remembering if we have call the Optimize method of the
+        IpoptInterface before */
+    bool optimized_before_;
+    //name of solver (Ipopt)
+    static std::string  solverName_;
+  };
+}
+#endif
+
diff --git a/src/Interfaces/Ipopt/BonIpoptWarmStart.cpp b/src/Interfaces/Ipopt/BonIpoptWarmStart.cpp
new file mode 100644
index 0000000..a07d85f
--- /dev/null
+++ b/src/Interfaces/Ipopt/BonIpoptWarmStart.cpp
@@ -0,0 +1,120 @@
+// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 02/15/2006
+
+#include "BonIpoptWarmStart.hpp"
+#include "CoinHelperFunctions.hpp"
+
+#include "BonTMINLP2TNLP.hpp"
+#include "BonIpoptInteriorWarmStarter.hpp"
+
+using namespace Ipopt;
+
+namespace Bonmin
+{
+/// Default constructor
+  IpoptWarmStart::IpoptWarmStart
+  (bool empty, int numvars, int numcont):
+      CoinWarmStartPrimalDual(),
+      CoinWarmStartBasis(),
+      warm_starter_(NULL),
+      empty_(empty)
+  {
+    setSize(numvars,numcont);
+  }
+/// Usefull constructor
+  IpoptWarmStart::IpoptWarmStart(const Ipopt::SmartPtr<TMINLP2TNLP> tnlp,
+      SmartPtr<IpoptInteriorWarmStarter> warm_starter):
+      CoinWarmStartPrimalDual(tnlp->num_variables(),
+			      2*tnlp->num_variables()+tnlp->num_constraints(),
+			      tnlp->x_sol(), tnlp->duals_sol() ),
+      CoinWarmStartBasis(),
+      warm_starter_(warm_starter),
+      empty_(false)
+  {
+    int numcols = tnlp->num_variables();
+    int numrows = tnlp->num_constraints();
+    // initialize the size in the CoinWarmStartBasis part
+    setSize(numcols,numrows);
+  }
+
+/// Another usefull constructor, stores the passed point
+IpoptWarmStart::IpoptWarmStart(int primal_size, int dual_size,
+                   const double * primal, const double * dual):
+          CoinWarmStartPrimalDual(primal_size, dual_size, primal, dual),
+          CoinWarmStartBasis(),
+          warm_starter_(NULL), 
+          empty_(false)
+{
+   setSize(primal_size, dual_size - 2* primal_size);
+}
+/// Copy constructor
+  IpoptWarmStart::IpoptWarmStart( const IpoptWarmStart &other, bool ownValues):
+    CoinWarmStartPrimalDual(other),
+    CoinWarmStartBasis(other),
+    warm_starter_(NULL /*other.warm_starter_*/),
+    empty_(other.empty_)
+  {
+    //  if(ownValues_ && other.values_ != NULL)
+  }
+
+/// A constructor from a CoinWarmStartPrimalDual
+  IpoptWarmStart::IpoptWarmStart(const CoinWarmStartPrimalDual& pdws) :
+    CoinWarmStartPrimalDual(pdws),
+    CoinWarmStartBasis(),
+    warm_starter_(NULL),
+    empty_(false)
+  {   
+  }
+  
+  CoinWarmStartDiff*
+  IpoptWarmStart::generateDiff(const CoinWarmStart *const oldCWS) const
+  {
+    const IpoptWarmStart * const ws =
+      dynamic_cast< const IpoptWarmStart * const > (oldCWS);
+    DBG_ASSERT(ws);
+
+    CoinWarmStartDiff * diff = CoinWarmStartPrimalDual::generateDiff(ws);
+
+    CoinWarmStartPrimalDualDiff * pdDiff =
+      dynamic_cast<CoinWarmStartPrimalDualDiff*>(diff);
+
+    CoinWarmStartDiff* retval =
+      new IpoptWarmStartDiff(pdDiff, NULL);//warm_starter_);
+    delete diff;
+
+    return retval;
+  }
+
+
+  void
+  IpoptWarmStart::applyDiff (const CoinWarmStartDiff *const cwsdDiff)
+  {
+    IpoptWarmStartDiff const * const ipoptDiff =
+      dynamic_cast<IpoptWarmStartDiff const * const > (cwsdDiff);
+    DBG_ASSERT(ipoptDiff);
+    CoinWarmStartPrimalDual::applyDiff(ipoptDiff);
+    warm_starter_ = ipoptDiff->warm_starter();
+  }
+
+  IpoptWarmStart::~IpoptWarmStart()
+  {}
+
+  void
+  IpoptWarmStart::flushPoint()
+  {
+    CoinWarmStartPrimalDual::clear();
+  }
+
+  void
+  IpoptWarmStartDiff::flushPoint()
+  {
+    CoinWarmStartPrimalDualDiff::clear();
+  }
+}
diff --git a/src/Interfaces/Ipopt/BonIpoptWarmStart.hpp b/src/Interfaces/Ipopt/BonIpoptWarmStart.hpp
new file mode 100644
index 0000000..fd8864f
--- /dev/null
+++ b/src/Interfaces/Ipopt/BonIpoptWarmStart.hpp
@@ -0,0 +1,148 @@
+// (C) Copyright International Business Machines Corporation, Carnegie Mellon University 2006
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// Pierre Bonami, Carnegie Mellon University,
+// Andreas Waechter, International Business Machines Corporation
+//
+// Date : 02/15/2006
+
+
+#ifndef IpoptWarmStart_HPP
+#define IpoptWarmStart_HPP
+#include "CoinWarmStartBasis.hpp"
+#include "CoinWarmStartPrimalDual.hpp"
+#include "BonIpoptInteriorWarmStarter.hpp"
+
+
+namespace Bonmin
+{
+  class TMINLP2TNLP;
+
+  /** \brief Class for storing warm start informations for Ipopt.<br>
+   * This class inherits from CoinWarmStartPrimalDual, because that's what
+   * this warmstart really is. <br>
+   * For practical reason (integration in Cbc) this class also inherits from
+   * CoinWarmStartBasis. <br>
+   * This class stores a starting point (primal and dual values) for Ipopt.
+   * <br>
+   * <p>
+   * The primal part of the base class contains the value of each primal
+   * variable.
+   * <p>
+   * The dual part of the base class consists of three sections (the number of
+   * values is 2*numcols+numrows):
+     <UL>
+     <li> First, values for dual variables associated with the lower bound
+          constraints on structurals, i.e., primal variables (constraints
+	  \f$ l \leq x \f$); 
+     <li> Then values for dual variables associated with upper bound
+           constraints on structurals (constraints \f$ x \leq u\f$).
+     <li> the values for dual variables associated with regular constraints
+          (constraints \f$ g(x) \leq 0 \f$) 
+     </UL>
+   */
+  class IpoptWarmStart :
+    public virtual CoinWarmStartPrimalDual, public virtual CoinWarmStartBasis
+  {
+  public:
+
+    /// Default constructor
+    IpoptWarmStart(bool empty = 1, int numvars = 0, int numcont = 0);
+    /// Usefull constructor, stores the current optimum of ipopt
+    IpoptWarmStart(const Ipopt::SmartPtr<TMINLP2TNLP> tnlp,
+        Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter);
+    /// Another usefull constructor, stores the passed point
+    IpoptWarmStart(int primal_size, int dual_size,
+                   const double * primal, const double * dual);
+    /// Copy constructor
+    IpoptWarmStart( const IpoptWarmStart &other, bool ownValues = 1);
+    /// A constructor from a CoinWarmStartPrimalDual
+    IpoptWarmStart(const CoinWarmStartPrimalDual& pdws);
+    /// Abstract destructor
+    virtual ~IpoptWarmStart();
+
+    /// `Virtual constructor'
+    virtual CoinWarmStart *clone() const
+    {
+      return new IpoptWarmStart(*this,1);
+    }
+
+    /** Generate the "differences" between two IpoptWarmStart.*/
+    virtual CoinWarmStartDiff*
+    generateDiff(const CoinWarmStart *const oldCWS) const;
+    /** \brief Apply 'differences' to an Ipopt warm start.
+     * What this actually does is get a copy to the vector of values stored
+     in IpoptWarmStartDiff.*/
+    virtual void
+    applyDiff (const CoinWarmStartDiff *const cwsdDiff);
+
+    /** Accessor to warm start information obecjt */
+    Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter() const
+    {
+      return warm_starter_;
+    }
+
+    /// flush the starting point
+    void flushPoint();
+
+    ///Is this an empty warm start?
+    bool empty() const
+    {
+      return empty_;
+    }
+  private:
+    /** warm start information object */
+    mutable Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter_;
+    ///Say if warm start is empty
+    bool empty_;
+  };
+
+  //###########################################################################
+
+  /** \brief Diff class for IpoptWarmStart.
+   * Actually get the differences from CoinWarmStartBasis and stores the
+   whole vector of values.
+   \todo Find a way to free unused values.
+  */
+  class IpoptWarmStartDiff : public CoinWarmStartPrimalDualDiff
+  {
+  public:
+    friend class IpoptWarmStart;
+    /** Useful constructor; takes over the data in \c diff */
+    IpoptWarmStartDiff(CoinWarmStartPrimalDualDiff * diff,
+		       Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter):
+      CoinWarmStartPrimalDualDiff(),
+      warm_starter_(NULL)//(warm_starter)
+    {
+      CoinWarmStartPrimalDualDiff::swap(*diff);
+    }
+    /** Copy constructor. */
+    IpoptWarmStartDiff(const IpoptWarmStartDiff &other):
+        CoinWarmStartPrimalDualDiff(other),
+        warm_starter_(NULL /*other.warm_starter_*/) {}
+
+    /// Abstract destructor
+    virtual ~IpoptWarmStartDiff() {}
+
+    /// `Virtual constructor'
+    virtual CoinWarmStartDiff *clone() const
+    {
+      return new IpoptWarmStartDiff(*this);
+    }
+
+    /** Accessor to warm start information obecjt */
+    Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter() const
+    {
+      return warm_starter_;
+    }
+    void flushPoint();
+  private:
+
+    /** warm start information object */
+    Ipopt::SmartPtr<IpoptInteriorWarmStarter> warm_starter_;
+  };
+
+}
+#endif
diff --git a/src/Interfaces/Ipopt/Makefile.am b/src/Interfaces/Ipopt/Makefile.am
new file mode 100644
index 0000000..09132e2
--- /dev/null
+++ b/src/Interfaces/Ipopt/Makefile.am
@@ -0,0 +1,77 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 83 2006-10-23 16:53:13Z pbonami $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libipoptinterface.la
+
+# List all source files, including headers
+libipoptinterface_la_SOURCES = \
+	BonIpoptInteriorWarmStarter.cpp  BonIpoptSolver.cpp \
+        BonIpoptWarmStart.cpp \
+        BonIpoptInteriorWarmStarter.hpp  BonIpoptSolver.hpp \
+        BonIpoptWarmStart.hpp
+
+# This is for libtool
+libipoptinterface_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/..` $(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+	BonIpoptInteriorWarmStarter.hpp \
+	BonIpoptSolver.hpp \
+	BonIpoptWarmStart.hpp
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+         BonIpoptInteriorWarmStarter.cppbak \
+         BonIpoptSolver.cppbak \
+         BonIpoptWarmStart.cppbak \
+         BonIpoptInteriorWarmStarter.hppbak \
+         BonIpoptSolver.hppbak \
+         BonIpoptWarmStart.hppbak
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Interfaces/Ipopt/Makefile.in b/src/Interfaces/Ipopt/Makefile.in
new file mode 100644
index 0000000..23d93b9
--- /dev/null
+++ b/src/Interfaces/Ipopt/Makefile.in
@@ -0,0 +1,644 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/Interfaces/Ipopt
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libipoptinterface_la_LIBADD =
+am_libipoptinterface_la_OBJECTS = BonIpoptInteriorWarmStarter.lo \
+	BonIpoptSolver.lo BonIpoptWarmStart.lo
+libipoptinterface_la_OBJECTS = $(am_libipoptinterface_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libipoptinterface_la_SOURCES)
+DIST_SOURCES = $(libipoptinterface_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libipoptinterface.la
+
+# List all source files, including headers
+libipoptinterface_la_SOURCES = \
+	BonIpoptInteriorWarmStarter.cpp  BonIpoptSolver.cpp \
+        BonIpoptWarmStart.cpp \
+        BonIpoptInteriorWarmStarter.hpp  BonIpoptSolver.hpp \
+        BonIpoptWarmStart.hpp
+
+
+# This is for libtool
+libipoptinterface_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = -I`$(CYGPATH_W) $(srcdir)/..` $(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+	BonIpoptInteriorWarmStarter.hpp \
+	BonIpoptSolver.hpp \
+	BonIpoptWarmStart.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+         BonIpoptInteriorWarmStarter.cppbak \
+         BonIpoptSolver.cppbak \
+         BonIpoptWarmStart.cppbak \
+         BonIpoptInteriorWarmStarter.hppbak \
+         BonIpoptSolver.hppbak \
+         BonIpoptWarmStart.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Interfaces/Ipopt/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Interfaces/Ipopt/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libipoptinterface.la: $(libipoptinterface_la_OBJECTS) $(libipoptinterface_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libipoptinterface_la_LDFLAGS) $(libipoptinterface_la_OBJECTS) $(libipoptinterface_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonIpoptInteriorWarmStarter.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonIpoptSolver.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonIpoptWarmStart.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includecoinHEADERS \
+	uninstall-info-am
+
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Interfaces/Makefile.am b/src/Interfaces/Makefile.am
new file mode 100644
index 0000000..bdd131f
--- /dev/null
+++ b/src/Interfaces/Makefile.am
@@ -0,0 +1,150 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 2092 2013-12-16 10:58:03Z stefan $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+#We need to do autothings in the subdirectories for the different interfaces
+SUBDIRS = Ipopt
+if COIN_HAS_ASL
+SUBDIRS += Ampl
+endif
+if COIN_HAS_FILTERSQP
+SUBDIRS += Filter
+endif
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonmininterfaces.la 
+# List all source files, including headers
+libbonmininterfaces_la_SOURCES = \
+        BonAuxInfos.cpp BonAuxInfos.hpp \
+	BonBoundsReader.cpp BonBoundsReader.hpp \
+	BonColReader.cpp BonColReader.hpp \
+	BonCutStrengthener.cpp BonCutStrengthener.hpp \
+	BonStartPointReader.cpp BonStartPointReader.hpp \
+	BonOsiTMINLPInterface.cpp BonOsiTMINLPInterface.hpp \
+	BonTMINLP2TNLP.cpp BonTMINLP2TNLP.hpp \
+	BonTMINLP2OsiLP.cpp BonTMINLP2OsiLP.hpp \
+	BonTMINLP.cpp BonTMINLP.hpp \
+	BonTNLPSolver.hpp BonTNLPSolver.cpp \
+	BonTNLP2FPNLP.cpp BonTNLP2FPNLP.hpp \
+	BonBranchingTQP.cpp BonBranchingTQP.hpp \
+	BonStrongBranchingSolver.cpp BonStrongBranchingSolver.hpp \
+        BonRegisteredOption.hpp BonRegisteredOptions.cpp
+
+#sublibraries for various installed solvers
+libbonmininterfaces_la_LIBADD = Ipopt/libipoptinterface.la 
+
+if COIN_HAS_FILTERSQP
+libbonmininterfaces_la_LIBADD += Filter/libfilterinterface.la
+endif
+
+libbonmininterfaces_la_DEPENDENCIES = $(libbonmininterfaces_la_LIBADD)
+
+# This is for libtool (on Windows)
+libbonmininterfaces_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin` \
+	$(BONMINLIB_CFLAGS)
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)`
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+     BonOsiTMINLPInterface.hpp \
+     BonTMINLP2TNLP.hpp \
+     BonAuxInfos.hpp \
+     BonTMINLP.hpp \
+     BonTNLP2FPNLP.hpp \
+     BonCutStrengthener.hpp \
+     BonTNLPSolver.hpp \
+     BonBranchingTQP.hpp \
+     BonStrongBranchingSolver.hpp \
+     BonTMINLP2OsiLP.hpp \
+     BonTypes.hpp \
+     BonRegisteredOptions.hpp \
+     BonExitCodes.hpp
+
+install-exec-local:
+	$(install_sh_DATA) config_bonmin.h $(DESTDIR)$(includecoindir)/BonminConfig.h
+
+uninstall-local:
+	rm -f $(DESTDIR)$(includecoindir)/BonminConfig.h
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonAuxInfos.cppbak \
+	BonAuxInfos.hppbak \
+	BonBoundsReader.cppbak \
+	BonBoundsReader.hppbak \
+	BonBranchingTQP.cppbak \
+	BonBranchingTQP.hppbak \
+	BonColReader.cppbak \
+	BonColReader.hppbak \
+	BonCurvatureEstimator.cppbak \
+	BonCurvatureEstimator.hppbak \
+	BonCutStrengthener.cppbak \
+	BonCutStrengthener.hppbak \
+	BonExitCodes.hppbak \
+	BonOsiTMINLPInterface.cppbak \
+	BonOsiTMINLPInterface.hppbak \
+	BonRegisteredOptions.cppbak \
+	BonRegisteredOptions.hppbak \
+	BonStartPointReader.cppbak \
+	BonStartPointReader.hppbak \
+	BonStrongBranchingSolver.cppbak \
+	BonStrongBranchingSolver.hppbak \
+	BonTMINLP2TNLP.cppbak \
+	BonTMINLP2TNLP.hppbak \
+	BonTMINLP.cppbak \
+	BonTMINLP.hppbak \
+	BonTNLP2FPNLP.cppbak \
+	BonTNLP2FPNLP.hppbak \
+	BonTNLPSolver.cppbak \
+	BonTNLPSolver.hppbak \
+	BonTypes.hppbak
+
+
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+
+CLEANFILES = $(ASTYLE_FILES)
+
+SUFFIXES = .cppbak .hppbak
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
diff --git a/src/Interfaces/Makefile.in b/src/Interfaces/Makefile.in
new file mode 100644
index 0000000..9149a01
--- /dev/null
+++ b/src/Interfaces/Makefile.in
@@ -0,0 +1,867 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at COIN_HAS_ASL_TRUE@am__append_1 = Ampl
+ at COIN_HAS_FILTERSQP_TRUE@am__append_2 = Filter
+ at COIN_HAS_FILTERSQP_TRUE@am__append_3 = Filter/libfilterinterface.la
+subdir = src/Interfaces
+DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(srcdir)/config_bonmin.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h config_bonmin.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+ at COIN_HAS_FILTERSQP_TRUE@am__DEPENDENCIES_1 =  \
+ at COIN_HAS_FILTERSQP_TRUE@	Filter/libfilterinterface.la
+am_libbonmininterfaces_la_OBJECTS = BonAuxInfos.lo BonBoundsReader.lo \
+	BonColReader.lo BonCutStrengthener.lo BonStartPointReader.lo \
+	BonOsiTMINLPInterface.lo BonTMINLP2TNLP.lo BonTMINLP2OsiLP.lo \
+	BonTMINLP.lo BonTNLPSolver.lo BonTNLP2FPNLP.lo \
+	BonBranchingTQP.lo BonStrongBranchingSolver.lo \
+	BonRegisteredOptions.lo
+libbonmininterfaces_la_OBJECTS = $(am_libbonmininterfaces_la_OBJECTS)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libbonmininterfaces_la_SOURCES)
+DIST_SOURCES = $(libbonmininterfaces_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includecoindir)"
+includecoinHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(includecoin_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = Ipopt Ampl Filter
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+
+#We need to do autothings in the subdirectories for the different interfaces
+SUBDIRS = Ipopt $(am__append_1) $(am__append_2)
+
+########################################################################
+#                          libipoptinterface                           #
+########################################################################
+
+# Name of the library in this directory
+noinst_LTLIBRARIES = libbonmininterfaces.la 
+# List all source files, including headers
+libbonmininterfaces_la_SOURCES = \
+        BonAuxInfos.cpp BonAuxInfos.hpp \
+	BonBoundsReader.cpp BonBoundsReader.hpp \
+	BonColReader.cpp BonColReader.hpp \
+	BonCutStrengthener.cpp BonCutStrengthener.hpp \
+	BonStartPointReader.cpp BonStartPointReader.hpp \
+	BonOsiTMINLPInterface.cpp BonOsiTMINLPInterface.hpp \
+	BonTMINLP2TNLP.cpp BonTMINLP2TNLP.hpp \
+	BonTMINLP2OsiLP.cpp BonTMINLP2OsiLP.hpp \
+	BonTMINLP.cpp BonTMINLP.hpp \
+	BonTNLPSolver.hpp BonTNLPSolver.cpp \
+	BonTNLP2FPNLP.cpp BonTNLP2FPNLP.hpp \
+	BonBranchingTQP.cpp BonBranchingTQP.hpp \
+	BonStrongBranchingSolver.cpp BonStrongBranchingSolver.hpp \
+        BonRegisteredOption.hpp BonRegisteredOptions.cpp
+
+
+#sublibraries for various installed solvers
+libbonmininterfaces_la_LIBADD = Ipopt/libipoptinterface.la \
+	$(am__append_3)
+libbonmininterfaces_la_DEPENDENCIES = $(libbonmininterfaces_la_LIBADD)
+
+# This is for libtool (on Windows)
+libbonmininterfaces_la_LDFLAGS = $(LT_LDFLAGS)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Windows
+AM_CPPFLAGS = \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin` \
+	$(BONMINLIB_CFLAGS)
+
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)`
+
+########################################################################
+#                Headers that need to be installed                     #
+########################################################################
+
+# Here list all the header files that are required by a user of the library,
+# and that therefore should be installed in 'include/coin'
+includecoindir = $(includedir)/coin
+includecoin_HEADERS = \
+     BonOsiTMINLPInterface.hpp \
+     BonTMINLP2TNLP.hpp \
+     BonAuxInfos.hpp \
+     BonTMINLP.hpp \
+     BonTNLP2FPNLP.hpp \
+     BonCutStrengthener.hpp \
+     BonTNLPSolver.hpp \
+     BonBranchingTQP.hpp \
+     BonStrongBranchingSolver.hpp \
+     BonTMINLP2OsiLP.hpp \
+     BonTypes.hpp \
+     BonRegisteredOptions.hpp \
+     BonExitCodes.hpp
+
+
+########################################################################
+#                            Astyle stuff                              #
+########################################################################
+
+# Here repeat all source files, with "bak" appended
+ASTYLE_FILES = \
+	BonAuxInfos.cppbak \
+	BonAuxInfos.hppbak \
+	BonBoundsReader.cppbak \
+	BonBoundsReader.hppbak \
+	BonBranchingTQP.cppbak \
+	BonBranchingTQP.hppbak \
+	BonColReader.cppbak \
+	BonColReader.hppbak \
+	BonCurvatureEstimator.cppbak \
+	BonCurvatureEstimator.hppbak \
+	BonCutStrengthener.cppbak \
+	BonCutStrengthener.hppbak \
+	BonExitCodes.hppbak \
+	BonOsiTMINLPInterface.cppbak \
+	BonOsiTMINLPInterface.hppbak \
+	BonRegisteredOptions.cppbak \
+	BonRegisteredOptions.hppbak \
+	BonStartPointReader.cppbak \
+	BonStartPointReader.hppbak \
+	BonStrongBranchingSolver.cppbak \
+	BonStrongBranchingSolver.hppbak \
+	BonTMINLP2TNLP.cppbak \
+	BonTMINLP2TNLP.hppbak \
+	BonTMINLP.cppbak \
+	BonTMINLP.hppbak \
+	BonTNLP2FPNLP.cppbak \
+	BonTNLP2FPNLP.hppbak \
+	BonTNLPSolver.cppbak \
+	BonTNLPSolver.hppbak \
+	BonTypes.hppbak
+
+CLEANFILES = $(ASTYLE_FILES)
+SUFFIXES = .cppbak .hppbak
+all: config.h config_bonmin.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cppbak .hppbak .cpp .hpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Interfaces/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Interfaces/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/Interfaces/config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+config_bonmin.h: stamp-h2
+	@if test ! -f $@; then \
+	  rm -f stamp-h2; \
+	  $(MAKE) stamp-h2; \
+	else :; fi
+
+stamp-h2: $(srcdir)/config_bonmin.h.in $(top_builddir)/config.status
+	@rm -f stamp-h2
+	cd $(top_builddir) && $(SHELL) ./config.status src/Interfaces/config_bonmin.h
+
+distclean-hdr:
+	-rm -f config.h stamp-h1 config_bonmin.h stamp-h2
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libbonmininterfaces.la: $(libbonmininterfaces_la_OBJECTS) $(libbonmininterfaces_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libbonmininterfaces_la_LDFLAGS) $(libbonmininterfaces_la_OBJECTS) $(libbonmininterfaces_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonAuxInfos.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonBoundsReader.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonBranchingTQP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonColReader.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonCutStrengthener.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonOsiTMINLPInterface.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonRegisteredOptions.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonStartPointReader.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonStrongBranchingSolver.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTMINLP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTMINLP2OsiLP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTMINLP2TNLP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTNLP2FPNLP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BonTNLPSolver.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-includecoinHEADERS: $(includecoin_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includecoindir)" || $(mkdir_p) "$(DESTDIR)$(includecoindir)"
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includecoinHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  $(includecoinHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+uninstall-includecoinHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(includecoin_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includecoindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includecoindir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in config_bonmin.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config.h.in config_bonmin.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in config_bonmin.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in config_bonmin.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h config_bonmin.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(includecoindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-includecoinHEADERS
+
+install-exec-am: install-exec-local
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-includecoinHEADERS uninstall-info-am \
+	uninstall-local
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	clean-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-recursive distclean-tags distdir \
+	dvi dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-exec-local install-includecoinHEADERS install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-includecoinHEADERS uninstall-info-am uninstall-local
+
+
+install-exec-local:
+	$(install_sh_DATA) config_bonmin.h $(DESTDIR)$(includecoindir)/BonminConfig.h
+
+uninstall-local:
+	rm -f $(DESTDIR)$(includecoindir)/BonminConfig.h
+
+astyle: $(ASTYLE_FILES)
+
+.hpp.hppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+
+.cpp.cppbak:
+	mv $< $@
+	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
+	touch $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Interfaces/config.h.in b/src/Interfaces/config.h.in
new file mode 100644
index 0000000..217499d
--- /dev/null
+++ b/src/Interfaces/config.h.in
@@ -0,0 +1,105 @@
+/* src/Interfaces/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* SVN revision number of project */
+#undef BONMIN_SVN_REV
+
+/* Version number of project */
+#undef BONMIN_VERSION
+
+/* Major Version number of project */
+#undef BONMIN_VERSION_MAJOR
+
+/* Minor Version number of project */
+#undef BONMIN_VERSION_MINOR
+
+/* Release Version number of project */
+#undef BONMIN_VERSION_RELEASE
+
+/* Define to the debug sanity check level (0 is no test) */
+#undef COIN_BONMIN_CHECKLEVEL
+
+/* Define to the debug verbosity level (0 is no output) */
+#undef COIN_BONMIN_VERBOSITY
+
+/* Define to 1 if the ASL package is available */
+#undef COIN_HAS_ASL
+
+/* Define to 1 if the CoinDepend package is available */
+#undef COIN_HAS_COINDEPEND
+
+/* Define to 1 if the Cplex package is available */
+#undef COIN_HAS_CPX
+
+/* Define to 1 if the FilterSQP package is available */
+#undef COIN_HAS_FILTERSQP
+
+/* Define to 1 if the OsiCpx package is available */
+#undef COIN_HAS_OSICPX
+
+/* Define to dummy `main' function (if any) required to link to the Fortran
+   libraries. */
+#undef F77_DUMMY_MAIN
+
+/* Define to a macro mangling the given C identifier (in lower and upper
+   case), which must not contain underscores, for linking with Fortran. */
+#undef F77_FUNC
+
+/* As F77_FUNC, but for C identifiers containing underscores. */
+#undef F77_FUNC_
+
+/* Define if F77 and FC dummy `main' functions are identical. */
+#undef FC_DUMMY_MAIN_EQ_F77
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/src/Interfaces/config_bonmin.h.in b/src/Interfaces/config_bonmin.h.in
new file mode 100644
index 0000000..fa4e0c9
--- /dev/null
+++ b/src/Interfaces/config_bonmin.h.in
@@ -0,0 +1,18 @@
+/* src/Interfaces/config_bonmin.h.in. */
+
+#ifndef __CONFIG_BONMIN_H__
+#define __CONFIG_BONMIN_H__
+
+/* Version number of project */
+#undef BONMIN_VERSION
+
+/* Major Version number of project */
+#undef BONMIN_VERSION_MAJOR
+
+/* Minor Version number of project */
+#undef BONMIN_VERSION_MINOR
+
+/* Release Version number of project */
+#undef BONMIN_VERSION_RELEASE
+
+#endif
diff --git a/src/Interfaces/config_bonmin_default.h b/src/Interfaces/config_bonmin_default.h
new file mode 100644
index 0000000..280730a
--- /dev/null
+++ b/src/Interfaces/config_bonmin_default.h
@@ -0,0 +1,17 @@
+
+/***************************************************************************/
+/*           HERE DEFINE THE PROJECT SPECIFIC PUBLIC MACROS                */
+/*    These are only in effect in a setting that doesn't use configure     */
+/***************************************************************************/
+
+/* Version number of project */
+#define BONMIN_VERSION "1.7.4"
+
+/* Major Version number of project */
+#define BONMIN_VERSION_MAJOR 1
+
+/* Minor Version number of project */
+#define BONMIN_VERSION_MINOR 7
+
+/* Release Version number of project */
+#define BONMIN_VERSION_RELEASE 4
diff --git a/src/Interfaces/config_default.h b/src/Interfaces/config_default.h
new file mode 100644
index 0000000..c7b3809
--- /dev/null
+++ b/src/Interfaces/config_default.h
@@ -0,0 +1,20 @@
+
+/* include the COIN-OR-wide system specific configure header */
+#include "configall_system.h"
+
+/* include the public project specific macros */
+#include "config_bonmin_default.h"
+
+/***************************************************************************/
+/*             HERE DEFINE THE PROJECT SPECIFIC MACROS                     */
+/*    These are only in effect in a setting that doesn't use configure     */
+/***************************************************************************/
+
+/* Define to the debug sanity check level (0 is no test) */
+#define COIN_BONMIN_CHECKLEVEL 0
+
+/* Define to the debug verbosity level (0 is no output) */
+#define COIN_BONMIN_VERBOSITY 0
+
+/* If defined, the Ampl Solver Library is available. */
+#define COIN_HAS_ASL 1
diff --git a/test/InterfaceTest.cpp b/test/InterfaceTest.cpp
new file mode 100644
index 0000000..1bd74c8
--- /dev/null
+++ b/test/InterfaceTest.cpp
@@ -0,0 +1,402 @@
+// (C) Copyright Carnegie Mellon University 2005, 2007
+// All Rights Reserved.
+// This code is published under the Common Public License.
+//
+// Authors :
+// P. Bonami, Carnegie Mellon University
+//
+// Date :  07/01/2005
+
+#include "BonminConfig.h"
+#include "BonAmplInterface.hpp"
+#include "OsiClpSolverInterface.hpp"
+#include "BonTMINLP.hpp"
+#include "IpIpoptApplication.hpp"
+#ifdef COIN_HAS_ASL
+#include "BonAmplTMINLP.hpp"
+#include "BonAmplSetup.hpp"
+#endif
+
+#include "BonIpoptSolver.hpp"
+#include "BonminConfig.h"
+
+#ifdef COIN_HAS_FILTERSQP
+#include "BonFilterSolver.hpp"
+#endif
+
+#include "CoinError.hpp"
+
+#include <string>
+#include <cmath>
+using namespace Bonmin;
+
+void MyAssertFunc(bool c, const std::string &s, const std::string&  file, unsigned int line){
+   if(c != true){
+      fprintf(stderr, "Failed MyAssertion: %s in %s line %i.\n", s.c_str(), file.c_str(), line);
+      exit(1);
+   }
+}
+
+void DblEqAssertFunc(const double& a, const std::string &a_s, const double&b, const std::string& b_s,
+                  const std::string&  file, unsigned int line){
+   CoinRelFltEq eq;
+   if(!eq(a,b)){
+      fprintf(stderr, "Failed comparison: %s = %f != %s =%f in  %s line %i.\n", a_s.c_str(),
+              a, b_s.c_str(), b, file.c_str(), line);
+      exit(1);
+   }
+}
+
+#define MAKE_STRING(exp) std::string(#exp)
+#define MyAssert(exp)  MyAssertFunc(exp, MAKE_STRING(exp), __FILE__, __LINE__);
+#define DblEqAssert(a,b)  DblEqAssertFunc(a,MAKE_STRING(a),b,MAKE_STRING(b), __FILE__, __LINE__);
+
+
+
+/** Test function for the Osi interface to Ipopt (or any nlp solver). <br>
+    If Solver passes all the test then it should have everything needed to be integrated into bonmin. */
+
+void testGetMethods(OsiTMINLPInterface &si)
+{
+    CoinRelFltEq eq;// to test equality of doubles    
+    std::cout<<"Checking get functions"<<std::endl;
+      // Problem size
+      MyAssert(si.getNumCols()==4);
+      MyAssert(si.getNumRows()==3);
+      
+      //Check bounds on columns
+      const double * colLow = si.getColLower();
+      DblEqAssert(colLow[0],0.);
+      DblEqAssert(colLow[1],0.);
+      DblEqAssert(colLow[2],0.);
+      DblEqAssert(colLow[3],0.);
+      
+      const double * colUp = si.getColUpper();
+      MyAssert(colUp[0]>si.getInfinity());
+      MyAssert(colUp[1]>si.getInfinity());
+      DblEqAssert(colUp[2],1.);
+      DblEqAssert(colUp[3],5.);
+      //Check bounds on rows
+      const double * rowLow = si.getRowLower();
+      MyAssert(rowLow[0]<= -si.getInfinity());
+      MyAssert(rowLow[1]<= -si.getInfinity());
+      MyAssert(rowLow[2]<= -si.getInfinity());
+                  
+      const double * rowUp = si.getRowUpper();
+      DblEqAssert(rowUp[0], 1./4.);
+      DblEqAssert(rowUp[1], 0.);
+      DblEqAssert(rowUp[2], 2.);
+
+      //check objective sense
+      MyAssert(si.getObjSense()==1);
+      
+      // check variables types
+      MyAssert(si.isInteger(0)==0);
+      MyAssert(si.isInteger(1)==0);
+      MyAssert(si.isInteger(2)==1);
+      MyAssert(si.isInteger(3)==1);
+      
+      MyAssert(si.isContinuous(0)==1);
+      MyAssert(si.isContinuous(1)==1);
+      MyAssert(si.isContinuous(2)==0);
+      MyAssert(si.isContinuous(3)==0);
+      
+      MyAssert(si.isBinary(0)==0);
+      MyAssert(si.isBinary(1)==0);
+      MyAssert(si.isBinary(2)==1);
+      MyAssert(si.isBinary(3)==0);
+      
+      MyAssert(si.isIntegerNonBinary(0)==0);
+      MyAssert(si.isIntegerNonBinary(1)==0);
+      MyAssert(si.isIntegerNonBinary(2)==0);
+      MyAssert(si.isIntegerNonBinary(3)==1);
+      
+      MyAssert(si.isFreeBinary(2)==1);
+      si.setColLower(2,1.);
+      MyAssert(si.isFreeBinary(2)==0);
+      si.setColLower(2,0.);
+      
+      //MyAssert(si.getInfinity()>1e50);
+      std::cout<<"Test passed"<<std::endl;                  
+}
+void testOptimAndSolutionQuery(OsiTMINLPInterface & si)
+{
+    CoinRelFltEq eq(1e-07);// to test equality of doubles    
+    std::cout<<"Testing optimization methods and solution query"<<std::endl;
+    si.initialSolve();
+    
+    MyAssert(si.isProvenOptimal());
+//    MyAssert(si.nCallOptimizeTNLP()==1);
+    MyAssert(si.getIterationCount()>0);
+    // Optimum of the problem is -( 3/2 + sqrt(5)/2)
+    // with x = (1/2 + sqrt(5) y[1]=x and y[2] = 1/2 + sqrt(5)/2
+    // (can easily be computed since constraint x-y[1]<=0 imply x = y[1] and the resulting problem has dimension 2
+    if(!eq(si.getObjValue(),-( (3./2.) + sqrt(5.)/2.)))
+        std::cout<<"Error in objective : "<<fabs(si.getObjValue()+( (3./2.) + sqrt(5.0)/2.))<<std::endl;
+    
+    //Test validity of primal solution
+    const double * colsol = si.getColSolution();
+    if(!eq(colsol[0],( (1./2.) + 1/sqrt(5.0))))
+        std::cout<<"Error for y[1]  : "<<fabs(colsol[0]-( (1./2.) + 1/sqrt(5.0)))<<std::endl;
+    if(!eq(colsol[1],( (1./2.) + 1/(2.*sqrt(5.0)))))
+        std::cout<<"Error for y[2]  : "<<fabs(colsol[1]-( (1./2.) + 1/(2*sqrt(5.0))))<<std::endl;
+    if(!eq(colsol[2],( (1./2.) + 1/sqrt(5.))))
+        std::cout<<"Error for x  : "<<fabs(colsol[2]-( (1./2.) + 1/sqrt(5.0)))<<std::endl;
+    //value of z is not tested
+
+    //Test for row activity
+    const double * rowAct = si.getRowActivity();
+    if(!eq(rowAct[0],1./4.))
+        std::cout<<"Error for row activity of c1 : "<<fabs(rowAct[0]-1./4.)<<std::endl;
+    if(!eq(rowAct[1],0.))
+        std::cout<<"Error for row activity of c2 : "<<fabs(rowAct[1])<<std::endl;
+        
+     //Check dual values dual for c1 = sqrt(5) c2=1 c3 not tested
+     const double * duals = si.getRowPrice();
+     if(!eq(duals[0],sqrt(5.0)))
+             std::cout<<"Error dual of c1 : "<<fabs(duals[0]-sqrt(5.))<<std::endl;
+     if(!eq(duals[1],1.))
+             std::cout<<"Error dual of c2 : "<<fabs(duals[0]-1.)<<std::endl;
+             
+     std::cout<<"Test passed successfully"<<std::endl;
+}
+
+///Test set methods
+void testSetMethods(OsiTMINLPInterface &si)
+{
+    CoinRelFltEq eq(1e-07);// to test equality of doubles    
+    si.setColLower(2,1.);
+    DblEqAssert(si.getColLower()[2],1.);
+    si.initialSolve();    
+    MyAssert(si.isProvenOptimal());
+    DblEqAssert(si.getColSolution()[2],1.);
+
+    CoinWarmStart * ws = si.getWarmStart();
+    
+    
+    si.setColLower(2,0.);
+    
+    si.setColUpper(2,0.);
+    DblEqAssert(si.getColUpper()[2],0.);
+    si.setWarmStart(ws);
+
+    si.resolve();
+    MyAssert(si.isProvenOptimal());
+    DblEqAssert(si.getColSolution()[2],0.);
+    
+    si.setColUpper(2,1.);
+    delete ws;
+}
+
+void testOa(Bonmin::OsiTMINLPInterface &si)
+{
+      CoinRelFltEq eq(1e-07);// to test equality of doubles    
+      OsiClpSolverInterface lp;
+      si.extractLinearRelaxation(lp);
+
+      //get tolerances
+      double tiny, very_tiny, rhs_relax, infty;
+      si.get_tolerances(tiny, very_tiny, rhs_relax, infty);
+
+//    lp.writeMps("toy");
+      MyAssert(lp.getNumCols()==4);
+      MyAssert(lp.getNumRows()==3);
+      //Check bounds on columns
+      const double * colLow = lp.getColLower();
+      DblEqAssert(colLow[0],0.);
+      DblEqAssert(colLow[1],0.);
+      DblEqAssert(colLow[2],0.);
+      DblEqAssert(colLow[3],0.);
+      
+      const double * colUp = lp.getColUpper();
+      MyAssert(colUp[0]>=lp.getInfinity());
+      MyAssert(colUp[1]>=lp.getInfinity());
+      DblEqAssert(colUp[2],1.);
+      DblEqAssert(colUp[3],5.);
+      //Check bounds on rows
+      const double * rowLow = lp.getRowLower();
+      std::cout<<rowLow[0]<<"\t"<<lp.getInfinity()<<std::endl;
+      MyAssert(rowLow[0]<= -lp.getInfinity());
+      MyAssert(rowLow[1]<= -lp.getInfinity());
+      MyAssert(rowLow[2]<= -lp.getInfinity());
+                  
+      const double * rowUp = lp.getRowUpper();
+      double sqrt5 = sqrt(5.);
+      if(!eq(rowUp[0], 1./2. + 3./(2 * sqrt5))){
+	double error = fabs(rowUp[0] - 1./2. - 3./(2 * sqrt5));
+	std::cout<<"Error in OA for rowUp[0]: "
+		 <<error<<std::endl;
+      }
+      DblEqAssert(rowUp[1], 0. + rhs_relax);
+      DblEqAssert(rowUp[2], 2. * (1 + rhs_relax));
+      //DblEqAssert(rowUp[3], 0.);
+      
+
+      //check objective sense
+      MyAssert(si.getObjSense()==1);
+      
+      // check variables types
+      MyAssert(si.isInteger(0)==0);
+      MyAssert(si.isInteger(1)==0);
+      MyAssert(si.isInteger(2)==1);
+      MyAssert(si.isInteger(3)==1);
+    
+       //Now check the full matrix
+       const CoinPackedMatrix * mat = lp.getMatrixByCol();
+       int  inds[7] = {0, 1, 0, 2, 1, 2,  2};
+       double vals[7] = {2. / sqrt(5.) , -1., 1./sqrt(5.), 1. ,  1. , 1., 1.};
+       MyAssert(mat->getNumElements()==7);
+       int k=0;
+       for(int i = 0 ; i < si.getNumCols() ; i++)
+       {
+        for(int j = mat->getVectorStarts()[i] ; j < mat->getVectorStarts()[i] + mat->getVectorLengths()[i] ; j++)
+        {
+        MyAssert(inds[k]==mat->getIndices()[j]);
+        if(!eq(vals[k],mat->getElements()[j])){
+	double error = fabs(vals[k] - mat->getElements()[j]);
+	std::cout<<"Error in OA for element of constraint matrix "<<k<<": "
+		 <<error<<std::endl;
+	if(error > 1e-06) throw -1;
+      }
+          k++;
+        }
+       }
+}
+
+void testFp(Bonmin::AmplInterface &si)
+{
+        CoinRelFltEq eq(1e-07);// to test equality of doubles
+        double x[1] = {0.};
+        int ind[1]={1};
+        si.solveFeasibilityProblem(1,x,ind, 0, 1);
+        std::cout<<si.getColSolution()[0]<<std::endl;
+         std::cout<<si.getColSolution()[1]<<std::endl;
+       DblEqAssert(si.getColSolution()[1],(1./2.));
+}
+void interfaceTest(Ipopt::SmartPtr<TNLPSolver> solver)
+{
+  /**********************************************************************************/
+  /*   Test constructors                                                                                                              */
+  /**********************************************************************************/
+  std::cout<<"Test OsiTMINLPInterface with "
+	   <<solver->solverName()<<" solver"<<std::endl;
+  // Test usefull constructor
+#ifdef COIN_HAS_ASL
+  {
+        //read a toy problem and do various tests
+//        var x binary;
+//        var z integer >= 0 <= 5;
+//        var y{1..2} >=0;
+//        
+//        
+//        minimize cost:
+//            - x - y[1] - y[2] ;
+//            
+//        subject to
+//            c1: ( y[1] - 1/2 )^2 + (y[2] - 1/2)^2 <= 1/4 ;
+//            c2: x - y[1] <= 0 ;
+//            c3: x + y[2] + z <= 2;
+        
+        //Setup Ipopt should be replaced if solver is changed
+       const char * args[3] ={"name","mytoy",NULL}; //Ugly, but I don't know how to do differently
+       const char ** argv = args;
+       AmplInterface amplSi;
+       amplSi.setSolver(solver);
+       BonminSetup::registerAllOptions(solver->roptions());
+       BonminAmplSetup bonmin;
+       bonmin.initialize(amplSi,const_cast<char **&>(argv));
+       OsiTMINLPInterface& si = *bonmin.nonlinearSolver();
+       si.setWarmStartMode(2);
+    std::cout<<"---------------------------------------------------------------------------------------------------------------------------------------------------------"
+    <<std::endl<<"Testing useful constructor"<<std::endl
+    <<"---------------------------------------------------------------------------------------------------------------------------------------------------------"<<std::endl;
+      //Start of real tests
+      testGetMethods(si);
+      testOptimAndSolutionQuery(si);
+      testSetMethods(si);
+
+  }
+  // Test copy constructor
+  {
+        //read a toy problem and do various tests
+//        var x binary;
+//        var z integer >= 0 <= 5;
+//        var y{1..2} >=0;
+//        
+//        
+//        minimize cost:
+//            - x - y[1] - y[2] ;
+//            
+//        subject to
+//            c1: ( y[1] - 1/2 )^2 + (y[2] - 1/2)^2 <= 1/4 ;
+//            c2: x - y[1] <= 0 ;
+//            c3: x + y[2] + z <= 2;
+        
+        //Setup should be replaced if solver is changed
+      const char * args[3] ={"name","mytoy",NULL}; //Ugly, but I don't know how to do differently
+      const char ** argv = args;
+      AmplInterface amplSi;
+      amplSi.setSolver(solver);
+      BonminAmplSetup bonmin;
+      bonmin.initialize(amplSi,const_cast<char **&>(argv));     
+      OsiTMINLPInterface& si1 = *bonmin.nonlinearSolver();
+      si1.setWarmStartMode(2);
+      
+      OsiTMINLPInterface si(si1);
+    std::cout<<"---------------------------------------------------------------------------------------------------------------------------------------------------------"
+    <<std::endl<<"Testing copy constructor"<<std::endl
+    <<"---------------------------------------------------------------------------------------------------------------------------------------------------------"<<std::endl;
+      //Start of real tests
+      testGetMethods(si);
+      testOptimAndSolutionQuery(si);
+      testSetMethods(si);
+  }
+  
+    // Test outer approximation methods
+  {
+        //Setup Ipopt should be replaced if solver is changed
+        const char * args[3] ={"name","mytoy",NULL}; //Ugly, but I don't know how to do differently
+        const char ** argv = args;
+        AmplInterface amplSi;
+        amplSi.setSolver(solver);
+        BonminAmplSetup bonmin;
+        bonmin.initialize(amplSi,const_cast<char **&>(argv));     
+        OsiTMINLPInterface& si = *bonmin.nonlinearSolver();
+        si.setWarmStartMode(2);
+        std::cout<<"---------------------------------------------------------------------------------------------------------------------------------------------------------"
+          <<std::endl<<"Testing outer approximations related methods"<<std::endl
+          <<"---------------------------------------------------------------------------------------------------------------------------------------------------------"<<std::endl;
+        testOa(si);
+  }
+  
+  // Test Feasibility Pump methods
+//  {
+//    //Setup Ipopt should be replaced if solver is changed
+//    using namespace Ipopt;
+//    SmartPtr<Ipopt::IpoptApplication> app = new Ipopt::IpoptApplication();
+//    char * args[3] ={"name","toy3",NULL}; //Ugly, but I don't know how to do differently
+//    char ** argv = args;
+//    SmartPtr<TMINLP> ampl_tminlp = new AmplTMINLP(ConstPtr(app->Jnlst()),  app->Options(), argv);
+//    Bonmin::AmplInterface si(ampl_tminlp);
+//    std::cout<<"---------------------------------------------------------------------------------------------------------------------------------------------------------"
+//	     <<std::endl<<"Testing optimization of some distance over feasible set"<<std::endl
+//	     <<"---------------------------------------------------------------------------------------------------------------------------------------------------------"<<std::endl;
+ //   testFp(si);
+//  }
+#endif // COIN_HAS_ASL
+  std::cout<<"All test passed successfully"<<std::endl;
+} 
+
+int main()
+{
+  WindowsErrorPopupBlocker();
+
+  Ipopt::SmartPtr<IpoptSolver> ipopt_solver = new IpoptSolver;
+  interfaceTest(GetRawPtr(ipopt_solver));
+
+#ifdef COIN_HAS_FILTERSQP
+  Ipopt::SmartPtr<FilterSolver> filter_solver = new FilterSolver;
+  interfaceTest(GetRawPtr(filter_solver));
+#endif
+  return 0;
+}
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..ce4da75
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,81 @@
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+## $Id: Makefile.am 1896 2011-08-14 11:10:38Z stefan $
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+AUTOMAKE_OPTIONS = foreign
+
+########################################################################
+#                       unitTest for Bonmin                            #
+########################################################################
+
+noinst_PROGRAMS = 
+
+if COIN_HAS_ASL
+noinst_PROGRAMS += unitTest
+endif
+
+noinst_PROGRAMS += CppExample
+
+unitTest_SOURCES = \
+	InterfaceTest.cpp 
+
+# List libraries that need to be linked in
+# libs with AMPL interface have to come before ASLLIB
+unitTest_LDADD =
+unitTest_DEPENDENCIES =
+
+if COIN_HAS_ASL
+unitTest_LDADD        += ../src/CbcBonmin/libbonminampl.la $(ASL_LIBS)
+unitTest_DEPENDENCIES += ../src/CbcBonmin/libbonminampl.la $(ASL_DEPENDENCIES)
+endif
+
+unitTest_LDADD        += ../src/CbcBonmin/libbonmin.la $(BONMINLIB_LIBS)
+unitTest_DEPENDENCIES += ../src/CbcBonmin/libbonmin.la $(BONMINLIB_DEPENDENCIES)
+
+
+#########################################################################
+##                      Example C++ program                             #
+#########################################################################
+
+CppExample_SOURCES = MyBonmin.cpp  MyTMINLP.cpp  MyTMINLP.hpp
+
+# List libraries that need to be linked in
+CppExample_LDADD        = ../src/CbcBonmin/libbonmin.la $(BONMINLIB_LIBS)
+CppExample_DEPENDENCIES = ../src/CbcBonmin/libbonmin.la $(BONMINLIB_DEPENDENCIES)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Cygwin
+AM_CPPFLAGS = \
+        -I`$(CYGPATH_W) $(srcdir)/../src/Apps` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces/Filter` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms/Ampl` \
+	$(BONMINLIB_CFLAGS) $(ASL_CFLAGS) 
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+test: unitTest$(EXEEXT) CppExample$(EXEEXT)
+	./unitTest$(EXEEXT)
+	./CppExample$(EXEEXT)
+
+.PHONY: test
+
+########################################################################
+#                          Cleaning stuff                              #
+########################################################################
+
+# Here we list everything that is not generated by the compiler, e.g.,
+# output files of a program
+
+DISTCLEANFILES = MyBonmin.cpp  MyTMINLP.cpp  MyTMINLP.hpp
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644
index 0000000..eedf1b0
--- /dev/null
+++ b/test/Makefile.in
@@ -0,0 +1,608 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (C) 2006 International Business Machines and others.
+# All Rights Reserved.
+# This file is distributed under the Common Public License.
+
+# Author:  Andreas Waechter           IBM    2006-04-13
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = $(am__EXEEXT_1) CppExample$(EXEEXT)
+ at COIN_HAS_ASL_TRUE@am__append_1 = unitTest
+ at COIN_HAS_ASL_TRUE@am__append_2 = ../src/CbcBonmin/libbonminampl.la $(ASL_LIBS)
+ at COIN_HAS_ASL_TRUE@am__append_3 = ../src/CbcBonmin/libbonminampl.la $(ASL_DEPENDENCIES)
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/Interfaces/config.h \
+	$(top_builddir)/src/Interfaces/config_bonmin.h
+CONFIG_CLEAN_FILES = MyBonmin.cpp MyTMINLP.cpp MyTMINLP.hpp
+ at COIN_HAS_ASL_TRUE@am__EXEEXT_1 = unitTest$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_CppExample_OBJECTS = MyBonmin.$(OBJEXT) MyTMINLP.$(OBJEXT)
+CppExample_OBJECTS = $(am_CppExample_OBJECTS)
+am__DEPENDENCIES_1 =
+am_unitTest_OBJECTS = InterfaceTest.$(OBJEXT)
+unitTest_OBJECTS = $(am_unitTest_OBJECTS)
+ at COIN_HAS_ASL_TRUE@am__DEPENDENCIES_2 =  \
+ at COIN_HAS_ASL_TRUE@	../src/CbcBonmin/libbonminampl.la \
+ at COIN_HAS_ASL_TRUE@	$(am__DEPENDENCIES_1)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(CppExample_SOURCES) $(unitTest_SOURCES)
+DIST_SOURCES = $(CppExample_SOURCES) $(unitTest_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSBUILDDIR = @ABSBUILDDIR@
+ACLOCAL = @ACLOCAL@
+ADD_CFLAGS = @ADD_CFLAGS@
+ADD_CXXFLAGS = @ADD_CXXFLAGS@
+ADD_FFLAGS = @ADD_FFLAGS@
+ALWAYS_FALSE_FALSE = @ALWAYS_FALSE_FALSE@
+ALWAYS_FALSE_TRUE = @ALWAYS_FALSE_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ASL_CFLAGS = @ASL_CFLAGS@
+ASL_CFLAGS_INSTALLED = @ASL_CFLAGS_INSTALLED@
+ASL_DATA = @ASL_DATA@
+ASL_DATA_INSTALLED = @ASL_DATA_INSTALLED@
+ASL_DEPENDENCIES = @ASL_DEPENDENCIES@
+ASL_LIBS = @ASL_LIBS@
+ASL_LIBS_INSTALLED = @ASL_LIBS_INSTALLED@
+ASTYLE = @ASTYLE@
+ASTYLEFLAGS = @ASTYLEFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUX_DIR = @AUX_DIR@
+AWK = @AWK@
+BONMINAMPLINTERFACELIB_CFLAGS = @BONMINAMPLINTERFACELIB_CFLAGS@
+BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED = @BONMINAMPLINTERFACELIB_CFLAGS_INSTALLED@
+BONMINAMPLINTERFACELIB_DEPENDENCIES = @BONMINAMPLINTERFACELIB_DEPENDENCIES@
+BONMINAMPLINTERFACELIB_LIBS = @BONMINAMPLINTERFACELIB_LIBS@
+BONMINAMPLINTERFACELIB_LIBS_INSTALLED = @BONMINAMPLINTERFACELIB_LIBS_INSTALLED@
+BONMINAMPLINTERFACELIB_PCLIBS = @BONMINAMPLINTERFACELIB_PCLIBS@
+BONMINAMPLINTERFACELIB_PCREQUIRES = @BONMINAMPLINTERFACELIB_PCREQUIRES@
+BONMINLIB_CFLAGS = @BONMINLIB_CFLAGS@
+BONMINLIB_CFLAGS_INSTALLED = @BONMINLIB_CFLAGS_INSTALLED@
+BONMINLIB_DEPENDENCIES = @BONMINLIB_DEPENDENCIES@
+BONMINLIB_LIBS = @BONMINLIB_LIBS@
+BONMINLIB_LIBS_INSTALLED = @BONMINLIB_LIBS_INSTALLED@
+BONMINLIB_PCLIBS = @BONMINLIB_PCLIBS@
+BONMINLIB_PCREQUIRES = @BONMINLIB_PCREQUIRES@
+BONMIN_SVN_REV = @BONMIN_SVN_REV@
+BUILDTOOLSDIR = @BUILDTOOLSDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDEFS = @CDEFS@
+CFLAGS = @CFLAGS@
+COINDEPEND_CFLAGS = @COINDEPEND_CFLAGS@
+COINDEPEND_CFLAGS_INSTALLED = @COINDEPEND_CFLAGS_INSTALLED@
+COINDEPEND_DATA = @COINDEPEND_DATA@
+COINDEPEND_DATA_INSTALLED = @COINDEPEND_DATA_INSTALLED@
+COINDEPEND_DEPENDENCIES = @COINDEPEND_DEPENDENCIES@
+COINDEPEND_LIBS = @COINDEPEND_LIBS@
+COINDEPEND_LIBS_INSTALLED = @COINDEPEND_LIBS_INSTALLED@
+COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
+COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
+COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
+COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
+COIN_HAS_ASL_FALSE = @COIN_HAS_ASL_FALSE@
+COIN_HAS_ASL_TRUE = @COIN_HAS_ASL_TRUE@
+COIN_HAS_COINDEPEND_FALSE = @COIN_HAS_COINDEPEND_FALSE@
+COIN_HAS_COINDEPEND_TRUE = @COIN_HAS_COINDEPEND_TRUE@
+COIN_HAS_CPX_FALSE = @COIN_HAS_CPX_FALSE@
+COIN_HAS_CPX_TRUE = @COIN_HAS_CPX_TRUE@
+COIN_HAS_FILTERSQP_FALSE = @COIN_HAS_FILTERSQP_FALSE@
+COIN_HAS_FILTERSQP_TRUE = @COIN_HAS_FILTERSQP_TRUE@
+COIN_HAS_OSICPX_FALSE = @COIN_HAS_OSICPX_FALSE@
+COIN_HAS_OSICPX_TRUE = @COIN_HAS_OSICPX_TRUE@
+COIN_HAS_PKGCONFIG_FALSE = @COIN_HAS_PKGCONFIG_FALSE@
+COIN_HAS_PKGCONFIG_TRUE = @COIN_HAS_PKGCONFIG_TRUE@
+COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
+COIN_PKG_CONFIG_PATH_UNINSTALLED = @COIN_PKG_CONFIG_PATH_UNINSTALLED@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPXINCDIR = @CPXINCDIR@
+CPXLIB = @CPXLIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEFS = @CXXDEFS@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBG_CFLAGS = @DBG_CFLAGS@
+DBG_CXXFLAGS = @DBG_CXXFLAGS@
+DBG_FFLAGS = @DBG_FFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPENDENCY_LINKING_FALSE = @DEPENDENCY_LINKING_FALSE@
+DEPENDENCY_LINKING_TRUE = @DEPENDENCY_LINKING_TRUE@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FILTERSQP_CFLAGS = @FILTERSQP_CFLAGS@
+FILTERSQP_CFLAGS_INSTALLED = @FILTERSQP_CFLAGS_INSTALLED@
+FILTERSQP_DATA = @FILTERSQP_DATA@
+FILTERSQP_DATA_INSTALLED = @FILTERSQP_DATA_INSTALLED@
+FILTERSQP_DEPENDENCIES = @FILTERSQP_DEPENDENCIES@
+FILTERSQP_LIBS = @FILTERSQP_LIBS@
+FILTERSQP_LIBS_INSTALLED = @FILTERSQP_LIBS_INSTALLED@
+FLIBS = @FLIBS@
+HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
+HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBEXT = @LIBEXT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOLM4 = @LIBTOOLM4@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_LDFLAGS = @LT_LDFLAGS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MPICC = @MPICC@
+MPICXX = @MPICXX@
+MPIF77 = @MPIF77@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+OPT_CXXFLAGS = @OPT_CXXFLAGS@
+OPT_FFLAGS = @OPT_FFLAGS@
+OSICPX_CFLAGS = @OSICPX_CFLAGS@
+OSICPX_CFLAGS_INSTALLED = @OSICPX_CFLAGS_INSTALLED@
+OSICPX_DATA = @OSICPX_DATA@
+OSICPX_DATA_INSTALLED = @OSICPX_DATA_INSTALLED@
+OSICPX_DEPENDENCIES = @OSICPX_DEPENDENCIES@
+OSICPX_LIBS = @OSICPX_LIBS@
+OSICPX_LIBS_INSTALLED = @OSICPX_LIBS_INSTALLED@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+RPATH_FLAGS = @RPATH_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VPATH_DISTCLEANFILES = @VPATH_DISTCLEANFILES@
+abs_bin_dir = @abs_bin_dir@
+abs_include_dir = @abs_include_dir@
+abs_lib_dir = @abs_lib_dir@
+abs_source_dir = @abs_source_dir@
+ac_c_preproc_warn_flag = @ac_c_preproc_warn_flag@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_PKG_CONFIG = @ac_ct_PKG_CONFIG@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_cxx_preproc_warn_flag = @ac_cxx_preproc_warn_flag@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_autoconf = @have_autoconf@
+have_automake = @have_automake@
+have_svn = @have_svn@
+have_svnversion = @have_svnversion@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sol_cc_compiler = @sol_cc_compiler@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = foreign
+unitTest_SOURCES = \
+	InterfaceTest.cpp 
+
+
+# List libraries that need to be linked in
+# libs with AMPL interface have to come before ASLLIB
+unitTest_LDADD = $(am__append_2) ../src/CbcBonmin/libbonmin.la \
+	$(BONMINLIB_LIBS)
+unitTest_DEPENDENCIES = $(am__append_3) ../src/CbcBonmin/libbonmin.la \
+	$(BONMINLIB_DEPENDENCIES)
+
+#########################################################################
+#########################################################################
+CppExample_SOURCES = MyBonmin.cpp  MyTMINLP.cpp  MyTMINLP.hpp
+
+# List libraries that need to be linked in
+CppExample_LDADD = ../src/CbcBonmin/libbonmin.la $(BONMINLIB_LIBS)
+CppExample_DEPENDENCIES = ../src/CbcBonmin/libbonmin.la $(BONMINLIB_DEPENDENCIES)
+
+# Here list all include flags, relative to this "srcdir" directory.  This
+# "cygpath" stuff is necessary to compile with native compilers on Cygwin
+AM_CPPFLAGS = \
+        -I`$(CYGPATH_W) $(srcdir)/../src/Apps` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces/Ipopt` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces/Filter` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Interfaces/Ampl` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/CbcBonmin` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms/Branching` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms/OaGenerators` \
+	-I`$(CYGPATH_W) $(srcdir)/../src/Algorithms/Ampl` \
+	$(BONMINLIB_CFLAGS) $(ASL_CFLAGS) 
+
+
+# This line is necessary to allow VPATH compilation
+DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
+
+########################################################################
+#                          Cleaning stuff                              #
+########################################################################
+
+# Here we list everything that is not generated by the compiler, e.g.,
+# output files of a program
+DISTCLEANFILES = MyBonmin.cpp  MyTMINLP.cpp  MyTMINLP.hpp
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  test/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+CppExample$(EXEEXT): $(CppExample_OBJECTS) $(CppExample_DEPENDENCIES) 
+	@rm -f CppExample$(EXEEXT)
+	$(CXXLINK) $(CppExample_LDFLAGS) $(CppExample_OBJECTS) $(CppExample_LDADD) $(LIBS)
+unitTest$(EXEEXT): $(unitTest_OBJECTS) $(unitTest_DEPENDENCIES) 
+	@rm -f unitTest$(EXEEXT)
+	$(CXXLINK) $(unitTest_LDFLAGS) $(unitTest_OBJECTS) $(unitTest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/InterfaceTest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MyBonmin.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MyTMINLP.Po at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-info-am
+
+
+test: unitTest$(EXEEXT) CppExample$(EXEEXT)
+	./unitTest$(EXEEXT)
+	./CppExample$(EXEEXT)
+
+.PHONY: test
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/bonmin.opt b/test/bonmin.opt
new file mode 100644
index 0000000..72fc254
--- /dev/null
+++ b/test/bonmin.opt
@@ -0,0 +1,156 @@
+
+# registering category: Algorithm choice
+
+bonmin.algorithm                             B-BB      	#Choice of the algorithm.
+
+# registering category: Branch-and-bound options
+
+bonmin.allowable_fraction_gap                0         	#Specify the value of relative gap under which the algorithm stops.
+bonmin.allowable_gap                         0         	#Specify the value of absolute gap under which the algorithm stops.
+bonmin.cutoff                                1e+100    	#Specify cutoff value.
+bonmin.cutoff_decr                           1e-05     	#Specify cutoff decrement.
+bonmin.enable_dynamic_nlp                    no        	#Enable dynamic linear and quadratic rows addition in nlp
+bonmin.integer_tolerance                     1e-06     	#Set integer tolerance.
+bonmin.iteration_limit                       2147483647	#Set the cumulative maximum number of iteration in the algorithm used to process nodes continuous relaxations in the branch-and-bound.
+bonmin.nlp_failure_behavior                  stop      	#Set the behavior when an NLP or a series of NLP are unsolved by Ipopt (we call unsolved an NLP for which Ipopt is not able to guarantee optimality within the specified tolerances).
+bonmin.node_comparison                       best-bound	#Choose the node selection strategy.
+bonmin.node_limit                            2147483647	#Set the maximum number of nodes explored in the branch-and-bound search.
+bonmin.num_cut_passes                        1         	#Set the maximum number of cut passes at regular nodes of the branch-and-cut.
+bonmin.num_cut_passes_at_root                20        	#Set the maximum number of cut passes at regular nodes of the branch-and-cut.
+bonmin.number_before_trust                   8         	#Set the number of branches on a variable before its pseudo costs are to be believed in dynamic strong branching.
+bonmin.number_strong_branch                  20        	#Choose the maximum number of variables considered for strong branching.
+bonmin.random_generator_seed                 0         	#Set seed for random number generator (a value of -1 sets seeds to time since Epoch).
+bonmin.read_solution_file                    no        	#Read a file with the optimal solution to test if algorithms cuts it.
+bonmin.solution_limit                        2147483647	#Abort after that much integer feasible solution have been found by algorithm
+bonmin.sos_constraints                       enable    	#Whether or not to activate SOS constraints.
+bonmin.time_limit                            1e+10     	#Set the global maximum computation time (in secs) for the algorithm.
+bonmin.tree_search_strategy                  probed-dive	#Pick a strategy for traversing the tree
+bonmin.variable_selection                    strong-branching	#Chooses variable selection strategy
+
+# registering category: ECP cuts generation
+
+bonmin.ecp_abs_tol                           1e-06     	#Set the absolute termination tolerance for ECP rounds.
+bonmin.ecp_max_rounds                        5         	#Set the maximal number of rounds of ECP cuts.
+bonmin.ecp_probability_factor                10        	#Factor appearing in formula for skipping ECP cuts.
+bonmin.ecp_rel_tol                           0         	#Set the relative termination tolerance for ECP rounds.
+bonmin.filmint_ecp_cuts                      0         	#Specify the frequency (in terms of nodes) at which some a la filmint ecp cuts are generated.
+
+# registering category: Feasibility checker using OA cuts
+
+bonmin.feas_check_cut_types                  outer-approx	#Choose the type of cuts generated when an integer feasible solution is found
+bonmin.feas_check_discard_policy             detect-cycles	#How cuts from feasibility checker are discarded
+bonmin.generate_benders_after_so_many_oa     5000      	#Specify that after so many oa cuts have been generated Benders cuts should be generated instead.
+
+# registering category: MILP Solver
+
+bonmin.cpx_parallel_strategy                 0         	#Strategy of parallel search mode in CPLEX.
+bonmin.milp_solver                           Cbc_D     	#Choose the subsolver to solve MILP sub-problems in OA decompositions.
+bonmin.milp_strategy                         solve_to_optimality	#Choose a strategy for MILPs.
+bonmin.number_cpx_threads                    0         	#Set number of threads to use with cplex.
+
+# registering category: MILP cutting planes in hybrid algorithm
+
+bonmin.2mir_cuts                             0         	#Frequency (in terms of nodes) for generating 2-MIR cuts in branch-and-cut
+bonmin.Gomory_cuts                           -5        	#Frequency (in terms of nodes) for generating Gomory cuts in branch-and-cut.
+bonmin.clique_cuts                           -5        	#Frequency (in terms of nodes) for generating clique cuts in branch-and-cut
+bonmin.cover_cuts                            0         	#Frequency (in terms of nodes) for generating cover cuts in branch-and-cut
+bonmin.flow_cover_cuts                       -5        	#Frequency (in terms of nodes) for generating flow cover cuts in branch-and-cut
+bonmin.lift_and_project_cuts                 0         	#Frequency (in terms of nodes) for generating lift-and-project cuts in branch-and-cut
+bonmin.mir_cuts                              -5        	#Frequency (in terms of nodes) for generating MIR cuts in branch-and-cut
+bonmin.reduce_and_split_cuts                 0         	#Frequency (in terms of nodes) for generating reduce-and-split cuts in branch-and-cut
+
+# registering category: NLP interface
+
+bonmin.nlp_solver                            Ipopt     	#Choice of the solver for local optima of continuous NLP's
+bonmin.warm_start                            none      	#Select the warm start method
+
+# registering category: NLP solution robustness
+
+bonmin.max_consecutive_failures              10        	#(temporarily removed) Number $n$ of consecutive unsolved problems before aborting a branch of the tree.
+bonmin.max_random_point_radius               100000    	#Set max value r for coordinate of a random point.
+bonmin.num_iterations_suspect                -1        	#Number of iterations over which a node is considered "suspect" (for debugging purposes only, see detailed documentation).
+bonmin.num_retry_unsolved_random_point       0         	#Number $k$ of times that the algorithm will try to resolve an unsolved NLP with a random starting point (we call unsolved an NLP for which Ipopt is not able to guarantee optimality within the specified tolerances).
+bonmin.random_point_perturbation_interval    1         	#Amount by which starting point is perturbed when choosing to pick random point by perturbing starting point
+bonmin.random_point_type                     Jon       	#method to choose a random starting point
+bonmin.resolve_on_small_infeasibility        0         	#If a locally infeasible problem is infeasible by less than this, resolve it with initial starting point.
+
+# registering category: NLP solves in hybrid algorithm (B-Hyb)
+
+bonmin.nlp_solve_frequency                   10        	#Specify the frequency (in terms of nodes) at which NLP relaxations are solved in B-Hyb.
+bonmin.nlp_solve_max_depth                   10        	#Set maximum depth in the tree at which NLP relaxations are solved in B-Hyb.
+bonmin.nlp_solves_per_depth                  1e+100    	#Set average number of nodes in the tree at which NLP relaxations are solved in B-Hyb for each depth.
+
+# registering category: Nonconvex problems
+
+bonmin.coeff_var_threshold                   0.1       	#Coefficient of variation threshold (for dynamic definition of cutoff_decr).
+bonmin.dynamic_def_cutoff_decr               no        	#Do you want to define the parameter cutoff_decr dynamically?
+bonmin.first_perc_for_cutoff_decr            -0.02     	#The percentage used when, the coeff of variance is smaller than the threshold, to compute the cutoff_decr dynamically.
+bonmin.max_consecutive_infeasible            0         	#Number of consecutive infeasible subproblems before aborting a branch.
+bonmin.num_resolve_at_infeasibles            0         	#Number $k$ of tries to resolve an infeasible node (other than the root) of the tree with different starting point.
+bonmin.num_resolve_at_node                   0         	#Number $k$ of tries to resolve a node (other than the root) of the tree with different starting point.
+bonmin.num_resolve_at_root                   0         	#Number $k$ of tries to resolve the root node with different starting points.
+bonmin.second_perc_for_cutoff_decr           -0.05     	#The percentage used when, the coeff of variance is greater than the threshold, to compute the cutoff_decr dynamically.
+
+# registering category: Outer Approximation Decomposition (B-OA)
+
+bonmin.oa_decomposition                      no        	#If yes do initial OA decomposition
+
+# registering category: Outer Approximation cuts generation
+
+bonmin.add_only_violated_oa                  no        	#Do we add all OA cuts or only the ones violated by current point?
+bonmin.oa_cuts_scope                         global    	#Specify if OA cuts added are to be set globally or locally valid
+bonmin.oa_rhs_relax                          1e-08     	#Value by which to relax OA cut
+bonmin.tiny_element                          1e-08     	#Value for tiny element in OA cut
+bonmin.very_tiny_element                     1e-17     	#Value for very tiny element in OA cut
+
+# registering category: Output
+
+bonmin.bb_log_interval                       100       	#Interval at which node level output is printed.
+bonmin.bb_log_level                          1         	#specify main branch-and-bound log level.
+bonmin.file_print_level                      5         	#Verbosity level for output file.
+bonmin.file_solution                         no        	#Write a file bonmin.sol with the solution
+bonmin.fp_log_frequency                      100       	#display an update on lower and upper bounds in FP every n seconds
+bonmin.fp_log_level                          1         	#specify FP iterations log level.
+bonmin.inf_pr_output                         original  	#Determines what value is printed in the "inf_pr" output column.
+bonmin.lp_log_level                          0         	#specify LP log level.
+bonmin.milp_log_level                        0         	#specify MILP solver log level.
+bonmin.nlp_log_at_root                       0         	# Specify a different log level for root relaxation.
+bonmin.nlp_log_level                         1         	#specify NLP solver interface log level (independent from ipopt print_level).
+bonmin.oa_cuts_log_level                     0         	#level of log when generating OA cuts.
+bonmin.oa_log_frequency                      100       	#display an update on lower and upper bounds in OA every n seconds
+bonmin.oa_log_level                          1         	#specify OA iterations log level.
+bonmin.option_file_name                                	#File name of options file (to overwrite default).
+bonmin.output_file                                     	#File name of desired output file (leave unset for no file output).
+bonmin.print_frequency_iter                  1         	#Determines at which iteration frequency the summarizing iteration output line should be printed.
+bonmin.print_frequency_time                  0         	#Determines at which time frequency the summarizing iteration output line should be printed.
+bonmin.print_info_string                     no        	#Enables printing of additional info string at end of iteration output.
+bonmin.print_level                           5         	#Output verbosity level.
+bonmin.print_options_documentation           no        	#Switch to print all algorithmic options.
+bonmin.print_timing_statistics               no        	#Switch to print timing statistics.
+bonmin.print_user_options                    no        	#Print all options set by the user.
+bonmin.replace_bounds                        no        	#Indicates if all variable bounds should be replaced by inequality constraints
+bonmin.skip_finalize_solution_call           no        	#Indicates if call to NLP::FinalizeSolution after optimization should be suppressed
+
+# registering category: Primal Heuristics
+
+bonmin.feasibility_pump_objective_norm       1         	#Norm of feasibility pump objective function
+bonmin.fp_pass_infeasible                    no        	#Say whether feasibility pump should claim to converge or not
+bonmin.heuristic_RINS                        no        	#if yes runs the RINS heuristic
+bonmin.heuristic_dive_MIP_fractional         no        	#if yes runs the Dive MIP Fractional heuristic
+bonmin.heuristic_dive_MIP_vectorLength       no        	#if yes runs the Dive MIP VectorLength heuristic
+bonmin.heuristic_dive_fractional             no        	#if yes runs the Dive Fractional heuristic
+bonmin.heuristic_dive_vectorLength           no        	#if yes runs the Dive VectorLength heuristic
+bonmin.heuristic_feasibility_pump            no        	#whether the heuristic feasibility pump should be used
+bonmin.pump_for_minlp                        no        	#whether to run the feasibility pump heuristic for MINLP
+
+# registering category: Strong branching setup
+
+bonmin.candidate_sort_criterion              best-ps-cost	#Choice of the criterion to choose candidates in strong-branching
+bonmin.maxmin_crit_have_sol                  0.1       	#Weight towards minimum in of lower and upper branching estimates when a solution has been found.
+bonmin.maxmin_crit_no_sol                    0.7       	#Weight towards minimum in of lower and upper branching estimates when no solution has been found yet.
+bonmin.min_number_strong_branch              0         	#Sets minimum number of variables for strong branching (overriding trust)
+bonmin.number_before_trust_list              0         	#Set the number of branches on a variable before its pseudo costs are to be believed during setup of strong branching candidate list.
+bonmin.number_look_ahead                     0         	#Sets limit of look-ahead strong-branching trials
+bonmin.number_strong_branch_root             2147483647	#Maximum number of variables considered for strong branching in root node.
+bonmin.setup_pseudo_frac                     0.5       	#Proportion of strong branching list that has to be taken from most-integer-infeasible list.
+bonmin.trust_strong_branching_for_pseudo_cost yes       	#Whether or not to trust strong branching results for updating pseudo costs.
diff --git a/test/mytoy.nl b/test/mytoy.nl
new file mode 100644
index 0000000..1af7e15
--- /dev/null
+++ b/test/mytoy.nl
@@ -0,0 +1,55 @@
+g0 0 0 0	# toy problem - the 'g' indicates the file here is in ascii (other numbers (0,0,0,0) ignored)
+4 3 1 0 0	# num vars, num constraints, num objectives, 0,0
+1 0	        # number nonlinear constraints, num nonlinear objectives
+0 0	        # num nonlinear network constraints, num linear network constraints, 
+2 0 0	        # num nonlinear vars in constraints, objectives, both
+0 0 0 1	        # num linear network variables; functions; arith, flags
+1 1 0 0 0	# discrete variables: binary, integer, nonlinear (b,c,o)
+7 3	        # number nonzeros in Jacobian, number nonzeros in linear part of objectives
+0 0	        # 0,0
+0 0 0 0 0	# 0,0,0,0,0    // Note that the variables are in order y[1],y[2],x,z
+C0	#           Here starts the nonlinear part of constraint-0
+o0	#             = add
+o5	#             = raise-to-power
+o0	#             = add
+n-0.5   #             = constant -0.5
+v0	#             = the continuous variable y[1]
+n2      #             = constant 2
+o5	#             = raise-to-power
+o0	#             = add
+n-0.5   #             = constant -0.5
+v1	#             = the continuous variable y[2]
+n2      #             = constant 2     ....Here ends the nonlinear part of constraint-0                   
+C1	#           Here starts the nonlinear part of constraint-1
+n0      #             Here ends the nonlinear part of constraint-1                              
+C2	#           Here starts the nonlinear part of constraint-2
+n0      #             Here ends the nonlinear part of constraint-2                               
+O0 0	#           Here starts the nonlinear part of objective(-0)
+n0      #             Here ends the nonlinear part of objective(-0)
+r	#           Here starts the right-hand side section
+1 0.25  #             constraint-0 body <= 0.25
+1 0     #             constraint-1 body <=0
+1 2     #             constraint-2 body <= 2
+b	#           Here starts the bounds on variables section
+2 0     #             var-0 >= 0
+2 0     #             var-1 >= 0
+0 0 1   #             0 <= var-2 <= 1
+0 0 5   #             0 <= var-3 <= 5
+k3	#           INFO FOR JACOBIAN COLUMN COUNTS. THIS RECORD IS ALWAYS 'k' FOLLOWED BY NUMBER OF VARIABLES MINUS 1
+2       #             the number of nonzeros in the column2 0..0 of the jacobian
+4       #             the number of nonzeros in the columns 0..1 of the jacobian
+6       #             the number of nonzeros in the columns 0..2 of the jacobian 
+J0 2    #           Two coefficients for the row-0 of the (explicitly) linear part of the constraints
+0 0     #              var-0, linear coefficient 0
+1 0     #              var-1, linear coefficient 0
+J1 2    #           Two coefficients for the row-1 of the linear part of the constraints
+0 -1    #             var-0, linear coefficient -1
+2 1     #             var-2, linear coefficient 1
+J2 3    #           Three coefficients for the row-2 of the linear part of the constraints
+1 1     #             var-1, linear coefficient 1
+2 1     #             var-2, linear coefficient 1
+3 1     #             var-3, linear coefficient 1
+G0 3    #           Three coefficients for the linear part of objective(-0)
+0 -1    #             var-0, linear coefficient -1
+1 -1    #             var-1, linear coefficient -1
+2 -1    #             var-2, linear coefficient -1
diff --git a/test/toy.mps.gz b/test/toy.mps.gz
new file mode 100644
index 0000000..bf809b8
Binary files /dev/null and b/test/toy.mps.gz differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/coinor-bonmin.git



More information about the debian-science-commits mailing list