[gerris] 05/13: Merge.

Anton Gladky gladk at moszumanska.debian.org
Thu Jul 31 22:49:43 UTC 2014


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

gladk pushed a commit to branch master
in repository gerris.

commit 82e3c4419dfcf47fa360fc9bb619836a8c176ccc
Merge: bb1c3c7 653f6dd
Author: Anton Gladky <gladk at debian.org>
Date:   Thu Jul 31 23:03:27 2014 +0200

    Merge.

 ChangeLog                                          | 1368 +++
 INSTALL                                            |   13 +
 Makefile.am                                        |   24 +
 Makefile.in                                        |  259 +
 aclocal.m4                                         | 8920 +++++++++++++++++++-
 build_function_gcc                                 |   36 +
 build_function_libtool                             |   38 +
 compile                                            |  247 +
 config.guess                                       |  301 +-
 config.h.in                                        |   48 +
 config.sub                                         |  303 +
 configure                                          | 3418 +++++++-
 configure.in => configure.ac                       |  352 +-
 depcomp                                            |  231 +
 desktop/Makefile.in                                |  112 +
 doc/Makefile.am                                    |   29 +
 doc/Makefile.in                                    |  122 +
 doc/examples/Makefile.am                           |   40 +
 doc/examples/Makefile.deps                         |  268 +
 doc/examples/Makefile.in                           |  650 ++
 doc/examples/atomisation.sh                        |    1 +
 doc/examples/boussinesq.sh                         |    1 +
 doc/examples/bubble.sh                             |    1 +
 doc/examples/bubble/bubble.gfs                     |  152 +
 doc/examples/bubble/bubble.gfv                     |  117 +
 doc/examples/bubble/bubble.sh                      |   32 +
 doc/examples/bubble/cap/bubble.gfv                 |  117 +
 doc/examples/bubble/cap/bubble.sh                  |   32 +
 doc/examples/bubble/cap/cap.gfs                    |  149 +
 doc/examples/column.sh                             |    1 +
 doc/examples/column/column.gfs                     |    3 +
 doc/examples/cyclone.sh                            |    1 +
 doc/examples/cylinder.sh                           |    1 +
 doc/examples/dam.sh                                |    1 +
 doc/examples/dam/dam.gfs                           |   47 +-
 doc/examples/depend.py                             |    7 +-
 doc/examples/forcedturbulence.sh                   |    1 +
 doc/examples/garden.sh                             |    1 +
 doc/examples/gfs-highlight.in                      |    4 +-
 doc/examples/gfs2doc.in                            |    2 +-
 doc/examples/hump.sh                               |    1 +
 doc/examples/logo.sh                               |    1 +
 doc/examples/monai.sh                              |    1 +
 doc/examples/plateau.sh                            |    1 +
 doc/examples/plateau/plateau.gfs                   |   17 +
 doc/examples/rt.sh                                 |    1 +
 doc/examples/ship.sh                               |    1 +
 doc/examples/shock.sh                              |    1 +
 .../zero.gfv => doc/examples/shock/depth.gfv       |   23 +-
 .../isolines.gfv => doc/examples/shock/mesh.gfv    |   24 +-
 doc/examples/shock/shock.gfs                       |   72 +
 doc/examples/starting.sh                           |    1 +
 doc/examples/starting/n2414.dat                    |   62 +
 doc/examples/starting/starting.gfs                 |   76 +
 .../zero.gfv => doc/examples/starting/starting.gfv |   21 +-
 doc/examples/starting/starting.sh                  |    4 +
 doc/examples/tangaroa.sh                           |    1 +
 doc/examples/template.tex                          |   43 +-
 doc/examples/tides.sh                              |    1 +
 doc/examples/tsunami.sh                            |    1 +
 doc/examples/viscmix.sh                            |    1 +
 doc/examples/viscmix/run.sh                        |   17 +
 doc/examples/viscmix/viscmix.gfs                   |  170 +
 doc/examples/viscmix/viscmix.gfv                   |   57 +
 doc/examples/wingtip.sh                            |    1 +
 doc/examples/wingtip/n2414.dat                     |   62 +
 doc/examples/wingtip/wingtip.gfs                   |   77 +
 doc/examples/wingtip/wingtip.gfv                   |   88 +
 doc/examples/wingtip/wingtip.sh                    |    4 +
 doc/figures/diffusion.tm                           |  168 +
 doc/figures/viscous-metric-3D.tm                   |  148 +
 doc/figures/viscous-metric.tm                      |  178 +
 doc/gerris.bib                                     |  607 ++
 doc/manpages/Makefile.in                           |  108 +
 doc/tutorial/Makefile.in                           |   80 +
 install-sh                                         |   44 +
 ltmain.sh                                          |  168 +
 m4/libtool.m4                                      |  449 +
 m4/ltoptions.m4                                    |   21 +
 m4/ltversion.m4                                    |   12 +
 missing                                            |   24 +
 modules/Makefile.am                                |  170 +-
 modules/Makefile.in                                |  849 ++
 modules/{kdt => RStarTree}/Makefile.in             |  299 +-
 modules/RStarTree/RSTBase.h                        |  218 +
 modules/RStarTree/RStarTree.c                      |  925 ++
 modules/RStarTree/RStarTree.h                      |  780 ++
 modules/agmg.c                                     |  175 +
 modules/bubbles.c                                  |  511 ++
 modules/culvert.c                                  |  176 +
 modules/culvert/Makefile.am                        |   37 +
 modules/{kdt => culvert}/Makefile.in               |  320 +-
 modules/culvert/boyd87.c                           |  273 +
 modules/culvert/boyd87.h                           |  100 +
 modules/culvert/check_inlet.c                      |   13 +
 modules/culvert/check_outlet.c                     |   15 +
 modules/culvert/discharge_table.c                  |   30 +
 modules/df3.c                                      |  357 +
 modules/electrohydro.c                             |  896 ++
 modules/{kdt => fes2004}/Makefile.in               |  296 +-
 modules/fes2004/fes2004_extraction.c               |   60 +
 modules/fes2004/fes2004_io.c                       |   23 +
 modules/fes2004/fes2004_kernel.c                   | 1277 +++
 modules/fes2004/fes2004_lib.h                      |  415 +
 modules/fes2004/fes2004_prediction.c               |   61 +
 modules/fft.c                                      |  368 +
 modules/hypre.c                                    | 1084 +++
 modules/kdt/Makefile.am                            |   18 +
 modules/kdt/Makefile.in                            |  151 +
 modules/kdt/kdt.c                                  |  821 ++
 modules/kdt/kdt.h                                  |   71 +
 modules/kdt/{xyz2kdt.c => kdt2kdt.c}               |   70 +-
 modules/kdt/kdtquery.c                             |    8 +
 modules/kdt/xyz2kdt.c                              |   40 +
 modules/layered.c                                  |  727 ++
 modules/lis.c                                      |  184 +
 modules/{map.mod => map.c}                         |   31 +-
 modules/ode.c                                      |  233 +
 modules/okada.c                                    |  308 +
 modules/particulatecommon.c                        | 1415 ++++
 modules/particulatecommon.h                        |  186 +
 src/unstructured.h => modules/particulates.c       |   41 +-
 modules/rsurface.c                                 |   21 +-
 modules/rsurface.h                                 |   19 +-
 modules/{kdt/xyz2kdt.c => rsurface2kdt.c}          |   85 +-
 modules/rsurfacedraw.c                             |  150 -
 modules/rsurfacequery.c                            |   37 -
 modules/skewsymmetric.c                            |  814 ++
 modules/{stokes.mod => stokes.c}                   |   52 +-
 modules/{terrain.mod => terrain.c}                 |  224 +-
 modules/{tide.mod => tide.c}                       |    9 +-
 modules/topics.c                                   | 1328 +++
 modules/{wavewatch.mod => wavewatch.c}             |   20 +-
 modules/wavewatch/Makefile.in                      |   84 +
 src/Makefile.am                                    |   29 +-
 src/Makefile.in                                    |  338 +
 src/adaptive.c                                     |  202 +-
 src/adaptive.h                                     |   28 +
 src/advection.c                                    |   76 +-
 src/advection.h                                    |   12 +
 src/boundary.c                                     |  184 +-
 src/boundary.h                                     |   13 +
 src/cartesian.c                                    |   69 +-
 src/cartesian.h                                    |    2 +
 src/domain.c                                       | 1014 ++-
 src/domain.h                                       |  121 +-
 src/event.c                                        |  152 +-
 src/event.h                                        |    1 +
 src/fluid.c                                        |  460 +-
 src/fluid.h                                        |   13 +-
 src/ftt.h                                          |    9 +-
 src/function.h                                     |   64 +
 src/gerris.c                                       |  132 +-
 src/gfs-config.in                                  |  108 -
 src/graphic.c                                      |  125 +-
 src/graphic.h                                      |   13 +-
 src/init.c                                         |   56 +-
 src/isocube.h                                      |   55 +-
 src/levelset.c                                     |   16 +-
 src/m4.awk                                         |   28 +-
 src/map.c                                          |  303 +-
 src/map.h                                          |   21 +
 src/metric.c                                       | 1593 +++-
 src/metric.h                                       |  109 +
 src/moving.c                                       |   61 +-
 src/moving2.c                                      |   12 +-
 src/mpi_boundary.c                                 |   82 +-
 src/ocean.c                                        |   97 +-
 src/open_memstream.c                               |  191 +
 src/output.c                                       |  185 +-
 src/output.h                                       |    4 +
 src/particle.c                                     |    4 +
 src/particle.h                                     |    4 +
 src/poisson.c                                      |  494 +-
 src/poisson.h                                      |   34 +-
 src/river.c                                        | 1623 +++-
 src/river.h                                        |   74 +-
 src/simulation.c                                   |  515 +-
 src/simulation.h                                   |   23 +-
 src/solid.c                                        |   17 +-
 src/source.c                                       |  439 +-
 src/source.h                                       |   37 +-
 src/spatial.h                                      |    7 +
 src/surface.c                                      |   10 +-
 src/tension.c                                      |  167 +-
 src/timestep.c                                     |  336 +-
 src/timestep.h                                     |   31 +-
 src/unstructured.c                                 |  239 +-
 src/unstructured.h                                 |   10 +-
 src/utils.c                                        |  993 ++-
 src/utils.h                                        |  120 +-
 src/variable.c                                     |  768 +-
 src/variable.h                                     |   88 +-
 src/verify.h                                       |  245 +
 src/version.h                                      |    4 +
 src/vof.c                                          | 1814 +++-
 src/vof.h                                          |   74 +-
 src/wave.c                                         |    4 +
 test/Makefile.am                                   |   35 +-
 test/Makefile.deps                                 |  805 ++
 test/Makefile.in                                   |  966 +++
 test/advection.sh                                  |    1 +
 test/annulus.sh                                    |    1 +
 test/annulus/annulus.gfs                           |   79 +
 test/annulus/annulus.sh                            |   53 +
 test/annulus/error.ref                             |    4 +
 test/axi.sh                                        |    1 +
 test/axi/error.ref                                 |    8 +-
 test/axi/order.ref                                 |    6 +-
 test/axi/viscous/viscous.gfs                       |    1 -
 test/axiadvection.sh                               |    1 +
 test/boundaries.sh                                 |    1 +
 test/bump.sh                                       |    1 +
 test/bump/bump.gfs                                 |   44 +
 test/bump/bump.sh                                  |   48 +
 test/bump/norms-explicit.ref                       |   61 +
 test/bump/norms-implicit.ref                       |   61 +
 test/capwave.sh                                    |    1 +
 test/capwave/air-water/air-water.gfs               |    2 +-
 test/capwave/air-water/convergence.ref             |    8 +-
 test/capwave/capwave.gfs                           |    2 +-
 test/capwave/convergence.ref                       |    8 +-
 test/capwave/density/convergence.ref               |    8 +-
 test/capwave/density/density.gfs                   |    2 +-
 test/capwave/gravity/convergence.ref               |    8 +-
 test/capwave/gravity/gravity.gfs                   |    2 +-
 test/channel.sh                                    |    1 +
 test/channel/orderU.ref                            |    4 +-
 test/channel/orderV.ref                            |    4 +-
 test/channel/orderfU.ref                           |    4 +-
 test/channel/orderfV.ref                           |    4 +-
 test/circle.sh                                     |    1 +
 test/circle/error.ref                              |    9 +
 test/circle/order.ref                              |   10 +-
 test/circle/refined/error.ref                      |    9 +
 test/circle/refined/order.ref                      |    8 +
 test/circle/refined/res-7.ref                      |   13 +
 test/circle/res-7.ref                              |   13 +
 test/circle/star/error.ref                         |    9 +
 test/circle/star/order.ref                         |   10 +-
 test/circle/star/res-7.ref                         |   13 +
 test/conservation.sh                               |    1 +
 test/conservation/conservation.gfs                 |    8 +
 test/coriolis.sh                                   |    1 +
 test/coriolis/coriolis.gfs                         |   10 +
 test/cosine.sh                                     |    1 +
 test/cosine/cosine.gfs                             |   64 +
 test/cosine/cosine.sh                              |   15 +
 test/cosine/error-45.ref                           |    7 +
 test/cosine/error-90.ref                           |    7 +
 test/cosine/isolines.gfv                           |   13 +
 test/cosine/reference.gfv                          |   17 +
 test/cosine/zero.gfv                               |   13 +
 test/couette.sh                                    |    1 +
 test/couette/couette.gfs                           |    4 +-
 test/cylinder.sh                                   |    1 +
 test/cylinder/cylinder.gfs                         |   37 +
 test/cylinder/cylinder.sh                          |   11 +
 test/cylinder/norms.ref                            |    7 +
 test/cylinder/planar/planar.gfs                    |    8 +
 test/debye.sh                                      |    1 +
 test/debye/analytical                              |  100 +
 test/debye/debye.gfs                               |  115 +
 test/debye/debye.sh                                |   37 +
 test/debye/points                                  |   51 +
 test/depend.py                                     |   14 +-
 test/diffusion.sh                                  |    1 +
 test/diffusion/concentration/concentration.gfs     |   74 +
 test/diffusion/concentration/concentration.sh      |   39 +
 test/diffusion/diffusion.gfs                       |    6 +
 test/dumbell.sh                                    |    1 +
 test/electro.sh                                    |    1 +
 test/electro/convergence.ref                       |    7 +
 test/electro/electro.gfs                           |   18 +
 test/electro/electro.sh                            |    4 +
 test/gaussian.sh                                   |    1 +
 test/geo.sh                                        |    1 +
 test/geo/e.ref                                     | 1584 ++++
 test/geo/geo.gfs                                   |   43 +-
 test/geo/geo.sh                                    |   13 +-
 test/geo/river/e.ref                               | 1581 ++++
 test/{cosine/isolines.gfv => geo/river/geo.gfv}    |   21 +-
 test/geo/{ => river}/geo.sh                        |   13 +-
 test/geo/river/river.gfs                           |   84 +
 test/groundwater.sh                                |    1 +
 test/groundwater/U.ref                             |    9 +
 test/groundwater/groundwater.gfs                   |   95 +
 test/groundwater/groundwater.gfv                   |   57 +
 test/groundwater/groundwater.sh                    |   54 +
 test/groundwater/p.ref                             |    9 +
 test/groundwater/piecewise/U.ref                   |    9 +
 test/groundwater/piecewise/p.ref                   |    9 +
 test/groundwater/piecewise/piecewise.gfs           |  106 +
 test/groundwater/piecewise/piecewise.gfv           |   57 +
 test/harmonic.sh                                   |    1 +
 test/harmonic/error.ref                            |    9 +
 test/harmonic/harmonic.gfs                         |   11 +
 test/harmonic/lonlat/res-7.ref                     |   14 +
 test/harmonic/order.ref                            |    8 +
 test/harmonic/res-7.ref                            |   14 +
 test/height.sh                                     |    1 +
 test/height/height.gfs                             |   27 +
 test/height/height.sh                              |   32 +
 test/height/height1.gfs                            |   14 +
 test/height/height2.gfs                            |   14 +
 test/height/height3.gfs                            |   20 +
 test/height/height4.gfs                            |   21 +
 test/height/height5.gfs                            |   21 +
 test/hexagon.sh                                    |    1 +
 test/hydrostatic.sh                                |    1 +
 test/hydrostatic/hydrostatic.gfs                   |    4 +
 test/hydrostatic/quadratic/quadratic.gfs           |    2 +-
 test/injectionaxi.sh                               |    1 +
 test/injectionaxi/injectionaxi.gfs                 |  104 +
 test/kinetic.sh                                    |    1 +
 test/kinetic/kinetic.gfs                           |    2 +-
 test/lake.sh                                       |    1 +
 test/lake/lake.gfs                                 |   15 +
 test/lake/river/error.ref                          |    4 +
 test/lake/river/river.gfs                          |   75 +
 test/lake/river/river.sh                           |   59 +
 test/lake/stratified/error.ref                     |    4 +
 test/lake/stratified/field.awk                     |   26 +
 test/lake/stratified/stratified.gfs                |  154 +
 test/lake/stratified/stratified.sh                 |   94 +
 test/lake/stratified/thermo.awk                    |   12 +
 test/lid.sh                                        |    1 +
 test/lid/lid.sh                                    |    2 +
 test/{cosine => lid/metric}/isolines.gfv           |   26 +-
 .../lid/{stretch/stretch.gfs => metric/metric.gfs} |   82 +-
 test/lid/metric/xprof.ghia                         |   17 +
 test/lid/metric/xprofile                           |  101 +
 test/lid/metric/yprof.ghia                         |   17 +
 test/lid/metric/yprofile                           |  101 +
 test/lid/stretch/stretch.gfs                       |    4 +
 test/lonlat.sh                                     |    1 +
 test/lonlat/{lonlat.gfs => cubed/cubed.gfs}        |  101 +-
 test/{cosine => lonlat/cubed}/isolines.gfv         |   15 +-
 test/lonlat/lonlat.gfs                             |    4 +
 test/merging.sh                                    |    1 +
 test/merging/sim.err.ref                           |    6 +
 test/nonlinear.sh                                  |    1 +
 test/nonlinear/error-1.ref                         |  502 ++
 test/nonlinear/error-ocean-1.ref                   |  502 ++
 .../isolines.gfv => nonlinear/error-ocean.gfv}     |   25 +-
 test/nonlinear/error-river-1.ref                   |  714 ++
 test/{cosine/isolines.gfv => nonlinear/error.gfv}  |   23 +-
 test/nonlinear/nonlinear.gfs                       |  104 +
 test/nonlinear/nonlinear.sh                        |   44 +
 test/nonlinear/ocean.gfs                           |   50 +
 test/nonlinear/river.gfs                           |   53 +
 test/nz.sh                                         |    1 +
 test/oscillation.sh                                |    1 +
 test/oscillation/fit.ref                           |    7 +
 test/oscillation/oscillation.gfs                   |   27 +-
 test/oscillation/oscillation.sh                    |   70 +-
 test/parabola.sh                                   |    1 +
 test/parabola/error.ref                            |    8 +
 test/parabola/parabola.gfs                         |   14 +-
 test/parabola/parabola.sh                          |    4 +-
 test/parabola/solid/error.ref                      |    5 +
 test/parabola/{parabola.gfs => solid/solid.gfs}    |   83 +-
 test/periodic.sh                                   |    1 +
 test/planar.sh                                     |    1 +
 test/plate.sh                                      |    1 +
 test/plateau.sh                                    |    1 +
 test/plateau/plateau.gfs                           |  162 +
 test/plateau/plateau.gfv                           |   64 +
 test/plateau/zoom.gfv                              |   57 +
 test/poiseuille.sh                                 |    1 +
 test/poiseuille/bagnold/bagnold.gfs                |    6 +
 test/poiseuille/metric/error.ref                   |    4 +
 .../{poiseuille.gfs => metric/metric.gfs}          |   23 +-
 test/poiseuille/poiseuille.gfs                     |    3 +
 test/poiseuille/river/error.ref                    |    4 +
 test/poiseuille/river/river.gfs                    |   64 +
 test/poiseuille/river/river.sh                     |   39 +
 test/poisson.sh                                    |    1 +
 test/poisson/dirichlet/error.ref                   |    9 +
 test/poisson/dirichlet/order.ref                   |    8 +
 test/poisson/dirichlet/res-7.ref                   |   14 +
 test/reynolds.sh                                   |    1 +
 test/reynolds/box/box.gfs                          |   22 +-
 test/reynolds/box/div5.ref                         |  292 +-
 test/reynolds/box/div6.ref                         |  736 +-
 test/reynolds/box/div7.ref                         | 1546 ++--
 test/reynolds/reynolds.gfs                         |   22 +-
 test/reynolds/reynolds.sh                          |   22 +-
 test/reynolds/skew/div5.ref                        |   81 +
 test/reynolds/skew/div6.ref                        |  161 +
 test/reynolds/skew/div7.ref                        |  321 +
 test/reynolds/skew/reynolds.ref                    |    3 +
 test/reynolds/{box/box.gfs => skew/skew.gfs}       |   41 +-
 test/reynolds/{reynolds.sh => skew/skew.sh}        |   37 +-
 test/reynolds/skewbox/error.ref                    |    3 +
 test/reynolds/skewbox/skew.sh                      |   48 +
 test/reynolds/skewbox/skewbox.gfs                  |   56 +
 test/reynolds/stream/div5.ref                      |   80 +
 test/reynolds/stream/div6.ref                      |  161 +
 test/reynolds/stream/div7.ref                      |  321 +
 test/reynolds/stream/reynolds.ref                  |    3 +
 test/reynolds/stream/stream.gfs                    |   80 +
 test/rossby.sh                                     |    1 +
 test/rossby/ec-6                                   |  208 +
 test/rossby/eh-4.ref                               |  208 +
 test/rossby/eh-5.ref                               |  208 +
 test/rossby/eh-6.ref                               |  208 +
 test/{cosine/isolines.gfv => rossby/ehm.gfv}       |   17 +-
 test/{cosine/isolines.gfv => rossby/ehp.gfv}       |   13 +-
 test/{cosine/zero.gfv => rossby/h.gfv}             |   19 +-
 test/{cosine/zero.gfv => rossby/href.gfv}          |   17 +-
 test/rossby/ocean/ec-6                             |  208 +
 test/rossby/ocean/eh-4.ref                         |  208 +
 test/rossby/ocean/eh-5.ref                         |  208 +
 test/rossby/ocean/eh-6.ref                         |  208 +
 test/{cosine/isolines.gfv => rossby/ocean/ehm.gfv} |   17 +-
 test/{cosine/isolines.gfv => rossby/ocean/ehp.gfv} |   13 +-
 test/{cosine/zero.gfv => rossby/ocean/h.gfv}       |   19 +-
 test/{cosine/zero.gfv => rossby/ocean/href.gfv}    |   17 +-
 test/rossby/ocean/ocean.gfs                        |  166 +
 test/rossby/river/ec-6                             | 3112 +++++++
 test/rossby/river/eh-4.ref                         |  488 ++
 test/rossby/river/eh-5.ref                         | 1236 +++
 test/rossby/river/eh-6.ref                         | 3112 +++++++
 test/{cosine/isolines.gfv => rossby/river/ehm.gfv} |   17 +-
 test/{cosine/isolines.gfv => rossby/river/ehp.gfv} |   13 +-
 test/{cosine/zero.gfv => rossby/river/h.gfv}       |   19 +-
 test/{cosine/zero.gfv => rossby/river/href.gfv}    |   17 +-
 test/rossby/river/river.gfs                        |  161 +
 test/rossby/rossby.gfs                             |  158 +
 test/rossby/rossby.sh                              |   83 +
 test/rotate.sh                                     |    1 +
 test/rotate/cells.gfv                              |   48 +
 test/rotate/error.n1                               |   40 +
 test/rotate/error.ref                              |   40 +
 test/rotate/n1-0.gnu                               |   10 +
 test/rotate/n1-1.gnu                               |   14 +
 test/rotate/n1-2.gnu                               |   24 +
 test/rotate/n1-5.gnu                               |   18 +
 test/rotate/rotate.gfs                             |  125 +
 test/rotate/rotate.gfv                             |   31 +
 test/sessile.sh                                    |    1 +
 test/sessile/error-6.ref                           |    7 +
 test/sessile/sessile.gfs                           |   69 +
 test/sessile/sessile.sh                            |   90 +
 test/shear.sh                                      |    1 +
 test/shear/concentration/concentration.gfs         |  111 +
 test/shear/concentration/concentration.sh          |   52 +
 test/shear/concentration/convergence.ref           |    4 +
 test/shear/concentration/convergence1.ref          |    4 +
 test/shear/concentration/convergence2.ref          |    4 +
 test/shear/concentration/t1.gfv                    |   54 +
 test/shear/concentration/t2.gfv                    |   54 +
 test/shear/curvature/curvature.gfs                 |   19 +-
 test/shear/curvature/norms.ref                     |    4 +
 test/shear/norms.ref                               |    4 +
 test/shear/shear.gfs                               |    7 +-
 test/shock.sh                                      |    1 +
 test/shock/error.ref                               |    4 +
 test/shock/layered/field.awk                       |   26 +
 test/shock/layered/layered.gfs                     |  112 +
 test/shock/layered/layered.sh                      |   71 +
 test/shock/layered/prof.ref                        |  256 +
 test/shock/layered/uprof.awk                       |   16 +
 test/shock/shock.gfs                               |   75 +
 test/shock/shock.sh                                |   51 +
 test/shore.sh                                      |    1 +
 test/shore/convergence.ref                         |    4 +
 test/shore/init.cgd                                | 1006 +++
 test/shore/shore.gfs                               |   82 +
 test/shore/shore.sh                                |   72 +
 test/shore/t160.csv                                |  102 +
 test/shore/t175.csv                                |  102 +
 test/shore/t220.csv                                |  102 +
 test/source.sh                                     |    1 +
 test/spurious.sh                                   |    1 +
 test/spurious/axi/axi.gfs                          |    6 +-
 test/spurious/axi/convergence.ref                  |    8 +
 test/spurious/axi/kconvergence.ref                 |    8 +
 test/spurious/convergence.ref                      |    8 +
 test/spurious/kconvergence.ref                     |    8 +
 test/spurious/spurious.gfs                         |    2 +-
 test/still.sh                                      |    1 +
 test/still/bipolar/bipolar.gfs                     |  119 +
 test/still/bipolar/mesh.gfv                        |   30 +
 test/{cosine/zero.gfv => still/bipolar/p.gfv}      |   25 +-
 test/still/still.gfs                               |   64 +
 test/still/still.gfv                               |   75 +
 test/strouhal.sh                                   |    1 +
 test/strouhal/strouhal.gfs                         |    4 +
 test/strouhal/strouhal.ref                         |    6 +-
 test/swirl.sh                                      |    1 +
 test/swirl/analytical                              |  100 +
 test/swirl/swirl.gfs                               |  159 +
 test/template.tex                                  |  149 +-
 test/terrain.sh                                    |    1 +
 test/terrain/error-h.ref                           |    4 +
 test/terrain/error-t.ref                           |    8 +
 test/terrain/terrain.gfs                           |   84 +
 test/terrain/terrain.sh                            |   79 +
 test/wannier.sh                                    |    1 +
 test/wannier/bipolar/bipolar.gfs                   |  131 +
 test/wannier/bipolar/bipolar.sh                    |   59 +
 test/wannier/bipolar/error.ref                     |    5 +
 .../isolines.gfv => wannier/bipolar/mesh.gfv}      |   18 +-
 test/wannier/error.ref                             |    6 +
 test/{cosine/zero.gfv => wannier/streamlines.gfv}  |   23 +-
 test/wannier/stretch/error.ref                     |    5 +
 test/wannier/stretch/streamlines.gfv               |   39 +
 test/wannier/stretch/stretch.gfs                   |   82 +
 test/wannier/wannier.c                             |   40 +
 test/wannier/wannier.gfs                           |   98 +
 test/wannier/wannier.sh                            |   45 +
 test/waves.sh                                      |    1 +
 test/waves/adaptive/correlation.ref                |    5 +
 tools/Makefile.am                                  |   19 +-
 tools/Makefile.in                                  |  206 +
 tools/darcs2dist                                   |   41 +-
 tools/gfs2oogl.c                                   |   17 +-
 tools/gfscombine.c                                 |  231 +
 tools/gfscompare.c                                 |   59 +-
 tools/gfsjoin2.c                                   |    4 +
 tools/gfsplot                                      |   64 +
 523 files changed, 77387 insertions(+), 4133 deletions(-)

diff --cc ChangeLog
index 8337bb4,5cf4a81..f99f61a
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,3 -1,1364 +1,1367 @@@
++<<<<<<< HEAD
++=======
+ Fri Dec  6 16:51:20 CET 2013  Release
+   tagged 2013-12-06
+ 
+ Fri Dec  6 14:01:25 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * Fixed docs for sinking velocity
+ 
+ Fri Dec  6 10:53:10 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * Fix for bubble cap example
+ 
+ Wed Nov 20 16:21:17 CET 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * New solver GfsAdvectionAxi
+   Axisymmetric version of the solver GfsAdvection
+ 
+ Fri Nov 29 11:49:51 CET 2013  Stephane Popinet <popinet at basilisk.fr>
+   * Cosmetics
+ 
+ Wed Nov 27 17:47:05 CET 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * sink velocity can be applied to VariableVOFConcentration
+ 
+ Wed Nov 27 12:19:11 CET 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * New test: unipolar injection in cylindrical
+ 
+ Tue Nov 26 11:57:29 CET 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * sink velocities can be functions
+ 
+ Fri Nov 29 11:35:58 CET 2013  Stephane Popinet <popinet at basilisk.fr>
+   * Fix for gfs-highlight
+   
+   It somehow didn't worh anymore with recent versions of source-highlight.
+ 
+ Sat Aug  3 08:09:31 CEST 2013  Dustin Langewisch <dustinl at mit.edu>
+   * Rising bubble example
+ 
+ Fri Aug  2 05:53:54 CEST 2013  Release
+   tagged 2013-08-02
+ 
+ Fri Aug  2 03:50:00 CEST 2013  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for 32-bits padding in kdt
+ 
+ Fri Aug  2 03:16:25 CEST 2013  Stephane Popinet <s.popinet at gmail.com>
+   * Removed obsolete --partial darcs option
+ 
+ Fri Aug  2 02:49:08 CEST 2013  Release
+   tagged 2013-08-01
+ 
+ Fri Aug  2 00:16:38 CEST 2013  Stephane Popinet <popinet at users.sf.net>
+   * Updated Poisson tests references for new hypre version
+ 
+ Thu Aug  1 02:01:21 CEST 2013  Stephane Popinet <popinet at basilisk.fr>
+   * Fluxes are reset properly
+   
+   The previous implementation could cause FPEs when trying to reuse
+   non-initialised invalid values.
+ 
+ Fri Jul 27 01:46:23 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New tool 'gfscombine'
+ 
+ Wed Jul 24 04:34:18 CEST 2013  Stephane Popinet <popinet at basilisk.fr>
+   * Fixed qsort() function call in kdt
+ 
+ Wed Jul 24 04:32:01 CEST 2013  Stephane Popinet <popinet at basilisk.fr>
+   * Cosmetics
+ 
+ Wed Feb 20 18:49:15 CET 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * For VariableVOFConcentration face diffusion is set to zero
+ 
+ Fri Jan 18 13:54:27 CET 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * New object gfs_vof_face_fraction
+ 
+ Fri Jan 18 13:25:55 CET 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * Corrections to gfs_vof_face_value
+ 
+ Fri Jan 11 04:29:54 CET 2013  Stephane Popinet <s.popinet at gmail.com>
+   * Updated field.awk for stratified lake case
+ 
+ Fri May 31 08:57:17 CEST 2013  Release
+   tagged 2013-05-28
+ 
+ Tue May 28 13:10:34 CEST 2013  Jose M. Lopez-Herrera Sanchez <jose.lopez.herrera.s at gmail.com>
+   * electric BC fixed
+   
+   This patch solve defective BC application in parallel runs
+ 
+ Sat Jan 12 10:57:27 CET 2013  Release
+   tagged 2013-01-12
+ 
+ Sat Jan 12 08:55:45 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * New test case geostrophic adjustment with Saint Venant
+ 
+ Sat Jan 12 08:41:14 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * Cosmetics for Rossby test case
+ 
+ Sat Jan 12 08:38:09 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * Fixed scaling of 'geo' test case
+ 
+ Thu Jan 10 00:33:58 CET 2013  Stephane Popinet <s.popinet at gmail.com>
+   * Checks that SourcePipe does not use negative water depths
+ 
+ Thu Jan 10 00:33:34 CET 2013  Stephane Popinet <s.popinet at gmail.com>
+   * Fixes for convergence checks for Boyd's culvert model
+ 
+ Wed Jan  9 07:55:10 CET 2013  Release
+   tagged 2012-12-06
+ 
+ Thu Dec  6 05:38:21 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Do not use pipes within gnuplot for test cases
+   
+   Gnuplot seems to have problems when several instances are running in
+   parallel.
+ 
+ Wed Jan  9 04:31:00 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * Fix for incorrect pending functions
+ 
+ Wed Jan  9 03:56:08 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * Added missing BCs for OutputScalar when using functions
+ 
+ Wed Jan  9 01:50:32 CET 2013  Stephane Popinet <popinet at users.sf.net>
+   * Cosmetics for VOFConcentration
+ 
+ Thu Nov 15 12:52:56 CET 2012  jose.lopez.herrera.s at gmail.com
+   * new test case to check diffusion applied to VariableVOFConcentration
+ 
+ Thu Nov 15 12:49:25 CET 2012  jose.lopez.herrera.s at gmail.com
+   * cylinder test updated
+ 
+ Thu Nov 15 11:27:29 CET 2012  jose.lopez.herrera.s at gmail.com
+   * concentration test is adapted to the new definition of VariableVOFConcentration
+ 
+ Thu Nov 15 11:19:18 CET 2012  jose.lopez.herrera.s at gmail.com
+   * VariableVOFConcentration is defined now as per cell volume
+ 
+ Sat Dec  1 06:13:57 CET 2012  Stephane Popinet <popinet at users.sf.net>
+   * Added GNUlib open_memstream() implementation for BSD systems
+ 
+ Fri Nov 30 07:54:38 CET 2012  Release
+   tagged 2012-11-30
+ 
+ Fri Nov 30 05:19:43 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Set "feature test macros" correctly for open_memstream()
+ 
+ Fri Nov 30 01:17:34 CET 2012  Release
+   tagged 2012-11-29
+ 
+ Thu Nov 29 22:56:26 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Use only glib functions for temporary file creation
+   
+   System-supplied versions are very flaky on some systems (e.g. AIX).
+ 
+ Thu Nov 29 10:13:22 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Replaced tmpfile() with open_memstream()
+   
+   This avoids using (often flaky) filesystems so should be more robust
+   and more efficient.
+ 
+ Thu Nov 29 03:12:12 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Consistent temporary file creation
+ 
+ Wed Nov 28 22:23:16 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Renamed configure.in to configure.ac
+ 
+ Wed Nov 28 21:49:47 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for command-line events and GfsFunctions
+ 
+ Tue Nov 27 05:59:49 CET 2012  Release
+   tagged 2012-11-27
+ 
+ Tue Nov 27 03:27:12 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Pre-compiled GfsFunctions are always cached
+   
+   This is necessary to avoid re-compilation during load-balancing.
+ 
+ Mon Nov 26 22:52:23 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixes for GfsGlobals and GfsFunctionConstant
+ 
+ Mon Nov 26 00:12:30 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for gfs_vorticity() with GfsAxi
+   
+   The generalised metric calculation for vorticity somehow does not work
+   for the axisymmetric metric.
+ 
+ Sat Nov 24 06:17:33 CET 2012  Stephane Popinet <popinet at users.sf.net>
+   * GfsFunctions are compiled as a "batch"
+   
+   This means that usually only one compilation/linking is required for
+   the entire simulation rather than one compile/link for each
+   GfsFunction. On systems with slow fork/system() calls this can make a
+   large difference in initialisation time.
+ 
+ Wed Nov 21 06:55:37 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Added profiling info for compilation of GfsFunctions
+ 
+ Tue Nov 20 21:51:23 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Variable density for GfsRiver uses alpha
+ 
+ Fri Nov 16 04:26:29 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New stratified lake test case
+ 
+ Thu Nov 15 00:07:11 CET 2012  Stephane Popinet <popinet at users.sf.net>
+   * Preliminary implementation of variable density for multilayer Saint-Venant
+ 
+ Wed Nov 14 22:26:37 CET 2012  Stephane Popinet <popinet at users.sf.net>
+   * Cosmetics.
+ 
+ Wed Nov 14 22:25:11 CET 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fix for initialisation of layered variables
+ 
+ Wed Nov 14 22:23:55 CET 2012  Stephane Popinet <popinet at users.sf.net>
+   * Bug fix for FFT module
+ 
+ Sun Oct 21 21:49:04 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fix for uninitialised kmax in gfs_height_curvature()
+ 
+ Mon Sep 17 12:17:47 CEST 2012  Daniel Fuster <dfuster at gmail.com>
+   * GfsInit allows for a physical end time
+ 
+ Wed Nov 14 01:18:54 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for GfsFunction and directories with spaces
+ 
+ Wed Nov 14 01:05:28 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Possible fix for gfs_domain_tag_droplets() in parallel
+ 
+ Mon Nov 12 07:53:38 CET 2012  Release
+   tagged 2012-11-12
+ 
+ Mon Nov 12 05:40:35 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Updated cloneubuntu to 12.10
+ 
+ Mon Nov 12 05:40:11 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Debian packages depend on libproj-dev rather than proj (obsolete)
+ 
+ Sun Oct 21 18:51:15 CEST 2012  Release
+   tagged 2012-10-21
+ 
+ Sun Oct 21 16:06:29 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Updated reference for rotate test case
+ 
+ Sat Oct 20 19:09:37 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Additional test case for TracerVOFHeight on 4 procs
+ 
+ Sat Oct 20 18:13:21 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fix for TracerVOFHeight with periodic/parallel BCs
+ 
+ Mon Oct  8 14:11:35 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * New vector mapping functions mapvx(), mapvy()
+ 
+ Wed Oct  3 14:06:28 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fixed mapping of cubed sphere coordinates
+ 
+ Tue Oct  2 17:05:09 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Second-order vertical advection for layered module
+ 
+ Thu Sep  6 13:54:00 CEST 2012  Release
+   tagged 2012-09-06
+ 
+ Thu Sep  6 11:48:26 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Minor test suite fixes
+ 
+ Wed Sep  5 16:12:29 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fix for symmetry conditions of tensors
+ 
+ Sun Aug 12 07:16:50 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixes for rotated boundaries in 2nd-order GfsRiver
+ 
+ Fri Aug 17 00:51:25 CEST 2012  George Gerber <george.gerber at gmail.com>
+   * Fixes for convergence of outlet control iteration
+ 
+ Fri Aug 17 00:51:10 CEST 2012  George Gerber <george.gerber at gmail.com>
+   * New utility discharge_table for culvert module
+ 
+ Thu Aug 16 23:41:03 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Added missing outputs for GfsRiver
+ 
+ Thu Aug 16 23:40:25 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fix for vector GfsSources
+ 
+ Tue Aug 14 01:48:35 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New test case 'nonlinear geostrophic adjustment'
+ 
+ Tue Aug 14 01:29:16 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for layered shock test case
+ 
+ Sun Aug 12 23:25:04 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Option for non-linear free-surface in GfsOcean
+ 
+ Wed Aug  1 02:48:11 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Cosmetics for groundwater test case
+ 
+ Tue Jul 31 17:14:12 CEST 2012  gdmcbain at freeshell.org
+   * groundwater test with spatial step in permeability
+ 
+ Tue Jul 31 16:16:23 CEST 2012  gdmcbain at freeshell.org
+   * test solving groundwater flow by projection
+ 
+ Fri Jun 15 02:48:23 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New free surface Rossby-Haurwitz test case
+ 
+ Thu Jun 14 07:26:05 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixes for metric in GfsOcean
+ 
+ Sun Aug 12 09:39:57 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New test case, shock wave on cubed sphere
+ 
+ Sun Aug 12 07:22:28 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New Rossby-Haurwitz waves Saint-Venant test case
+ 
+ Tue Jul 31 09:32:48 CEST 2012  Release
+   tagged 2012-07-31
+ 
+ Tue Jul 31 07:21:32 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for layered shock test case
+ 
+ Tue Jul 31 04:45:18 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Mass fluxes are not necessary for a single layer
+ 
+ Wed Jul 25 05:00:47 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Second-order vertical advection for GfsRiver
+ 
+ Wed Jul 25 00:58:01 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New layered transcritical flow test case
+ 
+ Mon Jul 23 01:52:33 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Bottom friction for multilayer Saint-Venant
+ 
+ Fri Jul 20 07:11:54 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Boundary conditions for multilayer Saint-Venant
+ 
+ Thu Jul 19 07:33:58 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New test case for transcritical flow over a bump
+ 
+ Thu Jul 19 05:44:45 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New lake test case for multilayer Saint-Venant
+ 
+ Thu Jul 19 03:13:36 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Bug fixes for multilayer Saint-Venant
+ 
+ Tue Jul 17 04:46:58 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for poiseuille/river test case
+ 
+ Fri Jul 13 07:02:59 CEST 2012  Jesse Robertson <jesse.robertson at csiro.au>
+   * New example 'viscmix'
+ 
+ Sun Jun 24 12:19:59 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Tracer advection for GfsRiver
+ 
+ Fri Jun 22 01:37:57 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * New GfsLayers object
+ 
+ Wed Jun 20 12:23:54 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * New Poiseuille test case for multilayer Saint-Venant
+ 
+ Wed Jun 20 07:08:59 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Vertical viscosity for multilayer Saint-Venant
+ 
+ Tue Jun 19 12:15:25 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Multilayer Saint-Venant solver
+ 
+ Thu Jun 14 03:00:03 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New function gfs_domain_cell_traverse_new()
+ 
+ Fri Jul  6 13:27:03 CEST 2012  Release
+   tagged 2012-07-06
+ 
+ Fri Jul  6 11:40:09 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fix for distribution of test suite in tarballs
+ 
+ Tue Jul  3 12:32:21 CEST 2012  Release
+   tagged 2012-06-28
+ 
+ Thu Jun 28 04:15:01 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Debian packages needs mpi-default-dev also at runtime
+ 
+ Fri Jun 22 13:30:09 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * New utility 'gfsplot'
+   
+   For coupling gnuplot with OutputSimulation (text format). There is an
+   example in doc/examples/dam.
+ 
+ Sun Jun 17 09:05:27 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Kinetic Riemann solver for GfsRiver
+ 
+ Wed Jun 13 07:31:37 CEST 2012  Release
+   tagged 2012-06-13
+ 
+ Wed Jun 13 05:18:38 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Added missing classes to gfs_classes()
+ 
+ Wed Jun 13 01:48:40 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for treatment of thin solids
+ 
+ Wed Jun 13 01:47:54 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for 'layered' bug in moving.c
+ 
+ Wed Jun 13 01:47:27 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Updated test cases references
+ 
+ Tue Jun 12 03:46:54 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New "overlaps()" utility function
+ 
+ Tue Jun 12 02:13:28 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for Dirichlet bcs in VariablePoisson
+ 
+ Tue Jun 12 01:58:49 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * OutputGRD uses physical coordinates
+ 
+ Fri Jun  1 03:29:30 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * gfs_divergence() uses a finite-volume approximation
+ 
+ Thu May 31 01:44:05 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New Rossby-Haurwitz wave test case
+ 
+ Thu May 31 01:09:32 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Added evolution of error with time for cosine bell test case
+ 
+ Tue May 29 02:00:15 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Support for rotated MPI boundaries
+ 
+ Mon May 28 06:08:10 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Various fixes for layered module
+ 
+ Mon May 28 05:54:15 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New object GfsMetricVariable
+ 
+ Mon May 28 05:51:45 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * inverse_vector() method for MetricCubed
+ 
+ Mon May 28 05:48:56 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * AdaptError now works on cubed sphere
+ 
+ Fri May 25 08:13:00 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Cosmetics
+ 
+ Fri May 25 08:08:28 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Switched cubed sphere coefficients back to Rancic et al
+ 
+ Fri May 25 07:13:59 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * gfs_divergence() and gfs_vorticity() take metric into account
+ 
+ Fri May 25 07:06:17 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for interpolation close to domain corners.
+ 
+ Fri May 25 06:59:31 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New utility functions dx2(), dy2(), dz2()
+ 
+ Fri May 25 06:57:01 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New function gfs_cartesian_grid_read()
+ 
+ Fri May 25 06:40:52 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Removed netcdf from RPM dependencies
+ 
+ Mon May 21 00:12:02 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * The TMPDIR environment variable is taken into account
+ 
+ Sun May 20 23:40:45 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * LocateArray was not updated when entirely solid boxes were destroyed
+ 
+ Fri May 18 01:21:25 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * CGD files now understand "rx,ry,rz"
+   
+   This is useful for defining coordinate transformations numerically.
+ 
+ Wed May 16 10:42:39 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Orthogonality is the deviation from orthogonality
+ 
+ Wed May 16 10:40:25 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Conformal and spherical options for MetricLaplace
+ 
+ Tue May 15 23:28:46 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New object GfsMetricLaplace
+ 
+ Tue May  8 03:10:47 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New derived variable "Orthogonality"
+ 
+ Fri May  4 08:59:36 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New object GfsVariableLaplacian
+ 
+ Thu May  3 22:45:04 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for electro module warning
+ 
+ Thu May  3 13:02:40 CEST 2012  "Jose Lopez-Herrera Sanchez" <jose.lopez.herrera.s at gmail.com>"
+   * A warning for correct use of EHD implicit scheme
+ 
+ Wed May  2 23:34:42 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New 'culvert' module
+ 
+ Mon Apr 30 23:24:32 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * build_function_gcc uses '$CC' rather than just 'gcc'
+ 
+ Wed Mar 21 21:38:04 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Norm of residual takes metric into account
+ 
+ Thu Mar  8 21:58:48 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New 'layered' module for 2.5D hydrostatic solver
+ 
+ Tue Feb 28 22:28:14 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New object GfsVariableAverage
+ 
+ Wed Feb 22 06:59:29 CET 2012  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Vorticity is computed consistently from circulation (2D only for now)
+ 
+ Fri Feb 17 03:15:39 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * gfs_domain_face_bc() now works also for "rotated" edges
+ 
+ Tue Feb  7 22:40:13 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New object GfsDomainProjection
+ 
+ Fri Apr 27 10:29:30 CEST 2012  Release
+   tagged 2012-04-27
+ 
+ Fri Apr 27 06:47:35 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Bug fix for parallel restarts
+ 
+ Fri Apr 27 00:40:44 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixed libmath and mergesort() conflicts in kdt.c
+ 
+ Thu Apr 26 23:48:43 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for compilation flags on Mac OSX
+ 
+ Mon Dec 19 08:31:23 CET 2011  stephane.zaleski at gmail.com
+   * Fixes to let autogen.sh work on MacOS X - Darwin
+ 
+ Thu Apr 26 11:30:01 CEST 2012  Release
+   tagged 2012-04-26
+ 
+ Thu Apr 26 08:54:32 CEST 2012  Stephane Popinet <popinet at users.sf.net>
+   * Updated test case references
+ 
+ Thu Apr 26 06:51:51 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * KDT defines better bounds for nodes
+ 
+ Thu Apr 26 06:00:53 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New rsurface2kdt conversion utility
+   
+   Old-style R-tree terrain databases are now unsupported but can still
+   be converted to the KDT format using this utility.
+ 
+ Thu Apr 26 05:49:16 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New utility kdt2kdt for conversion between versions
+ 
+ Thu Apr 26 03:10:08 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for okada module and lonlat coordinates
+ 
+ Thu Apr 26 03:07:47 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New 'terrain' test case
+ 
+ Thu Apr 26 03:07:32 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * gfs_interpolate() uses 5 points interpolation.
+   
+   This doesn't smooth as much as 4 points interpolation. Note that the
+   size of the array filled by gfs_cell_corner_values() as grown by one
+   element as a result of this change. It is imperative to adjust the
+   size of the array for all calls made to gfs_cell_corner_values().
+ 
+ Tue Apr 24 08:37:32 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for VOFHeight Bcs when used together with Solid
+ 
+ Fri Apr 20 06:45:42 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Terrain module now only supports the KDT format
+ 
+ Thu Apr  5 04:27:10 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Electrohydro and Poisson/Helmholtz solvers allow negative coefficients
+ 
+ Wed Apr  4 02:42:52 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Kdt optimises use of temporary files
+ 
+ Tue Apr  3 05:21:55 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Reuses buffers
+ 
+ Tue Apr  3 01:16:31 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Much improved kdt implementation
+ 
+ Mon Mar 26 07:32:07 CEST 2012  Release
+   tagged 2012-03-26
+ 
+ Mon Mar 26 05:41:28 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New SourcePipe object
+ 
+ Sun Mar 25 22:05:09 CEST 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Cleanup of swirl test case
+ 
+ Sun Mar 25 07:51:34 CEST 2012  Stephane Popinet <s.popinet at niwa.co.nz>
+   * RPM fixes for Fedora 16 and CentOS 6
+ 
+ Sun Mar 25 01:35:03 CET 2012  Release
+   tagged 2012-03-24
+ 
+ Sat Mar 24 23:52:04 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Updated reference for electro test case
+ 
+ Sat Mar 24 08:43:09 CET 2012  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Need to use gfs_face_interpolated_value_generic() when face is not simply oriented
+ 
+ Sat Mar 24 08:41:34 CET 2012  Stephane Popinet <popinet at users.sf.net>
+   * Fix for bibtex path
+ 
+ Sat Mar 24 01:11:19 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for gfsview snapshot tarballs
+ 
+ Fri Mar 23 23:49:21 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Tests and examples lists are created automatically from template.tex
+ 
+ Tue Mar 20 23:18:21 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New test case 'still/bipolar'
+ 
+ Sun Mar 18 23:49:51 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New test case: parabolic container with solid boundaries
+ 
+ Wed Mar 14 00:22:03 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New 'still' test case for cut cells and Saint-Venant
+ 
+ Fri Mar 23 08:35:22 CET 2012  Stephane Popinet <s.popinet at niwa.co.nz>
+   * 'W' can be used to define an azimuthal velocity in GfsAxi
+ 
+ Fri Mar 23 06:54:34 CET 2012  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Swirl test case uses the new formulation
+ 
+ Thu Mar 22 02:52:03 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for libparticulates and libbubbles linking
+ 
+ Wed Mar 21 21:39:47 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Unified bibliographies for examples and tests
+ 
+ Mon Jan  9 15:52:56 CET 2012  "Jose Lopez-Herrera Sanchez" <jose.lopez.herrera.s at gmail.com>"
+   * Swirl test case
+ 
+ Wed Mar 21 22:45:35 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixes for gradients and metric in GfsRiver (due to cut cell implementation)
+ 
+ Wed Mar 21 21:34:04 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New 'shock' example
+ 
+ Mon Mar 19 01:02:42 CET 2012  Hyunuk An <hanlight20 at hotmail.com>
+   * Cut cells for GfsRiver
+ 
+ Sun Mar 18 22:58:02 CET 2012  Release
+   tagged 2012-03-18
+ 
+ Sun Mar 18 01:11:23 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Removed support for obsolete 'gts-config' and 'gfs-config'
+ 
+ Sun Mar 18 01:08:52 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixes for automake and install dirs for scripts
+ 
+ Thu Mar  8 22:00:19 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixed gfs_variable_read_vector() input checking
+ 
+ Fri Mar  2 02:58:56 CET 2012  Release
+   tagged 2012-03-01
+ 
+ Thu Mar  1 22:50:11 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for incorrect use of gfs_face_interpolated_value() in GfsDiffusion
+ 
+ Thu Mar  1 22:48:17 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for GfsGlobal and function cache
+ 
+ Wed Feb 29 22:29:12 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for refinement of mixed cells containing a VOF interface
+   
+   Note that this is not mass conserving.
+ 
+ Wed Feb 29 08:57:33 CET 2012  Release
+   tagged 2012-02-29
+ 
+ Wed Feb 29 06:51:47 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Latex does not like underscores in test case names
+ 
+ Wed Feb 29 03:10:06 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New test case wannier/stretch
+ 
+ Wed Feb 29 02:41:37 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixed version info for skew_box test case
+ 
+ Tue Feb 28 23:10:20 CET 2012  Daniel Fuster <dfuster at gmail.com>
+   * New test case for AMR with the skew-symmetric formulation
+ 
+ Tue Feb 28 00:31:31 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Updated reference for shear/curvature test case
+ 
+ Tue Feb 28 00:22:15 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Support for metric and embedded boundaries
+ 
+ Fri Feb 24 06:41:37 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Removed crappy "deferred compilation" stuff
+   
+   This has been replaced by a generic global function cache.
+ 
+ Thu Feb 23 03:14:19 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for VariableStreamfunction and degenerate metrics (e.g. lon-lat)
+ 
+ Thu Feb 23 03:13:04 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Hypre module now works also for VariablePoisson
+ 
+ Wed Feb 22 21:45:00 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Adaptation needs to occur at the right time for GfsAdvection
+   
+   In particular so that the streamfunction is defined correctly after
+   adaptation for streamfunction/vorticity formulations.
+ 
+ Wed Feb 22 01:12:34 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Bias of residual now correctly reflects the compatibility condition
+ 
+ Tue Feb 21 23:47:00 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * VariablePoisson takes an optional multilevel parameter block
+ 
+ Tue Feb 21 03:50:25 CET 2012  Release
+   tagged 2012-02-20
+ 
+ Tue Feb 21 00:35:14 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Bug fix for GfsInitFaceValues
+ 
+ Tue Feb 21 00:07:36 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Cosmetics for skewsymmetric module
+ 
+ Wed Jan 25 19:22:33 CET 2012  Daniel Fuster <dfuster at gmail.com>
+   * Fixes for AMR in the skew-symmetric formulation
+ 
+ Wed Jan 25 19:17:15 CET 2012  Daniel Fuster <dfuster at gmail.com>
+   * New object GfsInitFaceValues in the skew-symmetric module
+ 
+ Wed Jan 25 19:12:11 CET 2012  Daniel Fuster <dfuster at gmail.com>
+   * Fix in viscous terms in the skew-symmetric module + several minor fixes
+ 
+ Mon Feb 20 23:57:44 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Minor bug fix for Coriolis terms
+ 
+ Mon Feb 20 23:43:38 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Acceleration-based CFL rollback
+ 
+ Fri Feb 17 03:04:51 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Bug fix for gfs_get_poisson_problem() with periodic boundary conditions
+ 
+ Fri Feb 17 03:16:47 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Metric terms for advection of velocity
+ 
+ Fri Feb 17 03:15:12 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Added vector transformations to cubed sphere mapping
+ 
+ Wed Feb 15 23:44:04 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * GfsInit can initialise vector fields with metric
+ 
+ Thu Feb  9 21:19:36 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Hydrostatic pressure needs to be updated when the mesh is adapted
+ 
+ Tue Feb  7 23:00:02 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * GfsPoisson takes Dirichlet conditions into account for compatibility
+ 
+ Tue Feb  7 22:37:52 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Minor warning fix for gfs_velocity_face_sources
+ 
+ Tue Feb  7 22:36:55 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Timestep CFL only takes accelerations into account when velocity is zero
+ 
+ Wed Feb  1 15:06:12 CET 2012  "Jose Lopez-Herrera Sanchez" <jose.lopez.herrera.s at gmail.com>"
+   * added missed gfs_domain_surface_bc in electrohydro.c
+ 
+ Tue Jan 31 05:46:28 CET 2012  Release
+   tagged 2012-01-31
+ 
+ Tue Jan 31 03:55:45 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Unified WEBROOT for docs
+ 
+ Tue Jan 31 00:37:51 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Fixed typo
+ 
+ Mon Jan 30 22:40:07 CET 2012  Stephane Zaleski <stephane.zaleski at upmc.fr>
+   * Do not call boundary_tree on boundaries with no root cell
+ 
+ Thu Nov 24 23:10:47 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Changed quotes for TecPlot files
+ 
+ Mon Jan 30 05:47:24 CET 2012  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Consistent use of GFS_VALUE() and GFS_VARIABLE()
+ 
+ Mon Jan 30 05:43:50 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * New object GfsHydrostaticPressure
+ 
+ Fri Jan 27 06:44:12 CET 2012  Stephane Popinet <s.popinet at niwa.co.nz>
+   * gfs_send_objects() and gfs_union_open() use fread() rather than mmap()
+   
+   Openfabrics/infiniband/OpenMPI somehow does not like mmap().
+ 
+ Mon Jan 30 02:43:59 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * All GfsModules are kept until the simulation is destroyed
+   
+   This means that in parallel no recompilation of GfsModules should be
+   necessary for GfsFunctions appearing in the boundary conditions of
+   GfsBoxes (when exchanging boxes between PEs for load balancing).
+   
+   This should allow to circumvent the dodgy fork() limitation of
+   openfabrics/infiniband.
+ 
+ Mon Jan 30 02:37:45 CET 2012  Stephane Popinet <s.popinet at gmail.com>
+   * Simplified box_split()
+ 
+ Wed Nov 23 02:46:27 CET 2011  Release
+   tagged 2011-11-23
+ 
+ Wed Nov 23 01:11:09 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Cosmetics
+ 
+ Tue Nov 15 23:12:55 CET 2011  Vladimir Kolobov <vik at cfdrc.com>
+   * Implementing gfs_domain_write_tecplot_surface
+   
+   Adding capability of outputing Gerris surfaces (either gts or implicitly specified) into Tecplot files
+   
+ 
+ Tue Nov 22 23:57:02 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Bug fix for charge in electrohydro
+ 
+ Tue Nov 22 21:33:49 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Removed obsolete GfsSourceCharge
+ 
+ Tue Nov 22 21:32:27 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * More fixes for map module and inverted transforms
+ 
+ Tue Nov 22 21:28:41 CET 2011  J.M. Lopez-Herrera <jose.lopez.herrera.s at gmail.com>
+   * Implicit treatment of the charge density equation for electrohydro
+   
+   Charge volume density is now user-defined by means of the function 'charge'.
+ 
+ Tue Nov 22 21:28:21 CET 2011  J.M. Lopez-Herrera <jose.lopez.herrera.s at gmail.com>
+   * Electrokinetic test: Gouy-Chapman Debye layer
+ 
+ Tue Nov 22 06:49:25 CET 2011  J.M. Lopez-Herrera <jose.lopez.herrera.s at gmail.com>
+   * Bump test also compares the implicit vs explicit charge scheme
+ 
+ Fri Nov 18 02:56:51 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New --debug option for gerris2D/3D
+ 
+ Tue Nov 15 03:47:31 CET 2011  Release
+   tagged 2011-11-15
+ 
+ Tue Nov 15 02:09:46 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Important fix for SurfaceBc and Neumann conditions
+   
+   They were completely wrong for values different from zero.
+ 
+ Tue Nov 15 02:06:58 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for MapProjection and inversion of mapping transforms
+ 
+ Thu Nov 10 09:48:20 CET 2011  Release
+   tagged 2011-11-10
+ 
+ Thu Nov 10 07:43:44 CET 2011  Stephane Popinet <popinet at users.sf.net>
+   * Updated test case references for new unified axi solver
+ 
+ Thu Nov 10 04:12:37 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Removed (hopefully) obsolete check on interface curvature
+ 
+ Wed Nov  9 23:18:15 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * GfsGlobal can include files from working directory
+ 
+ Wed Nov  9 23:16:53 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New wannier/bipolar test case
+ 
+ Wed Nov  9 22:32:34 CET 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New wannier test case
+ 
+ Wed Nov  9 10:29:07 CET 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Cosmetics
+ 
+ Mon Nov  7 21:14:34 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Axi solver is now just another metric
+ 
+ Mon Nov  7 01:23:52 CET 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New annulus test case
+ 
+ Mon Nov  7 01:00:08 CET 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * GfsSource takes into account mapping for vector quantities
+ 
+ Mon Nov  7 00:54:59 CET 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New vector mapping functions
+ 
+ Sat Nov  5 06:48:50 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Updated conflicting debian packages
+ 
+ Wed Nov  2 21:36:27 CET 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fixed m4 options configure test
+ 
+ Sun Oct 30 11:13:29 CET 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Improved cloneubuntu
+ 
+ Fri Oct 28 06:05:26 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * First implementation of metric terms for viscosity
+ 
+ Tue Oct 25 09:40:46 CEST 2011  Release
+   tagged 2011-10-25
+ 
+ Tue Oct 25 07:36:03 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Moved darcs gts to dalembert
+ 
+ Tue Oct 25 05:08:18 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * GfsMap uses Newton iterations to compute inverse mapping
+ 
+ Tue Oct 25 03:00:14 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * DischargeElevation is not an "Init" event
+ 
+ Tue Oct 25 01:30:10 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New non-uniform-stretching lid example
+ 
+ Mon Oct 24 23:29:03 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New Poiseuille with metric test case
+ 
+ Tue Mar 29 21:33:54 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Changed the ordering of mapping/scaling transforms
+ 
+ Mon Mar 28 21:37:08 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Commented out GSL use in metric.c
+ 
+ Mon Mar 28 21:08:25 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Updated documentation format for new GfsMetric objects
+ 
+ Mon Mar 28 20:55:04 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * GfsGenericMetric is now truly generic.
+ 
+ Mon Mar 28 20:43:30 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Simplified MapFunction
+ 
+ Wed Feb  9 21:26:07 CET 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New GfsGenericMetric and GfsMetric objects
+ 
+ Thu Jan 13 22:26:18 CET 2011  Sebastien Delaux <s.delaux at niwa.co.nz>
+   * The Coriolis test now uses the stretch metric
+ 
+ Fri Oct 21 05:35:40 CEST 2011  Release
+   tagged 2011-10-08
+ 
+ Sat Oct  8 05:11:25 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fixes for RPM specfile
+ 
+ Tue Oct 18 06:42:59 CEST 2011  Release
+   tagged 2011-10-14
+ 
+ Fri Oct 14 09:15:39 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * Initialization of the "old" velocity is skew-symmetric module + other minor changes
+ 
+ Fri Oct 14 00:53:03 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for "debugging leftovers" of skewsymmetric module
+ 
+ Thu Oct 13 23:25:55 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Various cosmetic improvements
+ 
+ Tue Oct 11 11:03:32 CEST 2011  Daniel Fuster<dfuster at gmail.com>
+   * Proper initialization and stockage of face velocities in skew-symmetric module
+ 
+ Sun Oct  9 21:51:16 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * 3D implementation of viscosity in skew-symmetric formulation
+ 
+ Thu Oct  6 10:52:56 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * Return to the original skew symmetric formulation + user defined value of beta
+ 
+ Sun Aug  7 17:23:30 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * new scheme implementation based on the skew-symmetric formulation
+ 
+ Mon Aug  1 10:55:46 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * variable density in skew symmetric formulation
+ 
+ Mon Oct 10 18:13:30 CEST 2011  J.M. Lopez-Herrera <jose.lopez.herrera.s at gmail.com>
+   * Bug fix in EHD forces
+ 
+ Fri Oct  7 11:41:54 CEST 2011  Release
+   tagged 2011-10-07
+ 
+ Fri Oct  7 09:34:47 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Doc fix
+ 
+ Fri Oct  7 09:28:36 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Another fix for gfs_domain_forget_boundary()
+ 
+ Fri Oct  7 06:26:19 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Debian/Ubuntu packages now include the hypre module
+ 
+ Fri Oct  7 06:13:53 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for gfs_domain_forget_boundary()
+ 
+ Thu Oct  6 23:36:38 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Hypre module should now work also for diffusion problems
+ 
+ Thu Oct  6 00:09:04 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for destroyed boundaries and gfs_domain_boundary_locate()
+ 
+ Wed Oct  5 22:43:33 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New 'shore' test case
+ 
+ Wed Oct  5 03:42:05 CEST 2011  Release
+   tagged 2011-10-05
+ 
+ Wed Oct  5 02:12:08 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Fixed F77 wrappers configure check
+ 
+ Wed Oct  5 01:46:09 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * New object GfsVariableVOFConcentration
+ 
+ Wed Oct  5 01:23:15 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * New time-reversed 'concentration' test case
+ 
+ Fri Sep 30 01:27:06 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * The dimension of the fft is now defined inside the structure of the object
+ 
+ Tue Oct  4 01:39:04 CEST 2011  Release
+   tagged 2011-10-03
+ 
+ Mon Oct  3 22:26:12 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fix for obsolete gfsconfig.h
+ 
+ Mon Oct  3 12:40:50 CEST 2011  Release
+   tagged 2011-10-03
+ 
+ Mon Oct  3 09:49:46 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Fix for configure and mpicc
+ 
+ Mon Oct  3 07:00:52 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Made pointer conversion explicit for buggy C libraries (AIX)
+ 
+ Mon Oct  3 06:59:39 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Bug fix for --with-suffix configure option
+ 
+ Mon Oct  3 06:58:44 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Macros should now work also with standard awk and m4
+ 
+ Sun Oct  2 12:20:43 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * GfsFunction should now support libtool compilation
+ 
+ Sun Oct  2 12:16:19 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Portability improvements and removal of obsolete "static modules" support
+ 
+ Thu Sep 29 12:40:13 CEST 2011  Release
+   tagged 2011-09-28
+ 
+ Wed Sep 28 23:54:36 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Added checks for gfs_domain_locate()
+ 
+ Wed Sep 28 23:31:33 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Distribute "multimedia" files also for test cases
+ 
+ Wed Sep 28 23:20:19 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Cosmetics for fft module
+ 
+ Wed Sep 28 10:43:48 CEST 2011  Daniel Fuster<dfuster at gmail.com>
+   * bug writting 3D spectra
+ 
+ Wed Sep 28 10:18:41 CEST 2011  Daniel Fuster<dfuster at gmail.com>
+   * minor corrections in GfsOutputSpectra
+ 
+ Thu Sep 29 09:49:09 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Added rotations to GfsMapTransform
+ 
+ Wed Sep 28 12:42:03 CEST 2011  Release
+   tagged 2011-09-28
+ 
+ Wed Sep 28 11:24:18 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Fix for typo in bibtex file
+ 
+ Wed Sep 28 07:32:02 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New 'plateau' test case
+ 
+ Wed Sep 28 07:30:08 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New "format" option for OutputScalar
+ 
+ Wed Sep 28 01:03:36 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Various fixes for fft module
+ 
+ Mon Sep 26 20:47:16 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * Several improvements in the GfsOutputSpectra module
+ 
+ Fri Sep 23 12:12:53 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * new GfsOutputSpectra object
+ 
+ Tue Sep 27 05:31:55 CEST 2011  Release
+   tagged 2011-09-27
+ 
+ Tue Sep 27 02:17:31 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Limit the minimum axisymmetric radius for HF curvature
+ 
+ Tue Sep 27 00:46:13 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Redefined g_assert macros for consistent error logging
+ 
+ Mon Sep 26 11:36:19 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Important fix for fine -> coarse VOF refinement and metric
+   
+   In particular this should impact axisymmetric VOF simulations.
+ 
+ Mon Sep 26 09:43:16 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New object GfsAdaptThickness
+ 
+ Sun Sep 25 23:19:34 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Changed defaults to beta = 1 and gc = 1
+ 
+ Fri Sep 23 09:24:22 CEST 2011  Release
+   tagged 2011-09-23
+ 
+ Fri Sep 23 07:10:56 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * "Multiband" VOF advection
+ 
+ Wed Sep 21 22:38:37 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Bug fix for error message in topics.mod
+ 
+ Thu Sep 22 04:36:02 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Fixed units for BcAngle
+ 
+ Wed Sep 21 04:31:11 CEST 2011  Release
+   tagged 2011-09-20
+ 
+ Wed Sep 21 01:17:49 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Only consider central-HF values close enough to the cell
+ 
+ Wed Sep 21 01:02:50 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Added levelset to 'rotate' test case
+ 
+ Wed Sep 21 00:32:17 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Coarse cells can use HF on finer interfacial cells
+ 
+ Wed Sep 21 00:27:47 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Coarse cells can use HF information on finer neighbours
+ 
+ Wed Sep 21 00:24:01 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * For GfsAdvection fixed order of tracer advection and adaptivity
+ 
+ Tue Sep 20 13:32:13 CEST 2011  Release
+   tagged 2011-09-20
+ 
+ Tue Sep 20 10:29:32 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Cosmetics
+ 
+ Tue Sep 20 09:00:07 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * New test case: sheared straight interface
+ 
+ Fri Sep 16 06:30:08 CEST 2011  Release
+   tagged 2011-09-16
+ 
+ Fri Sep 16 04:11:29 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New implementation of curvature from height-functions
+   
+   Gives priority to HF defined on equally-spaced columns.
+ 
+ Wed Sep 14 08:44:38 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * gfs_height_curvature_new() tries to find equally-spaced columns.
+ 
+ Wed Sep 14 06:31:03 CEST 2011  Release
+   tagged 2011-09-13
+ 
+ Wed Sep 14 00:41:37 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Optimisation for VariableTracerVOFHeight.
+   
+   Also fixes regression for VariableTracerVOF.
+ 
+ Tue Sep 13 09:58:22 CEST 2011  Release
+   tagged 2011-09-13
+ 
+ Tue Sep 13 07:06:02 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * A few test cases now use GfsVariableTracerVOFHeight
+ 
+ Tue Sep 13 07:03:07 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * Contact angle implementation for VariableTracerVOFHeight
+ 
+ Tue Sep 13 04:55:33 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New sessile drop test case
+ 
+ Fri Sep  9 02:39:16 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New contact angle boundary condition GfsBcAngle
+ 
+ Wed Sep  7 10:33:58 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * bug fix in skew-symmetric module (dt pointer)
+ 
+ Fri Sep  9 00:55:12 CEST 2011  Stephane Popinet <s.popinet at gmail.com>
+   * New utility function gfs_cell_message()
+ 
+ Tue Sep  6 03:22:08 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New height function implementation "GfsVariableTracerVOFHeight"
+ 
+ Tue Sep  6 03:06:00 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New test case for height-function in parallel
+ 
+ Mon Sep  5 23:23:22 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Bug fix for gfscompare and field with NODATA values
+ 
+ Fri Sep  2 05:24:04 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Preliminary implementation of new height-function algorithm
+ 
+ Tue Aug 30 11:24:03 CEST 2011  Release
+   tagged 2011-08-30
+ 
+ Tue Aug 30 07:59:25 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Various fixes for reynolds test case
+ 
+ Mon Aug  1 10:48:50 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * accuracy plot in reynolds test
+ 
+ Mon Aug  1 15:40:33 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * minor changes example
+ 
+ Fri Jul 29 20:55:43 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * bug in the skewsymmetric example
+ 
+ Sun Jul 10 16:42:24 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * new example for the skewsymmetric module
+ 
+ Tue Aug 30 07:17:51 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Properly exported gfs_velocity_face_sources()
+ 
+ Sat Jul 23 19:20:19 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * surface tension implementation in skewsymmetric module
+ 
+ Tue Aug 30 04:30:38 CEST 2011  Release
+   tagged 2011-08-29
+ 
+ Tue Aug 30 01:20:49 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Cosmetics
+ 
+ Tue Aug  9 01:42:46 CEST 2011  jose.lopez.herrera.s at gmail.com
+   * diffusion coefficients can be now evaluated using gfs_function_face_value
+ 
+ Sat Jul  9 01:29:44 CEST 2011  Release
+   tagged 2011-07-08
+ 
+ Fri Jul  8 22:50:12 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Fix for conflicts with new skew symmetric solver
+ 
+ Fri Jul  8 22:49:35 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Cosmetics for skew-symmetric solver
+ 
+ Fri Jul  8 21:50:48 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * skewsymmetric.mod: Remove useless macros
+ 
+ Fri Jul  8 19:12:28 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * Cleaning skewsymmetric module
+ 
+ Tue May 31 18:59:20 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * Skew symmetric formulation with all the possible combinations (I will decide the good ones later)
+ 
+ Thu May 26 17:12:54 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * AMR implementation for the skew-symmetric module
+ 
+ Mon May 23 16:49:43 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * 0th order extrapolation for AMR in the skew-symetric formulation
+ 
+ Sat May 21 16:17:30 CEST 2011  Daniel Fuster <dfuster at gmail.com>
+   * Initial implementation of the skew symmetric formulation
+ 
+ Fri Jul  8 23:28:40 CEST 2011  Release
+   tagged 2011-07-08
+ 
+ Fri Jul  8 21:52:54 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Fixed references in wingtip and starting examples
+ 
+ Fri Jul  8 15:48:00 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Cosmetics
+ 
+ Tue May 17 06:51:47 CEST 2011  Sebastien Delaux <s.delaux at niwa.co.nz>
+   * New topics module for submarine landslides and more
+ 
+ Tue May 17 06:56:02 CEST 2011  Sebastien Delaux <s.delaux at niwa.co.nz>
+   * Extension of gfs_cell_coarse_fine for 3D metric
+ 
+ Fri Jul  8 18:13:40 CEST 2011  G. D. McBain <gdmcbain at freeshell.org>
+   * Wingtip example
+ 
+ Fri Jul  8 17:54:58 CEST 2011  G. D. McBain <gdmcbain at freeshell.org>
+   * Starting vortex example
+ 
+ Fri Jul  1 09:27:58 CEST 2011  Release
+   tagged 2011-07-01
+ 
+ Fri Jul  1 07:34:31 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Updated test cases references
+ 
+ Thu Jun 30 23:05:43 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Fixed surface/solid marginal cases
+ 
+ Sun Jun 26 03:13:45 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Removed 'fix' for implicit function intersection
+ 
+ Sat Jun 25 20:55:04 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Fixed RPM spec file for Fedora 15
+ 
+ Sat Jun 11 11:03:46 CEST 2011  Release
+   tagged 2011-06-11
+ 
+ Sat Jun 11 09:11:35 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Added reference to Lopez et al for electro test cases
+ 
+ Fri Jun 10 23:31:35 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New reynolds test case with streamfunction/vorticity formulation
+ 
+ Fri Jun 10 23:28:56 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * New object GfsVariablePoisson for vorticity/streamfunction formulation
+ 
+ Wed Jun  8 16:52:15 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Bug fix for scaling being ignored in AdaptGradient when restarting
+ 
+ Fri May 27 02:30:28 CEST 2011  Release
+   tagged 2011-05-26
+ 
+ Fri May 27 01:01:11 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Added corner definitions for isolines in isocube.h
+ 
+ Thu May 26 16:32:05 CEST 2011  Release
+   tagged 2011-05-26
+ 
+ Thu May 26 14:53:34 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Updated daily script for move to gerris.dalembert
+ 
+ Thu May 26 15:23:27 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * "dV" now takes the metric into account
+ 
+ Tue May 24 15:15:00 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   tagged 2011-05-24
+ 
+ Tue May 24 12:50:28 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Added option to remove bubbles using RemoveDroplets
+ 
+ Tue May 24 10:41:07 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * For GfsAxi the minimum radius is _half_ the grid size
+ 
+ Tue May 24 09:55:03 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Cosmetics
+ 
+ Mon May 23 22:18:05 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * For GfsAxi the minimum radius of curvature is now limited to the grid size.
+ 
+ Fri May  6 20:43:11 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   tagged 2011-05-05
+ 
+ Thu May  5 11:07:55 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Partial fix for units in gfscompare
+ 
+ Thu May  5 10:51:45 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Fixed assertion for function_compile()
+ 
+ Fri Apr 29 21:01:51 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   tagged 2011-04-28
+ 
+ Thu Apr 28 20:35:49 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Fix for preloaded modules in parallel
+ 
+ Thu Apr 28 20:51:13 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   tagged 2011-04-28
+ 
+ Thu Apr 28 17:26:22 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Proper (hopefully) fix for optimised domain traversal
+ 
+ Thu Apr 28 10:17:35 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Rollback of partitioning fix 
+ 
+ Tue Apr 26 17:01:43 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Bug fix for partitioning with the optimised array traversal
+ 
+ Tue Apr  5 19:02:28 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Fixed scaling of tx,ty,tz in GfsSurface
+ 
+ Fri Apr  1 17:05:11 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Fixed problem with combination of EventBalance and periodic Bcs
+ 
+ Fri Apr  1 11:00:41 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Check for location of hypre module
+ 
+ Mon Mar 28 22:10:05 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
+   * Optimised domain box traversal by caching sorted array.
+ 
+ Wed Mar 30 22:34:42 CEST 2011  Stephane Popinet <popinet at users.sf.net>
+   * Important fix for Okada module in longitude/latitude coordinates
+ 
++>>>>>>> upstream/20131206+dfsg
  Wed Mar 30 11:19:12 CEST 2011  Stephane Popinet <s.popinet at niwa.co.nz>
    tagged 2011-03-29
  
@@@ -3573,7 -4934,7 +4937,11 @@@ Tue Mar 13 04:18:40 CET 2007  Stephane 
  Tue Mar 13 03:45:54 CET 2007  Cedric Penard <cedric.penard at ifremer.fr>
    * Fix for merge with stable branch
  
++<<<<<<< HEAD
 +Tue Mar 13 02:01:28 CET 2007  C[_\c3_][_\a9_]dric P[_\c3_][_\a9_]nard <cedric.penard at ifremer.fr>
++=======
+ Tue Mar 13 02:01:28 CET 2007  C[_<U+00E9>_]dric P[_<U+00E9>_]nard <cedric.penard at ifremer.fr>
++>>>>>>> upstream/20131206+dfsg
    * New object GfsCartesianGrid
  
  Tue Mar 13 03:25:43 CET 2007  Stephane Popinet <popinet at users.sf.net>
diff --cc INSTALL
index 7d1c323,a1e89e1..ac1ef04
--- a/INSTALL
+++ b/INSTALL
@@@ -1,8 -1,8 +1,13 @@@
  Installation Instructions
  *************************
  
++<<<<<<< HEAD
 +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
 +2006, 2007, 2008, 2009 Free Software Foundation, Inc.
++=======
+ Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+ Inc.
++>>>>>>> upstream/20131206+dfsg
  
     Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
@@@ -226,6 -226,11 +231,14 @@@ order to use an ANSI C compiler
  
  and if that doesn't work, install pre-built binaries of GCC for HP-UX.
  
++<<<<<<< HEAD
++=======
+    HP-UX `make' updates targets which have the same time stamps as
+ their prerequisites, which makes it generally unusable when shipped
+ generated files such as `configure' are involved.  Use GNU `make'
+ instead.
+ 
++>>>>>>> upstream/20131206+dfsg
     On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
  parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
  a workaround.  If GNU CC is not installed, it is therefore recommended
diff --cc Makefile.am
index 755ee10,584ec9c..2105ab3
--- a/Makefile.am
+++ b/Makefile.am
@@@ -1,26 -1,25 +1,48 @@@
  ## Process this file with automake to produce Makefile.in
  
  ACLOCAL_AMFLAGS = -I m4
++<<<<<<< HEAD
 +
 +# change this to your OSC directory
 +OSC_DIR=$(HOME)/local/src/osc/home:popinet/$(PACKAGE)-snapshot
 +
 +# change this to your dput command
 +DPUT = socksify dput
 +
 +# change this to your launchpad PPA
 +# configured in ~/.dput.cf
 +PPA = gerris-ppa
 +
 +# change this to the ID of the PPA GPG key
 +KEY = 07AB22DC
 +
 +# change this to the html changelog for this launchpad release
 +LOG = /var/www/gerris/version/gerris_changes
 +
 +SUBDIRS = modules src tools test doc desktop
 +
 +EXTRA_DIST = ChangeLog m4
++=======
+ 
+ # change this to your OSC directory
+ OSC_DIR=$(HOME)/local/src/osc/home:popinet/$(PACKAGE)-snapshot
+ 
+ # change this to your dput command
+ DPUT = socksify dput
+ 
+ # change this to your launchpad PPA
+ # configured in ~/.dput.cf
+ PPA = gerris-ppa
+ 
+ # change this to the ID of the PPA GPG key
+ KEY = 07AB22DC
+ 
+ LOG = $(WEBROOT)/version/gerris_changes
+ 
+ SUBDIRS = src modules tools test doc desktop debian
+ 
+ EXTRA_DIST = ChangeLog m4 build_function_gcc build_function_libtool
++>>>>>>> upstream/20131206+dfsg
  
  if DARCS_CONTROLLED
  DARCS_CHANGELOG = changelog
diff --cc Makefile.in
index 7984135,4db4449..6879d83
--- a/Makefile.in
+++ b/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -14,7 -14,25 +23,29 @@@
  # PARTICULAR PURPOSE.
  
  @SET_MAKE@
++<<<<<<< HEAD
++VPATH = @srcdir@
++=======
+ 
  VPATH = @srcdir@
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -40,10 -58,8 +71,15 @@@ DIST_COMMON = README $(am__configure_de
  	THANKS TODO compile config.guess config.sub depcomp install-sh \
  	ltmain.sh missing
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@@ -52,6 -68,35 +88,38 @@@ mkinstalldirs = $(install_sh) -
  CONFIG_HEADER = config.h
  CONFIG_CLEAN_FILES =
  CONFIG_CLEAN_VPATH_FILES =
++<<<<<<< HEAD
++=======
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+ am__vpath_adj = case $$p in \
+     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+     *) f=$$p;; \
+   esac;
+ am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+ am__install_max = 40
+ am__nobase_strip_setup = \
+   srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+ am__nobase_strip = \
+   for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+ am__nobase_list = $(am__nobase_strip_setup); \
+   for p in $$list; do echo "$$p $$p"; done | \
+   sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+   $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+     if (++n[$$2] == $(am__install_max)) \
+       { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+     END { for (dir in files) print dir, files[dir] }'
+ am__base_list = \
+   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
+ am__installdirs = "$(DESTDIR)$(pkgdatadir)"
+ SCRIPTS = $(pkgdata_SCRIPTS)
++>>>>>>> upstream/20131206+dfsg
  SOURCES =
  DIST_SOURCES =
  RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@@ -61,6 -106,11 +129,14 @@@
  	install-pdf-recursive install-ps-recursive install-recursive \
  	installcheck-recursive installdirs-recursive pdf-recursive \
  	ps-recursive uninstall-recursive
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
    distclean-recursive maintainer-clean-recursive
  AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@@ -73,9 -123,11 +149,17 @@@ DISTFILES = $(DIST_COMMON) $(DIST_SOURC
  distdir = $(PACKAGE)-$(VERSION)
  top_distdir = $(distdir)
  am__remove_distdir = \
++<<<<<<< HEAD
 +  { test ! -d "$(distdir)" \
 +    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
 +         && rm -fr "$(distdir)"; }; }
++=======
+   if test -d "$(distdir)"; then \
+     find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+       && rm -rf "$(distdir)" \
+       || { sleep 5 && rm -rf "$(distdir)"; }; \
+   else :; fi
++>>>>>>> upstream/20131206+dfsg
  am__relativize = \
    dir0=`pwd`; \
    sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@@ -104,6 -156,8 +188,11 @@@
  DIST_ARCHIVES = $(distdir).tar.gz
  GZIP_ENV = --best
  distuninstallcheck_listfiles = find . -type f -print
++<<<<<<< HEAD
++=======
+ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
++>>>>>>> upstream/20131206+dfsg
  distcleancheck_listfiles = find . -type f -print
  ACLOCAL = @ACLOCAL@
  AMTAR = @AMTAR@
@@@ -133,7 -187,10 +222,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
 +FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
+ FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -146,8 -203,6 +242,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -170,7 -225,6 +269,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -188,6 -242,9 +290,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -195,6 -252,7 +303,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -221,10 -279,6 +333,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -271,18 -325,17 +386,31 @@@ PPA = gerris-pp
  
  # change this to the ID of the PPA GPG key
  KEY = 07AB22DC
++<<<<<<< HEAD
 +
 +# change this to the html changelog for this launchpad release
 +LOG = /var/www/gerris/version/gerris_changes
 +SUBDIRS = modules src tools test doc desktop
 +EXTRA_DIST = ChangeLog m4
 + at DARCS_CONTROLLED_FALSE@DARCS_CHANGELOG = 
 + at DARCS_CONTROLLED_TRUE@DARCS_CHANGELOG = changelog
++=======
+ LOG = $(WEBROOT)/version/gerris_changes
+ SUBDIRS = src modules tools test doc desktop debian
+ EXTRA_DIST = ChangeLog m4 build_function_gcc build_function_libtool
+ @DARCS_CONTROLLED_FALSE at DARCS_CHANGELOG = 
+ @DARCS_CONTROLLED_TRUE at DARCS_CHANGELOG = changelog
+ pkgdata_SCRIPTS = build_function libtool
++>>>>>>> upstream/20131206+dfsg
  all: config.h
  	$(MAKE) $(AM_MAKEFLAGS) all-recursive
  
  .SUFFIXES:
++<<<<<<< HEAD
 +am--refresh:
++=======
+ am--refresh: Makefile
++>>>>>>> upstream/20131206+dfsg
  	@:
  $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
  	@for dep in $?; do \
@@@ -318,10 -371,8 +446,15 @@@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $
  $(am__aclocal_m4_deps):
  
  config.h: stamp-h1
++<<<<<<< HEAD
 +	@if test ! -f $@; then \
 +	  rm -f stamp-h1; \
 +	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
 +	else :; fi
++=======
+ 	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+ 	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
++>>>>>>> upstream/20131206+dfsg
  
  stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
  	@rm -f stamp-h1
@@@ -333,6 -384,41 +466,44 @@@ $(srcdir)/config.h.in: @MAINTAINER_MODE
  
  distclean-hdr:
  	-rm -f config.h stamp-h1
++<<<<<<< HEAD
++=======
+ install-pkgdataSCRIPTS: $(pkgdata_SCRIPTS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(pkgdata_SCRIPTS)'; test -n "$(pkgdatadir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ 	fi; \
+ 	for p in $$list; do \
+ 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ 	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ 	done | \
+ 	sed -e 'p;s,.*/,,;n' \
+ 	    -e 'h;s|.*|.|' \
+ 	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ 	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ 	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ 	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ 	      if (++n[d] == $(am__install_max)) { \
+ 		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ 	    else { print "f", d "/" $$4, $$1 } } \
+ 	  END { for (d in files) print "f", d, files[d] }' | \
+ 	while read type dir files; do \
+ 	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ 	     test -z "$$files" || { \
+ 	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkgdatadir)$$dir'"; \
+ 	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkgdatadir)$$dir" || exit $$?; \
+ 	     } \
+ 	; done
+ 
+ uninstall-pkgdataSCRIPTS:
+ 	@$(NORMAL_UNINSTALL)
+ 	@list='$(pkgdata_SCRIPTS)'; test -n "$(pkgdatadir)" || exit 0; \
+ 	files=`for p in $$list; do echo "$$p"; done | \
+ 	       sed -e 's,.*/,,;$(transform)'`; \
+ 	dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
++>>>>>>> upstream/20131206+dfsg
  
  mostlyclean-libtool:
  	-rm -f *.lo
@@@ -512,13 -598,10 +683,20 @@@ distdir: $(DISTFILES
  	done
  	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
  	  if test "$$subdir" = .; then :; else \
++<<<<<<< HEAD
 +	    test -d "$(distdir)/$$subdir" \
 +	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 +	    || exit 1; \
 +	  fi; \
 +	done
 +	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 +	  if test "$$subdir" = .; then :; else \
++=======
+ 	    $(am__make_dryrun) \
+ 	      || test -d "$(distdir)/$$subdir" \
+ 	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+ 	      || exit 1; \
++>>>>>>> upstream/20131206+dfsg
  	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
  	    $(am__relativize); \
  	    new_distdir=$$reldir; \
@@@ -550,7 -633,11 +728,15 @@@ dist-gzip: distdi
  	$(am__remove_distdir)
  
  dist-bzip2: distdir
++<<<<<<< HEAD
 +	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
++=======
+ 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ 	$(am__remove_distdir)
+ 
+ dist-lzip: distdir
+ 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
++>>>>>>> upstream/20131206+dfsg
  	$(am__remove_distdir)
  
  dist-lzma: distdir
@@@ -558,7 -645,7 +744,11 @@@
  	$(am__remove_distdir)
  
  dist-xz: distdir
++<<<<<<< HEAD
 +	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
++=======
+ 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
++>>>>>>> upstream/20131206+dfsg
  	$(am__remove_distdir)
  
  dist-tarZ: distdir
@@@ -589,6 -676,8 +779,11 @@@ distcheck: dis
  	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
  	*.tar.lzma*) \
  	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
++<<<<<<< HEAD
++=======
+ 	*.tar.lz*) \
+ 	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
++>>>>>>> upstream/20131206+dfsg
  	*.tar.xz*) \
  	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
  	*.tar.Z*) \
@@@ -598,7 -687,7 +793,11 @@@
  	*.zip*) \
  	  unzip $(distdir).zip ;;\
  	esac
++<<<<<<< HEAD
 +	chmod -R a-w $(distdir); chmod a+w $(distdir)
++=======
+ 	chmod -R a-w $(distdir); chmod u+w $(distdir)
++>>>>>>> upstream/20131206+dfsg
  	mkdir $(distdir)/_build
  	mkdir $(distdir)/_inst
  	chmod a-w $(distdir)
@@@ -608,6 -697,7 +807,10 @@@
  	  && am__cwd=`pwd` \
  	  && $(am__cd) $(distdir)/_build \
  	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
++<<<<<<< HEAD
++=======
+ 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
++>>>>>>> upstream/20131206+dfsg
  	    $(DISTCHECK_CONFIGURE_FLAGS) \
  	  && $(MAKE) $(AM_MAKEFLAGS) \
  	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@@ -636,8 -726,16 +839,21 @@@
  	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
  	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
  distuninstallcheck:
++<<<<<<< HEAD
 +	@$(am__cd) '$(distuninstallcheck_dir)' \
 +	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
++=======
+ 	@test -n '$(distuninstallcheck_dir)' || { \
+ 	  echo 'ERROR: trying to run $@ with an empty' \
+ 	       '$$(distuninstallcheck_dir)' >&2; \
+ 	  exit 1; \
+ 	}; \
+ 	$(am__cd) '$(distuninstallcheck_dir)' || { \
+ 	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ 	  exit 1; \
+ 	}; \
+ 	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
++>>>>>>> upstream/20131206+dfsg
  	   || { echo "ERROR: files left after uninstall:" ; \
  	        if test -n "$(DESTDIR)"; then \
  	          echo "  (check DESTDIR support)"; \
@@@ -655,9 -753,12 +871,18 @@@ distcleancheck: distclea
  	       exit 1; } >&2
  check-am: all-am
  check: check-recursive
++<<<<<<< HEAD
 +all-am: Makefile config.h
 +installdirs: installdirs-recursive
 +installdirs-am:
++=======
+ all-am: Makefile $(SCRIPTS) config.h
+ installdirs: installdirs-recursive
+ installdirs-am:
+ 	for dir in "$(DESTDIR)$(pkgdatadir)"; do \
+ 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ 	done
++>>>>>>> upstream/20131206+dfsg
  install: install-recursive
  install-exec: install-exec-recursive
  install-data: install-data-recursive
@@@ -668,10 -769,15 +893,22 @@@ install-am: all-a
  
  installcheck: installcheck-recursive
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
@@@ -705,7 -811,7 +942,11 @@@ info: info-recursiv
  
  info-am:
  
++<<<<<<< HEAD
 +install-data-am:
++=======
+ install-data-am: install-pkgdataSCRIPTS
++>>>>>>> upstream/20131206+dfsg
  
  install-dvi: install-dvi-recursive
  
@@@ -751,7 -857,7 +992,11 @@@ ps: ps-recursiv
  
  ps-am:
  
++<<<<<<< HEAD
 +uninstall-am:
++=======
+ uninstall-am: uninstall-pkgdataSCRIPTS
++>>>>>>> upstream/20131206+dfsg
  
  .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
  	ctags-recursive install-am install-strip tags-recursive
@@@ -759,18 -865,19 +1004,32 @@@
  .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
  	all all-am am--refresh check check-am clean clean-generic \
  	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
++<<<<<<< HEAD
 +	dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
 +	distcheck distclean distclean-generic distclean-hdr \
++=======
+ 	dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
+ 	dist-zip distcheck distclean distclean-generic distclean-hdr \
++>>>>>>> upstream/20131206+dfsg
  	distclean-libtool distclean-tags distcleancheck distdir \
  	distuninstallcheck dvi dvi-am html html-am info info-am \
  	install install-am install-data install-data-am install-dvi \
  	install-dvi-am install-exec install-exec-am install-html \
  	install-html-am install-info install-info-am install-man \
++<<<<<<< HEAD
 +	install-pdf install-pdf-am install-ps install-ps-am \
 +	install-strip installcheck installcheck-am installdirs \
 +	installdirs-am maintainer-clean maintainer-clean-generic \
 +	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 +	ps ps-am tags tags-recursive uninstall uninstall-am
++=======
+ 	install-pdf install-pdf-am install-pkgdataSCRIPTS install-ps \
+ 	install-ps-am install-strip installcheck installcheck-am \
+ 	installdirs installdirs-am maintainer-clean \
+ 	maintainer-clean-generic mostlyclean mostlyclean-generic \
+ 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ 	uninstall uninstall-am uninstall-pkgdataSCRIPTS
++>>>>>>> upstream/20131206+dfsg
  
  
  ChangeLog: $(DARCS_CHANGELOG)
diff --cc aclocal.m4
index b0ac0f7,cbc161a..caf83eb
--- a/aclocal.m4
+++ b/aclocal.m4
@@@ -1,30 -1,8782 +1,8801 @@@
++<<<<<<< HEAD
 +# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 +
 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 +# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
++=======
+ # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+ 
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+ # Inc.
++>>>>>>> upstream/20131206+dfsg
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+ 
+ m4_ifndef([AC_AUTOCONF_VERSION],
+   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
++<<<<<<< HEAD
++m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
++[m4_warning([this file was generated for autoconf 2.67.
++=======
+ m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+ [m4_warning([this file was generated for autoconf 2.69.
++>>>>>>> upstream/20131206+dfsg
+ You have another version of autoconf.  It may work, but is not guaranteed to.
+ If you have problems, you may need to regenerate the build system entirely.
+ To do so, use the procedure documented by the package, typically `autoreconf'.])])
+ 
++<<<<<<< HEAD
++# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
++=======
+ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+ #
+ #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+ #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ #                 Foundation, Inc.
+ #   Written by Gordon Matzigkeit, 1996
+ #
+ # This file is free software; the Free Software Foundation gives
+ # unlimited permission to copy and/or distribute it, with or without
+ # modifications, as long as this notice is preserved.
+ 
+ m4_define([_LT_COPYING], [dnl
+ #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+ #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ #                 Foundation, Inc.
+ #   Written by Gordon Matzigkeit, 1996
+ #
+ #   This file is part of GNU Libtool.
+ #
+ # GNU Libtool is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License as
+ # published by the Free Software Foundation; either version 2 of
+ # the License, or (at your option) any later version.
+ #
+ # As a special exception to the GNU General Public License,
+ # if you distribute this file as part of a program or library that
+ # is built using GNU Libtool, you may include this file under the
+ # same distribution terms that you use for the rest of that program.
+ #
+ # GNU Libtool is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with GNU Libtool; see the file COPYING.  If not, a copy
+ # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+ # obtained by writing to the Free Software Foundation, Inc.,
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ])
+ 
+ # serial 57 LT_INIT
+ 
+ 
+ # LT_PREREQ(VERSION)
+ # ------------------
+ # Complain and exit if this libtool version is less that VERSION.
+ m4_defun([LT_PREREQ],
+ [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+        [m4_default([$3],
+ 		   [m4_fatal([Libtool version $1 or higher is required],
+ 		             63)])],
+        [$2])])
+ 
+ 
+ # _LT_CHECK_BUILDDIR
+ # ------------------
+ # Complain if the absolute build directory name contains unusual characters
+ m4_defun([_LT_CHECK_BUILDDIR],
+ [case `pwd` in
+   *\ * | *\	*)
+     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+ esac
+ ])
+ 
+ 
+ # LT_INIT([OPTIONS])
+ # ------------------
+ AC_DEFUN([LT_INIT],
+ [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+ AC_BEFORE([$0], [LT_LANG])dnl
+ AC_BEFORE([$0], [LT_OUTPUT])dnl
+ AC_BEFORE([$0], [LTDL_INIT])dnl
+ m4_require([_LT_CHECK_BUILDDIR])dnl
+ 
+ dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+ m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+ m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+ dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+ dnl unless we require an AC_DEFUNed macro:
+ AC_REQUIRE([LTOPTIONS_VERSION])dnl
+ AC_REQUIRE([LTSUGAR_VERSION])dnl
+ AC_REQUIRE([LTVERSION_VERSION])dnl
+ AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+ m4_require([_LT_PROG_LTMAIN])dnl
+ 
+ _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+ 
+ dnl Parse OPTIONS
+ _LT_SET_OPTIONS([$0], [$1])
+ 
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ltmain"
+ 
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+ AC_SUBST(LIBTOOL)dnl
+ 
+ _LT_SETUP
+ 
+ # Only expand once:
+ m4_define([LT_INIT])
+ ])# LT_INIT
+ 
+ # Old names:
+ AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+ AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+ dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+ 
+ 
+ # _LT_CC_BASENAME(CC)
+ # -------------------
+ # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+ m4_defun([_LT_CC_BASENAME],
+ [for cc_temp in $1""; do
+   case $cc_temp in
+     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+     \-*) ;;
+     *) break;;
+   esac
+ done
+ cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+ ])
+ 
+ 
+ # _LT_FILEUTILS_DEFAULTS
+ # ----------------------
+ # It is okay to use these file commands and assume they have been set
+ # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+ m4_defun([_LT_FILEUTILS_DEFAULTS],
+ [: ${CP="cp -f"}
+ : ${MV="mv -f"}
+ : ${RM="rm -f"}
+ ])# _LT_FILEUTILS_DEFAULTS
+ 
+ 
+ # _LT_SETUP
+ # ---------
+ m4_defun([_LT_SETUP],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+ AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+ 
+ _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+ dnl
+ _LT_DECL([], [host_alias], [0], [The host system])dnl
+ _LT_DECL([], [host], [0])dnl
+ _LT_DECL([], [host_os], [0])dnl
+ dnl
+ _LT_DECL([], [build_alias], [0], [The build system])dnl
+ _LT_DECL([], [build], [0])dnl
+ _LT_DECL([], [build_os], [0])dnl
+ dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([LT_PATH_LD])dnl
+ AC_REQUIRE([LT_PATH_NM])dnl
+ dnl
+ AC_REQUIRE([AC_PROG_LN_S])dnl
+ test -z "$LN_S" && LN_S="ln -s"
+ _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+ dnl
+ AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+ _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+ dnl
+ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+ m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+ m4_require([_LT_CMD_RELOAD])dnl
+ m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+ m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+ m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+ m4_require([_LT_WITH_SYSROOT])dnl
+ 
+ _LT_CONFIG_LIBTOOL_INIT([
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes INIT.
+ if test -n "\${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+ fi
+ ])
+ if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+ fi
+ 
+ _LT_CHECK_OBJDIR
+ 
+ m4_require([_LT_TAG_COMPILER])dnl
+ 
+ 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
+ 
+ # Global variables:
+ ofile=libtool
+ can_build_shared=yes
+ 
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+ # which needs '.lib').
+ libext=a
+ 
+ with_gnu_ld="$lt_cv_prog_gnu_ld"
+ 
+ old_CC="$CC"
+ old_CFLAGS="$CFLAGS"
+ 
+ # Set sane defaults for various variables
+ test -z "$CC" && CC=cc
+ test -z "$LTCC" && LTCC=$CC
+ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+ test -z "$LD" && LD=ld
+ test -z "$ac_objext" && ac_objext=o
+ 
+ _LT_CC_BASENAME([$compiler])
+ 
+ # Only perform the check for file, if the check method requires it
+ test -z "$MAGIC_CMD" && MAGIC_CMD=file
+ case $deplibs_check_method in
+ file_magic*)
+   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+     _LT_PATH_MAGIC
+   fi
+   ;;
+ esac
+ 
+ # Use C for the default configuration in the libtool script
+ LT_SUPPORTED_TAG([CC])
+ _LT_LANG_C_CONFIG
+ _LT_LANG_DEFAULT_CONFIG
+ _LT_CONFIG_COMMANDS
+ ])# _LT_SETUP
+ 
+ 
+ # _LT_PREPARE_SED_QUOTE_VARS
+ # --------------------------
+ # Define a few sed substitution that help us do robust quoting.
+ m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+ [# Backslashify metacharacters that are still active within
+ # double-quoted strings.
+ sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+ 
+ # Same as above, but do not quote variable references.
+ double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+ 
+ # Sed substitution to delay expansion of an escaped shell variable in a
+ # double_quote_subst'ed string.
+ delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+ 
+ # Sed substitution to delay expansion of an escaped single quote.
+ delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+ 
+ # Sed substitution to avoid accidental globbing in evaled expressions
+ no_glob_subst='s/\*/\\\*/g'
+ ])
+ 
+ # _LT_PROG_LTMAIN
+ # ---------------
+ # Note that this code is called both from `configure', and `config.status'
+ # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+ # `config.status' has no value for ac_aux_dir unless we are using Automake,
+ # so we pass a copy along to make sure it has a sensible value anyway.
+ m4_defun([_LT_PROG_LTMAIN],
+ [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+ _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ ltmain="$ac_aux_dir/ltmain.sh"
+ ])# _LT_PROG_LTMAIN
+ 
+ 
+ 
+ # So that we can recreate a full libtool script including additional
+ # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+ # in macros and then make a single call at the end using the `libtool'
+ # label.
+ 
+ 
+ # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+ # ----------------------------------------
+ # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+ m4_define([_LT_CONFIG_LIBTOOL_INIT],
+ [m4_ifval([$1],
+           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                      [$1
+ ])])])
+ 
+ # Initialize.
+ m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+ 
+ 
+ # _LT_CONFIG_LIBTOOL([COMMANDS])
+ # ------------------------------
+ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+ m4_define([_LT_CONFIG_LIBTOOL],
+ [m4_ifval([$1],
+           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                      [$1
+ ])])])
+ 
+ # Initialize.
+ m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+ 
+ 
+ # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+ # -----------------------------------------------------
+ m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+ [_LT_CONFIG_LIBTOOL([$1])
+ _LT_CONFIG_LIBTOOL_INIT([$2])
+ ])
+ 
+ 
+ # _LT_FORMAT_COMMENT([COMMENT])
+ # -----------------------------
+ # Add leading comment marks to the start of each line, and a trailing
+ # full-stop to the whole comment if one is not present already.
+ m4_define([_LT_FORMAT_COMMENT],
+ [m4_ifval([$1], [
+ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+ )])
+ 
+ 
+ 
+ 
+ 
+ # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+ # -------------------------------------------------------------------
+ # CONFIGNAME is the name given to the value in the libtool script.
+ # VARNAME is the (base) name used in the configure script.
+ # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+ # VARNAME.  Any other value will be used directly.
+ m4_define([_LT_DECL],
+ [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ 	[m4_ifval([$1], [$1], [$2])])
+     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+     m4_ifval([$4],
+ 	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+     lt_dict_add_subkey([lt_decl_dict], [$2],
+ 	[tagged?], [m4_ifval([$5], [yes], [no])])])
+ ])
+ 
+ 
+ # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+ # --------------------------------------------------------
+ m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+ 
+ 
+ # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+ # ------------------------------------------------
+ m4_define([lt_decl_tag_varnames],
+ [_lt_decl_filter([tagged?], [yes], $@)])
+ 
+ 
+ # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+ # ---------------------------------------------------------
+ m4_define([_lt_decl_filter],
+ [m4_case([$#],
+   [0], [m4_fatal([$0: too few arguments: $#])],
+   [1], [m4_fatal([$0: too few arguments: $#: $1])],
+   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+ ])
+ 
+ 
+ # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+ # --------------------------------------------------
+ m4_define([lt_decl_quote_varnames],
+ [_lt_decl_filter([value], [1], $@)])
+ 
+ 
+ # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+ # ---------------------------------------------------
+ m4_define([lt_decl_dquote_varnames],
+ [_lt_decl_filter([value], [2], $@)])
+ 
+ 
+ # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+ # ---------------------------------------------------
+ m4_define([lt_decl_varnames_tagged],
+ [m4_assert([$# <= 2])dnl
+ _$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+ m4_define([_lt_decl_varnames_tagged],
+ [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+ 
+ 
+ # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+ # ------------------------------------------------
+ m4_define([lt_decl_all_varnames],
+ [_$0(m4_quote(m4_default([$1], [[, ]])),
+      m4_if([$2], [],
+ 	   m4_quote(lt_decl_varnames),
+ 	m4_quote(m4_shift($@))))[]dnl
+ ])
+ m4_define([_lt_decl_all_varnames],
+ [lt_join($@, lt_decl_varnames_tagged([$1],
+ 			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+ ])
+ 
+ 
+ # _LT_CONFIG_STATUS_DECLARE([VARNAME])
+ # ------------------------------------
+ # Quote a variable value, and forward it to `config.status' so that its
+ # declaration there will have the same value as in `configure'.  VARNAME
+ # must have a single quote delimited value for this to work.
+ m4_define([_LT_CONFIG_STATUS_DECLARE],
+ [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+ 
+ 
+ # _LT_CONFIG_STATUS_DECLARATIONS
+ # ------------------------------
+ # We delimit libtool config variables with single quotes, so when
+ # we write them to config.status, we have to be sure to quote all
+ # embedded single quotes properly.  In configure, this macro expands
+ # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+ #
+ #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+ [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+ 
+ 
+ # _LT_LIBTOOL_TAGS
+ # ----------------
+ # Output comment and list of tags supported by the script
+ m4_defun([_LT_LIBTOOL_TAGS],
+ [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+ available_tags="_LT_TAGS"dnl
+ ])
+ 
+ 
+ # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+ # -----------------------------------
+ # Extract the dictionary values for VARNAME (optionally with TAG) and
+ # expand to a commented shell variable setting:
+ #
+ #    # Some comment about what VAR is for.
+ #    visible_name=$lt_internal_name
+ m4_define([_LT_LIBTOOL_DECLARE],
+ [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ 					   [description])))[]dnl
+ m4_pushdef([_libtool_name],
+     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+ m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+     [0], [_libtool_name=[$]$1],
+     [1], [_libtool_name=$lt_[]$1],
+     [2], [_libtool_name=$lt_[]$1],
+     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+ ])
+ 
+ 
+ # _LT_LIBTOOL_CONFIG_VARS
+ # -----------------------
+ # Produce commented declarations of non-tagged libtool config variables
+ # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+ # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+ # section) are produced by _LT_LIBTOOL_TAG_VARS.
+ m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+ [m4_foreach([_lt_var],
+     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+ 
+ 
+ # _LT_LIBTOOL_TAG_VARS(TAG)
+ # -------------------------
+ m4_define([_LT_LIBTOOL_TAG_VARS],
+ [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+ 
+ 
+ # _LT_TAGVAR(VARNAME, [TAGNAME])
+ # ------------------------------
+ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+ 
+ 
+ # _LT_CONFIG_COMMANDS
+ # -------------------
+ # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+ # variables for single and double quote escaping we saved from calls
+ # to _LT_DECL, we can put quote escaped variables declarations
+ # into `config.status', and then the shell code to quote escape them in
+ # for loops in `config.status'.  Finally, any additional code accumulated
+ # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+ m4_defun([_LT_CONFIG_COMMANDS],
+ [AC_PROVIDE_IFELSE([LT_OUTPUT],
+ 	dnl If the libtool generation code has been placed in $CONFIG_LT,
+ 	dnl instead of duplicating it all over again into config.status,
+ 	dnl then we will have config.status run $CONFIG_LT later, so it
+ 	dnl needs to know what name is stored there:
+         [AC_CONFIG_COMMANDS([libtool],
+             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+     dnl If the libtool generation code is destined for config.status,
+     dnl expand the accumulated commands and init code now:
+     [AC_CONFIG_COMMANDS([libtool],
+         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+ ])#_LT_CONFIG_COMMANDS
+ 
+ 
+ # Initialize.
+ m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+ [
+ 
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
+ # if CDPATH is set.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ 
+ sed_quote_subst='$sed_quote_subst'
+ double_quote_subst='$double_quote_subst'
+ delay_variable_subst='$delay_variable_subst'
+ _LT_CONFIG_STATUS_DECLARATIONS
+ LTCC='$LTCC'
+ LTCFLAGS='$LTCFLAGS'
+ compiler='$compiler_DEFAULT'
+ 
+ # A function that is used when there is no print builtin or printf.
+ func_fallback_echo ()
+ {
+   eval 'cat <<_LTECHO_EOF
+ \$[]1
+ _LTECHO_EOF'
+ }
+ 
+ # Quote evaled strings.
+ for var in lt_decl_all_varnames([[ \
+ ]], lt_decl_quote_varnames); do
+     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+     *[[\\\\\\\`\\"\\\$]]*)
+       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+       ;;
+     *)
+       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+       ;;
+     esac
+ done
+ 
+ # Double-quote double-evaled strings.
+ for var in lt_decl_all_varnames([[ \
+ ]], lt_decl_dquote_varnames); do
+     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+     *[[\\\\\\\`\\"\\\$]]*)
+       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+       ;;
+     *)
+       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+       ;;
+     esac
+ done
+ 
+ _LT_OUTPUT_LIBTOOL_INIT
+ ])
+ 
+ # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+ # ------------------------------------
+ # Generate a child script FILE with all initialization necessary to
+ # reuse the environment learned by the parent script, and make the
+ # file executable.  If COMMENT is supplied, it is inserted after the
+ # `#!' sequence but before initialization text begins.  After this
+ # macro, additional text can be appended to FILE to form the body of
+ # the child script.  The macro ends with non-zero status if the
+ # file could not be fully written (such as if the disk is full).
+ m4_ifdef([AS_INIT_GENERATED],
+ [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+ [m4_defun([_LT_GENERATED_FILE_INIT],
+ [m4_require([AS_PREPARE])]dnl
+ [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+ [lt_write_fail=0
+ cat >$1 <<_ASEOF || lt_write_fail=1
+ #! $SHELL
+ # Generated by $as_me.
+ $2
+ SHELL=\${CONFIG_SHELL-$SHELL}
+ export SHELL
+ _ASEOF
+ cat >>$1 <<\_ASEOF || lt_write_fail=1
+ AS_SHELL_SANITIZE
+ _AS_PREPARE
+ exec AS_MESSAGE_FD>&1
+ _ASEOF
+ test $lt_write_fail = 0 && chmod +x $1[]dnl
+ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+ 
+ # LT_OUTPUT
+ # ---------
+ # This macro allows early generation of the libtool script (before
+ # AC_OUTPUT is called), incase it is used in configure for compilation
+ # tests.
+ AC_DEFUN([LT_OUTPUT],
+ [: ${CONFIG_LT=./config.lt}
+ AC_MSG_NOTICE([creating $CONFIG_LT])
+ _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+ [# Run this file to recreate a libtool stub with the current configuration.])
+ 
+ cat >>"$CONFIG_LT" <<\_LTEOF
+ lt_cl_silent=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ {
+   echo
+   AS_BOX([Running $as_me.])
+ } >&AS_MESSAGE_LOG_FD
+ 
+ lt_cl_help="\
+ \`$as_me' creates a local libtool stub from the current configuration,
+ for use in further configure time tests before the real libtool is
+ generated.
+ 
+ Usage: $[0] [[OPTIONS]]
+ 
+   -h, --help      print this help, then exit
+   -V, --version   print version number, then exit
+   -q, --quiet     do not print progress messages
+   -d, --debug     don't remove temporary files
+ 
+ Report bugs to <bug-libtool at gnu.org>."
+ 
+ lt_cl_version="\
+ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+ configured by $[0], generated by m4_PACKAGE_STRING.
+ 
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This config.lt script is free software; the Free Software Foundation
+ gives unlimited permision to copy, distribute and modify it."
+ 
+ while test $[#] != 0
+ do
+   case $[1] in
+     --version | --v* | -V )
+       echo "$lt_cl_version"; exit 0 ;;
+     --help | --h* | -h )
+       echo "$lt_cl_help"; exit 0 ;;
+     --debug | --d* | -d )
+       debug=: ;;
+     --quiet | --q* | --silent | --s* | -q )
+       lt_cl_silent=: ;;
+ 
+     -*) AC_MSG_ERROR([unrecognized option: $[1]
+ Try \`$[0] --help' for more information.]) ;;
+ 
+     *) AC_MSG_ERROR([unrecognized argument: $[1]
+ Try \`$[0] --help' for more information.]) ;;
+   esac
+   shift
+ done
+ 
+ if $lt_cl_silent; then
+   exec AS_MESSAGE_FD>/dev/null
+ fi
+ _LTEOF
+ 
+ cat >>"$CONFIG_LT" <<_LTEOF
+ _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+ _LTEOF
+ 
+ cat >>"$CONFIG_LT" <<\_LTEOF
+ AC_MSG_NOTICE([creating $ofile])
+ _LT_OUTPUT_LIBTOOL_COMMANDS
+ AS_EXIT(0)
+ _LTEOF
+ chmod +x "$CONFIG_LT"
+ 
+ # configure is writing to config.log, but config.lt does its own redirection,
+ # appending to config.log, which fails on DOS, as config.log is still kept
+ # open by configure.  Here we exec the FD to /dev/null, effectively closing
+ # config.log, so it can be properly (re)opened and appended to by config.lt.
+ lt_cl_success=:
+ test "$silent" = yes &&
+   lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+ ])# LT_OUTPUT
+ 
+ 
+ # _LT_CONFIG(TAG)
+ # ---------------
+ # If TAG is the built-in tag, create an initial libtool script with a
+ # default configuration from the untagged config vars.  Otherwise add code
+ # to config.status for appending the configuration named by TAG from the
+ # matching tagged config vars.
+ m4_defun([_LT_CONFIG],
+ [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ _LT_CONFIG_SAVE_COMMANDS([
+   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+   m4_if(_LT_TAG, [C], [
+     # See if we are running on zsh, and set the options which allow our
+     # commands through without removal of \ escapes.
+     if test -n "${ZSH_VERSION+set}" ; then
+       setopt NO_GLOB_SUBST
+     fi
+ 
+     cfgfile="${ofile}T"
+     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+     $RM "$cfgfile"
+ 
+     cat <<_LT_EOF >> "$cfgfile"
+ #! $SHELL
+ 
+ # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+ # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ #
+ _LT_COPYING
+ _LT_LIBTOOL_TAGS
+ 
+ # ### BEGIN LIBTOOL CONFIG
+ _LT_LIBTOOL_CONFIG_VARS
+ _LT_LIBTOOL_TAG_VARS
+ # ### END LIBTOOL CONFIG
+ 
+ _LT_EOF
+ 
+   case $host_os in
+   aix3*)
+     cat <<\_LT_EOF >> "$cfgfile"
+ # AIX sometimes has problems with the GCC collect2 program.  For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+   COLLECT_NAMES=
+   export COLLECT_NAMES
+ fi
+ _LT_EOF
+     ;;
+   esac
+ 
+   _LT_PROG_LTMAIN
+ 
+   # We use sed instead of cat because bash on DJGPP gets confused if
+   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+   # text mode, it properly converts lines to CR/LF.  This bash problem
+   # is reportedly fixed, but why not run on old versions too?
+   sed '$q' "$ltmain" >> "$cfgfile" \
+      || (rm -f "$cfgfile"; exit 1)
+ 
+   _LT_PROG_REPLACE_SHELLFNS
+ 
+    mv -f "$cfgfile" "$ofile" ||
+     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+   chmod +x "$ofile"
+ ],
+ [cat <<_LT_EOF >> "$ofile"
+ 
+ dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+ dnl in a comment (ie after a #).
+ # ### BEGIN LIBTOOL TAG CONFIG: $1
+ _LT_LIBTOOL_TAG_VARS(_LT_TAG)
+ # ### END LIBTOOL TAG CONFIG: $1
+ _LT_EOF
+ ])dnl /m4_if
+ ],
+ [m4_if([$1], [], [
+     PACKAGE='$PACKAGE'
+     VERSION='$VERSION'
+     TIMESTAMP='$TIMESTAMP'
+     RM='$RM'
+     ofile='$ofile'], [])
+ ])dnl /_LT_CONFIG_SAVE_COMMANDS
+ ])# _LT_CONFIG
+ 
+ 
+ # LT_SUPPORTED_TAG(TAG)
+ # ---------------------
+ # Trace this macro to discover what tags are supported by the libtool
+ # --tag option, using:
+ #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+ AC_DEFUN([LT_SUPPORTED_TAG], [])
+ 
+ 
+ # C support is built-in for now
+ m4_define([_LT_LANG_C_enabled], [])
+ m4_define([_LT_TAGS], [])
+ 
+ 
+ # LT_LANG(LANG)
+ # -------------
+ # Enable libtool support for the given language if not already enabled.
+ AC_DEFUN([LT_LANG],
+ [AC_BEFORE([$0], [LT_OUTPUT])dnl
+ m4_case([$1],
+   [C],			[_LT_LANG(C)],
+   [C++],		[_LT_LANG(CXX)],
+   [Go],			[_LT_LANG(GO)],
+   [Java],		[_LT_LANG(GCJ)],
+   [Fortran 77],		[_LT_LANG(F77)],
+   [Fortran],		[_LT_LANG(FC)],
+   [Windows Resource],	[_LT_LANG(RC)],
+   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+     [_LT_LANG($1)],
+     [m4_fatal([$0: unsupported language: "$1"])])])dnl
+ ])# LT_LANG
+ 
+ 
+ # _LT_LANG(LANGNAME)
+ # ------------------
+ m4_defun([_LT_LANG],
+ [m4_ifdef([_LT_LANG_]$1[_enabled], [],
+   [LT_SUPPORTED_TAG([$1])dnl
+   m4_append([_LT_TAGS], [$1 ])dnl
+   m4_define([_LT_LANG_]$1[_enabled], [])dnl
+   _LT_LANG_$1_CONFIG($1)])dnl
+ ])# _LT_LANG
+ 
+ 
+ m4_ifndef([AC_PROG_GO], [
+ # NOTE: This macro has been submitted for inclusion into   #
+ #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+ #  a released version of Autoconf we should remove this    #
+ #  macro and use it instead.                               #
+ m4_defun([AC_PROG_GO],
+ [AC_LANG_PUSH(Go)dnl
+ AC_ARG_VAR([GOC],     [Go compiler command])dnl
+ AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+ _AC_ARG_VAR_LDFLAGS()dnl
+ AC_CHECK_TOOL(GOC, gccgo)
+ if test -z "$GOC"; then
+   if test -n "$ac_tool_prefix"; then
+     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+   fi
+ fi
+ if test -z "$GOC"; then
+   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+ fi
+ ])#m4_defun
+ ])#m4_ifndef
+ 
+ 
+ # _LT_LANG_DEFAULT_CONFIG
+ # -----------------------
+ m4_defun([_LT_LANG_DEFAULT_CONFIG],
+ [AC_PROVIDE_IFELSE([AC_PROG_CXX],
+   [LT_LANG(CXX)],
+   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+ 
+ AC_PROVIDE_IFELSE([AC_PROG_F77],
+   [LT_LANG(F77)],
+   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+ 
+ AC_PROVIDE_IFELSE([AC_PROG_FC],
+   [LT_LANG(FC)],
+   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+ 
+ dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+ dnl pulling things in needlessly.
+ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+   [LT_LANG(GCJ)],
+   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+     [LT_LANG(GCJ)],
+     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+       [LT_LANG(GCJ)],
+       [m4_ifdef([AC_PROG_GCJ],
+ 	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+        m4_ifdef([A][M_PROG_GCJ],
+ 	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+        m4_ifdef([LT_PROG_GCJ],
+ 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+ 
+ AC_PROVIDE_IFELSE([AC_PROG_GO],
+   [LT_LANG(GO)],
+   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+ 
+ AC_PROVIDE_IFELSE([LT_PROG_RC],
+   [LT_LANG(RC)],
+   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+ ])# _LT_LANG_DEFAULT_CONFIG
+ 
+ # Obsolete macros:
+ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+ AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+ AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+ AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+ AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+ dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+ dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+ dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+ dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+ 
+ 
+ # _LT_TAG_COMPILER
+ # ----------------
+ m4_defun([_LT_TAG_COMPILER],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ 
+ _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+ _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+ _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+ _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+ 
+ # If no C compiler was specified, use CC.
+ LTCC=${LTCC-"$CC"}
+ 
+ # If no C compiler flags were specified, use CFLAGS.
+ LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+ 
+ # Allow CC to be a program name with arguments.
+ compiler=$CC
+ ])# _LT_TAG_COMPILER
+ 
+ 
+ # _LT_COMPILER_BOILERPLATE
+ # ------------------------
+ # Check for compiler boilerplate output or warnings with
+ # the simple compiler test code.
+ m4_defun([_LT_COMPILER_BOILERPLATE],
+ [m4_require([_LT_DECL_SED])dnl
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_compiler_boilerplate=`cat conftest.err`
+ $RM conftest*
+ ])# _LT_COMPILER_BOILERPLATE
+ 
+ 
+ # _LT_LINKER_BOILERPLATE
+ # ----------------------
+ # Check for linker boilerplate output or warnings with
+ # the simple link test code.
+ m4_defun([_LT_LINKER_BOILERPLATE],
+ [m4_require([_LT_DECL_SED])dnl
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_link_test_code" >conftest.$ac_ext
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_linker_boilerplate=`cat conftest.err`
+ $RM -r conftest*
+ ])# _LT_LINKER_BOILERPLATE
+ 
+ # _LT_REQUIRED_DARWIN_CHECKS
+ # -------------------------
+ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+   case $host_os in
+     rhapsody* | darwin*)
+     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+     AC_CHECK_TOOL([LIPO], [lipo], [:])
+     AC_CHECK_TOOL([OTOOL], [otool], [:])
+     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+     _LT_DECL([], [DSYMUTIL], [1],
+       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+     _LT_DECL([], [NMEDIT], [1],
+       [Tool to change global to local symbols on Mac OS X])
+     _LT_DECL([], [LIPO], [1],
+       [Tool to manipulate fat objects and archives on Mac OS X])
+     _LT_DECL([], [OTOOL], [1],
+       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+     _LT_DECL([], [OTOOL64], [1],
+       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+ 
+     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+       [lt_cv_apple_cc_single_mod=no
+       if test -z "${LT_MULTI_MODULE}"; then
+ 	# By default we will add the -single_module flag. You can override
+ 	# by either setting the environment variable LT_MULTI_MODULE
+ 	# non-empty at configure time, or by adding -multi_module to the
+ 	# link flags.
+ 	rm -rf libconftest.dylib*
+ 	echo "int foo(void){return 1;}" > conftest.c
+ 	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+         _lt_result=$?
+ 	# If there is a non-empty error log, and "single_module"
+ 	# appears in it, assume the flag caused a linker warning
+         if test -s conftest.err && $GREP single_module conftest.err; then
+ 	  cat conftest.err >&AS_MESSAGE_LOG_FD
+ 	# Otherwise, if the output was created with a 0 exit code from
+ 	# the compiler, it worked.
+ 	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ 	  lt_cv_apple_cc_single_mod=yes
+ 	else
+ 	  cat conftest.err >&AS_MESSAGE_LOG_FD
+ 	fi
+ 	rm -rf libconftest.dylib*
+ 	rm -f conftest.*
+       fi])
+ 
+     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+       [lt_cv_ld_exported_symbols_list],
+       [lt_cv_ld_exported_symbols_list=no
+       save_LDFLAGS=$LDFLAGS
+       echo "_main" > conftest.sym
+       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ 	[lt_cv_ld_exported_symbols_list=yes],
+ 	[lt_cv_ld_exported_symbols_list=no])
+ 	LDFLAGS="$save_LDFLAGS"
+     ])
+ 
+     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+       [lt_cv_ld_force_load=no
+       cat > conftest.c << _LT_EOF
+ int forced_loaded() { return 2;}
+ _LT_EOF
+       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+       cat > conftest.c << _LT_EOF
+ int main() { return 0;}
+ _LT_EOF
+       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+       _lt_result=$?
+       if test -s conftest.err && $GREP force_load conftest.err; then
+ 	cat conftest.err >&AS_MESSAGE_LOG_FD
+       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ 	lt_cv_ld_force_load=yes
+       else
+ 	cat conftest.err >&AS_MESSAGE_LOG_FD
+       fi
+         rm -f conftest.err libconftest.a conftest conftest.c
+         rm -rf conftest.dSYM
+     ])
+     case $host_os in
+     rhapsody* | darwin1.[[012]])
+       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+     darwin1.*)
+       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+     darwin*) # darwin 5.x on
+       # if running on 10.5 or later, the deployment target defaults
+       # to the OS version, if on x86, and 10.4, the deployment
+       # target defaults to 10.4. Don't you love it?
+       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 	10.[[012]]*)
+ 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 	10.*)
+ 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+       esac
+     ;;
+   esac
+     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+       _lt_dar_single_mod='$single_module'
+     fi
+     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+     else
+       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+     fi
+     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+       _lt_dsymutil='~$DSYMUTIL $lib || :'
+     else
+       _lt_dsymutil=
+     fi
+     ;;
+   esac
+ ])
+ 
+ 
+ # _LT_DARWIN_LINKER_FEATURES([TAG])
+ # ---------------------------------
+ # Checks for linker and compiler features on darwin
+ m4_defun([_LT_DARWIN_LINKER_FEATURES],
+ [
+   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+   _LT_TAGVAR(hardcode_direct, $1)=no
+   _LT_TAGVAR(hardcode_automatic, $1)=yes
+   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+   if test "$lt_cv_ld_force_load" = "yes"; then
+     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+   else
+     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+   fi
+   _LT_TAGVAR(link_all_deplibs, $1)=yes
+   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+   case $cc_basename in
+      ifort*) _lt_dar_can_shared=yes ;;
+      *) _lt_dar_can_shared=$GCC ;;
+   esac
+   if test "$_lt_dar_can_shared" = "yes"; then
+     output_verbose_link_cmd=func_echo_all
+     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+     m4_if([$1], [CXX],
+ [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+     fi
+ ],[])
+   else
+   _LT_TAGVAR(ld_shlibs, $1)=no
+   fi
+ ])
+ 
+ # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+ # ----------------------------------
+ # Links a minimal program and checks the executable
+ # for the system default hardcoded library path. In most cases,
+ # this is /usr/lib:/lib, but when the MPI compilers are used
+ # the location of the communication and MPI libs are included too.
+ # If we don't find anything, use the default library path according
+ # to the aix ld manual.
+ # Store the results from the different compilers for each TAGNAME.
+ # Allow to override them for all tags through lt_cv_aix_libpath.
+ m4_defun([_LT_SYS_MODULE_PATH_AIX],
+ [m4_require([_LT_DECL_SED])dnl
+ if test "${lt_cv_aix_libpath+set}" = set; then
+   aix_libpath=$lt_cv_aix_libpath
+ else
+   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+   lt_aix_libpath_sed='[
+       /Import File Strings/,/^$/ {
+ 	  /^0/ {
+ 	      s/^0  *\([^ ]*\) *$/\1/
+ 	      p
+ 	  }
+       }]'
+   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+   # Check for a 64-bit object if we didn't find anything.
+   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+   fi],[])
+   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+   fi
+   ])
+   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+ fi
+ ])# _LT_SYS_MODULE_PATH_AIX
+ 
+ 
+ # _LT_SHELL_INIT(ARG)
+ # -------------------
+ m4_define([_LT_SHELL_INIT],
+ [m4_divert_text([M4SH-INIT], [$1
+ ])])# _LT_SHELL_INIT
+ 
+ 
+ 
+ # _LT_PROG_ECHO_BACKSLASH
+ # -----------------------
+ # Find how we can fake an echo command that does not interpret backslash.
+ # In particular, with Autoconf 2.60 or later we add some code to the start
+ # of the generated configure script which will find a shell with a builtin
+ # printf (which we can use as an echo command).
+ m4_defun([_LT_PROG_ECHO_BACKSLASH],
+ [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ 
+ AC_MSG_CHECKING([how to print strings])
+ # Test print first, because it will be a builtin if present.
+ if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+   ECHO='print -r --'
+ elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+   ECHO='printf %s\n'
+ else
+   # Use this function as a fallback that always works.
+   func_fallback_echo ()
+   {
+     eval 'cat <<_LTECHO_EOF
+ $[]1
+ _LTECHO_EOF'
+   }
+   ECHO='func_fallback_echo'
+ fi
+ 
+ # func_echo_all arg...
+ # Invoke $ECHO with all args, space-separated.
+ func_echo_all ()
+ {
+     $ECHO "$*" 
+ }
+ 
+ case "$ECHO" in
+   printf*) AC_MSG_RESULT([printf]) ;;
+   print*) AC_MSG_RESULT([print -r]) ;;
+   *) AC_MSG_RESULT([cat]) ;;
+ esac
+ 
+ m4_ifdef([_AS_DETECT_SUGGESTED],
+ [_AS_DETECT_SUGGESTED([
+   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+     PATH=/empty FPATH=/empty; export PATH FPATH
+     test "X`printf %s $ECHO`" = "X$ECHO" \
+       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+ 
+ _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+ ])# _LT_PROG_ECHO_BACKSLASH
+ 
+ 
+ # _LT_WITH_SYSROOT
+ # ----------------
+ AC_DEFUN([_LT_WITH_SYSROOT],
+ [AC_MSG_CHECKING([for sysroot])
+ AC_ARG_WITH([sysroot],
+ [  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                         (or the compiler's sysroot if not specified).],
+ [], [with_sysroot=no])
+ 
+ dnl lt_sysroot will always be passed unquoted.  We quote it here
+ dnl in case the user passed a directory name.
+ lt_sysroot=
+ case ${with_sysroot} in #(
+  yes)
+    if test "$GCC" = yes; then
+      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+    fi
+    ;; #(
+  /*)
+    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+    ;; #(
+  no|'')
+    ;; #(
+  *)
+    AC_MSG_RESULT([${with_sysroot}])
+    AC_MSG_ERROR([The sysroot must be an absolute path.])
+    ;;
+ esac
+ 
+  AC_MSG_RESULT([${lt_sysroot:-no}])
+ _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+ [dependent libraries, and in which our libraries should be installed.])])
+ 
+ # _LT_ENABLE_LOCK
+ # ---------------
+ m4_defun([_LT_ENABLE_LOCK],
+ [AC_ARG_ENABLE([libtool-lock],
+   [AS_HELP_STRING([--disable-libtool-lock],
+     [avoid locking (might break parallel builds)])])
+ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+ 
+ # Some flags need to be propagated to the compiler or linker for good
+ # libtool support.
+ case $host in
+ ia64-*-hpux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+     case `/usr/bin/file conftest.$ac_objext` in
+       *ELF-32*)
+ 	HPUX_IA64_MODE="32"
+ 	;;
+       *ELF-64*)
+ 	HPUX_IA64_MODE="64"
+ 	;;
+     esac
+   fi
+   rm -rf conftest*
+   ;;
+ *-*-irix6*)
+   # Find out which ABI we are using.
+   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+     if test "$lt_cv_prog_gnu_ld" = yes; then
+       case `/usr/bin/file conftest.$ac_objext` in
+ 	*32-bit*)
+ 	  LD="${LD-ld} -melf32bsmip"
+ 	  ;;
+ 	*N32*)
+ 	  LD="${LD-ld} -melf32bmipn32"
+ 	  ;;
+ 	*64-bit*)
+ 	  LD="${LD-ld} -melf64bmip"
+ 	;;
+       esac
+     else
+       case `/usr/bin/file conftest.$ac_objext` in
+ 	*32-bit*)
+ 	  LD="${LD-ld} -32"
+ 	  ;;
+ 	*N32*)
+ 	  LD="${LD-ld} -n32"
+ 	  ;;
+ 	*64-bit*)
+ 	  LD="${LD-ld} -64"
+ 	  ;;
+       esac
+     fi
+   fi
+   rm -rf conftest*
+   ;;
+ 
+ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+     case `/usr/bin/file conftest.o` in
+       *32-bit*)
+ 	case $host in
+ 	  x86_64-*kfreebsd*-gnu)
+ 	    LD="${LD-ld} -m elf_i386_fbsd"
+ 	    ;;
+ 	  x86_64-*linux*)
+ 	    LD="${LD-ld} -m elf_i386"
+ 	    ;;
+ 	  ppc64-*linux*|powerpc64-*linux*)
+ 	    LD="${LD-ld} -m elf32ppclinux"
+ 	    ;;
+ 	  s390x-*linux*)
+ 	    LD="${LD-ld} -m elf_s390"
+ 	    ;;
+ 	  sparc64-*linux*)
+ 	    LD="${LD-ld} -m elf32_sparc"
+ 	    ;;
+ 	esac
+ 	;;
+       *64-bit*)
+ 	case $host in
+ 	  x86_64-*kfreebsd*-gnu)
+ 	    LD="${LD-ld} -m elf_x86_64_fbsd"
+ 	    ;;
+ 	  x86_64-*linux*)
+ 	    LD="${LD-ld} -m elf_x86_64"
+ 	    ;;
+ 	  ppc*-*linux*|powerpc*-*linux*)
+ 	    LD="${LD-ld} -m elf64ppc"
+ 	    ;;
+ 	  s390*-*linux*|s390*-*tpf*)
+ 	    LD="${LD-ld} -m elf64_s390"
+ 	    ;;
+ 	  sparc*-*linux*)
+ 	    LD="${LD-ld} -m elf64_sparc"
+ 	    ;;
+ 	esac
+ 	;;
+     esac
+   fi
+   rm -rf conftest*
+   ;;
+ 
+ *-*-sco3.2v5*)
+   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+   SAVE_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS -belf"
+   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+     [AC_LANG_PUSH(C)
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+      AC_LANG_POP])
+   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+     CFLAGS="$SAVE_CFLAGS"
+   fi
+   ;;
+ *-*solaris*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+     case `/usr/bin/file conftest.o` in
+     *64-bit*)
+       case $lt_cv_prog_gnu_ld in
+       yes*)
+         case $host in
+         i?86-*-solaris*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         sparc*-*-solaris*)
+           LD="${LD-ld} -m elf64_sparc"
+           ;;
+         esac
+         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+           LD="${LD-ld}_sol2"
+         fi
+         ;;
+       *)
+ 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ 	  LD="${LD-ld} -64"
+ 	fi
+ 	;;
+       esac
+       ;;
+     esac
+   fi
+   rm -rf conftest*
+   ;;
+ esac
+ 
+ need_locks="$enable_libtool_lock"
+ ])# _LT_ENABLE_LOCK
+ 
+ 
+ # _LT_PROG_AR
+ # -----------
+ m4_defun([_LT_PROG_AR],
+ [AC_CHECK_TOOLS(AR, [ar], false)
+ : ${AR=ar}
+ : ${AR_FLAGS=cru}
+ _LT_DECL([], [AR], [1], [The archiver])
+ _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+ 
+ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+   [lt_cv_ar_at_file=no
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+      [echo conftest.$ac_objext > conftest.lst
+       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+       AC_TRY_EVAL([lt_ar_try])
+       if test "$ac_status" -eq 0; then
+ 	# Ensure the archiver fails upon bogus file names.
+ 	rm -f conftest.$ac_objext libconftest.a
+ 	AC_TRY_EVAL([lt_ar_try])
+ 	if test "$ac_status" -ne 0; then
+           lt_cv_ar_at_file=@
+         fi
+       fi
+       rm -f conftest.* libconftest.a
+      ])
+   ])
+ 
+ if test "x$lt_cv_ar_at_file" = xno; then
+   archiver_list_spec=
+ else
+   archiver_list_spec=$lt_cv_ar_at_file
+ fi
+ _LT_DECL([], [archiver_list_spec], [1],
+   [How to feed a file listing to the archiver])
+ ])# _LT_PROG_AR
+ 
+ 
+ # _LT_CMD_OLD_ARCHIVE
+ # -------------------
+ m4_defun([_LT_CMD_OLD_ARCHIVE],
+ [_LT_PROG_AR
+ 
+ AC_CHECK_TOOL(STRIP, strip, :)
+ test -z "$STRIP" && STRIP=:
+ _LT_DECL([], [STRIP], [1], [A symbol stripping program])
+ 
+ AC_CHECK_TOOL(RANLIB, ranlib, :)
+ test -z "$RANLIB" && RANLIB=:
+ _LT_DECL([], [RANLIB], [1],
+     [Commands used to install an old-style archive])
+ 
+ # Determine commands to create old-style static archives.
+ old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+ old_postinstall_cmds='chmod 644 $oldlib'
+ old_postuninstall_cmds=
+ 
+ if test -n "$RANLIB"; then
+   case $host_os in
+   openbsd*)
+     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+     ;;
+   *)
+     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+     ;;
+   esac
+   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+ fi
+ 
+ case $host_os in
+   darwin*)
+     lock_old_archive_extraction=yes ;;
+   *)
+     lock_old_archive_extraction=no ;;
+ esac
+ _LT_DECL([], [old_postinstall_cmds], [2])
+ _LT_DECL([], [old_postuninstall_cmds], [2])
+ _LT_TAGDECL([], [old_archive_cmds], [2],
+     [Commands used to build an old-style archive])
+ _LT_DECL([], [lock_old_archive_extraction], [0],
+     [Whether to use a lock for old archive extraction])
+ ])# _LT_CMD_OLD_ARCHIVE
+ 
+ 
+ # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+ #		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+ # ----------------------------------------------------------------
+ # Check whether the given compiler option works
+ AC_DEFUN([_LT_COMPILER_OPTION],
+ [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ m4_require([_LT_DECL_SED])dnl
+ AC_CACHE_CHECK([$1], [$2],
+   [$2=no
+    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="$3"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    # The option is referenced via a variable to avoid confusing sed.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&AS_MESSAGE_LOG_FD
+    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+        $2=yes
+      fi
+    fi
+    $RM conftest*
+ ])
+ 
+ if test x"[$]$2" = xyes; then
+     m4_if([$5], , :, [$5])
+ else
+     m4_if([$6], , :, [$6])
+ fi
+ ])# _LT_COMPILER_OPTION
+ 
+ # Old name:
+ AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+ 
+ 
+ # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+ #                  [ACTION-SUCCESS], [ACTION-FAILURE])
+ # ----------------------------------------------------
+ # Check whether the given linker option works
+ AC_DEFUN([_LT_LINKER_OPTION],
+ [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ m4_require([_LT_DECL_SED])dnl
+ AC_CACHE_CHECK([$1], [$2],
+   [$2=no
+    save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $3"
+    echo "$lt_simple_link_test_code" > conftest.$ac_ext
+    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+      # The linker can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+      if test -s conftest.err; then
+        # Append any errors to the config.log.
+        cat conftest.err 1>&AS_MESSAGE_LOG_FD
+        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+        if diff conftest.exp conftest.er2 >/dev/null; then
+          $2=yes
+        fi
+      else
+        $2=yes
+      fi
+    fi
+    $RM -r conftest*
+    LDFLAGS="$save_LDFLAGS"
+ ])
+ 
+ if test x"[$]$2" = xyes; then
+     m4_if([$4], , :, [$4])
+ else
+     m4_if([$5], , :, [$5])
+ fi
+ ])# _LT_LINKER_OPTION
+ 
+ # Old name:
+ AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+ 
+ 
+ # LT_CMD_MAX_LEN
+ #---------------
+ AC_DEFUN([LT_CMD_MAX_LEN],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ # find the maximum length of command line arguments
+ AC_MSG_CHECKING([the maximum length of command line arguments])
+ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+   i=0
+   teststring="ABCD"
+ 
+   case $build_os in
+   msdosdjgpp*)
+     # On DJGPP, this test can blow up pretty badly due to problems in libc
+     # (any single argument exceeding 2000 bytes causes a buffer overrun
+     # during glob expansion).  Even if it were fixed, the result of this
+     # check would be larger than it should be.
+     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+     ;;
+ 
+   gnu*)
+     # Under GNU Hurd, this test is not required because there is
+     # no limit to the length of command line arguments.
+     # Libtool will interpret -1 as no limit whatsoever
+     lt_cv_sys_max_cmd_len=-1;
+     ;;
+ 
+   cygwin* | mingw* | cegcc*)
+     # On Win9x/ME, this test blows up -- it succeeds, but takes
+     # about 5 minutes as the teststring grows exponentially.
+     # Worse, since 9x/ME are not pre-emptively multitasking,
+     # you end up with a "frozen" computer, even though with patience
+     # the test eventually succeeds (with a max line length of 256k).
+     # Instead, let's just punt: use the minimum linelength reported by
+     # all of the supported platforms: 8192 (on NT/2K/XP).
+     lt_cv_sys_max_cmd_len=8192;
+     ;;
+ 
+   mint*)
+     # On MiNT this can take a long time and run out of memory.
+     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
+     ;;
+ 
+   os2*)
+     # The test takes a long time on OS/2.
+     lt_cv_sys_max_cmd_len=8192
+     ;;
+ 
+   osf*)
+     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+     # nice to cause kernel panics so lets avoid the loop below.
+     # First set a reasonable default.
+     lt_cv_sys_max_cmd_len=16384
+     #
+     if test -x /sbin/sysconfig; then
+       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+         *1*) lt_cv_sys_max_cmd_len=-1 ;;
+       esac
+     fi
+     ;;
+   sco3.2v5*)
+     lt_cv_sys_max_cmd_len=102400
+     ;;
+   sysv5* | sco5v6* | sysv4.2uw2*)
+     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+     if test -n "$kargmax"; then
+       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+     else
+       lt_cv_sys_max_cmd_len=32768
+     fi
+     ;;
+   *)
+     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+     if test -n "$lt_cv_sys_max_cmd_len"; then
+       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+     else
+       # Make teststring a little bigger before we do anything with it.
+       # a 1K string should be a reasonable start.
+       for i in 1 2 3 4 5 6 7 8 ; do
+         teststring=$teststring$teststring
+       done
+       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+       # If test is not a shell built-in, we'll probably end up computing a
+       # maximum length that is only half of the actual maximum length, but
+       # we can't tell.
+       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ 	      test $i != 17 # 1/2 MB should be enough
+       do
+         i=`expr $i + 1`
+         teststring=$teststring$teststring
+       done
+       # Only check the string length outside the loop.
+       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+       teststring=
+       # Add a significant safety factor because C++ compilers can tack on
+       # massive amounts of additional arguments before passing them to the
+       # linker.  It appears as though 1/2 is a usable value.
+       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+     fi
+     ;;
+   esac
+ ])
+ if test -n $lt_cv_sys_max_cmd_len ; then
+   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+ else
+   AC_MSG_RESULT(none)
+ fi
+ max_cmd_len=$lt_cv_sys_max_cmd_len
+ _LT_DECL([], [max_cmd_len], [0],
+     [What is the maximum length of a command?])
+ ])# LT_CMD_MAX_LEN
+ 
+ # Old name:
+ AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+ 
+ 
+ # _LT_HEADER_DLFCN
+ # ----------------
+ m4_defun([_LT_HEADER_DLFCN],
+ [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+ ])# _LT_HEADER_DLFCN
+ 
+ 
+ # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+ #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+ # ----------------------------------------------------------------
+ m4_defun([_LT_TRY_DLOPEN_SELF],
+ [m4_require([_LT_HEADER_DLFCN])dnl
+ if test "$cross_compiling" = yes; then :
+   [$4]
+ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+ [#line $LINENO "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
+ 
+ /* When -fvisbility=hidden is used, assume the code has been annotated
+    correspondingly for the symbols needed.  */
+ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+ int fnord () __attribute__((visibility("default")));
+ #endif
+ 
+ int fnord () { return 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;
+           else puts (dlerror ());
+ 	}
+       /* dlclose (self); */
+     }
+   else
+     puts (dlerror ());
+ 
+   return status;
+ }]
+ _LT_EOF
+   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+     lt_status=$?
+     case x$lt_status in
+       x$lt_dlno_uscore) $1 ;;
+       x$lt_dlneed_uscore) $2 ;;
+       x$lt_dlunknown|x*) $3 ;;
+     esac
+   else :
+     # compilation failed
+     $3
+   fi
+ fi
+ rm -fr conftest*
+ ])# _LT_TRY_DLOPEN_SELF
+ 
+ 
+ # LT_SYS_DLOPEN_SELF
+ # ------------------
+ AC_DEFUN([LT_SYS_DLOPEN_SELF],
+ [m4_require([_LT_HEADER_DLFCN])dnl
+ if test "x$enable_dlopen" != xyes; then
+   enable_dlopen=unknown
+   enable_dlopen_self=unknown
+   enable_dlopen_self_static=unknown
+ else
+   lt_cv_dlopen=no
+   lt_cv_dlopen_libs=
+ 
+   case $host_os in
+   beos*)
+     lt_cv_dlopen="load_add_on"
+     lt_cv_dlopen_libs=
+     lt_cv_dlopen_self=yes
+     ;;
+ 
+   mingw* | pw32* | cegcc*)
+     lt_cv_dlopen="LoadLibrary"
+     lt_cv_dlopen_libs=
+     ;;
+ 
+   cygwin*)
+     lt_cv_dlopen="dlopen"
+     lt_cv_dlopen_libs=
+     ;;
+ 
+   darwin*)
+   # if libdl is installed we need to link against it
+     AC_CHECK_LIB([dl], [dlopen],
+ 		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+     lt_cv_dlopen="dyld"
+     lt_cv_dlopen_libs=
+     lt_cv_dlopen_self=yes
+     ])
+     ;;
+ 
+   *)
+     AC_CHECK_FUNC([shl_load],
+ 	  [lt_cv_dlopen="shl_load"],
+       [AC_CHECK_LIB([dld], [shl_load],
+ 	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ 	[AC_CHECK_FUNC([dlopen],
+ 	      [lt_cv_dlopen="dlopen"],
+ 	  [AC_CHECK_LIB([dl], [dlopen],
+ 		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ 	    [AC_CHECK_LIB([svld], [dlopen],
+ 		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ 	      [AC_CHECK_LIB([dld], [dld_link],
+ 		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ 	      ])
+ 	    ])
+ 	  ])
+ 	])
+       ])
+     ;;
+   esac
+ 
+   if test "x$lt_cv_dlopen" != xno; then
+     enable_dlopen=yes
+   else
+     enable_dlopen=no
+   fi
+ 
+   case $lt_cv_dlopen in
+   dlopen)
+     save_CPPFLAGS="$CPPFLAGS"
+     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ 
+     save_LDFLAGS="$LDFLAGS"
+     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ 
+     save_LIBS="$LIBS"
+     LIBS="$lt_cv_dlopen_libs $LIBS"
+ 
+     AC_CACHE_CHECK([whether a program can dlopen itself],
+ 	  lt_cv_dlopen_self, [dnl
+ 	  _LT_TRY_DLOPEN_SELF(
+ 	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+     ])
+ 
+     if test "x$lt_cv_dlopen_self" = xyes; then
+       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ 	  lt_cv_dlopen_self_static, [dnl
+ 	  _LT_TRY_DLOPEN_SELF(
+ 	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ 	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+       ])
+     fi
+ 
+     CPPFLAGS="$save_CPPFLAGS"
+     LDFLAGS="$save_LDFLAGS"
+     LIBS="$save_LIBS"
+     ;;
+   esac
+ 
+   case $lt_cv_dlopen_self in
+   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+   *) enable_dlopen_self=unknown ;;
+   esac
+ 
+   case $lt_cv_dlopen_self_static in
+   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+   *) enable_dlopen_self_static=unknown ;;
+   esac
+ fi
+ _LT_DECL([dlopen_support], [enable_dlopen], [0],
+ 	 [Whether dlopen is supported])
+ _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ 	 [Whether dlopen of programs is supported])
+ _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ 	 [Whether dlopen of statically linked programs is supported])
+ ])# LT_SYS_DLOPEN_SELF
+ 
+ # Old name:
+ AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+ 
+ 
+ # _LT_COMPILER_C_O([TAGNAME])
+ # ---------------------------
+ # Check to see if options -c and -o are simultaneously supported by compiler.
+ # This macro does not hard code the compiler like AC_PROG_CC_C_O.
+ m4_defun([_LT_COMPILER_C_O],
+ [m4_require([_LT_DECL_SED])dnl
+ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ m4_require([_LT_TAG_COMPILER])dnl
+ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+    $RM -r conftest 2>/dev/null
+    mkdir conftest
+    cd conftest
+    mkdir out
+    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&AS_MESSAGE_LOG_FD
+    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+      fi
+    fi
+    chmod u+w . 2>&AS_MESSAGE_LOG_FD
+    $RM conftest*
+    # SGI C++ compiler will create directory out/ii_files/ for
+    # template instantiation
+    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+    $RM out/* && rmdir out
+    cd ..
+    $RM -r conftest
+    $RM conftest*
+ ])
+ _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ 	[Does compiler simultaneously support -c and -o options?])
+ ])# _LT_COMPILER_C_O
+ 
+ 
+ # _LT_COMPILER_FILE_LOCKS([TAGNAME])
+ # ----------------------------------
+ # Check to see if we can do hard links to lock some files if needed
+ m4_defun([_LT_COMPILER_FILE_LOCKS],
+ [m4_require([_LT_ENABLE_LOCK])dnl
+ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ _LT_COMPILER_C_O([$1])
+ 
+ hard_links="nottested"
+ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+   # do not overwrite the value of need_locks provided by the user
+   AC_MSG_CHECKING([if we can lock with hard links])
+   hard_links=yes
+   $RM conftest*
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   touch conftest.a
+   ln conftest.a conftest.b 2>&5 || hard_links=no
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   AC_MSG_RESULT([$hard_links])
+   if test "$hard_links" = no; then
+     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+     need_locks=warn
+   fi
+ else
+   need_locks=no
+ fi
+ _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+ ])# _LT_COMPILER_FILE_LOCKS
+ 
+ 
+ # _LT_CHECK_OBJDIR
+ # ----------------
+ m4_defun([_LT_CHECK_OBJDIR],
+ [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+ [rm -f .libs 2>/dev/null
+ mkdir .libs 2>/dev/null
+ if test -d .libs; then
+   lt_cv_objdir=.libs
+ else
+   # MS-DOS does not allow filenames that begin with a dot.
+   lt_cv_objdir=_libs
+ fi
+ rmdir .libs 2>/dev/null])
+ objdir=$lt_cv_objdir
+ _LT_DECL([], [objdir], [0],
+          [The name of the directory that contains temporary libtool files])dnl
+ m4_pattern_allow([LT_OBJDIR])dnl
+ AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+   [Define to the sub-directory in which libtool stores uninstalled libraries.])
+ ])# _LT_CHECK_OBJDIR
+ 
+ 
+ # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+ # --------------------------------------
+ # Check hardcoding attributes.
+ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+ [AC_MSG_CHECKING([how to hardcode library paths into programs])
+ _LT_TAGVAR(hardcode_action, $1)=
+ if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+ 
+   # We can hardcode non-existent directories.
+   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+      # If the only mechanism to avoid hardcoding is shlibpath_var, we
+      # have to relink, otherwise we might link with an installed library
+      # when we should be linking with a yet-to-be-installed one
+      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+     # Linking always hardcodes the temporary library directory.
+     _LT_TAGVAR(hardcode_action, $1)=relink
+   else
+     # We can link without hardcoding, and we can hardcode nonexisting dirs.
+     _LT_TAGVAR(hardcode_action, $1)=immediate
+   fi
+ else
+   # We cannot hardcode anything, or else we can only hardcode existing
+   # directories.
+   _LT_TAGVAR(hardcode_action, $1)=unsupported
+ fi
+ AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+ 
+ if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+   # Fast installation is not supported
+   enable_fast_install=no
+ elif test "$shlibpath_overrides_runpath" = yes ||
+      test "$enable_shared" = no; then
+   # Fast installation is not necessary
+   enable_fast_install=needless
+ fi
+ _LT_TAGDECL([], [hardcode_action], [0],
+     [How to hardcode a shared library path into an executable])
+ ])# _LT_LINKER_HARDCODE_LIBPATH
+ 
+ 
+ # _LT_CMD_STRIPLIB
+ # ----------------
+ m4_defun([_LT_CMD_STRIPLIB],
+ [m4_require([_LT_DECL_EGREP])
+ striplib=
+ old_striplib=
+ AC_MSG_CHECKING([whether stripping libraries is possible])
+ if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+   AC_MSG_RESULT([yes])
+ else
+ # FIXME - insert some real tests, host_os isn't really good enough
+   case $host_os in
+   darwin*)
+     if test -n "$STRIP" ; then
+       striplib="$STRIP -x"
+       old_striplib="$STRIP -S"
+       AC_MSG_RESULT([yes])
+     else
+       AC_MSG_RESULT([no])
+     fi
+     ;;
+   *)
+     AC_MSG_RESULT([no])
+     ;;
+   esac
+ fi
+ _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+ _LT_DECL([], [striplib], [1])
+ ])# _LT_CMD_STRIPLIB
+ 
+ 
+ # _LT_SYS_DYNAMIC_LINKER([TAG])
+ # -----------------------------
+ # PORTME Fill in your ld.so characteristics
+ m4_defun([_LT_SYS_DYNAMIC_LINKER],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ m4_require([_LT_DECL_EGREP])dnl
+ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ m4_require([_LT_DECL_OBJDUMP])dnl
+ m4_require([_LT_DECL_SED])dnl
+ m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+ AC_MSG_CHECKING([dynamic linker characteristics])
+ m4_if([$1],
+ 	[], [
+ if test "$GCC" = yes; then
+   case $host_os in
+     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+     *) lt_awk_arg="/^libraries:/" ;;
+   esac
+   case $host_os in
+     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+     *) lt_sed_strip_eq="s,=/,/,g" ;;
+   esac
+   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+   case $lt_search_path_spec in
+   *\;*)
+     # if the path contains ";" then we assume it to be the separator
+     # otherwise default to the standard path separator (i.e. ":") - it is
+     # assumed that no part of a normal pathname contains ";" but that should
+     # okay in the real world where ";" in dirpaths is itself problematic.
+     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+     ;;
+   *)
+     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+     ;;
+   esac
+   # Ok, now we have the path, separated by spaces, we can step through it
+   # and add multilib dir if necessary.
+   lt_tmp_lt_search_path_spec=
+   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+   for lt_sys_path in $lt_search_path_spec; do
+     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+     else
+       test -d "$lt_sys_path" && \
+ 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+     fi
+   done
+   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+ BEGIN {RS=" "; FS="/|\n";} {
+   lt_foo="";
+   lt_count=0;
+   for (lt_i = NF; lt_i > 0; lt_i--) {
+     if ($lt_i != "" && $lt_i != ".") {
+       if ($lt_i == "..") {
+         lt_count++;
+       } else {
+         if (lt_count == 0) {
+           lt_foo="/" $lt_i lt_foo;
+         } else {
+           lt_count--;
+         }
+       }
+     }
+   }
+   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+ }'`
+   # AWK program above erroneously prepends '/' to C:/dos/paths
+   # for these hosts.
+   case $host_os in
+     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+   esac
+   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+ else
+   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ fi])
+ library_names_spec=
+ libname_spec='lib$name'
+ soname_spec=
+ shrext_cmds=".so"
+ postinstall_cmds=
+ postuninstall_cmds=
+ finish_cmds=
+ finish_eval=
+ shlibpath_var=
+ shlibpath_overrides_runpath=unknown
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+ 
+ # when you set need_version to no, make sure it does not cause -set_version
+ # flags to be left without arguments
+ need_version=unknown
+ 
+ case $host_os in
+ aix3*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+   shlibpath_var=LIBPATH
+ 
+   # AIX 3 has no versioning support, so we append a major version to the name.
+   soname_spec='${libname}${release}${shared_ext}$major'
+   ;;
+ 
+ aix[[4-9]]*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+   need_version=no
+   hardcode_into_libs=yes
+   if test "$host_cpu" = ia64; then
+     # AIX 5 supports IA64
+     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+     shlibpath_var=LD_LIBRARY_PATH
+   else
+     # With GCC up to 2.95.x, collect2 would create an import file
+     # for dependence libraries.  The import file would start with
+     # the line `#! .'.  This would cause the generated library to
+     # depend on `.', always an invalid library.  This was fixed in
+     # development snapshots of GCC prior to 3.0.
+     case $host_os in
+       aix4 | aix4.[[01]] | aix4.[[01]].*)
+       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ 	   echo ' yes '
+ 	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ 	:
+       else
+ 	can_build_shared=no
+       fi
+       ;;
+     esac
+     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+     # soname into executable. Probably we can add versioning support to
+     # collect2, so additional links can be useful in future.
+     if test "$aix_use_runtimelinking" = yes; then
+       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+       # instead of lib<name>.a to let people know that these are not
+       # typical AIX shared libraries.
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     else
+       # We preserve .a as extension for shared libraries through AIX4.2
+       # and later when we are not doing run time linking.
+       library_names_spec='${libname}${release}.a $libname.a'
+       soname_spec='${libname}${release}${shared_ext}$major'
+     fi
+     shlibpath_var=LIBPATH
+   fi
+   ;;
+ 
+ amigaos*)
+   case $host_cpu in
+   powerpc)
+     # Since July 2007 AmigaOS4 officially supports .so libraries.
+     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     ;;
+   m68k)
+     library_names_spec='$libname.ixlibrary $libname.a'
+     # Create ${libname}_ixlibrary.a entries in /sys/libs.
+     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+     ;;
+   esac
+   ;;
+ 
+ beos*)
+   library_names_spec='${libname}${shared_ext}'
+   dynamic_linker="$host_os ld.so"
+   shlibpath_var=LIBRARY_PATH
+   ;;
+ 
+ bsdi[[45]]*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+   # the default ld.so.conf also contains /usr/contrib/lib and
+   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+   # libtool to hard-code these into programs
+   ;;
+ 
+ cygwin* | mingw* | pw32* | cegcc*)
+   version_type=windows
+   shrext_cmds=".dll"
+   need_version=no
+   need_lib_prefix=no
+ 
+   case $GCC,$cc_basename in
+   yes,*)
+     # gcc
+     library_names_spec='$libname.dll.a'
+     # DLL is installed to $(libdir)/../bin by postinstall_cmds
+     postinstall_cmds='base_file=`basename \${file}`~
+       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+       dldir=$destdir/`dirname \$dlpath`~
+       test -d \$dldir || mkdir -p \$dldir~
+       $install_prog $dir/$dlname \$dldir/$dlname~
+       chmod a+x \$dldir/$dlname~
+       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+       fi'
+     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+       dlpath=$dir/\$dldll~
+        $RM \$dlpath'
+     shlibpath_overrides_runpath=yes
+ 
+     case $host_os in
+     cygwin*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ m4_if([$1], [],[
+       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+       ;;
+     mingw* | cegcc*)
+       # MinGW DLLs use traditional 'lib' prefix
+       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+       ;;
+     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
+     dynamic_linker='Win32 ld.exe'
+     ;;
+ 
+   *,cl*)
+     # Native MSVC
+     libname_spec='$name'
+     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+     library_names_spec='${libname}.dll.lib'
+ 
+     case $build_os in
+     mingw*)
+       sys_lib_search_path_spec=
+       lt_save_ifs=$IFS
+       IFS=';'
+       for lt_path in $LIB
+       do
+         IFS=$lt_save_ifs
+         # Let DOS variable expansion print the short 8.3 style file name.
+         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+       done
+       IFS=$lt_save_ifs
+       # Convert to MSYS style.
+       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+       ;;
+     cygwin*)
+       # Convert to unix form, then to dos form, then back to unix form
+       # but this time dos style (no spaces!) so that the unix form looks
+       # like /cygdrive/c/PROGRA~1:/cygdr...
+       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+       ;;
+     *)
+       sys_lib_search_path_spec="$LIB"
+       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+         # It is most probably a Windows format PATH.
+         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
+       # FIXME: find the short name or the path components, as spaces are
+       # common. (e.g. "Program Files" -> "PROGRA~1")
+       ;;
+     esac
+ 
+     # 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'
+     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+       dlpath=$dir/\$dldll~
+        $RM \$dlpath'
+     shlibpath_overrides_runpath=yes
+     dynamic_linker='Win32 link.exe'
+     ;;
+ 
+   *)
+     # Assume MSVC wrapper
+     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+     dynamic_linker='Win32 ld.exe'
+     ;;
+   esac
+   # FIXME: first we should search . and the directory the executable is in
+   shlibpath_var=PATH
+   ;;
+ 
+ darwin* | rhapsody*)
+   dynamic_linker="$host_os dyld"
+   version_type=darwin
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+   soname_spec='${libname}${release}${major}$shared_ext'
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+ m4_if([$1], [],[
+   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+   ;;
+ 
+ dgux*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   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
+   ;;
+ 
+ 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[[23]].*) objformat=aout ;;
+     *) objformat=elf ;;
+     esac
+   fi
+   version_type=freebsd-$objformat
+   case $version_type in
+     freebsd-elf*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+       need_version=no
+       need_lib_prefix=no
+       ;;
+     freebsd-*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+       need_version=yes
+       ;;
+   esac
+   shlibpath_var=LD_LIBRARY_PATH
+   case $host_os in
+   freebsd2.*)
+     shlibpath_overrides_runpath=yes
+     ;;
+   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+     shlibpath_overrides_runpath=yes
+     hardcode_into_libs=yes
+     ;;
+   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+     shlibpath_overrides_runpath=no
+     hardcode_into_libs=yes
+     ;;
+   *) # from 4.6 on, and DragonFly
+     shlibpath_overrides_runpath=yes
+     hardcode_into_libs=yes
+     ;;
+   esac
+   ;;
+ 
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+   need_version=no
+   dynamic_linker="$host_os runtime_loader"
+   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=LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+   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'
+   # or fails outright, so override atomically:
+   install_override_mode=555
+   ;;
+ 
+ interix[[3-9]]*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   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 # correct to gnu/linux during the next big refactor
+ 	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 glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+ 
+   # Some binutils ld are patched to set DT_RUNPATH
+   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+     [lt_cv_shlibpath_overrides_runpath=no
+     save_LDFLAGS=$LDFLAGS
+     save_libdir=$libdir
+     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ 	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ 	 [lt_cv_shlibpath_overrides_runpath=yes])])
+     LDFLAGS=$save_LDFLAGS
+     libdir=$save_libdir
+     ])
+   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+ 
+   # This implies no fast_install, which is unacceptable.
+   # Some rework will be needed to allow for fast_install
+   # before this can be enabled.
+   hardcode_into_libs=yes
+ 
+   # Append ld.so.conf contents to the search path
+   if test -f /etc/ld.so.conf; then
+     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+   fi
+ 
+   # We used to test for /lib/ld.so.1 and disable shared libraries on
+   # powerpc, because MkLinux only supported shared libraries with the
+   # GNU dynamic linker.  Since this was broken with cross compilers,
+   # most powerpc-linux boxes support dynamic linking these days and
+   # people can always --disable-shared, the test was removed, and we
+   # assume the GNU/Linux dynamic linker is in use.
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
+ netbsdelf*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+   hardcode_into_libs=yes
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+ 
+ netbsd*)
+   version_type=sunos
+   need_lib_prefix=no
+   need_version=no
+   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+     dynamic_linker='NetBSD (a.out) ld.so'
+   else
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     dynamic_linker='NetBSD ld.elf_so'
+   fi
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   hardcode_into_libs=yes
+   ;;
+ 
+ newsos6)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   ;;
+ 
+ *nto* | *qnx*)
+   version_type=qnx
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+   hardcode_into_libs=yes
+   dynamic_linker='ldqnx.so'
+   ;;
+ 
+ openbsd*)
+   version_type=sunos
+   sys_lib_dlsearch_path_spec="/usr/lib"
+   need_lib_prefix=no
+   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+   case $host_os in
+     openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+     *)				need_version=no  ;;
+   esac
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+     case $host_os in
+       openbsd2.[[89]] | openbsd2.[[89]].*)
+ 	shlibpath_overrides_runpath=no
+ 	;;
+       *)
+ 	shlibpath_overrides_runpath=yes
+ 	;;
+       esac
+   else
+     shlibpath_overrides_runpath=yes
+   fi
+   ;;
+ 
+ os2*)
+   libname_spec='$name'
+   shrext_cmds=".dll"
+   need_lib_prefix=no
+   library_names_spec='$libname${shared_ext} $libname.a'
+   dynamic_linker='OS/2 ld.exe'
+   shlibpath_var=LIBPATH
+   ;;
+ 
+ osf3* | osf4* | osf5*)
+   version_type=osf
+   need_lib_prefix=no
+   need_version=no
+   soname_spec='${libname}${release}${shared_ext}$major'
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   shlibpath_var=LD_LIBRARY_PATH
+   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+   ;;
+ 
+ rdos*)
+   dynamic_linker=no
+   ;;
+ 
+ solaris*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   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 # correct to gnu/linux during the next big refactor
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   case $host_vendor in
+     sni)
+       shlibpath_overrides_runpath=no
+       need_lib_prefix=no
+       runpath_var=LD_RUN_PATH
+       ;;
+     siemens)
+       need_lib_prefix=no
+       ;;
+     motorola)
+       need_lib_prefix=no
+       need_version=no
+       shlibpath_overrides_runpath=no
+       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+       ;;
+   esac
+   ;;
+ 
+ sysv4*MP*)
+   if test -d /usr/nec ;then
+     version_type=linux # correct to gnu/linux during the next big refactor
+     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+     soname_spec='$libname${shared_ext}.$major'
+     shlibpath_var=LD_LIBRARY_PATH
+   fi
+   ;;
+ 
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+   version_type=freebsd-elf
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   hardcode_into_libs=yes
+   if test "$with_gnu_ld" = yes; then
+     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+   else
+     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+     case $host_os in
+       sco3.2v5*)
+         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ 	;;
+     esac
+   fi
+   sys_lib_dlsearch_path_spec='/usr/lib'
+   ;;
+ 
+ tpf*)
+   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+   hardcode_into_libs=yes
+   ;;
+ 
+ uts4*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   ;;
+ 
+ *)
+   dynamic_linker=no
+   ;;
+ esac
+ AC_MSG_RESULT([$dynamic_linker])
+ test "$dynamic_linker" = no && can_build_shared=no
+ 
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+ if test "$GCC" = yes; then
+   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+ fi
+ 
+ if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+ fi
+ if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+ fi
+ 
+ _LT_DECL([], [variables_saved_for_relink], [1],
+     [Variables whose values should be saved in libtool wrapper scripts and
+     restored at link time])
+ _LT_DECL([], [need_lib_prefix], [0],
+     [Do we need the "lib" prefix for modules?])
+ _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+ _LT_DECL([], [version_type], [0], [Library versioning type])
+ _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+ _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+ _LT_DECL([], [shlibpath_overrides_runpath], [0],
+     [Is shlibpath searched before the hard-coded library search path?])
+ _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+ _LT_DECL([], [library_names_spec], [1],
+     [[List of archive names.  First name is the real one, the rest are links.
+     The last name is the one that the linker finds with -lNAME]])
+ _LT_DECL([], [soname_spec], [1],
+     [[The coded name of the library, if different from the real name]])
+ _LT_DECL([], [install_override_mode], [1],
+     [Permission mode override for installation of shared libraries])
+ _LT_DECL([], [postinstall_cmds], [2],
+     [Command to use after installation of a shared archive])
+ _LT_DECL([], [postuninstall_cmds], [2],
+     [Command to use after uninstallation of a shared archive])
+ _LT_DECL([], [finish_cmds], [2],
+     [Commands used to finish a libtool library installation in a directory])
+ _LT_DECL([], [finish_eval], [1],
+     [[As "finish_cmds", except a single script fragment to be evaled but
+     not shown]])
+ _LT_DECL([], [hardcode_into_libs], [0],
+     [Whether we should hardcode library paths into libraries])
+ _LT_DECL([], [sys_lib_search_path_spec], [2],
+     [Compile-time system search path for libraries])
+ _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+     [Run-time system search path for libraries])
+ ])# _LT_SYS_DYNAMIC_LINKER
+ 
+ 
+ # _LT_PATH_TOOL_PREFIX(TOOL)
+ # --------------------------
+ # find a file program which can recognize shared library
+ AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+ [m4_require([_LT_DECL_EGREP])dnl
+ AC_MSG_CHECKING([for $1])
+ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+ [case $MAGIC_CMD in
+ [[\\/*] |  ?:[\\/]*])
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+ *)
+   lt_save_MAGIC_CMD="$MAGIC_CMD"
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ dnl $ac_dummy forces splitting on constant user-supplied paths.
+ dnl POSIX.2 word splitting is done only on the output of word expansions,
+ dnl not every word.  This closes a longstanding sh security hole.
+   ac_dummy="m4_if([$2], , $PATH, [$2])"
+   for ac_dir in $ac_dummy; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$1; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+       if test -n "$file_magic_test_file"; then
+ 	case $deplibs_check_method in
+ 	"file_magic "*)
+ 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ 	    $EGREP "$file_magic_regex" > /dev/null; then
+ 	    :
+ 	  else
+ 	    cat <<_LT_EOF 1>&2
+ 
+ *** Warning: the command libtool uses to detect shared libraries,
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
+ *** The result is that libtool may fail to recognize shared libraries
+ *** as such.  This will affect the creation of libtool libraries that
+ *** depend on shared libraries, but programs linked with such libtool
+ *** libraries will work regardless of this problem.  Nevertheless, you
+ *** may want to report the problem to your system manager and/or to
+ *** bug-libtool at gnu.org
+ 
+ _LT_EOF
+ 	  fi ;;
+ 	esac
+       fi
+       break
+     fi
+   done
+   IFS="$lt_save_ifs"
+   MAGIC_CMD="$lt_save_MAGIC_CMD"
+   ;;
+ esac])
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if test -n "$MAGIC_CMD"; then
+   AC_MSG_RESULT($MAGIC_CMD)
+ else
+   AC_MSG_RESULT(no)
+ fi
+ _LT_DECL([], [MAGIC_CMD], [0],
+ 	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+ ])# _LT_PATH_TOOL_PREFIX
+ 
+ # Old name:
+ AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+ 
+ 
+ # _LT_PATH_MAGIC
+ # --------------
+ # find a file program which can recognize a shared library
+ m4_defun([_LT_PATH_MAGIC],
+ [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
+   if test -n "$ac_tool_prefix"; then
+     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+   else
+     MAGIC_CMD=:
+   fi
+ fi
+ ])# _LT_PATH_MAGIC
+ 
+ 
+ # LT_PATH_LD
+ # ----------
+ # find the pathname to the GNU or non-GNU linker
+ AC_DEFUN([LT_PATH_LD],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ m4_require([_LT_DECL_SED])dnl
+ m4_require([_LT_DECL_EGREP])dnl
+ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+ 
+ AC_ARG_WITH([gnu-ld],
+     [AS_HELP_STRING([--with-gnu-ld],
+ 	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+     [test "$withval" = no || with_gnu_ld=yes],
+     [with_gnu_ld=no])dnl
+ 
+ ac_prog=ld
+ if test "$GCC" = yes; then
+   # Check if gcc -print-prog-name=ld gives a path.
+   AC_MSG_CHECKING([for ld used by $CC])
+   case $host in
+   *-*-mingw*)
+     # gcc leaves a trailing carriage return which upsets mingw
+     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+   *)
+     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+   esac
+   case $ac_prog in
+     # Accept absolute paths.
+     [[\\/]]* | ?:[[\\/]]*)
+       re_direlt='/[[^/]][[^/]]*/\.\./'
+       # Canonicalize the pathname of ld
+       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+       done
+       test -z "$LD" && LD="$ac_prog"
+       ;;
+   "")
+     # If it fails, then pretend we aren't using GCC.
+     ac_prog=ld
+     ;;
+   *)
+     # If it is relative, then search for the first ld in PATH.
+     with_gnu_ld=unknown
+     ;;
+   esac
+ elif test "$with_gnu_ld" = yes; then
+   AC_MSG_CHECKING([for GNU ld])
+ else
+   AC_MSG_CHECKING([for non-GNU ld])
+ fi
+ AC_CACHE_VAL(lt_cv_path_LD,
+ [if test -z "$LD"; then
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+   for ac_dir in $PATH; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+       lt_cv_path_LD="$ac_dir/$ac_prog"
+       # Check to see if the program is GNU ld.  I'd rather use --version,
+       # but apparently some variants of GNU ld only accept -v.
+       # Break only if it was the GNU/non-GNU ld that we prefer.
+       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+       *GNU* | *'with BFD'*)
+ 	test "$with_gnu_ld" != no && break
+ 	;;
+       *)
+ 	test "$with_gnu_ld" != yes && break
+ 	;;
+       esac
+     fi
+   done
+   IFS="$lt_save_ifs"
+ else
+   lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ fi])
+ LD="$lt_cv_path_LD"
+ if test -n "$LD"; then
+   AC_MSG_RESULT($LD)
+ else
+   AC_MSG_RESULT(no)
+ fi
+ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+ _LT_PATH_LD_GNU
+ AC_SUBST([LD])
+ 
+ _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+ ])# LT_PATH_LD
+ 
+ # Old names:
+ AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+ AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AM_PROG_LD], [])
+ dnl AC_DEFUN([AC_PROG_LD], [])
+ 
+ 
+ # _LT_PATH_LD_GNU
+ #- --------------
+ m4_defun([_LT_PATH_LD_GNU],
+ [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+ [# I'd rather use --version here, but apparently some GNU lds only accept -v.
+ case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+   lt_cv_prog_gnu_ld=yes
+   ;;
+ *)
+   lt_cv_prog_gnu_ld=no
+   ;;
+ esac])
+ with_gnu_ld=$lt_cv_prog_gnu_ld
+ ])# _LT_PATH_LD_GNU
+ 
+ 
+ # _LT_CMD_RELOAD
+ # --------------
+ # find reload flag for linker
+ #   -- PORTME Some linkers may need a different reload flag.
+ m4_defun([_LT_CMD_RELOAD],
+ [AC_CACHE_CHECK([for $LD option to reload object files],
+   lt_cv_ld_reload_flag,
+   [lt_cv_ld_reload_flag='-r'])
+ reload_flag=$lt_cv_ld_reload_flag
+ case $reload_flag in
+ "" | " "*) ;;
+ *) reload_flag=" $reload_flag" ;;
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+   cygwin* | mingw* | pw32* | cegcc*)
+     if test "$GCC" != yes; then
+       reload_cmds=false
+     fi
+     ;;
+   darwin*)
+     if test "$GCC" = yes; then
+       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+     else
+       reload_cmds='$LD$reload_flag -o $output$reload_objs'
+     fi
+     ;;
+ esac
+ _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+ _LT_TAGDECL([], [reload_cmds], [2])dnl
+ ])# _LT_CMD_RELOAD
+ 
+ 
+ # _LT_CHECK_MAGIC_METHOD
+ # ----------------------
+ # how to check for library dependencies
+ #  -- PORTME fill in with the dynamic library characteristics
+ m4_defun([_LT_CHECK_MAGIC_METHOD],
+ [m4_require([_LT_DECL_EGREP])
+ m4_require([_LT_DECL_OBJDUMP])
+ AC_CACHE_CHECK([how to recognize dependent libraries],
+ lt_cv_deplibs_check_method,
+ [lt_cv_file_magic_cmd='$MAGIC_CMD'
+ lt_cv_file_magic_test_file=
+ lt_cv_deplibs_check_method='unknown'
+ # Need to set the preceding variable on all platforms that support
+ # interlibrary dependencies.
+ # 'none' -- dependencies not supported.
+ # `unknown' -- same as none, but documents that we really don't know.
+ # 'pass_all' -- all dependencies passed with no checks.
+ # 'test_compile' -- check by making test program.
+ # 'file_magic [[regex]]' -- check by looking for files in library path
+ # which responds to the $file_magic_cmd with a given extended regex.
+ # If you have `file' or equivalent on your system and you're not sure
+ # whether `pass_all' will *always* work, you probably want this one.
+ 
+ case $host_os in
+ aix[[4-9]]*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ beos*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ bsdi[[45]]*)
+   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+   lt_cv_file_magic_cmd='/usr/bin/file -L'
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
+ 
+ cygwin*)
+   # func_win32_libid is a shell function defined in ltmain.sh
+   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+   lt_cv_file_magic_cmd='func_win32_libid'
+   ;;
+ 
+ mingw* | pw32*)
+   # Base MSYS/MinGW do not provide the 'file' command needed by
+   # func_win32_libid shell function, so use a weaker test based on 'objdump',
+   # unless we find 'file', for example because we are cross-compiling.
+   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+     lt_cv_file_magic_cmd='func_win32_libid'
+   else
+     # Keep this pattern in sync with the one in func_win32_libid.
+     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+     lt_cv_file_magic_cmd='$OBJDUMP -f'
+   fi
+   ;;
+ 
+ cegcc*)
+   # use the weaker test based on 'objdump'. See mingw*.
+   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+   lt_cv_file_magic_cmd='$OBJDUMP -f'
+   ;;
+ 
+ darwin* | rhapsody*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ freebsd* | dragonfly*)
+   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+     case $host_cpu in
+     i*86 )
+       # Not sure whether the presence of OpenBSD here was a mistake.
+       # Let's accept both of them until this is cleared up.
+       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+       lt_cv_file_magic_cmd=/usr/bin/file
+       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+       ;;
+     esac
+   else
+     lt_cv_deplibs_check_method=pass_all
+   fi
+   ;;
+ 
+ haiku*)
+   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])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+     ;;
+   *)
+     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+     lt_cv_file_magic_test_file=/usr/lib/libc.sl
+     ;;
+   esac
+   ;;
+ 
+ interix[[3-9]]*)
+   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+   ;;
+ 
+ irix5* | irix6* | nonstopux*)
+   case $LD in
+   *-32|*"-32 ") libmagic=32-bit;;
+   *-n32|*"-n32 ") libmagic=N32;;
+   *-64|*"-64 ") libmagic=64-bit;;
+   *) libmagic=never-match;;
+   esac
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ # This must be glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ netbsd* | netbsdelf*-gnu)
+   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+   else
+     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+   fi
+   ;;
+ 
+ newos6*)
+   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+   lt_cv_file_magic_cmd=/usr/bin/file
+   lt_cv_file_magic_test_file=/usr/lib/libnls.so
+   ;;
+ 
+ *nto* | *qnx*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ openbsd*)
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+   else
+     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+   fi
+   ;;
+ 
+ osf3* | osf4* | osf5*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ rdos*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ solaris*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ sysv4 | sysv4.3*)
+   case $host_vendor in
+   motorola)
+     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+     ;;
+   ncr)
+     lt_cv_deplibs_check_method=pass_all
+     ;;
+   sequent)
+     lt_cv_file_magic_cmd='/bin/file'
+     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+     ;;
+   sni)
+     lt_cv_file_magic_cmd='/bin/file'
+     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+     lt_cv_file_magic_test_file=/lib/libc.so
+     ;;
+   siemens)
+     lt_cv_deplibs_check_method=pass_all
+     ;;
+   pc)
+     lt_cv_deplibs_check_method=pass_all
+     ;;
+   esac
+   ;;
+ 
+ tpf*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ esac
+ ])
+ 
+ file_magic_glob=
+ want_nocaseglob=no
+ if test "$build" = "$host"; then
+   case $host_os in
+   mingw* | pw32*)
+     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+       want_nocaseglob=yes
+     else
+       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+     fi
+     ;;
+   esac
+ fi
+ 
+ file_magic_cmd=$lt_cv_file_magic_cmd
+ deplibs_check_method=$lt_cv_deplibs_check_method
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+ 
+ _LT_DECL([], [deplibs_check_method], [1],
+     [Method to check whether dependent libraries are shared objects])
+ _LT_DECL([], [file_magic_cmd], [1],
+     [Command to use when deplibs_check_method = "file_magic"])
+ _LT_DECL([], [file_magic_glob], [1],
+     [How to find potential files when deplibs_check_method = "file_magic"])
+ _LT_DECL([], [want_nocaseglob], [1],
+     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+ ])# _LT_CHECK_MAGIC_METHOD
+ 
+ 
+ # LT_PATH_NM
+ # ----------
+ # find the pathname to a BSD- or MS-compatible name lister
+ AC_DEFUN([LT_PATH_NM],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+ [if test -n "$NM"; then
+   # Let the user override the test.
+   lt_cv_path_NM="$NM"
+ else
+   lt_nm_to_check="${ac_tool_prefix}nm"
+   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+     lt_nm_to_check="$lt_nm_to_check nm"
+   fi
+   for lt_tmp_nm in $lt_nm_to_check; do
+     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+       IFS="$lt_save_ifs"
+       test -z "$ac_dir" && ac_dir=.
+       tmp_nm="$ac_dir/$lt_tmp_nm"
+       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ 	# Check to see if the nm accepts a BSD-compat flag.
+ 	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ 	#   nm: unknown option "B" ignored
+ 	# Tru64's nm complains that /dev/null is an invalid object file
+ 	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ 	*/dev/null* | *'Invalid file or object type'*)
+ 	  lt_cv_path_NM="$tmp_nm -B"
+ 	  break
+ 	  ;;
+ 	*)
+ 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ 	  */dev/null*)
+ 	    lt_cv_path_NM="$tmp_nm -p"
+ 	    break
+ 	    ;;
+ 	  *)
+ 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ 	    continue # so that we can try to find one that supports BSD flags
+ 	    ;;
+ 	  esac
+ 	  ;;
+ 	esac
+       fi
+     done
+     IFS="$lt_save_ifs"
+   done
+   : ${lt_cv_path_NM=no}
+ fi])
+ if test "$lt_cv_path_NM" != "no"; then
+   NM="$lt_cv_path_NM"
+ else
+   # Didn't find any BSD compatible name lister, look for dumpbin.
+   if test -n "$DUMPBIN"; then :
+     # Let the user override the test.
+   else
+     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+     *COFF*)
+       DUMPBIN="$DUMPBIN -symbols"
+       ;;
+     *)
+       DUMPBIN=:
+       ;;
+     esac
+   fi
+   AC_SUBST([DUMPBIN])
+   if test "$DUMPBIN" != ":"; then
+     NM="$DUMPBIN"
+   fi
+ fi
+ test -z "$NM" && NM=nm
+ AC_SUBST([NM])
+ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+ 
+ AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+   [lt_cv_nm_interface="BSD nm"
+   echo "int some_variable = 0;" > conftest.$ac_ext
+   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$ac_compile" 2>conftest.err)
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+   cat conftest.out >&AS_MESSAGE_LOG_FD
+   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+     lt_cv_nm_interface="MS dumpbin"
+   fi
+   rm -f conftest*])
+ ])# LT_PATH_NM
+ 
+ # Old names:
+ AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+ AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AM_PROG_NM], [])
+ dnl AC_DEFUN([AC_PROG_NM], [])
+ 
+ # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+ # --------------------------------
+ # how to determine the name of the shared library
+ # associated with a specific link library.
+ #  -- PORTME fill in with the dynamic library characteristics
+ m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+ [m4_require([_LT_DECL_EGREP])
+ m4_require([_LT_DECL_OBJDUMP])
+ m4_require([_LT_DECL_DLLTOOL])
+ AC_CACHE_CHECK([how to associate runtime and link libraries],
+ lt_cv_sharedlib_from_linklib_cmd,
+ [lt_cv_sharedlib_from_linklib_cmd='unknown'
+ 
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+   # two different shell functions defined in ltmain.sh
+   # decide which to use based on capabilities of $DLLTOOL
+   case `$DLLTOOL --help 2>&1` in
+   *--identify-strict*)
+     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+     ;;
+   *)
+     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+     ;;
+   esac
+   ;;
+ *)
+   # fallback: assume linklib IS sharedlib
+   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+   ;;
+ esac
+ ])
+ sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+ 
+ _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+     [Command to associate shared and link libraries])
+ ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+ 
+ 
+ # _LT_PATH_MANIFEST_TOOL
+ # ----------------------
+ # locate the manifest tool
+ m4_defun([_LT_PATH_MANIFEST_TOOL],
+ [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+ test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+   [lt_cv_path_mainfest_tool=no
+   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+     lt_cv_path_mainfest_tool=yes
+   fi
+   rm -f conftest*])
+ if test "x$lt_cv_path_mainfest_tool" != xyes; then
+   MANIFEST_TOOL=:
+ fi
+ _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+ ])# _LT_PATH_MANIFEST_TOOL
+ 
+ 
+ # LT_LIB_M
+ # --------
+ # check for math library
+ AC_DEFUN([LT_LIB_M],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+ case $host in
+ *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+   # These system don't have libm, or don't need it
+   ;;
+ *-ncr-sysv4.3*)
+   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+   ;;
+ *)
+   AC_CHECK_LIB(m, cos, LIBM="-lm")
+   ;;
+ esac
+ AC_SUBST([LIBM])
+ ])# LT_LIB_M
+ 
+ # Old name:
+ AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_CHECK_LIBM], [])
+ 
+ 
+ # _LT_COMPILER_NO_RTTI([TAGNAME])
+ # -------------------------------
+ m4_defun([_LT_COMPILER_NO_RTTI],
+ [m4_require([_LT_TAG_COMPILER])dnl
+ 
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ 
+ if test "$GCC" = yes; then
+   case $cc_basename in
+   nvcc*)
+     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+   *)
+     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+   esac
+ 
+   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+     lt_cv_prog_compiler_rtti_exceptions,
+     [-fno-rtti -fno-exceptions], [],
+     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+ fi
+ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ 	[Compiler flag to turn off builtin functions])
+ ])# _LT_COMPILER_NO_RTTI
+ 
+ 
+ # _LT_CMD_GLOBAL_SYMBOLS
+ # ----------------------
+ m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_AWK])dnl
+ AC_REQUIRE([LT_PATH_NM])dnl
+ AC_REQUIRE([LT_PATH_LD])dnl
+ m4_require([_LT_DECL_SED])dnl
+ m4_require([_LT_DECL_EGREP])dnl
+ m4_require([_LT_TAG_COMPILER])dnl
+ 
+ # Check for command to grab the raw symbol name followed by C symbol from nm.
+ AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+ AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+ [
+ # These are sane defaults that work on at least a few old systems.
+ # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+ 
+ # Character class describing NM global symbol codes.
+ symcode='[[BCDEGRST]]'
+ 
+ # Regexp to match symbols that can be accessed directly from C.
+ sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+ 
+ # Define system-specific variables.
+ case $host_os in
+ aix*)
+   symcode='[[BCDT]]'
+   ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+   symcode='[[ABCDGISTW]]'
+   ;;
+ hpux*)
+   if test "$host_cpu" = ia64; then
+     symcode='[[ABCDEGRST]]'
+   fi
+   ;;
+ irix* | nonstopux*)
+   symcode='[[BCDEGRST]]'
+   ;;
+ osf*)
+   symcode='[[BCDEGQRST]]'
+   ;;
+ solaris*)
+   symcode='[[BDRT]]'
+   ;;
+ sco3.2v5*)
+   symcode='[[DT]]'
+   ;;
+ sysv4.2uw2*)
+   symcode='[[DT]]'
+   ;;
+ sysv5* | sco5v6* | unixware* | OpenUNIX*)
+   symcode='[[ABDT]]'
+   ;;
+ sysv4)
+   symcode='[[DFNSTU]]'
+   ;;
+ esac
+ 
+ # If we're using GNU nm, then use its standard symbol codes.
+ case `$NM -V 2>&1` in
+ *GNU* | *'with BFD'*)
+   symcode='[[ABCDGIRSTW]]' ;;
+ esac
+ 
+ # Transform an extracted symbol line into a proper C declaration.
+ # Some systems (esp. on ia64) link data and code symbols differently,
+ # so use this general approach.
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ 
+ # Transform an extracted symbol line into symbol name and symbol address
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+ 
+ # Handle CRLF in mingw tool chain
+ opt_cr=
+ case $build_os in
+ mingw*)
+   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+   ;;
+ esac
+ 
+ # Try without a prefix underscore, then with it.
+ for ac_symprfx in "" "_"; do
+ 
+   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+   symxfrm="\\1 $ac_symprfx\\2 \\2"
+ 
+   # Write the raw and C identifiers.
+   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+     # Fake it for dumpbin and say T for any non-static function
+     # and D for any global variable.
+     # Also find C++ and __fastcall symbols from MSVC++,
+     # which start with @ or ?.
+     lt_cv_sys_global_symbol_pipe="$AWK ['"\
+ "     {last_section=section; section=\$ 3};"\
+ "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+ "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+ "     \$ 0!~/External *\|/{next};"\
+ "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+ "     {if(hide[section]) next};"\
+ "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+ "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+ "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+ "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+ "     ' prfx=^$ac_symprfx]"
+   else
+     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+   fi
+   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+ 
+   # Check to see that the pipe works correctly.
+   pipe_works=no
+ 
+   rm -f conftest*
+   cat > conftest.$ac_ext <<_LT_EOF
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ char nm_test_var;
+ void nm_test_func(void);
+ void nm_test_func(void){}
+ #ifdef __cplusplus
+ }
+ #endif
+ int main(){nm_test_var='a';nm_test_func();return(0);}
+ _LT_EOF
+ 
+   if AC_TRY_EVAL(ac_compile); then
+     # Now try to grab the symbols.
+     nlist=conftest.nm
+     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+       # Try sorting and uniquifying the output.
+       if sort "$nlist" | uniq > "$nlist"T; then
+ 	mv -f "$nlist"T "$nlist"
+       else
+ 	rm -f "$nlist"T
+       fi
+ 
+       # Make sure that we snagged all the symbols we need.
+       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ 	  cat <<_LT_EOF > conftest.$ac_ext
+ /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+ /* DATA imports from DLLs on WIN32 con't be const, because runtime
+    relocations are performed -- see ld's documentation on pseudo-relocs.  */
+ # define LT@&t at _DLSYM_CONST
+ #elif defined(__osf__)
+ /* This system does not cope well with relocations in const data.  */
+ # define LT@&t at _DLSYM_CONST
+ #else
+ # define LT@&t at _DLSYM_CONST const
+ #endif
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ _LT_EOF
+ 	  # Now generate the symbol file.
+ 	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+ 
+ 	  cat <<_LT_EOF >> conftest.$ac_ext
+ 
+ /* The mapping between symbol names and symbols.  */
+ LT@&t at _DLSYM_CONST struct {
+   const char *name;
+   void       *address;
+ }
+ lt__PROGRAM__LTX_preloaded_symbols[[]] =
+ {
+   { "@PROGRAM@", (void *) 0 },
+ _LT_EOF
+ 	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ 	  cat <<\_LT_EOF >> conftest.$ac_ext
+   {0, (void *) 0}
+ };
+ 
+ /* This works around a problem in FreeBSD linker */
+ #ifdef FREEBSD_WORKAROUND
+ static const void *lt_preloaded_setup() {
+   return lt__PROGRAM__LTX_preloaded_symbols;
+ }
+ #endif
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ _LT_EOF
+ 	  # Now try linking the two files.
+ 	  mv conftest.$ac_objext conftstm.$ac_objext
+ 	  lt_globsym_save_LIBS=$LIBS
+ 	  lt_globsym_save_CFLAGS=$CFLAGS
+ 	  LIBS="conftstm.$ac_objext"
+ 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ 	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ 	    pipe_works=yes
+ 	  fi
+ 	  LIBS=$lt_globsym_save_LIBS
+ 	  CFLAGS=$lt_globsym_save_CFLAGS
+ 	else
+ 	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ 	fi
+       else
+ 	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+       fi
+     else
+       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+     fi
+   else
+     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+     cat conftest.$ac_ext >&5
+   fi
+   rm -rf conftest* conftst*
+ 
+   # Do not use the global_symbol_pipe unless it works.
+   if test "$pipe_works" = yes; then
+     break
+   else
+     lt_cv_sys_global_symbol_pipe=
+   fi
+ done
+ ])
+ if test -z "$lt_cv_sys_global_symbol_pipe"; then
+   lt_cv_sys_global_symbol_to_cdecl=
+ fi
+ if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+   AC_MSG_RESULT(failed)
+ else
+   AC_MSG_RESULT(ok)
+ fi
+ 
+ # Response file support.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+   nm_file_list_spec='@'
+ elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+   nm_file_list_spec='@'
+ fi
+ 
+ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+     [Take the output of nm and produce a listing of raw symbols and C names])
+ _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+     [Transform the output of nm in a proper C declaration])
+ _LT_DECL([global_symbol_to_c_name_address],
+     [lt_cv_sys_global_symbol_to_c_name_address], [1],
+     [Transform the output of nm in a C name address pair])
+ _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+     [Transform the output of nm in a C name address pair when lib prefix is needed])
+ _LT_DECL([], [nm_file_list_spec], [1],
+     [Specify filename containing input files for $NM])
+ ]) # _LT_CMD_GLOBAL_SYMBOLS
+ 
+ 
+ # _LT_COMPILER_PIC([TAGNAME])
+ # ---------------------------
+ m4_defun([_LT_COMPILER_PIC],
+ [m4_require([_LT_TAG_COMPILER])dnl
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ 
+ m4_if([$1], [CXX], [
+   # C++ specific cases for pic, static, wl, etc.
+   if test "$GXX" = yes; then
+     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ 
+     case $host_os in
+     aix*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+ 	# AIX 5 now supports IA64 processor
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       fi
+       ;;
+ 
+     amigaos*)
+       case $host_cpu in
+       powerpc)
+             # see comment about AmigaOS4 .so support
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+         ;;
+       m68k)
+             # FIXME: we need at least 68020 code to build shared libraries, but
+             # adding the `-m68020' flag to GCC prevents building anything better,
+             # like `-m68040'.
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+         ;;
+       esac
+       ;;
+ 
+     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+     mingw* | cygwin* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+       # (--disable-auto-import) libraries
+       m4_if([$1], [GCJ], [],
+ 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+       ;;
+     darwin* | rhapsody*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+       ;;
+     *djgpp*)
+       # DJGPP does not support shared libraries at all
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+       ;;
+     haiku*)
+       # PIC is the default for Haiku.
+       # The "-static" flag exists, but is broken.
+       _LT_TAGVAR(lt_prog_compiler_static, $1)=
+       ;;
+     interix[[3-9]]*)
+       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+     sysv4*MP*)
+       if test -d /usr/nec; then
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+       fi
+       ;;
+     hpux*)
+       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+       # sets the default TLS model and affects inlining.
+       case $host_cpu in
+       hppa*64*)
+ 	;;
+       *)
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ 	;;
+       esac
+       ;;
+     *qnx* | *nto*)
+       # QNX uses GNU C++, but need to define -shared option too, otherwise
+       # it will coredump.
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+       ;;
+     *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+     esac
+   else
+     case $host_os in
+       aix[[4-9]]*)
+ 	# All AIX code is PIC.
+ 	if test "$host_cpu" = ia64; then
+ 	  # AIX 5 now supports IA64 processor
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	else
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ 	fi
+ 	;;
+       chorus*)
+ 	case $cc_basename in
+ 	cxch68*)
+ 	  # Green Hills C++ Compiler
+ 	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ 	  ;;
+ 	esac
+ 	;;
+       mingw* | cygwin* | os2* | pw32* | cegcc*)
+ 	# This hack is so that the source file can tell whether it is being
+ 	# built for inclusion in a dll (and should export symbols for example).
+ 	m4_if([$1], [GCJ], [],
+ 	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ 	;;
+       dgux*)
+ 	case $cc_basename in
+ 	  ec++*)
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	    ;;
+ 	  ghcx*)
+ 	    # Green Hills C++ Compiler
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       freebsd* | dragonfly*)
+ 	# FreeBSD uses GNU C++
+ 	;;
+       hpux9* | hpux10* | hpux11*)
+ 	case $cc_basename in
+ 	  CC*)
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ 	    if test "$host_cpu" != ia64; then
+ 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ 	    fi
+ 	    ;;
+ 	  aCC*)
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ 	    case $host_cpu in
+ 	    hppa*64*|ia64*)
+ 	      # +Z the default
+ 	      ;;
+ 	    *)
+ 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ 	      ;;
+ 	    esac
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       interix*)
+ 	# This is c89, which is MS Visual C++ (no shared libs)
+ 	# Anyone wants to do a port?
+ 	;;
+       irix5* | irix6* | nonstopux*)
+ 	case $cc_basename in
+ 	  CC*)
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ 	    # CC pic flag -KPIC is the default.
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ 	case $cc_basename in
+ 	  KCC*)
+ 	    # KAI C++ Compiler
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ 	    ;;
+ 	  ecpc* )
+ 	    # old Intel C++ for x86_64 which still supported -KPIC.
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ 	    ;;
+ 	  icpc* )
+ 	    # Intel C++, used to be incompatible with GCC.
+ 	    # ICC 10 doesn't accept -KPIC any more.
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ 	    ;;
+ 	  pgCC* | pgcpp*)
+ 	    # Portland Group C++ compiler
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	    ;;
+ 	  cxx*)
+ 	    # Compaq C++
+ 	    # Make sure the PIC flag is empty.  It appears that all Alpha
+ 	    # Linux and Compaq Tru64 Unix objects are PIC.
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ 	    ;;
+ 	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ 	    # IBM XL 8.0, 9.0 on PPC and BlueGene
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ 	    ;;
+ 	  *)
+ 	    case `$CC -V 2>&1 | sed 5q` in
+ 	    *Sun\ C*)
+ 	      # Sun C++ 5.9
+ 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ 	      ;;
+ 	    esac
+ 	    ;;
+ 	esac
+ 	;;
+       lynxos*)
+ 	;;
+       m88k*)
+ 	;;
+       mvs*)
+ 	case $cc_basename in
+ 	  cxx*)
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       netbsd* | netbsdelf*-gnu)
+ 	;;
+       *qnx* | *nto*)
+         # QNX uses GNU C++, but need to define -shared option too, otherwise
+         # it will coredump.
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+         ;;
+       osf3* | osf4* | osf5*)
+ 	case $cc_basename in
+ 	  KCC*)
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ 	    ;;
+ 	  RCC*)
+ 	    # Rational C++ 2.4.1
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ 	    ;;
+ 	  cxx*)
+ 	    # Digital/Compaq C++
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    # Make sure the PIC flag is empty.  It appears that all Alpha
+ 	    # Linux and Compaq Tru64 Unix objects are PIC.
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       psos*)
+ 	;;
+       solaris*)
+ 	case $cc_basename in
+ 	  CC* | sunCC*)
+ 	    # Sun C++ 4.2, 5.x and Centerline C++
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ 	    ;;
+ 	  gcx*)
+ 	    # Green Hills C++ Compiler
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       sunos4*)
+ 	case $cc_basename in
+ 	  CC*)
+ 	    # Sun C++ 4.x
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	    ;;
+ 	  lcc*)
+ 	    # Lucid
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ 	case $cc_basename in
+ 	  CC*)
+ 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	    ;;
+ 	esac
+ 	;;
+       tandem*)
+ 	case $cc_basename in
+ 	  NCC*)
+ 	    # NonStop-UX NCC 3.20
+ 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	    ;;
+ 	  *)
+ 	    ;;
+ 	esac
+ 	;;
+       vxworks*)
+ 	;;
+       *)
+ 	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ 	;;
+     esac
+   fi
+ ],
+ [
+   if test "$GCC" = yes; then
+     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ 
+     case $host_os in
+       aix*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+ 	# AIX 5 now supports IA64 processor
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       fi
+       ;;
+ 
+     amigaos*)
+       case $host_cpu in
+       powerpc)
+             # see comment about AmigaOS4 .so support
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+         ;;
+       m68k)
+             # FIXME: we need at least 68020 code to build shared libraries, but
+             # adding the `-m68020' flag to GCC prevents building anything better,
+             # like `-m68040'.
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+         ;;
+       esac
+       ;;
+ 
+     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+ 
+     mingw* | cygwin* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       # Although the cygwin gcc ignores -fPIC, still need this for old-style
+       # (--disable-auto-import) libraries
+       m4_if([$1], [GCJ], [],
+ 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+       ;;
+ 
+     darwin* | rhapsody*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+       ;;
+ 
+     haiku*)
+       # PIC is the default for Haiku.
+       # The "-static" flag exists, but is broken.
+       _LT_TAGVAR(lt_prog_compiler_static, $1)=
+       ;;
+ 
+     hpux*)
+       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+       # sets the default TLS model and affects inlining.
+       case $host_cpu in
+       hppa*64*)
+ 	# +Z the default
+ 	;;
+       *)
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ 	;;
+       esac
+       ;;
+ 
+     interix[[3-9]]*)
+       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+ 
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+       enable_shared=no
+       ;;
+ 
+     *nto* | *qnx*)
+       # QNX uses GNU C++, but need to define -shared option too, otherwise
+       # it will coredump.
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+       ;;
+ 
+     sysv4*MP*)
+       if test -d /usr/nec; then
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+       fi
+       ;;
+ 
+     *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+     esac
+ 
+     case $cc_basename in
+     nvcc*) # Cuda Compiler Driver 2.2
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+       fi
+       ;;
+     esac
+   else
+     # PORTME Check for flag to pass linker flags through the system compiler.
+     case $host_os in
+     aix*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       if test "$host_cpu" = ia64; then
+ 	# AIX 5 now supports IA64 processor
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       else
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+ 
+     mingw* | cygwin* | pw32* | os2* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       m4_if([$1], [GCJ], [],
+ 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+       ;;
+ 
+     hpux9* | hpux10* | hpux11*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+ 	# +Z the default
+ 	;;
+       *)
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ 	;;
+       esac
+       # Is there a better lt_prog_compiler_static that works with the bundled CC?
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+       ;;
+ 
+     irix5* | irix6* | nonstopux*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       # PIC (with -KPIC) is the default.
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+       ;;
+ 
+     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+       case $cc_basename in
+       # old Intel for x86_64 which still supported -KPIC.
+       ecc*)
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+         ;;
+       # icc used to be incompatible with GCC.
+       # ICC 10 doesn't accept -KPIC any more.
+       icc* | ifort*)
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+         ;;
+       # Lahey Fortran 8.1.
+       lf95*)
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ 	;;
+       nagfor*)
+ 	# NAG Fortran compiler
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	;;
+       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+         # Portland Group compilers (*not* the Pentium gcc compiler,
+ 	# which looks to be a dead project)
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         ;;
+       ccc*)
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         # All Alpha code is PIC.
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+         ;;
+       xl* | bgxl* | bgf* | mpixl*)
+ 	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ 	;;
+       *)
+ 	case `$CC -V 2>&1 | sed 5q` in
+ 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+ 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ 	  ;;
+ 	*Sun\ F* | *Sun*Fortran*)
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ 	  ;;
+ 	*Sun\ C*)
+ 	  # Sun C 5.9
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	  ;;
+         *Intel*\ [[CF]]*Compiler*)
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ 	  ;;
+ 	*Portland\ Group*)
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	  ;;
+ 	esac
+ 	;;
+       esac
+       ;;
+ 
+     newsos6)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+ 
+     *nto* | *qnx*)
+       # QNX uses GNU C++, but need to define -shared option too, otherwise
+       # it will coredump.
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+       ;;
+ 
+     osf3* | osf4* | osf5*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       # All OSF/1 code is PIC.
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+       ;;
+ 
+     rdos*)
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+       ;;
+ 
+     solaris*)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       case $cc_basename in
+       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+       *)
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+       esac
+       ;;
+ 
+     sunos4*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+ 
+     sysv4 | sysv4.2uw2* | sysv4.3*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+ 
+     sysv4*MP*)
+       if test -d /usr/nec ;then
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       fi
+       ;;
+ 
+     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+ 
+     unicos*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+       ;;
+ 
+     uts4*)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+ 
+     *)
+       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+       ;;
+     esac
+   fi
+ ])
+ case $host_os in
+   # For platforms which do not support PIC, -DPIC is meaningless:
+   *djgpp*)
+     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     ;;
+   *)
+     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+     ;;
+ esac
+ 
+ AC_CACHE_CHECK([for $compiler option to produce PIC],
+   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+ 
+ #
+ # Check to make sure the PIC flag actually works.
+ #
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+      "" | " "*) ;;
+      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+      esac],
+     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+ fi
+ _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ 	[Additional compiler flags for building library objects])
+ 
+ _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ 	[How to pass a linker flag through the compiler])
+ #
+ # Check to make sure the static flag actually works.
+ #
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+ _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+   $lt_tmp_static_flag,
+   [],
+   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ 	[Compiler flag to prevent dynamic linking])
+ ])# _LT_COMPILER_PIC
+ 
+ 
+ # _LT_LINKER_SHLIBS([TAGNAME])
+ # ----------------------------
+ # See if the linker supports building shared libraries.
+ m4_defun([_LT_LINKER_SHLIBS],
+ [AC_REQUIRE([LT_PATH_LD])dnl
+ AC_REQUIRE([LT_PATH_NM])dnl
+ m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ m4_require([_LT_DECL_EGREP])dnl
+ m4_require([_LT_DECL_SED])dnl
+ m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+ m4_require([_LT_TAG_COMPILER])dnl
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ m4_if([$1], [CXX], [
+   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+   case $host_os in
+   aix[[4-9]]*)
+     # If we're using GNU nm, then we don't want the "-C" option.
+     # -C means demangle to AIX nm, but means don't demangle with GNU nm
+     # Also, AIX nm treats weak defined symbols like other global defined
+     # symbols, whereas GNU nm marks them as "W".
+     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+     else
+       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+     fi
+     ;;
+   pw32*)
+     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+     ;;
+   cygwin* | mingw* | cegcc*)
+     case $cc_basename in
+     cl*)
+       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+       ;;
+     *)
+       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+       ;;
+     esac
+     ;;
+   linux* | k*bsd*-gnu | gnu*)
+     _LT_TAGVAR(link_all_deplibs, $1)=no
+     ;;
+   *)
+     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+     ;;
+   esac
+ ], [
+   runpath_var=
+   _LT_TAGVAR(allow_undefined_flag, $1)=
+   _LT_TAGVAR(always_export_symbols, $1)=no
+   _LT_TAGVAR(archive_cmds, $1)=
+   _LT_TAGVAR(archive_expsym_cmds, $1)=
+   _LT_TAGVAR(compiler_needs_object, $1)=no
+   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   _LT_TAGVAR(hardcode_automatic, $1)=no
+   _LT_TAGVAR(hardcode_direct, $1)=no
+   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+   _LT_TAGVAR(hardcode_libdir_separator, $1)=
+   _LT_TAGVAR(hardcode_minus_L, $1)=no
+   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+   _LT_TAGVAR(inherit_rpath, $1)=no
+   _LT_TAGVAR(link_all_deplibs, $1)=unknown
+   _LT_TAGVAR(module_cmds, $1)=
+   _LT_TAGVAR(module_expsym_cmds, $1)=
+   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+   _LT_TAGVAR(thread_safe_flag_spec, $1)=
+   _LT_TAGVAR(whole_archive_flag_spec, $1)=
+   # include_expsyms should be a list of space-separated symbols to be *always*
+   # included in the symbol list
+   _LT_TAGVAR(include_expsyms, $1)=
+   # exclude_expsyms can be an extended regexp of symbols to exclude
+   # it will be wrapped by ` (' and `)$', so one must not match beginning or
+   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+   # as well as any symbol that contains `d'.
+   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+   # platforms (ab)use it in PIC code, but their linkers get confused if
+   # the symbol is explicitly referenced.  Since portable code cannot
+   # rely on this symbol name, it's probably fine to never include it in
+   # preloaded symbol tables.
+   # Exclude shared library initialization/finalization symbols.
+ dnl Note also adjust exclude_expsyms for C++ above.
+   extract_expsyms_cmds=
+ 
+   case $host_os in
+   cygwin* | mingw* | pw32* | cegcc*)
+     # FIXME: the MSVC++ port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++.
+     if test "$GCC" != yes; then
+       with_gnu_ld=no
+     fi
+     ;;
+   interix*)
+     # we just hope/assume this is gcc and not c89 (= MSVC++)
+     with_gnu_ld=yes
+     ;;
+   openbsd*)
+     with_gnu_ld=no
+     ;;
+   linux* | k*bsd*-gnu | gnu*)
+     _LT_TAGVAR(link_all_deplibs, $1)=no
+     ;;
+   esac
+ 
+   _LT_TAGVAR(ld_shlibs, $1)=yes
+ 
+   # On some targets, GNU ld is compatible enough with the native linker
+   # that we're better off using the native interface for both.
+   lt_use_gnu_ld_interface=no
+   if test "$with_gnu_ld" = yes; then
+     case $host_os in
+       aix*)
+ 	# The AIX port of GNU ld has always aspired to compatibility
+ 	# with the native linker.  However, as the warning in the GNU ld
+ 	# block says, versions before 2.19.5* couldn't really create working
+ 	# shared libraries, regardless of the interface used.
+ 	case `$LD -v 2>&1` in
+ 	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ 	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ 	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ 	  *)
+ 	    lt_use_gnu_ld_interface=yes
+ 	    ;;
+ 	esac
+ 	;;
+       *)
+ 	lt_use_gnu_ld_interface=yes
+ 	;;
+     esac
+   fi
+ 
+   if test "$lt_use_gnu_ld_interface" = yes; then
+     # If archive_cmds runs LD, not CC, wlarc should be empty
+     wlarc='${wl}'
+ 
+     # Set some defaults for GNU ld with shared library support. These
+     # are reset later if shared libraries are not supported. Putting them
+     # here allows them to be overridden if necessary.
+     runpath_var=LD_RUN_PATH
+     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+     # ancient GNU ld didn't support --whole-archive et. al.
+     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+     else
+       _LT_TAGVAR(whole_archive_flag_spec, $1)=
+     fi
+     supports_anon_versioning=no
+     case `$LD -v 2>&1` in
+       *GNU\ gold*) supports_anon_versioning=yes ;;
+       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+       *\ 2.11.*) ;; # other 2.11 versions
+       *) supports_anon_versioning=yes ;;
+     esac
+ 
+     # See if GNU ld supports shared libraries.
+     case $host_os in
+     aix[[3-9]]*)
+       # On AIX/PPC, the GNU linker is very broken
+       if test "$host_cpu" != ia64; then
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+ 	cat <<_LT_EOF 1>&2
+ 
+ *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils
+ *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+ *** You will then need to restart the configuration process.
+ 
+ _LT_EOF
+       fi
+       ;;
+ 
+     amigaos*)
+       case $host_cpu in
+       powerpc)
+             # see comment about AmigaOS4 .so support
+             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+             _LT_TAGVAR(archive_expsym_cmds, $1)=''
+         ;;
+       m68k)
+             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+             _LT_TAGVAR(hardcode_minus_L, $1)=yes
+         ;;
+       esac
+       ;;
+ 
+     beos*)
+       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+ 	# support --undefined.  This deserves some investigation.  FIXME
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       else
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+ 
+     cygwin* | mingw* | pw32* | cegcc*)
+       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+       # as there is no search path for DLLs.
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       _LT_TAGVAR(always_export_symbols, $1)=no
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ 
+       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ 	# If the export-symbols file already is a .def file (1st line
+ 	# is EXPORTS), use it as is; otherwise, prepend...
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ 	  cp $export_symbols $output_objdir/$soname.def;
+ 	else
+ 	  echo EXPORTS > $output_objdir/$soname.def;
+ 	  cat $export_symbols >> $output_objdir/$soname.def;
+ 	fi~
+ 	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       else
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+ 
+     haiku*)
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+ 
+     interix[[3-9]]*)
+       _LT_TAGVAR(hardcode_direct, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+       # Instead, shared libraries are loaded at an image base (0x10000000 by
+       # default) and relocated if they conflict, which is a slow very memory
+       # consuming and fragmenting process.  To avoid this, we pick a random,
+       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       ;;
+ 
+     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+       tmp_diet=no
+       if test "$host_os" = linux-dietlibc; then
+ 	case $cc_basename in
+ 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+ 	esac
+       fi
+       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ 	 && test "$tmp_diet" = no
+       then
+ 	tmp_addflag=' $pic_flag'
+ 	tmp_sharedflag='-shared'
+ 	case $cc_basename,$host_cpu in
+         pgcc*)				# Portland Group C compiler
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ 	  tmp_addflag=' $pic_flag'
+ 	  ;;
+ 	pgf77* | pgf90* | pgf95* | pgfortran*)
+ 					# Portland Group f77 and f90 compilers
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ 	  tmp_addflag=' $pic_flag -Mnomain' ;;
+ 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+ 	  tmp_addflag=' -i_dynamic' ;;
+ 	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+ 	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+ 	ifc* | ifort*)			# Intel Fortran compiler
+ 	  tmp_addflag=' -nofor_main' ;;
+ 	lf95*)				# Lahey Fortran 8.1
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ 	  tmp_sharedflag='--shared' ;;
+ 	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ 	  tmp_sharedflag='-qmkshrobj'
+ 	  tmp_addflag= ;;
+ 	nvcc*)	# Cuda Compiler Driver 2.2
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+ 	  ;;
+ 	esac
+ 	case `$CC -V 2>&1 | sed 5q` in
+ 	*Sun\ C*)			# Sun C 5.9
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+ 	  tmp_sharedflag='-G' ;;
+ 	*Sun\ F*)			# Sun Fortran 8.3
+ 	  tmp_sharedflag='-G' ;;
+ 	esac
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 
+         if test "x$supports_anon_versioning" = xyes; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ 	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ 	    echo "local: *; };" >> $output_objdir/$libname.ver~
+ 	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+         fi
+ 
+ 	case $cc_basename in
+ 	xlf* | bgf* | bgxlf* | mpixlf*)
+ 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ 	  if test "x$supports_anon_versioning" = xyes; then
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ 	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ 	      echo "local: *; };" >> $output_objdir/$libname.ver~
+ 	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ 	  fi
+ 	  ;;
+ 	esac
+       else
+         _LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+ 
+     netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ 	wlarc=
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       fi
+       ;;
+ 
+     solaris*)
+       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+ 	cat <<_LT_EOF 1>&2
+ 
+ *** Warning: The releases 2.8.* of the GNU linker cannot reliably
+ *** create shared libraries on Solaris systems.  Therefore, libtool
+ *** is disabling shared libraries support.  We urge you to upgrade GNU
+ *** binutils to release 2.9.1 or newer.  Another option is to modify
+ *** your PATH or compiler configuration so that the native linker is
+ *** used, and then restart.
+ 
+ _LT_EOF
+       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+ 
+     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+       case `$LD -v 2>&1` in
+         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+ 	cat <<_LT_EOF 1>&2
+ 
+ *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+ *** reliably create shared libraries on SCO systems.  Therefore, libtool
+ *** is disabling shared libraries support.  We urge you to upgrade GNU
+ *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+ *** your PATH or compiler configuration so that the native linker is
+ *** used, and then restart.
+ 
+ _LT_EOF
+ 	;;
+ 	*)
+ 	  # For security reasons, it is highly recommended that you always
+ 	  # use absolute paths for naming shared libraries, and exclude the
+ 	  # DT_RUNPATH tag from executables and libraries.  But doing so
+ 	  # requires that you compile everything twice, which is a pain.
+ 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ 	  else
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	  fi
+ 	;;
+       esac
+       ;;
+ 
+     sunos4*)
+       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+       wlarc=
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     *)
+       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+     esac
+ 
+     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+       runpath_var=
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+       _LT_TAGVAR(whole_archive_flag_spec, $1)=
+     fi
+   else
+     # PORTME fill in a description of your system's linker (not GNU ld)
+     case $host_os in
+     aix3*)
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       _LT_TAGVAR(always_export_symbols, $1)=yes
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+       # Note: this linker hardcodes the directories in LIBPATH if there
+       # are no directories specified by -L.
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ 	# Neither direct hardcoding nor static linking is supported with a
+ 	# broken collect2.
+ 	_LT_TAGVAR(hardcode_direct, $1)=unsupported
+       fi
+       ;;
+ 
+     aix[[4-9]]*)
+       if test "$host_cpu" = ia64; then
+ 	# On IA64, the linker does run time linking by default, so we don't
+ 	# have to do anything special.
+ 	aix_use_runtimelinking=no
+ 	exp_sym_flag='-Bexport'
+ 	no_entry_flag=""
+       else
+ 	# If we're using GNU nm, then we don't want the "-C" option.
+ 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+ 	# Also, AIX nm treats weak defined symbols like other global
+ 	# defined symbols, whereas GNU nm marks them as "W".
+ 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ 	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ 	else
+ 	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ 	fi
+ 	aix_use_runtimelinking=no
+ 
+ 	# Test if we are trying to use run time linking or normal
+ 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ 	# need to do runtime linking.
+ 	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ 	  for ld_flag in $LDFLAGS; do
+ 	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ 	    aix_use_runtimelinking=yes
+ 	    break
+ 	  fi
+ 	  done
+ 	  ;;
+ 	esac
+ 
+ 	exp_sym_flag='-bexport'
+ 	no_entry_flag='-bnoentry'
+       fi
+ 
+       # When large executables or shared objects are built, AIX ld can
+       # have problems creating the table of contents.  If linking a library
+       # or program results in "error TOC overflow" add -mminimal-toc to
+       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+ 
+       _LT_TAGVAR(archive_cmds, $1)=''
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+ 
+       if test "$GCC" = yes; then
+ 	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ 	# We only want to do this on AIX 4.2 and lower, the check
+ 	# below for broken collect2 doesn't work under 4.3+
+ 	  collect2name=`${CC} -print-prog-name=collect2`
+ 	  if test -f "$collect2name" &&
+ 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ 	  then
+ 	  # We have reworked collect2
+ 	  :
+ 	  else
+ 	  # We have old collect2
+ 	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ 	  # It fails to find uninstalled libraries when the uninstalled
+ 	  # path is not listed in the libpath.  Setting hardcode_minus_L
+ 	  # to unsupported forces relinking
+ 	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ 	  fi
+ 	  ;;
+ 	esac
+ 	shared_flag='-shared'
+ 	if test "$aix_use_runtimelinking" = yes; then
+ 	  shared_flag="$shared_flag "'${wl}-G'
+ 	fi
+ 	_LT_TAGVAR(link_all_deplibs, $1)=no
+       else
+ 	# not using gcc
+ 	if test "$host_cpu" = ia64; then
+ 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ 	# chokes on -Wl,-G. The following line is correct:
+ 	  shared_flag='-G'
+ 	else
+ 	  if test "$aix_use_runtimelinking" = yes; then
+ 	    shared_flag='${wl}-G'
+ 	  else
+ 	    shared_flag='${wl}-bM:SRE'
+ 	  fi
+ 	fi
+       fi
+ 
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+       # It seems that -bexpall does not export symbols beginning with
+       # underscore (_), so it is better to generate a list of symbols to export.
+       _LT_TAGVAR(always_export_symbols, $1)=yes
+       if test "$aix_use_runtimelinking" = yes; then
+ 	# Warning - without using the other runtime loading flags (-brtl),
+ 	# -berok will link without error, but may produce a broken library.
+ 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+         # Determine the default libpath from the value encoded in an
+         # empty executable.
+         _LT_SYS_MODULE_PATH_AIX([$1])
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+ 	if test "$host_cpu" = ia64; then
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ 	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ 	else
+ 	 # Determine the default libpath from the value encoded in an
+ 	 # empty executable.
+ 	 _LT_SYS_MODULE_PATH_AIX([$1])
+ 	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ 	  # Warning - without using the other run time loading flags,
+ 	  # -berok will link without error, but may produce a broken library.
+ 	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ 	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ 	  if test "$with_gnu_ld" = yes; then
+ 	    # We only use this code for GNU lds that support --whole-archive.
+ 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ 	  else
+ 	    # Exported symbols can be pulled into shared objects from archives
+ 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ 	  fi
+ 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ 	  # This is similar to how AIX traditionally builds its shared libraries.
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ 	fi
+       fi
+       ;;
+ 
+     amigaos*)
+       case $host_cpu in
+       powerpc)
+             # see comment about AmigaOS4 .so support
+             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+             _LT_TAGVAR(archive_expsym_cmds, $1)=''
+         ;;
+       m68k)
+             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+             _LT_TAGVAR(hardcode_minus_L, $1)=yes
+         ;;
+       esac
+       ;;
+ 
+     bsdi[[45]]*)
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+       ;;
+ 
+     cygwin* | mingw* | pw32* | cegcc*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+       # no search path for DLLs.
+       case $cc_basename in
+       cl*)
+ 	# Native MSVC
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ 	_LT_TAGVAR(always_export_symbols, $1)=yes
+ 	_LT_TAGVAR(file_list_spec, $1)='@'
+ 	# Tell ltmain to make .lib files, not .a files.
+ 	libext=lib
+ 	# Tell ltmain to make .dll files, not .so files.
+ 	shrext_cmds=".dll"
+ 	# FIXME: Setting linknames here is a bad hack.
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ 	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ 	  else
+ 	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ 	  fi~
+ 	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ 	  linknames='
+ 	# The linker will not automatically build a static lib if we build a DLL.
+ 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ 	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ 	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ 	# Don't use ranlib
+ 	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ 	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ 	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+ 	  case $lt_outputfile in
+ 	    *.exe|*.EXE) ;;
+ 	    *)
+ 	      lt_outputfile="$lt_outputfile.exe"
+ 	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+ 	      ;;
+ 	  esac~
+ 	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ 	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ 	    $RM "$lt_outputfile.manifest";
+ 	  fi'
+ 	;;
+       *)
+ 	# Assume MSVC wrapper
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ 	# Tell ltmain to make .lib files, not .a files.
+ 	libext=lib
+ 	# Tell ltmain to make .dll files, not .so files.
+ 	shrext_cmds=".dll"
+ 	# FIXME: Setting linknames here is a bad hack.
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ 	# The linker will automatically build a .lib file if we build a DLL.
+ 	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ 	# FIXME: Should let the user specify the lib program.
+ 	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ 	;;
+       esac
+       ;;
+ 
+     darwin* | rhapsody*)
+       _LT_DARWIN_LINKER_FEATURES($1)
+       ;;
+ 
+     dgux*)
+       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+     # support.  Future versions do this automatically, but an explicit c++rt0.o
+     # does not break anything, and helps significantly (at the cost of a little
+     # extra space).
+     freebsd2.2*)
+       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+     freebsd2.*)
+       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+     freebsd* | dragonfly*)
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     hpux9*)
+       if test "$GCC" = yes; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       fi
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+ 
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       ;;
+ 
+     hpux10*)
+       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+       fi
+       if test "$with_gnu_ld" = no; then
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ 	_LT_TAGVAR(hardcode_direct, $1)=yes
+ 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ 	# hardcode_minus_L: Not really in the search PATH,
+ 	# but as the default location of the library.
+ 	_LT_TAGVAR(hardcode_minus_L, $1)=yes
+       fi
+       ;;
+ 
+     hpux11*)
+       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ 	case $host_cpu in
+ 	hppa*64*)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	ia64*)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	*)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	esac
+       else
+ 	case $host_cpu in
+ 	hppa*64*)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	ia64*)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	*)
+ 	m4_if($1, [], [
+ 	  # Older versions of the 11.00 compiler do not understand -b yet
+ 	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ 	  _LT_LINKER_OPTION([if $CC understands -b],
+ 	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ 	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ 	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ 	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ 	  ;;
+ 	esac
+       fi
+       if test "$with_gnu_ld" = no; then
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ 
+ 	case $host_cpu in
+ 	hppa*64*|ia64*)
+ 	  _LT_TAGVAR(hardcode_direct, $1)=no
+ 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	  ;;
+ 	*)
+ 	  _LT_TAGVAR(hardcode_direct, $1)=yes
+ 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ 	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ 
+ 	  # hardcode_minus_L: Not really in the search PATH,
+ 	  # but as the default location of the library.
+ 	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ 	  ;;
+ 	esac
+       fi
+       ;;
+ 
+     irix5* | irix6* | nonstopux*)
+       if test "$GCC" = yes; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 	# Try to use the -exported_symbol ld option, if it does not
+ 	# work, assume that -exports_file does not work either and
+ 	# implicitly export all symbols.
+ 	# This should be the same for all languages, so no per-tag cache variable.
+ 	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ 	  [lt_cv_irix_exported_symbol],
+ 	  [save_LDFLAGS="$LDFLAGS"
+ 	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ 	   AC_LINK_IFELSE(
+ 	     [AC_LANG_SOURCE(
+ 	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ 			      [C++], [[int foo (void) { return 0; }]],
+ 			      [Fortran 77], [[
+       subroutine foo
+       end]],
+ 			      [Fortran], [[
+       subroutine foo
+       end]])])],
+ 	      [lt_cv_irix_exported_symbol=yes],
+ 	      [lt_cv_irix_exported_symbol=no])
+            LDFLAGS="$save_LDFLAGS"])
+ 	if test "$lt_cv_irix_exported_symbol" = yes; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ 	fi
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+       fi
+       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+       _LT_TAGVAR(inherit_rpath, $1)=yes
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+ 
+     netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+       fi
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     newsos6)
+       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     *nto* | *qnx*)
+       ;;
+ 
+     openbsd*)
+       if test -f /usr/libexec/ld.so; then
+ 	_LT_TAGVAR(hardcode_direct, $1)=yes
+ 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ 	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ 	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ 	else
+ 	  case $host_os in
+ 	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ 	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ 	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ 	     ;;
+ 	   *)
+ 	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ 	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ 	     ;;
+ 	  esac
+ 	fi
+       else
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+ 
+     os2*)
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+       ;;
+ 
+     osf3*)
+       if test "$GCC" = yes; then
+ 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       else
+ 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       fi
+       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+       ;;
+ 
+     osf4* | osf5*)	# as osf3* with the addition of -msym flag
+       if test "$GCC" = yes; then
+ 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+       else
+ 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ 	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+ 
+ 	# Both c and cxx compiler support -rpath directly
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+       fi
+       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+       ;;
+ 
+     solaris*)
+       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+       if test "$GCC" = yes; then
+ 	wlarc='${wl}'
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ 	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+       else
+ 	case `$CC -V 2>&1` in
+ 	*"Compilers 5.0"*)
+ 	  wlarc=''
+ 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ 	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ 	  ;;
+ 	*)
+ 	  wlarc='${wl}'
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ 	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ 	  ;;
+ 	esac
+       fi
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       case $host_os in
+       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+       *)
+ 	# The compiler driver will combine and reorder linker options,
+ 	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+ 	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+ 	if test "$GCC" = yes; then
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ 	else
+ 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ 	fi
+ 	;;
+       esac
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+ 
+     sunos4*)
+       if test "x$host_vendor" = xsequent; then
+ 	# Use $CC to link under sequent, because it throws in some extra .o
+ 	# files that make .init and .fini sections work.
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+       fi
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     sysv4)
+       case $host_vendor in
+ 	sni)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ 	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ 	;;
+ 	siemens)
+ 	  ## LD is ld it makes a PLAMLIB
+ 	  ## CC just makes a GrossModule.
+ 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ 	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ 	  _LT_TAGVAR(hardcode_direct, $1)=no
+         ;;
+ 	motorola)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ 	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ 	;;
+       esac
+       runpath_var='LD_RUN_PATH'
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     sysv4.3*)
+       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+       ;;
+ 
+     sysv4*MP*)
+       if test -d /usr/nec; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	runpath_var=LD_RUN_PATH
+ 	hardcode_runpath_var=yes
+ 	_LT_TAGVAR(ld_shlibs, $1)=yes
+       fi
+       ;;
+ 
+     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       runpath_var='LD_RUN_PATH'
+ 
+       if test "$GCC" = yes; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       fi
+       ;;
+ 
+     sysv5* | sco3.2v5* | sco5v6*)
+       # Note: We can NOT use -z defs as we might desire, because we do not
+       # link with -lc, and that would cause any symbols used from libc to
+       # always be unresolved, which means just about no library would
+       # ever link correctly.  If we're not using GNU ld we use -z text
+       # though, which does catch some bad symbols but isn't as heavy-handed
+       # as -z defs.
+       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+       runpath_var='LD_RUN_PATH'
+ 
+       if test "$GCC" = yes; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       else
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       fi
+       ;;
+ 
+     uts4*)
+       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+ 
+     *)
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       ;;
+     esac
+ 
+     if test x$host_vendor = xsni; then
+       case $host in
+       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ 	;;
+       esac
+     fi
+   fi
+ ])
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+ 
+ _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+ 
+ _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+ _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+ _LT_DECL([], [extract_expsyms_cmds], [2],
+     [The commands to extract the exported symbol list from a shared archive])
+ 
+ #
+ # Do we need to explicitly link libc?
+ #
+ case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+ x|xyes)
+   # Assume -lc should be added
+   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ 
+   if test "$enable_shared" = yes && test "$GCC" = yes; then
+     case $_LT_TAGVAR(archive_cmds, $1) in
+     *'~'*)
+       # FIXME: we may have to deal with multi-command sequences.
+       ;;
+     '$CC '*)
+       # Test whether the compiler implicitly links with -lc since on some
+       # systems, -lgcc has to come before -lc. If gcc already passes -lc
+       # to ld, don't add -lc before -lgcc.
+       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ 	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ 	[$RM conftest*
+ 	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ 
+ 	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ 	  soname=conftest
+ 	  lib=conftest
+ 	  libobjs=conftest.$ac_objext
+ 	  deplibs=
+ 	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ 	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ 	  compiler_flags=-v
+ 	  linker_flags=-v
+ 	  verstring=
+ 	  output_objdir=.
+ 	  libname=conftest
+ 	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ 	  _LT_TAGVAR(allow_undefined_flag, $1)=
+ 	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ 	  then
+ 	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ 	  else
+ 	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ 	  fi
+ 	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ 	else
+ 	  cat conftest.err 1>&5
+ 	fi
+ 	$RM conftest*
+ 	])
+       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+       ;;
+     esac
+   fi
+   ;;
+ esac
+ 
+ _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+     [Whether or not to add -lc for building shared libraries])
+ _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+     [enable_shared_with_static_runtimes], [0],
+     [Whether or not to disallow shared libs when runtime libs are static])
+ _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+     [Compiler flag to allow reflexive dlopens])
+ _LT_TAGDECL([], [whole_archive_flag_spec], [1],
+     [Compiler flag to generate shared objects directly from archives])
+ _LT_TAGDECL([], [compiler_needs_object], [1],
+     [Whether the compiler copes with passing no objects directly])
+ _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+     [Create an old-style archive from a shared archive])
+ _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+     [Create a temporary old-style archive to link instead of a shared archive])
+ _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+ _LT_TAGDECL([], [archive_expsym_cmds], [2])
+ _LT_TAGDECL([], [module_cmds], [2],
+     [Commands used to build a loadable module if different from building
+     a shared archive.])
+ _LT_TAGDECL([], [module_expsym_cmds], [2])
+ _LT_TAGDECL([], [with_gnu_ld], [1],
+     [Whether we are building with GNU ld or not])
+ _LT_TAGDECL([], [allow_undefined_flag], [1],
+     [Flag that allows shared libraries with undefined symbols to be built])
+ _LT_TAGDECL([], [no_undefined_flag], [1],
+     [Flag that enforces no undefined symbols])
+ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+     [Flag to hardcode $libdir into a binary during linking.
+     This must work even if $libdir does not exist])
+ _LT_TAGDECL([], [hardcode_libdir_separator], [1],
+     [Whether we need a single "-rpath" flag with a separated argument])
+ _LT_TAGDECL([], [hardcode_direct], [0],
+     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+     DIR into the resulting binary])
+ _LT_TAGDECL([], [hardcode_direct_absolute], [0],
+     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+     DIR into the resulting binary and the resulting library dependency is
+     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+     library is relocated])
+ _LT_TAGDECL([], [hardcode_minus_L], [0],
+     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+     into the resulting binary])
+ _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+     into the resulting binary])
+ _LT_TAGDECL([], [hardcode_automatic], [0],
+     [Set to "yes" if building a shared library automatically hardcodes DIR
+     into the library and all subsequent libraries and executables linked
+     against it])
+ _LT_TAGDECL([], [inherit_rpath], [0],
+     [Set to yes if linker adds runtime paths of dependent libraries
+     to runtime path list])
+ _LT_TAGDECL([], [link_all_deplibs], [0],
+     [Whether libtool must link a program against all its dependency libraries])
+ _LT_TAGDECL([], [always_export_symbols], [0],
+     [Set to "yes" if exported symbols are required])
+ _LT_TAGDECL([], [export_symbols_cmds], [2],
+     [The commands to list exported symbols])
+ _LT_TAGDECL([], [exclude_expsyms], [1],
+     [Symbols that should not be listed in the preloaded symbols])
+ _LT_TAGDECL([], [include_expsyms], [1],
+     [Symbols that must always be exported])
+ _LT_TAGDECL([], [prelink_cmds], [2],
+     [Commands necessary for linking programs (against libraries) with templates])
+ _LT_TAGDECL([], [postlink_cmds], [2],
+     [Commands necessary for finishing linking programs])
+ _LT_TAGDECL([], [file_list_spec], [1],
+     [Specify filename containing input files])
+ dnl FIXME: Not yet implemented
+ dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+ dnl    [Compiler flag to generate thread safe objects])
+ ])# _LT_LINKER_SHLIBS
+ 
+ 
+ # _LT_LANG_C_CONFIG([TAG])
+ # ------------------------
+ # Ensure that the configuration variables for a C compiler are suitably
+ # defined.  These variables are subsequently used by _LT_CONFIG to write
+ # the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_C_CONFIG],
+ [m4_require([_LT_DECL_EGREP])dnl
+ lt_save_CC="$CC"
+ AC_LANG_PUSH(C)
+ 
+ # Source file extension for C test sources.
+ ac_ext=c
+ 
+ # Object file extension for compiled C test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+ 
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(){return(0);}'
+ 
+ _LT_TAG_COMPILER
+ # Save the default compiler, since it gets overwritten when the other
+ # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+ compiler_DEFAULT=$CC
+ 
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+ 
+ if test -n "$compiler"; then
+   _LT_COMPILER_NO_RTTI($1)
+   _LT_COMPILER_PIC($1)
+   _LT_COMPILER_C_O($1)
+   _LT_COMPILER_FILE_LOCKS($1)
+   _LT_LINKER_SHLIBS($1)
+   _LT_SYS_DYNAMIC_LINKER($1)
+   _LT_LINKER_HARDCODE_LIBPATH($1)
+   LT_SYS_DLOPEN_SELF
+   _LT_CMD_STRIPLIB
+ 
+   # Report which library types will actually be built
+   AC_MSG_CHECKING([if libtool supports shared libraries])
+   AC_MSG_RESULT([$can_build_shared])
+ 
+   AC_MSG_CHECKING([whether to build shared libraries])
+   test "$can_build_shared" = "no" && enable_shared=no
+ 
+   # On AIX, shared libraries and static libraries use the same namespace, and
+   # are all built from PIC.
+   case $host_os in
+   aix3*)
+     test "$enable_shared" = yes && enable_static=no
+     if test -n "$RANLIB"; then
+       archive_cmds="$archive_cmds~\$RANLIB \$lib"
+       postinstall_cmds='$RANLIB $lib'
+     fi
+     ;;
+ 
+   aix[[4-9]]*)
+     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+       test "$enable_shared" = yes && enable_static=no
+     fi
+     ;;
+   esac
+   AC_MSG_RESULT([$enable_shared])
+ 
+   AC_MSG_CHECKING([whether to build static libraries])
+   # Make sure either enable_shared or enable_static is yes.
+   test "$enable_shared" = yes || enable_static=yes
+   AC_MSG_RESULT([$enable_static])
+ 
+   _LT_CONFIG($1)
+ fi
+ AC_LANG_POP
+ CC="$lt_save_CC"
+ ])# _LT_LANG_C_CONFIG
+ 
+ 
+ # _LT_LANG_CXX_CONFIG([TAG])
+ # --------------------------
+ # Ensure that the configuration variables for a C++ compiler are suitably
+ # defined.  These variables are subsequently used by _LT_CONFIG to write
+ # the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_CXX_CONFIG],
+ [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ m4_require([_LT_DECL_EGREP])dnl
+ m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+     (test "X$CXX" != "Xg++"))) ; then
+   AC_PROG_CXXCPP
+ else
+   _lt_caught_CXX_error=yes
+ fi
+ 
+ AC_LANG_PUSH(C++)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+ _LT_TAGVAR(reload_flag, $1)=$reload_flag
+ _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+ _LT_TAGVAR(no_undefined_flag, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ 
+ # Source file extension for C++ test sources.
+ ac_ext=cpp
+ 
+ # Object file extension for compiled C++ test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # No sense in running all these tests if we already determined that
+ # the CXX compiler isn't working.  Some variables (like enable_shared)
+ # are currently assumed to apply to all compilers on this platform,
+ # and will be corrupted by setting them based on a non-working compiler.
+ if test "$_lt_caught_CXX_error" != yes; then
+   # Code to be used in simple compile tests
+   lt_simple_compile_test_code="int some_variable = 0;"
+ 
+   # Code to be used in simple link tests
+   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+ 
+   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+   _LT_TAG_COMPILER
+ 
+   # save warnings/boilerplate of simple test code
+   _LT_COMPILER_BOILERPLATE
+   _LT_LINKER_BOILERPLATE
+ 
+   # Allow CC to be a program name with arguments.
+   lt_save_CC=$CC
+   lt_save_CFLAGS=$CFLAGS
+   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++"}
+   CFLAGS=$CXXFLAGS
+   compiler=$CC
+   _LT_TAGVAR(compiler, $1)=$CC
+   _LT_CC_BASENAME([$compiler])
+ 
+   if test -n "$compiler"; then
+     # We don't want -fno-exception when compiling C++ code, so set the
+     # no_builtin_flag separately
+     if test "$GXX" = yes; then
+       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+     else
+       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+     fi
+ 
+     if test "$GXX" = yes; then
+       # Set up default GNU C++ configuration
+ 
+       LT_PATH_LD
+ 
+       # Check if GNU C++ uses GNU ld as the underlying linker, since the
+       # archiving commands below assume that GNU ld is being used.
+       if test "$with_gnu_ld" = yes; then
+         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ 
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ 
+         # If archive_cmds runs LD, not CC, wlarc should be empty
+         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+         #     investigate it a little bit more. (MM)
+         wlarc='${wl}'
+ 
+         # ancient GNU ld didn't support --whole-archive et. al.
+         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ 	  $GREP 'no-whole-archive' > /dev/null; then
+           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+         else
+           _LT_TAGVAR(whole_archive_flag_spec, $1)=
+         fi
+       else
+         with_gnu_ld=no
+         wlarc=
+ 
+         # A generic and very simple default shared library creation
+         # command for GNU C++ for the case where it uses the native
+         # linker, instead of GNU ld.  If possible, this setting should
+         # overridden to take advantage of the native linker features on
+         # the platform it is being used on.
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+       fi
+ 
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ 
+     else
+       GXX=no
+       with_gnu_ld=no
+       wlarc=
+     fi
+ 
+     # PORTME: fill in a description of your system's C++ link characteristics
+     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+     _LT_TAGVAR(ld_shlibs, $1)=yes
+     case $host_os in
+       aix3*)
+         # FIXME: insert proper C++ library support
+         _LT_TAGVAR(ld_shlibs, $1)=no
+         ;;
+       aix[[4-9]]*)
+         if test "$host_cpu" = ia64; then
+           # On IA64, the linker does run time linking by default, so we don't
+           # have to do anything special.
+           aix_use_runtimelinking=no
+           exp_sym_flag='-Bexport'
+           no_entry_flag=""
+         else
+           aix_use_runtimelinking=no
+ 
+           # Test if we are trying to use run time linking or normal
+           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+           # need to do runtime linking.
+           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ 	    for ld_flag in $LDFLAGS; do
+ 	      case $ld_flag in
+ 	      *-brtl*)
+ 	        aix_use_runtimelinking=yes
+ 	        break
+ 	        ;;
+ 	      esac
+ 	    done
+ 	    ;;
+           esac
+ 
+           exp_sym_flag='-bexport'
+           no_entry_flag='-bnoentry'
+         fi
+ 
+         # When large executables or shared objects are built, AIX ld can
+         # have problems creating the table of contents.  If linking a library
+         # or program results in "error TOC overflow" add -mminimal-toc to
+         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+ 
+         _LT_TAGVAR(archive_cmds, $1)=''
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+         _LT_TAGVAR(link_all_deplibs, $1)=yes
+         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+ 
+         if test "$GXX" = yes; then
+           case $host_os in aix4.[[012]]|aix4.[[012]].*)
+           # We only want to do this on AIX 4.2 and lower, the check
+           # below for broken collect2 doesn't work under 4.3+
+ 	  collect2name=`${CC} -print-prog-name=collect2`
+ 	  if test -f "$collect2name" &&
+ 	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ 	  then
+ 	    # We have reworked collect2
+ 	    :
+ 	  else
+ 	    # We have old collect2
+ 	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ 	    # It fails to find uninstalled libraries when the uninstalled
+ 	    # path is not listed in the libpath.  Setting hardcode_minus_L
+ 	    # to unsupported forces relinking
+ 	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ 	  fi
+           esac
+           shared_flag='-shared'
+ 	  if test "$aix_use_runtimelinking" = yes; then
+ 	    shared_flag="$shared_flag "'${wl}-G'
+ 	  fi
+         else
+           # not using gcc
+           if test "$host_cpu" = ia64; then
+ 	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ 	  # chokes on -Wl,-G. The following line is correct:
+ 	  shared_flag='-G'
+           else
+ 	    if test "$aix_use_runtimelinking" = yes; then
+ 	      shared_flag='${wl}-G'
+ 	    else
+ 	      shared_flag='${wl}-bM:SRE'
+ 	    fi
+           fi
+         fi
+ 
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+         # It seems that -bexpall does not export symbols beginning with
+         # underscore (_), so it is better to generate a list of symbols to
+ 	# export.
+         _LT_TAGVAR(always_export_symbols, $1)=yes
+         if test "$aix_use_runtimelinking" = yes; then
+           # Warning - without using the other runtime loading flags (-brtl),
+           # -berok will link without error, but may produce a broken library.
+           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+           # Determine the default libpath from the value encoded in an empty
+           # executable.
+           _LT_SYS_MODULE_PATH_AIX([$1])
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ 
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+         else
+           if test "$host_cpu" = ia64; then
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ 	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+           else
+ 	    # Determine the default libpath from the value encoded in an
+ 	    # empty executable.
+ 	    _LT_SYS_MODULE_PATH_AIX([$1])
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ 	    # Warning - without using the other run time loading flags,
+ 	    # -berok will link without error, but may produce a broken library.
+ 	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ 	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ 	    if test "$with_gnu_ld" = yes; then
+ 	      # We only use this code for GNU lds that support --whole-archive.
+ 	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ 	    else
+ 	      # Exported symbols can be pulled into shared objects from archives
+ 	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ 	    fi
+ 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ 	    # This is similar to how AIX traditionally builds its shared
+ 	    # libraries.
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+           fi
+         fi
+         ;;
+ 
+       beos*)
+ 	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ 	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+ 	  # support --undefined.  This deserves some investigation.  FIXME
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 	else
+ 	  _LT_TAGVAR(ld_shlibs, $1)=no
+ 	fi
+ 	;;
+ 
+       chorus*)
+         case $cc_basename in
+           *)
+ 	  # FIXME: insert proper C++ library support
+ 	  _LT_TAGVAR(ld_shlibs, $1)=no
+ 	  ;;
+         esac
+         ;;
+ 
+       cygwin* | mingw* | pw32* | cegcc*)
+ 	case $GXX,$cc_basename in
+ 	,cl* | no,cl*)
+ 	  # Native MSVC
+ 	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+ 	  # no search path for DLLs.
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ 	  _LT_TAGVAR(always_export_symbols, $1)=yes
+ 	  _LT_TAGVAR(file_list_spec, $1)='@'
+ 	  # Tell ltmain to make .lib files, not .a files.
+ 	  libext=lib
+ 	  # Tell ltmain to make .dll files, not .so files.
+ 	  shrext_cmds=".dll"
+ 	  # FIXME: Setting linknames here is a bad hack.
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ 	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ 	    else
+ 	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ 	    fi~
+ 	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ 	    linknames='
+ 	  # The linker will not automatically build a static lib if we build a DLL.
+ 	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ 	  # Don't use ranlib
+ 	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ 	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ 	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+ 	    case $lt_outputfile in
+ 	      *.exe|*.EXE) ;;
+ 	      *)
+ 		lt_outputfile="$lt_outputfile.exe"
+ 		lt_tool_outputfile="$lt_tool_outputfile.exe"
+ 		;;
+ 	    esac~
+ 	    func_to_tool_file "$lt_outputfile"~
+ 	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ 	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ 	      $RM "$lt_outputfile.manifest";
+ 	    fi'
+ 	  ;;
+ 	*)
+ 	  # g++
+ 	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ 	  # as there is no search path for DLLs.
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ 	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ 	  _LT_TAGVAR(always_export_symbols, $1)=no
+ 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ 
+ 	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ 	    # If the export-symbols file already is a .def file (1st line
+ 	    # is EXPORTS), use it as is; otherwise, prepend...
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ 	      cp $export_symbols $output_objdir/$soname.def;
+ 	    else
+ 	      echo EXPORTS > $output_objdir/$soname.def;
+ 	      cat $export_symbols >> $output_objdir/$soname.def;
+ 	    fi~
+ 	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ 	  else
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	  fi
+ 	  ;;
+ 	esac
+ 	;;
+       darwin* | rhapsody*)
+         _LT_DARWIN_LINKER_FEATURES($1)
+ 	;;
+ 
+       dgux*)
+         case $cc_basename in
+           ec++*)
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+           ghcx*)
+ 	    # Green Hills C++ Compiler
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+           *)
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+         esac
+         ;;
+ 
+       freebsd2.*)
+         # C++ shared libraries reported to be fairly broken before
+ 	# switch to ELF
+         _LT_TAGVAR(ld_shlibs, $1)=no
+         ;;
+ 
+       freebsd-elf*)
+         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+         ;;
+ 
+       freebsd* | dragonfly*)
+         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+         # conventions
+         _LT_TAGVAR(ld_shlibs, $1)=yes
+         ;;
+ 
+       haiku*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         _LT_TAGVAR(link_all_deplibs, $1)=yes
+         ;;
+ 
+       hpux9*)
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ 				             # but as the default
+ 				             # location of the library.
+ 
+         case $cc_basename in
+           CC*)
+             # FIXME: insert proper C++ library support
+             _LT_TAGVAR(ld_shlibs, $1)=no
+             ;;
+           aCC*)
+             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+             # Commands to make compiler produce verbose output that lists
+             # what "hidden" libraries, object files and flags are used when
+             # linking a shared library.
+             #
+             # There doesn't appear to be a way to prevent this compiler from
+             # explicitly linking system object files so we need to strip them
+             # from the output so that they don't get included in the library
+             # dependencies.
+             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+             ;;
+           *)
+             if test "$GXX" = yes; then
+               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+             else
+               # FIXME: insert proper C++ library support
+               _LT_TAGVAR(ld_shlibs, $1)=no
+             fi
+             ;;
+         esac
+         ;;
+ 
+       hpux10*|hpux11*)
+         if test $with_gnu_ld = no; then
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ 
+           case $host_cpu in
+             hppa*64*|ia64*)
+               ;;
+             *)
+ 	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+               ;;
+           esac
+         fi
+         case $host_cpu in
+           hppa*64*|ia64*)
+             _LT_TAGVAR(hardcode_direct, $1)=no
+             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+             ;;
+           *)
+             _LT_TAGVAR(hardcode_direct, $1)=yes
+             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ 					         # but as the default
+ 					         # location of the library.
+             ;;
+         esac
+ 
+         case $cc_basename in
+           CC*)
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+           aCC*)
+ 	    case $host_cpu in
+ 	      hppa*64*)
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	        ;;
+ 	      ia64*)
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	        ;;
+ 	      *)
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	        ;;
+ 	    esac
+ 	    # Commands to make compiler produce verbose output that lists
+ 	    # what "hidden" libraries, object files and flags are used when
+ 	    # linking a shared library.
+ 	    #
+ 	    # There doesn't appear to be a way to prevent this compiler from
+ 	    # explicitly linking system object files so we need to strip them
+ 	    # from the output so that they don't get included in the library
+ 	    # dependencies.
+ 	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ 	    ;;
+           *)
+ 	    if test "$GXX" = yes; then
+ 	      if test $with_gnu_ld = no; then
+ 	        case $host_cpu in
+ 	          hppa*64*)
+ 	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	            ;;
+ 	          ia64*)
+ 	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	            ;;
+ 	          *)
+ 	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	            ;;
+ 	        esac
+ 	      fi
+ 	    else
+ 	      # FIXME: insert proper C++ library support
+ 	      _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    fi
+ 	    ;;
+         esac
+         ;;
+ 
+       interix[[3-9]]*)
+ 	_LT_TAGVAR(hardcode_direct, $1)=no
+ 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ 	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ 	# Instead, shared libraries are loaded at an image base (0x10000000 by
+ 	# default) and relocated if they conflict, which is a slow very memory
+ 	# consuming and fragmenting process.  To avoid this, we pick a random,
+ 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+ 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ 	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ 	;;
+       irix5* | irix6*)
+         case $cc_basename in
+           CC*)
+ 	    # SGI C++
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ 
+ 	    # Archives containing C++ object files must be created using
+ 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+ 	    # necessary to make sure instantiated templates are included
+ 	    # in the archive.
+ 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ 	    ;;
+           *)
+ 	    if test "$GXX" = yes; then
+ 	      if test "$with_gnu_ld" = no; then
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 	      else
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ 	      fi
+ 	    fi
+ 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+ 	    ;;
+         esac
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+         _LT_TAGVAR(inherit_rpath, $1)=yes
+         ;;
+ 
+       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+         case $cc_basename in
+           KCC*)
+ 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+ 
+ 	    # KCC will only create a shared library if the output file
+ 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ 	    # to its proper name (with version) after linking.
+ 	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ 	    # Commands to make compiler produce verbose output that lists
+ 	    # what "hidden" libraries, object files and flags are used when
+ 	    # linking a shared library.
+ 	    #
+ 	    # There doesn't appear to be a way to prevent this compiler from
+ 	    # explicitly linking system object files so we need to strip them
+ 	    # from the output so that they don't get included in the library
+ 	    # dependencies.
+ 	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ 
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ 
+ 	    # Archives containing C++ object files must be created using
+ 	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ 	    ;;
+ 	  icpc* | ecpc* )
+ 	    # Intel C++
+ 	    with_gnu_ld=yes
+ 	    # version 8.0 and above of icpc choke on multiply defined symbols
+ 	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+ 	    # earlier do not add the objects themselves.
+ 	    case `$CC -V 2>&1` in
+ 	      *"Version 7."*)
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ 		;;
+ 	      *)  # Version 8.0 or newer
+ 	        tmp_idyn=
+ 	        case $host_cpu in
+ 		  ia64*) tmp_idyn=' -i_dynamic';;
+ 		esac
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ 		;;
+ 	    esac
+ 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ 	    ;;
+           pgCC* | pgcpp*)
+             # Portland Group C++ compiler
+ 	    case `$CC -V` in
+ 	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ 		rm -rf $tpldir~
+ 		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ 		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ 	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ 		rm -rf $tpldir~
+ 		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ 		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ 		$RANLIB $oldlib'
+ 	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ 		rm -rf $tpldir~
+ 		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ 		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ 	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ 		rm -rf $tpldir~
+ 		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ 		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ 	      ;;
+ 	    *) # Version 6 and above use weak symbols
+ 	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ 	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ 	      ;;
+ 	    esac
+ 
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+             ;;
+ 	  cxx*)
+ 	    # Compaq C++
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+ 
+ 	    runpath_var=LD_RUN_PATH
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ 
+ 	    # Commands to make compiler produce verbose output that lists
+ 	    # what "hidden" libraries, object files and flags are used when
+ 	    # linking a shared library.
+ 	    #
+ 	    # There doesn't appear to be a way to prevent this compiler from
+ 	    # explicitly linking system object files so we need to strip them
+ 	    # from the output so that they don't get included in the library
+ 	    # dependencies.
+ 	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
+ 	    ;;
+ 	  xl* | mpixl* | bgxl*)
+ 	    # IBM XL 8.0 on PPC, with GNU ld
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ 	    if test "x$supports_anon_versioning" = xyes; then
+ 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ 		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ 		echo "local: *; };" >> $output_objdir/$libname.ver~
+ 		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ 	    fi
+ 	    ;;
+ 	  *)
+ 	    case `$CC -V 2>&1 | sed 5q` in
+ 	    *Sun\ C*)
+ 	      # Sun C++ 5.9
+ 	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ 	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ 	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ 	      _LT_TAGVAR(compiler_needs_object, $1)=yes
+ 
+ 	      # Not sure whether something based on
+ 	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ 	      # would be better.
+ 	      output_verbose_link_cmd='func_echo_all'
+ 
+ 	      # Archives containing C++ object files must be created using
+ 	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+ 	      # necessary to make sure instantiated templates are included
+ 	      # in the archive.
+ 	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ 	      ;;
+ 	    esac
+ 	    ;;
+ 	esac
+ 	;;
+ 
+       lynxos*)
+         # FIXME: insert proper C++ library support
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+ 	;;
+ 
+       m88k*)
+         # FIXME: insert proper C++ library support
+         _LT_TAGVAR(ld_shlibs, $1)=no
+ 	;;
+ 
+       mvs*)
+         case $cc_basename in
+           cxx*)
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+ 	  *)
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+ 	esac
+ 	;;
+ 
+       netbsd*)
+         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ 	  wlarc=
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ 	  _LT_TAGVAR(hardcode_direct, $1)=yes
+ 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	fi
+ 	# Workaround some broken pre-1.5 toolchains
+ 	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ 	;;
+ 
+       *nto* | *qnx*)
+         _LT_TAGVAR(ld_shlibs, $1)=yes
+ 	;;
+ 
+       openbsd2*)
+         # C++ shared libraries are fairly broken
+ 	_LT_TAGVAR(ld_shlibs, $1)=no
+ 	;;
+ 
+       openbsd*)
+ 	if test -f /usr/libexec/ld.so; then
+ 	  _LT_TAGVAR(hardcode_direct, $1)=yes
+ 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ 	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ 	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ 	  fi
+ 	  output_verbose_link_cmd=func_echo_all
+ 	else
+ 	  _LT_TAGVAR(ld_shlibs, $1)=no
+ 	fi
+ 	;;
+ 
+       osf3* | osf4* | osf5*)
+         case $cc_basename in
+           KCC*)
+ 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+ 
+ 	    # KCC will only create a shared library if the output file
+ 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ 	    # to its proper name (with version) after linking.
+ 	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ 
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ 
+ 	    # Archives containing C++ object files must be created using
+ 	    # the KAI C++ compiler.
+ 	    case $host in
+ 	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ 	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ 	    esac
+ 	    ;;
+           RCC*)
+ 	    # Rational C++ 2.4.1
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+           cxx*)
+ 	    case $host in
+ 	      osf3*)
+ 	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ 		;;
+ 	      *)
+ 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ 	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ 	          echo "-hidden">> $lib.exp~
+ 	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ 	          $RM $lib.exp'
+ 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ 		;;
+ 	    esac
+ 
+ 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ 
+ 	    # Commands to make compiler produce verbose output that lists
+ 	    # what "hidden" libraries, object files and flags are used when
+ 	    # linking a shared library.
+ 	    #
+ 	    # There doesn't appear to be a way to prevent this compiler from
+ 	    # explicitly linking system object files so we need to strip them
+ 	    # from the output so that they don't get included in the library
+ 	    # dependencies.
+ 	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
+ 	    ;;
+ 	  *)
+ 	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ 	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ 	      case $host in
+ 	        osf3*)
+ 	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 		  ;;
+ 	        *)
+ 	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 		  ;;
+ 	      esac
+ 
+ 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ 	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ 
+ 	      # Commands to make compiler produce verbose output that lists
+ 	      # what "hidden" libraries, object files and flags are used when
+ 	      # linking a shared library.
+ 	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ 
+ 	    else
+ 	      # FIXME: insert proper C++ library support
+ 	      _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    fi
+ 	    ;;
+         esac
+         ;;
+ 
+       psos*)
+         # FIXME: insert proper C++ library support
+         _LT_TAGVAR(ld_shlibs, $1)=no
+         ;;
+ 
+       sunos4*)
+         case $cc_basename in
+           CC*)
+ 	    # Sun C++ 4.x
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+           lcc*)
+ 	    # Lucid
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+           *)
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+         esac
+         ;;
+ 
+       solaris*)
+         case $cc_basename in
+           CC* | sunCC*)
+ 	    # Sun C++ 4.2, 5.x and Centerline C++
+             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ 	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ 	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ 
+ 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ 	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	    case $host_os in
+ 	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ 	      *)
+ 		# The compiler driver will combine and reorder linker options,
+ 		# but understands `-z linker_flag'.
+ 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+ 		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ 	        ;;
+ 	    esac
+ 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+ 
+ 	    output_verbose_link_cmd='func_echo_all'
+ 
+ 	    # Archives containing C++ object files must be created using
+ 	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+ 	    # necessary to make sure instantiated templates are included
+ 	    # in the archive.
+ 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ 	    ;;
+           gcx*)
+ 	    # Green Hills C++ Compiler
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ 
+ 	    # The C++ compiler must be used to create the archive.
+ 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ 	    ;;
+           *)
+ 	    # GNU C++ compiler with Solaris linker
+ 	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ 	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ 		  $CC -shared $pic_flag -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 -v "^Configured with:" | $GREP "\-L"'
+ 	      else
+ 	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ 	        # platform.
+ 	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ 		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ 
+ 	        # Commands to make compiler produce verbose output that lists
+ 	        # what "hidden" libraries, object files and flags are used when
+ 	        # linking a shared library.
+ 	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ 	      fi
+ 
+ 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ 	      case $host_os in
+ 		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ 		*)
+ 		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ 		  ;;
+ 	      esac
+ 	    fi
+ 	    ;;
+         esac
+         ;;
+ 
+     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       runpath_var='LD_RUN_PATH'
+ 
+       case $cc_basename in
+         CC*)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	*)
+ 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+       esac
+       ;;
+ 
+       sysv5* | sco3.2v5* | sco5v6*)
+ 	# Note: We can NOT use -z defs as we might desire, because we do not
+ 	# link with -lc, and that would cause any symbols used from libc to
+ 	# always be unresolved, which means just about no library would
+ 	# ever link correctly.  If we're not using GNU ld we use -z text
+ 	# though, which does catch some bad symbols but isn't as heavy-handed
+ 	# as -z defs.
+ 	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ 	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ 	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ 	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ 	_LT_TAGVAR(link_all_deplibs, $1)=yes
+ 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ 	runpath_var='LD_RUN_PATH'
+ 
+ 	case $cc_basename in
+           CC*)
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ 	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ 	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ 	      '"$_LT_TAGVAR(reload_cmds, $1)"
+ 	    ;;
+ 	  *)
+ 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	    ;;
+ 	esac
+       ;;
+ 
+       tandem*)
+         case $cc_basename in
+           NCC*)
+ 	    # NonStop-UX NCC 3.20
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+           *)
+ 	    # FIXME: insert proper C++ library support
+ 	    _LT_TAGVAR(ld_shlibs, $1)=no
+ 	    ;;
+         esac
+         ;;
+ 
+       vxworks*)
+         # FIXME: insert proper C++ library support
+         _LT_TAGVAR(ld_shlibs, $1)=no
+         ;;
+ 
+       *)
+         # FIXME: insert proper C++ library support
+         _LT_TAGVAR(ld_shlibs, $1)=no
+         ;;
+     esac
+ 
+     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+ 
+     _LT_TAGVAR(GCC, $1)="$GXX"
+     _LT_TAGVAR(LD, $1)="$LD"
+ 
+     ## CAVEAT EMPTOR:
+     ## There is no encapsulation within the following macros, do not change
+     ## the running order or otherwise move them around unless you know exactly
+     ## what you are doing...
+     _LT_SYS_HIDDEN_LIBDEPS($1)
+     _LT_COMPILER_PIC($1)
+     _LT_COMPILER_C_O($1)
+     _LT_COMPILER_FILE_LOCKS($1)
+     _LT_LINKER_SHLIBS($1)
+     _LT_SYS_DYNAMIC_LINKER($1)
+     _LT_LINKER_HARDCODE_LIBPATH($1)
+ 
+     _LT_CONFIG($1)
+   fi # test -n "$compiler"
+ 
+   CC=$lt_save_CC
+   CFLAGS=$lt_save_CFLAGS
+   LDCXX=$LD
+   LD=$lt_save_LD
+   GCC=$lt_save_GCC
+   with_gnu_ld=$lt_save_with_gnu_ld
+   lt_cv_path_LDCXX=$lt_cv_path_LD
+   lt_cv_path_LD=$lt_save_path_LD
+   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+ fi # test "$_lt_caught_CXX_error" != yes
+ 
+ AC_LANG_POP
+ ])# _LT_LANG_CXX_CONFIG
+ 
+ 
+ # _LT_FUNC_STRIPNAME_CNF
+ # ----------------------
+ # func_stripname_cnf prefix suffix name
+ # strip PREFIX and SUFFIX off of NAME.
+ # PREFIX and SUFFIX must not contain globbing or regex special
+ # characters, hashes, percent signs, but SUFFIX may contain a leading
+ # dot (in which case that matches only a dot).
+ #
+ # This function is identical to the (non-XSI) version of func_stripname,
+ # except this one can be used by m4 code that may be executed by configure,
+ # rather than the libtool script.
+ m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+ AC_REQUIRE([_LT_DECL_SED])
+ AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+ func_stripname_cnf ()
+ {
+   case ${2} in
+   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+   esac
+ } # func_stripname_cnf
+ ])# _LT_FUNC_STRIPNAME_CNF
+ 
+ # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+ # ---------------------------------
+ # Figure out "hidden" library dependencies from verbose
+ # compiler output when linking a shared library.
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+ m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+ [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+ AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+ # Dependencies to place before and after the object being linked:
+ _LT_TAGVAR(predep_objects, $1)=
+ _LT_TAGVAR(postdep_objects, $1)=
+ _LT_TAGVAR(predeps, $1)=
+ _LT_TAGVAR(postdeps, $1)=
+ _LT_TAGVAR(compiler_lib_search_path, $1)=
+ 
+ dnl we can't use the lt_simple_compile_test_code here,
+ dnl because it contains code intended for an executable,
+ dnl not a library.  It's possible we should let each
+ dnl tag define a new lt_????_link_test_code variable,
+ dnl but it's only used here...
+ m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+ int a;
+ void foo (void) { a = 0; }
+ _LT_EOF
+ ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+ class Foo
+ {
+ public:
+   Foo (void) { a = 0; }
+ private:
+   int a;
+ };
+ _LT_EOF
+ ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+       subroutine foo
+       implicit none
+       integer*4 a
+       a=0
+       return
+       end
+ _LT_EOF
+ ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+       subroutine foo
+       implicit none
+       integer a
+       a=0
+       return
+       end
+ _LT_EOF
+ ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+ public class foo {
+   private int a;
+   public void bar (void) {
+     a = 0;
+   }
+ };
+ _LT_EOF
+ ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+ package foo
+ func foo() {
+ }
+ _LT_EOF
+ ])
+ 
+ _lt_libdeps_save_CFLAGS=$CFLAGS
+ case "$CC $CFLAGS " in #(
+ *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+ *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+ *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+ esac
+ 
+ dnl Parse the compiler output and extract the necessary
+ dnl objects, libraries and library flags.
+ if AC_TRY_EVAL(ac_compile); then
+   # Parse the compiler output and extract the necessary
+   # objects, libraries and library flags.
+ 
+   # Sentinel used to keep track of whether or not we are before
+   # the conftest object file.
+   pre_test_object_deps_done=no
+ 
+   for p in `eval "$output_verbose_link_cmd"`; do
+     case ${prev}${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
+        fi
+ 
+        # Expand the sysroot to ease extracting the directories later.
+        if test -z "$prev"; then
+          case $p in
+          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+          esac
+        fi
+        case $p in
+        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+        esac
+        if test "$pre_test_object_deps_done" = no; then
+ 	 case ${prev} in
+ 	 -L | -R)
+ 	   # Internal compiler library paths should come after those
+ 	   # provided the user.  The postdeps already come after the
+ 	   # user supplied libs so there is no need to process them.
+ 	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ 	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ 	   else
+ 	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ 	   fi
+ 	   ;;
+ 	 # The "-l" case would never come before the object being
+ 	 # linked, so don't bother handling this case.
+ 	 esac
+        else
+ 	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ 	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ 	 else
+ 	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ 	 fi
+        fi
+        prev=
+        ;;
+ 
+     *.lto.$objext) ;; # Ignore GCC LTO objects
+     *.$objext)
+        # This assumes that the test object file only shows up
+        # once in the compiler output.
+        if test "$p" = "conftest.$objext"; then
+ 	 pre_test_object_deps_done=yes
+ 	 continue
+        fi
+ 
+        if test "$pre_test_object_deps_done" = no; then
+ 	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ 	   _LT_TAGVAR(predep_objects, $1)="$p"
+ 	 else
+ 	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ 	 fi
+        else
+ 	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ 	   _LT_TAGVAR(postdep_objects, $1)="$p"
+ 	 else
+ 	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ 	 fi
+        fi
+        ;;
+ 
+     *) ;; # Ignore the rest.
+ 
+     esac
+   done
+ 
+   # Clean up.
+   rm -f a.out a.exe
+ else
+   echo "libtool.m4: error: problem compiling $1 test program"
+ fi
+ 
+ $RM -f confest.$objext
+ CFLAGS=$_lt_libdeps_save_CFLAGS
+ 
+ # PORTME: override above test on systems where it is broken
+ m4_if([$1], [CXX],
+ [case $host_os in
+ interix[[3-9]]*)
+   # Interix 3.5 installs completely hosed .la files for C++, so rather than
+   # hack all around it, let's just trust "g++" to DTRT.
+   _LT_TAGVAR(predep_objects,$1)=
+   _LT_TAGVAR(postdep_objects,$1)=
+   _LT_TAGVAR(postdeps,$1)=
+   ;;
+ 
+ linux*)
+   case `$CC -V 2>&1 | sed 5q` in
+   *Sun\ C*)
+     # Sun C++ 5.9
+ 
+     # The more standards-conforming stlport4 library is
+     # incompatible with the Cstd library. Avoid specifying
+     # it if it's in CXXFLAGS. Ignore libCrun as
+     # -library=stlport4 depends on it.
+     case " $CXX $CXXFLAGS " in
+     *" -library=stlport4 "*)
+       solaris_use_stlport4=yes
+       ;;
+     esac
+ 
+     if test "$solaris_use_stlport4" != yes; then
+       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+     fi
+     ;;
+   esac
+   ;;
+ 
+ solaris*)
+   case $cc_basename in
+   CC* | sunCC*)
+     # The more standards-conforming stlport4 library is
+     # incompatible with the Cstd library. Avoid specifying
+     # it if it's in CXXFLAGS. Ignore libCrun as
+     # -library=stlport4 depends on it.
+     case " $CXX $CXXFLAGS " in
+     *" -library=stlport4 "*)
+       solaris_use_stlport4=yes
+       ;;
+     esac
+ 
+     # Adding this requires a known-good setup of shared libraries for
+     # Sun compiler versions before 5.6, else PIC objects from an old
+     # archive will be linked into the output, leading to subtle bugs.
+     if test "$solaris_use_stlport4" != yes; then
+       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+     fi
+     ;;
+   esac
+   ;;
+ esac
+ ])
+ 
+ case " $_LT_TAGVAR(postdeps, $1) " in
+ *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+ esac
+  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+ if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ fi
+ _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+     [The directories searched by this compiler when creating a shared library])
+ _LT_TAGDECL([], [predep_objects], [1],
+     [Dependencies to place before and after the objects being linked to
+     create a shared library])
+ _LT_TAGDECL([], [postdep_objects], [1])
+ _LT_TAGDECL([], [predeps], [1])
+ _LT_TAGDECL([], [postdeps], [1])
+ _LT_TAGDECL([], [compiler_lib_search_path], [1],
+     [The library search path used internally by the compiler when linking
+     a shared library])
+ ])# _LT_SYS_HIDDEN_LIBDEPS
+ 
+ 
+ # _LT_LANG_F77_CONFIG([TAG])
+ # --------------------------
+ # Ensure that the configuration variables for a Fortran 77 compiler are
+ # suitably defined.  These variables are subsequently used by _LT_CONFIG
+ # to write the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_F77_CONFIG],
+ [AC_LANG_PUSH(Fortran 77)
+ if test -z "$F77" || test "X$F77" = "Xno"; then
+   _lt_disable_F77=yes
+ fi
+ 
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+ _LT_TAGVAR(reload_flag, $1)=$reload_flag
+ _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+ _LT_TAGVAR(no_undefined_flag, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ 
+ # Source file extension for f77 test sources.
+ ac_ext=f
+ 
+ # Object file extension for compiled f77 test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # No sense in running all these tests if we already determined that
+ # the F77 compiler isn't working.  Some variables (like enable_shared)
+ # are currently assumed to apply to all compilers on this platform,
+ # and will be corrupted by setting them based on a non-working compiler.
+ if test "$_lt_disable_F77" != yes; then
+   # Code to be used in simple compile tests
+   lt_simple_compile_test_code="\
+       subroutine t
+       return
+       end
+ "
+ 
+   # Code to be used in simple link tests
+   lt_simple_link_test_code="\
+       program t
+       end
+ "
+ 
+   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+   _LT_TAG_COMPILER
+ 
+   # save warnings/boilerplate of simple test code
+   _LT_COMPILER_BOILERPLATE
+   _LT_LINKER_BOILERPLATE
+ 
+   # Allow CC to be a program name with arguments.
+   lt_save_CC="$CC"
+   lt_save_GCC=$GCC
+   lt_save_CFLAGS=$CFLAGS
+   CC=${F77-"f77"}
+   CFLAGS=$FFLAGS
+   compiler=$CC
+   _LT_TAGVAR(compiler, $1)=$CC
+   _LT_CC_BASENAME([$compiler])
+   GCC=$G77
+   if test -n "$compiler"; then
+     AC_MSG_CHECKING([if libtool supports shared libraries])
+     AC_MSG_RESULT([$can_build_shared])
+ 
+     AC_MSG_CHECKING([whether to build shared libraries])
+     test "$can_build_shared" = "no" && enable_shared=no
+ 
+     # On AIX, shared libraries and static libraries use the same namespace, and
+     # are all built from PIC.
+     case $host_os in
+       aix3*)
+         test "$enable_shared" = yes && enable_static=no
+         if test -n "$RANLIB"; then
+           archive_cmds="$archive_cmds~\$RANLIB \$lib"
+           postinstall_cmds='$RANLIB $lib'
+         fi
+         ;;
+       aix[[4-9]]*)
+ 	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ 	  test "$enable_shared" = yes && enable_static=no
+ 	fi
+         ;;
+     esac
+     AC_MSG_RESULT([$enable_shared])
+ 
+     AC_MSG_CHECKING([whether to build static libraries])
+     # Make sure either enable_shared or enable_static is yes.
+     test "$enable_shared" = yes || enable_static=yes
+     AC_MSG_RESULT([$enable_static])
+ 
+     _LT_TAGVAR(GCC, $1)="$G77"
+     _LT_TAGVAR(LD, $1)="$LD"
+ 
+     ## CAVEAT EMPTOR:
+     ## There is no encapsulation within the following macros, do not change
+     ## the running order or otherwise move them around unless you know exactly
+     ## what you are doing...
+     _LT_COMPILER_PIC($1)
+     _LT_COMPILER_C_O($1)
+     _LT_COMPILER_FILE_LOCKS($1)
+     _LT_LINKER_SHLIBS($1)
+     _LT_SYS_DYNAMIC_LINKER($1)
+     _LT_LINKER_HARDCODE_LIBPATH($1)
+ 
+     _LT_CONFIG($1)
+   fi # test -n "$compiler"
+ 
+   GCC=$lt_save_GCC
+   CC="$lt_save_CC"
+   CFLAGS="$lt_save_CFLAGS"
+ fi # test "$_lt_disable_F77" != yes
+ 
+ AC_LANG_POP
+ ])# _LT_LANG_F77_CONFIG
+ 
+ 
+ # _LT_LANG_FC_CONFIG([TAG])
+ # -------------------------
+ # Ensure that the configuration variables for a Fortran compiler are
+ # suitably defined.  These variables are subsequently used by _LT_CONFIG
+ # to write the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_FC_CONFIG],
+ [AC_LANG_PUSH(Fortran)
+ 
+ if test -z "$FC" || test "X$FC" = "Xno"; then
+   _lt_disable_FC=yes
+ fi
+ 
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+ _LT_TAGVAR(reload_flag, $1)=$reload_flag
+ _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+ _LT_TAGVAR(no_undefined_flag, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ 
+ # Source file extension for fc test sources.
+ ac_ext=${ac_fc_srcext-f}
+ 
+ # Object file extension for compiled fc test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # No sense in running all these tests if we already determined that
+ # the FC compiler isn't working.  Some variables (like enable_shared)
+ # are currently assumed to apply to all compilers on this platform,
+ # and will be corrupted by setting them based on a non-working compiler.
+ if test "$_lt_disable_FC" != yes; then
+   # Code to be used in simple compile tests
+   lt_simple_compile_test_code="\
+       subroutine t
+       return
+       end
+ "
+ 
+   # Code to be used in simple link tests
+   lt_simple_link_test_code="\
+       program t
+       end
+ "
+ 
+   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+   _LT_TAG_COMPILER
+ 
+   # save warnings/boilerplate of simple test code
+   _LT_COMPILER_BOILERPLATE
+   _LT_LINKER_BOILERPLATE
+ 
+   # Allow CC to be a program name with arguments.
+   lt_save_CC="$CC"
+   lt_save_GCC=$GCC
+   lt_save_CFLAGS=$CFLAGS
+   CC=${FC-"f95"}
+   CFLAGS=$FCFLAGS
+   compiler=$CC
+   GCC=$ac_cv_fc_compiler_gnu
+ 
+   _LT_TAGVAR(compiler, $1)=$CC
+   _LT_CC_BASENAME([$compiler])
+ 
+   if test -n "$compiler"; then
+     AC_MSG_CHECKING([if libtool supports shared libraries])
+     AC_MSG_RESULT([$can_build_shared])
+ 
+     AC_MSG_CHECKING([whether to build shared libraries])
+     test "$can_build_shared" = "no" && enable_shared=no
+ 
+     # On AIX, shared libraries and static libraries use the same namespace, and
+     # are all built from PIC.
+     case $host_os in
+       aix3*)
+         test "$enable_shared" = yes && enable_static=no
+         if test -n "$RANLIB"; then
+           archive_cmds="$archive_cmds~\$RANLIB \$lib"
+           postinstall_cmds='$RANLIB $lib'
+         fi
+         ;;
+       aix[[4-9]]*)
+ 	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ 	  test "$enable_shared" = yes && enable_static=no
+ 	fi
+         ;;
+     esac
+     AC_MSG_RESULT([$enable_shared])
+ 
+     AC_MSG_CHECKING([whether to build static libraries])
+     # Make sure either enable_shared or enable_static is yes.
+     test "$enable_shared" = yes || enable_static=yes
+     AC_MSG_RESULT([$enable_static])
+ 
+     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+     _LT_TAGVAR(LD, $1)="$LD"
+ 
+     ## CAVEAT EMPTOR:
+     ## There is no encapsulation within the following macros, do not change
+     ## the running order or otherwise move them around unless you know exactly
+     ## what you are doing...
+     _LT_SYS_HIDDEN_LIBDEPS($1)
+     _LT_COMPILER_PIC($1)
+     _LT_COMPILER_C_O($1)
+     _LT_COMPILER_FILE_LOCKS($1)
+     _LT_LINKER_SHLIBS($1)
+     _LT_SYS_DYNAMIC_LINKER($1)
+     _LT_LINKER_HARDCODE_LIBPATH($1)
+ 
+     _LT_CONFIG($1)
+   fi # test -n "$compiler"
+ 
+   GCC=$lt_save_GCC
+   CC=$lt_save_CC
+   CFLAGS=$lt_save_CFLAGS
+ fi # test "$_lt_disable_FC" != yes
+ 
+ AC_LANG_POP
+ ])# _LT_LANG_FC_CONFIG
+ 
+ 
+ # _LT_LANG_GCJ_CONFIG([TAG])
+ # --------------------------
+ # Ensure that the configuration variables for the GNU Java Compiler compiler
+ # are suitably defined.  These variables are subsequently used by _LT_CONFIG
+ # to write the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_GCJ_CONFIG],
+ [AC_REQUIRE([LT_PROG_GCJ])dnl
+ AC_LANG_SAVE
+ 
+ # Source file extension for Java test sources.
+ ac_ext=java
+ 
+ # Object file extension for compiled Java test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="class foo {}"
+ 
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+ 
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+ 
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+ 
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_GCC=$GCC
+ GCC=yes
+ CC=${GCJ-"gcj"}
+ CFLAGS=$GCJFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_TAGVAR(LD, $1)="$LD"
+ _LT_CC_BASENAME([$compiler])
+ 
+ # GCJ did not exist at the time GCC didn't implicitly link libc in.
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ 
+ _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+ _LT_TAGVAR(reload_flag, $1)=$reload_flag
+ _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+ 
+ if test -n "$compiler"; then
+   _LT_COMPILER_NO_RTTI($1)
+   _LT_COMPILER_PIC($1)
+   _LT_COMPILER_C_O($1)
+   _LT_COMPILER_FILE_LOCKS($1)
+   _LT_LINKER_SHLIBS($1)
+   _LT_LINKER_HARDCODE_LIBPATH($1)
+ 
+   _LT_CONFIG($1)
+ fi
+ 
+ AC_LANG_RESTORE
+ 
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ ])# _LT_LANG_GCJ_CONFIG
+ 
+ 
+ # _LT_LANG_GO_CONFIG([TAG])
+ # --------------------------
+ # Ensure that the configuration variables for the GNU Go compiler
+ # are suitably defined.  These variables are subsequently used by _LT_CONFIG
+ # to write the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_GO_CONFIG],
+ [AC_REQUIRE([LT_PROG_GO])dnl
+ AC_LANG_SAVE
+ 
+ # Source file extension for Go test sources.
+ ac_ext=go
+ 
+ # Object file extension for compiled Go test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="package main; func main() { }"
+ 
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='package main; func main() { }'
+ 
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+ 
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+ 
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_GCC=$GCC
+ GCC=yes
+ CC=${GOC-"gccgo"}
+ CFLAGS=$GOFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_TAGVAR(LD, $1)="$LD"
+ _LT_CC_BASENAME([$compiler])
+ 
+ # Go did not exist at the time GCC didn't implicitly link libc in.
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ 
+ _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+ _LT_TAGVAR(reload_flag, $1)=$reload_flag
+ _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+ 
+ if test -n "$compiler"; then
+   _LT_COMPILER_NO_RTTI($1)
+   _LT_COMPILER_PIC($1)
+   _LT_COMPILER_C_O($1)
+   _LT_COMPILER_FILE_LOCKS($1)
+   _LT_LINKER_SHLIBS($1)
+   _LT_LINKER_HARDCODE_LIBPATH($1)
+ 
+   _LT_CONFIG($1)
+ fi
+ 
+ AC_LANG_RESTORE
+ 
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ ])# _LT_LANG_GO_CONFIG
+ 
+ 
+ # _LT_LANG_RC_CONFIG([TAG])
+ # -------------------------
+ # Ensure that the configuration variables for the Windows resource compiler
+ # are suitably defined.  These variables are subsequently used by _LT_CONFIG
+ # to write the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_RC_CONFIG],
+ [AC_REQUIRE([LT_PROG_RC])dnl
+ AC_LANG_SAVE
+ 
+ # Source file extension for RC test sources.
+ ac_ext=rc
+ 
+ # Object file extension for compiled RC test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+ 
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="$lt_simple_compile_test_code"
+ 
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+ 
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+ 
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_GCC=$GCC
+ GCC=
+ CC=${RC-"windres"}
+ CFLAGS=
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ 
+ if test -n "$compiler"; then
+   :
+   _LT_CONFIG($1)
+ fi
+ 
+ GCC=$lt_save_GCC
+ AC_LANG_RESTORE
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ ])# _LT_LANG_RC_CONFIG
+ 
+ 
+ # LT_PROG_GCJ
+ # -----------
+ AC_DEFUN([LT_PROG_GCJ],
+ [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+     [AC_CHECK_TOOL(GCJ, gcj,)
+       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+       AC_SUBST(GCJFLAGS)])])[]dnl
+ ])
+ 
+ # Old name:
+ AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+ 
+ 
+ # LT_PROG_GO
+ # ----------
+ AC_DEFUN([LT_PROG_GO],
+ [AC_CHECK_TOOL(GOC, gccgo,)
+ ])
+ 
+ 
+ # LT_PROG_RC
+ # ----------
+ AC_DEFUN([LT_PROG_RC],
+ [AC_CHECK_TOOL(RC, windres,)
+ ])
+ 
+ # Old name:
+ AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([LT_AC_PROG_RC], [])
+ 
+ 
+ # _LT_DECL_EGREP
+ # --------------
+ # If we don't have a new enough Autoconf to choose the best grep
+ # available, choose the one first in the user's PATH.
+ m4_defun([_LT_DECL_EGREP],
+ [AC_REQUIRE([AC_PROG_EGREP])dnl
+ AC_REQUIRE([AC_PROG_FGREP])dnl
+ test -z "$GREP" && GREP=grep
+ _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+ _LT_DECL([], [EGREP], [1], [An ERE matcher])
+ _LT_DECL([], [FGREP], [1], [A literal string matcher])
+ dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+ AC_SUBST([GREP])
+ ])
+ 
+ 
+ # _LT_DECL_OBJDUMP
+ # --------------
+ # If we don't have a new enough Autoconf to choose the best objdump
+ # available, choose the one first in the user's PATH.
+ m4_defun([_LT_DECL_OBJDUMP],
+ [AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ test -z "$OBJDUMP" && OBJDUMP=objdump
+ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+ AC_SUBST([OBJDUMP])
+ ])
+ 
+ # _LT_DECL_DLLTOOL
+ # ----------------
+ # Ensure DLLTOOL variable is set.
+ m4_defun([_LT_DECL_DLLTOOL],
+ [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ test -z "$DLLTOOL" && DLLTOOL=dlltool
+ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+ AC_SUBST([DLLTOOL])
+ ])
+ 
+ # _LT_DECL_SED
+ # ------------
+ # Check for a fully-functional sed program, that truncates
+ # as few characters as possible.  Prefer GNU sed if found.
+ m4_defun([_LT_DECL_SED],
+ [AC_PROG_SED
+ test -z "$SED" && SED=sed
+ Xsed="$SED -e 1s/^X//"
+ _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+ _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+ ])# _LT_DECL_SED
+ 
+ m4_ifndef([AC_PROG_SED], [
+ # NOTE: This macro has been submitted for inclusion into   #
+ #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+ #  a released version of Autoconf we should remove this    #
+ #  macro and use it instead.                               #
  
- m4_ifndef([AC_AUTOCONF_VERSION],
-   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
- m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
- [m4_warning([this file was generated for autoconf 2.67.
- You have another version of autoconf.  It may work, but is not guaranteed to.
- If you have problems, you may need to regenerate the build system entirely.
- To do so, use the procedure documented by the package, typically `autoreconf'.])])
+ m4_defun([AC_PROG_SED],
+ [AC_MSG_CHECKING([for a sed that does not truncate output])
+ AC_CACHE_VAL(lt_cv_path_SED,
+ [# Loop through the user's path and test for sed and gsed.
+ # Then use that list of sed's as ones to test for truncation.
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for lt_ac_prog in sed gsed; do
+     for ac_exec_ext in '' $ac_executable_extensions; do
+       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+       fi
+     done
+   done
+ done
+ IFS=$as_save_IFS
+ lt_ac_max=0
+ lt_ac_count=0
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+ # along with /bin/sed that truncates output.
+ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+   test ! -f $lt_ac_sed && continue
+   cat /dev/null > conftest.in
+   lt_ac_count=0
+   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+   # Check for GNU sed and select it if it is found.
+   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+     lt_cv_path_SED=$lt_ac_sed
+     break
+   fi
+   while true; do
+     cat conftest.in conftest.in >conftest.tmp
+     mv conftest.tmp conftest.in
+     cp conftest.in conftest.nl
+     echo >>conftest.nl
+     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+     cmp -s conftest.out conftest.nl || break
+     # 10000 chars as input seems more than enough
+     test $lt_ac_count -gt 10 && break
+     lt_ac_count=`expr $lt_ac_count + 1`
+     if test $lt_ac_count -gt $lt_ac_max; then
+       lt_ac_max=$lt_ac_count
+       lt_cv_path_SED=$lt_ac_sed
+     fi
+   done
+ done
+ ])
+ SED=$lt_cv_path_SED
+ AC_SUBST([SED])
+ AC_MSG_RESULT([$SED])
+ ])#AC_PROG_SED
+ ])#m4_ifndef
  
- # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+ # Old name:
+ AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([LT_AC_PROG_SED], [])
+ 
+ 
+ # _LT_CHECK_SHELL_FEATURES
+ # ------------------------
+ # Find out whether the shell is Bourne or XSI compatible,
+ # or has some other useful features.
+ m4_defun([_LT_CHECK_SHELL_FEATURES],
+ [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+ # Try some XSI features
+ xsi_shell=no
+ ( _lt_dummy="a/b/c"
+   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+       = c,a/b,b/c, \
+     && eval 'test $(( 1 + 1 )) -eq 2 \
+     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+   && xsi_shell=yes
+ AC_MSG_RESULT([$xsi_shell])
+ _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+ 
+ AC_MSG_CHECKING([whether the shell understands "+="])
+ lt_shell_append=no
+ ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+     >/dev/null 2>&1 \
+   && lt_shell_append=yes
+ AC_MSG_RESULT([$lt_shell_append])
+ _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+ 
+ if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+   lt_unset=unset
+ else
+   lt_unset=false
+ fi
+ _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+ 
+ # test EBCDIC or ASCII
+ case `echo X|tr X '\101'` in
+  A) # ASCII based system
+     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+   lt_SP2NL='tr \040 \012'
+   lt_NL2SP='tr \015\012 \040\040'
+   ;;
+  *) # EBCDIC based system
+   lt_SP2NL='tr \100 \n'
+   lt_NL2SP='tr \r\n \100\100'
+   ;;
+ esac
+ _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+ ])# _LT_CHECK_SHELL_FEATURES
+ 
+ 
+ # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+ # ------------------------------------------------------
+ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+ # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+ m4_defun([_LT_PROG_FUNCTION_REPLACE],
+ [dnl {
+ sed -e '/^$1 ()$/,/^} # $1 /c\
+ $1 ()\
+ {\
+ m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+ } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+   && mv -f "$cfgfile.tmp" "$cfgfile" \
+     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+ ])
+ 
+ 
+ # _LT_PROG_REPLACE_SHELLFNS
+ # -------------------------
+ # Replace existing portable implementations of several shell functions with
+ # equivalent extended shell implementations where those features are available..
+ m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+ [if test x"$xsi_shell" = xyes; then
+   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+     case ${1} in
+       */*) func_dirname_result="${1%/*}${2}" ;;
+       *  ) func_dirname_result="${3}" ;;
+     esac])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+     func_basename_result="${1##*/}"])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+     case ${1} in
+       */*) func_dirname_result="${1%/*}${2}" ;;
+       *  ) func_dirname_result="${3}" ;;
+     esac
+     func_basename_result="${1##*/}"])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+     # positional parameters, so assign one to ordinary parameter first.
+     func_stripname_result=${3}
+     func_stripname_result=${func_stripname_result#"${1}"}
+     func_stripname_result=${func_stripname_result%"${2}"}])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+     func_split_long_opt_name=${1%%=*}
+     func_split_long_opt_arg=${1#*=}])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+     func_split_short_opt_arg=${1#??}
+     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+     case ${1} in
+       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+       *)    func_lo2o_result=${1} ;;
+     esac])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+ fi
+ 
+ if test x"$lt_shell_append" = xyes; then
+   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
+ 
+   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+     func_quote_for_eval "${2}"
+ dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+ 
+   # Save a `func_append' function call where possible by direct use of '+='
+   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+     && mv -f "$cfgfile.tmp" "$cfgfile" \
+       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+   test 0 -eq $? || _lt_function_replace_fail=:
+ else
+   # Save a `func_append' function call even when '+=' is not available
+   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+     && mv -f "$cfgfile.tmp" "$cfgfile" \
+       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+   test 0 -eq $? || _lt_function_replace_fail=:
+ fi
+ 
+ if test x"$_lt_function_replace_fail" = x":"; then
+   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+ fi
+ ])
+ 
+ # _LT_PATH_CONVERSION_FUNCTIONS
+ # -----------------------------
+ # Determine which file name conversion functions should be used by
+ # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+ # for certain cross-compile configurations and native mingw.
+ m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ AC_MSG_CHECKING([how to convert $build file names to $host format])
+ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+ [case $host in
+   *-*-mingw* )
+     case $build in
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+         ;;
+       *-*-cygwin* )
+         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+         ;;
+       * ) # otherwise, assume *nix
+         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+         ;;
+     esac
+     ;;
+   *-*-cygwin* )
+     case $build in
+       *-*-mingw* ) # actually msys
+         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+         ;;
+       *-*-cygwin* )
+         lt_cv_to_host_file_cmd=func_convert_file_noop
+         ;;
+       * ) # otherwise, assume *nix
+         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+         ;;
+     esac
+     ;;
+   * ) # unhandled hosts (and "normal" native builds)
+     lt_cv_to_host_file_cmd=func_convert_file_noop
+     ;;
+ esac
+ ])
+ to_host_file_cmd=$lt_cv_to_host_file_cmd
+ AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+ _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+          [0], [convert $build file names to $host format])dnl
+ 
+ AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+ [#assume ordinary cross tools, or native build.
+ lt_cv_to_tool_file_cmd=func_convert_file_noop
+ case $host in
+   *-*-mingw* )
+     case $build in
+       *-*-mingw* ) # actually msys
+         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+         ;;
+     esac
+     ;;
+ esac
+ ])
+ to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+ AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+          [0], [convert $build files to toolchain format])dnl
+ ])# _LT_PATH_CONVERSION_FUNCTIONS
+ 
+ # Helper functions for option handling.                    -*- Autoconf -*-
+ #
+ #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+ #   Inc.
+ #   Written by Gary V. Vaughan, 2004
+ #
+ # This file is free software; the Free Software Foundation gives
+ # unlimited permission to copy and/or distribute it, with or without
+ # modifications, as long as this notice is preserved.
+ 
+ # serial 7 ltoptions.m4
+ 
+ # This is to help aclocal find these macros, as it can't see m4_define.
+ AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+ 
+ 
+ # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+ # ------------------------------------------
+ m4_define([_LT_MANGLE_OPTION],
+ [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+ 
+ 
+ # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+ # ---------------------------------------
+ # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+ # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+ # saved as a flag.
+ m4_define([_LT_SET_OPTION],
+ [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+ m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+         _LT_MANGLE_DEFUN([$1], [$2]),
+     [m4_warning([Unknown $1 option `$2'])])[]dnl
+ ])
+ 
+ 
+ # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+ # ------------------------------------------------------------
+ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+ m4_define([_LT_IF_OPTION],
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+ 
+ 
+ # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+ # -------------------------------------------------------
+ # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+ # are set.
+ m4_define([_LT_UNLESS_OPTIONS],
+ [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ 	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ 		      [m4_define([$0_found])])])[]dnl
+ m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+ ])[]dnl
+ ])
+ 
+ 
+ # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+ # ----------------------------------------
+ # OPTION-LIST is a space-separated list of Libtool options associated
+ # with MACRO-NAME.  If any OPTION has a matching handler declared with
+ # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+ # the unknown option and exit.
+ m4_defun([_LT_SET_OPTIONS],
+ [# Set options
+ m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+     [_LT_SET_OPTION([$1], _LT_Option)])
+ 
+ m4_if([$1],[LT_INIT],[
+   dnl
+   dnl Simply set some default values (i.e off) if boolean options were not
+   dnl specified:
+   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+   ])
+   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+   ])
+   dnl
+   dnl If no reference was made to various pairs of opposing options, then
+   dnl we run the default mode handler for the pair.  For example, if neither
+   dnl `shared' nor `disable-shared' was passed, we enable building of shared
+   dnl archives by default:
+   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+   		   [_LT_ENABLE_FAST_INSTALL])
+   ])
+ ])# _LT_SET_OPTIONS
+ 
+ 
+ 
+ # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+ # -----------------------------------------
+ m4_define([_LT_MANGLE_DEFUN],
+ [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+ 
+ 
+ # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+ # -----------------------------------------------
+ m4_define([LT_OPTION_DEFINE],
+ [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+ ])# LT_OPTION_DEFINE
+ 
+ 
+ # dlopen
+ # ------
+ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+ ])
+ 
+ AU_DEFUN([AC_LIBTOOL_DLOPEN],
+ [_LT_SET_OPTION([LT_INIT], [dlopen])
+ AC_DIAGNOSE([obsolete],
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you
+ put the `dlopen' option into LT_INIT's first parameter.])
+ ])
+ 
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+ 
+ 
+ # win32-dll
+ # ---------
+ # Declare package support for building win32 dll's.
+ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+ [enable_win32_dll=yes
+ 
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+   AC_CHECK_TOOL(AS, as, false)
+   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+   AC_CHECK_TOOL(OBJDUMP, objdump, false)
+   ;;
+ esac
+ 
+ test -z "$AS" && AS=as
+ _LT_DECL([], [AS],      [1], [Assembler program])dnl
+ 
+ test -z "$DLLTOOL" && DLLTOOL=dlltool
+ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+ 
+ test -z "$OBJDUMP" && OBJDUMP=objdump
+ _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+ ])# win32-dll
+ 
+ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ _LT_SET_OPTION([LT_INIT], [win32-dll])
+ AC_DIAGNOSE([obsolete],
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you
+ put the `win32-dll' option into LT_INIT's first parameter.])
+ ])
+ 
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+ 
+ 
+ # _LT_ENABLE_SHARED([DEFAULT])
+ # ----------------------------
+ # implement the --enable-shared flag, and supports the `shared' and
+ # `disable-shared' LT_INIT options.
+ # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+ m4_define([_LT_ENABLE_SHARED],
+ [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+ AC_ARG_ENABLE([shared],
+     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ 	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+     [p=${PACKAGE-default}
+     case $enableval in
+     yes) enable_shared=yes ;;
+     no) enable_shared=no ;;
+     *)
+       enable_shared=no
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for pkg in $enableval; do
+ 	IFS="$lt_save_ifs"
+ 	if test "X$pkg" = "X$p"; then
+ 	  enable_shared=yes
+ 	fi
+       done
+       IFS="$lt_save_ifs"
+       ;;
+     esac],
+     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+ 
+     _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ 	[Whether or not to build shared libraries])
+ ])# _LT_ENABLE_SHARED
+ 
+ LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+ LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+ 
+ # Old names:
+ AC_DEFUN([AC_ENABLE_SHARED],
+ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+ ])
+ 
+ AC_DEFUN([AC_DISABLE_SHARED],
+ [_LT_SET_OPTION([LT_INIT], [disable-shared])
+ ])
+ 
+ AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+ AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+ 
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+ 
+ 
+ 
+ # _LT_ENABLE_STATIC([DEFAULT])
+ # ----------------------------
+ # implement the --enable-static flag, and support the `static' and
+ # `disable-static' LT_INIT options.
+ # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+ m4_define([_LT_ENABLE_STATIC],
+ [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+ AC_ARG_ENABLE([static],
+     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ 	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+     [p=${PACKAGE-default}
+     case $enableval in
+     yes) enable_static=yes ;;
+     no) enable_static=no ;;
+     *)
+      enable_static=no
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for pkg in $enableval; do
+ 	IFS="$lt_save_ifs"
+ 	if test "X$pkg" = "X$p"; then
+ 	  enable_static=yes
+ 	fi
+       done
+       IFS="$lt_save_ifs"
+       ;;
+     esac],
+     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+ 
+     _LT_DECL([build_old_libs], [enable_static], [0],
+ 	[Whether or not to build static libraries])
+ ])# _LT_ENABLE_STATIC
+ 
+ LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+ LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+ 
+ # Old names:
+ AC_DEFUN([AC_ENABLE_STATIC],
+ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+ ])
+ 
+ AC_DEFUN([AC_DISABLE_STATIC],
+ [_LT_SET_OPTION([LT_INIT], [disable-static])
+ ])
+ 
+ AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+ AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+ 
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+ 
+ 
+ 
+ # _LT_ENABLE_FAST_INSTALL([DEFAULT])
+ # ----------------------------------
+ # implement the --enable-fast-install flag, and support the `fast-install'
+ # and `disable-fast-install' LT_INIT options.
+ # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+ m4_define([_LT_ENABLE_FAST_INSTALL],
+ [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+ AC_ARG_ENABLE([fast-install],
+     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+     [p=${PACKAGE-default}
+     case $enableval in
+     yes) enable_fast_install=yes ;;
+     no) enable_fast_install=no ;;
+     *)
+       enable_fast_install=no
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for pkg in $enableval; do
+ 	IFS="$lt_save_ifs"
+ 	if test "X$pkg" = "X$p"; then
+ 	  enable_fast_install=yes
+ 	fi
+       done
+       IFS="$lt_save_ifs"
+       ;;
+     esac],
+     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+ 
+ _LT_DECL([fast_install], [enable_fast_install], [0],
+ 	 [Whether or not to optimize for fast installation])dnl
+ ])# _LT_ENABLE_FAST_INSTALL
+ 
+ LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+ LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+ 
+ # Old names:
+ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+ AC_DIAGNOSE([obsolete],
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you put
+ the `fast-install' option into LT_INIT's first parameter.])
+ ])
+ 
+ AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+ [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+ AC_DIAGNOSE([obsolete],
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you put
+ the `disable-fast-install' option into LT_INIT's first parameter.])
+ ])
+ 
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+ 
+ 
+ # _LT_WITH_PIC([MODE])
+ # --------------------
+ # implement the --with-pic flag, and support the `pic-only' and `no-pic'
+ # LT_INIT options.
+ # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+ m4_define([_LT_WITH_PIC],
+ [AC_ARG_WITH([pic],
+     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+     [lt_p=${PACKAGE-default}
+     case $withval in
+     yes|no) pic_mode=$withval ;;
+     *)
+       pic_mode=default
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for lt_pkg in $withval; do
+ 	IFS="$lt_save_ifs"
+ 	if test "X$lt_pkg" = "X$lt_p"; then
+ 	  pic_mode=yes
+ 	fi
+       done
+       IFS="$lt_save_ifs"
+       ;;
+     esac],
+     [pic_mode=default])
+ 
+ test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+ 
+ _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+ ])# _LT_WITH_PIC
+ 
+ LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+ LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+ 
+ # Old name:
+ AU_DEFUN([AC_LIBTOOL_PICMODE],
+ [_LT_SET_OPTION([LT_INIT], [pic-only])
+ AC_DIAGNOSE([obsolete],
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you
+ put the `pic-only' option into LT_INIT's first parameter.])
+ ])
+ 
+ dnl aclocal-1.4 backwards compatibility:
+ dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+ 
+ 
+ m4_define([_LTDL_MODE], [])
+ LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ 		 [m4_define([_LTDL_MODE], [nonrecursive])])
+ LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ 		 [m4_define([_LTDL_MODE], [recursive])])
+ LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ 		 [m4_define([_LTDL_MODE], [subproject])])
+ 
+ m4_define([_LTDL_TYPE], [])
+ LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ 		 [m4_define([_LTDL_TYPE], [installable])])
+ LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ 		 [m4_define([_LTDL_TYPE], [convenience])])
+ 
+ # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+ #
+ # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ # Written by Gary V. Vaughan, 2004
+ #
+ # This file is free software; the Free Software Foundation gives
+ # unlimited permission to copy and/or distribute it, with or without
+ # modifications, as long as this notice is preserved.
+ 
+ # serial 6 ltsugar.m4
+ 
+ # This is to help aclocal find these macros, as it can't see m4_define.
+ AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+ 
+ 
+ # lt_join(SEP, ARG1, [ARG2...])
+ # -----------------------------
+ # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+ # associated separator.
+ # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+ # versions in m4sugar had bugs.
+ m4_define([lt_join],
+ [m4_if([$#], [1], [],
+        [$#], [2], [[$2]],
+        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+ m4_define([_lt_join],
+ [m4_if([$#$2], [2], [],
+        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+ 
+ 
+ # lt_car(LIST)
+ # lt_cdr(LIST)
+ # ------------
+ # Manipulate m4 lists.
+ # These macros are necessary as long as will still need to support
+ # Autoconf-2.59 which quotes differently.
+ m4_define([lt_car], [[$1]])
+ m4_define([lt_cdr],
+ [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+        [$#], 1, [],
+        [m4_dquote(m4_shift($@))])])
+ m4_define([lt_unquote], $1)
+ 
+ 
+ # lt_append(MACRO-NAME, STRING, [SEPARATOR])
+ # ------------------------------------------
+ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+ # Note that neither SEPARATOR nor STRING are expanded; they are appended
+ # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+ # No SEPARATOR is output if MACRO-NAME was previously undefined (different
+ # than defined and empty).
+ #
+ # This macro is needed until we can rely on Autoconf 2.62, since earlier
+ # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+ m4_define([lt_append],
+ [m4_define([$1],
+ 	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+ 
+ 
+ 
+ # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+ # ----------------------------------------------------------
+ # Produce a SEP delimited list of all paired combinations of elements of
+ # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+ # has the form PREFIXmINFIXSUFFIXn.
+ # Needed until we can rely on m4_combine added in Autoconf 2.62.
+ m4_define([lt_combine],
+ [m4_if(m4_eval([$# > 3]), [1],
+        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+ [[m4_foreach([_Lt_prefix], [$2],
+ 	     [m4_foreach([_Lt_suffix],
+ 		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ 	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+ 
+ 
+ # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+ # -----------------------------------------------------------------------
+ # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+ # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+ m4_define([lt_if_append_uniq],
+ [m4_ifdef([$1],
+ 	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ 		 [lt_append([$1], [$2], [$3])$4],
+ 		 [$5])],
+ 	  [lt_append([$1], [$2], [$3])$4])])
+ 
+ 
+ # lt_dict_add(DICT, KEY, VALUE)
+ # -----------------------------
+ m4_define([lt_dict_add],
+ [m4_define([$1($2)], [$3])])
+ 
+ 
+ # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+ # --------------------------------------------
+ m4_define([lt_dict_add_subkey],
+ [m4_define([$1($2:$3)], [$4])])
+ 
+ 
+ # lt_dict_fetch(DICT, KEY, [SUBKEY])
+ # ----------------------------------
+ m4_define([lt_dict_fetch],
+ [m4_ifval([$3],
+ 	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+ 
+ 
+ # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+ # -----------------------------------------------------------------
+ m4_define([lt_if_dict_fetch],
+ [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ 	[$5],
+     [$6])])
+ 
+ 
+ # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+ # --------------------------------------------------------------
+ m4_define([lt_dict_filter],
+ [m4_if([$5], [], [],
+   [lt_join(m4_quote(m4_default([$4], [[, ]])),
+            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ 		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+ ])
+ 
+ # ltversion.m4 -- version numbers			-*- Autoconf -*-
+ #
+ #   Copyright (C) 2004 Free Software Foundation, Inc.
+ #   Written by Scott James Remnant, 2004
+ #
+ # This file is free software; the Free Software Foundation gives
+ # unlimited permission to copy and/or distribute it, with or without
+ # modifications, as long as this notice is preserved.
+ 
+ # @configure_input@
+ 
+ # serial 3337 ltversion.m4
+ # This file is part of GNU Libtool
+ 
+ m4_define([LT_PACKAGE_VERSION], [2.4.2])
+ m4_define([LT_PACKAGE_REVISION], [1.3337])
+ 
+ AC_DEFUN([LTVERSION_VERSION],
+ [macro_version='2.4.2'
+ macro_revision='1.3337'
+ _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+ _LT_DECL(, macro_revision, 0)
+ ])
+ 
+ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+ #
+ #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+ #   Written by Scott James Remnant, 2004.
+ #
+ # This file is free software; the Free Software Foundation gives
+ # unlimited permission to copy and/or distribute it, with or without
+ # modifications, as long as this notice is preserved.
+ 
+ # serial 5 lt~obsolete.m4
+ 
+ # These exist entirely to fool aclocal when bootstrapping libtool.
+ #
+ # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+ # which have later been changed to m4_define as they aren't part of the
+ # exported API, or moved to Autoconf or Automake where they belong.
+ #
+ # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+ # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+ # using a macro with the same name in our local m4/libtool.m4 it'll
+ # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+ # and doesn't know about Autoconf macros at all.)
+ #
+ # So we provide this file, which has a silly filename so it's always
+ # included after everything else.  This provides aclocal with the
+ # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+ # because those macros already exist, or will be overwritten later.
+ # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+ #
+ # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+ # Yes, that means every name once taken will need to remain here until
+ # we give up compatibility with versions before 1.7, at which point
+ # we need to keep only those names which we still refer to.
+ 
+ # This is to help aclocal find these macros, as it can't see m4_define.
+ AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+ 
+ m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+ m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
+ m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+ m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
+ m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+ m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
+ m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
+ m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+ m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
+ m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
+ m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
+ m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+ m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+ m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+ m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+ m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+ m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
+ m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+ m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+ m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
+ m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
+ m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+ m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+ m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+ m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+ m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+ m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+ m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+ m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
+ m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
+ m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
+ m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+ m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+ m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
+ m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
+ m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+ m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+ m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
+ m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+ m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
+ m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
+ m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
+ m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+ m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+ m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+ m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+ m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+ m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+ m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+ m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+ m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+ m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
+ m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+ m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+ m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+ m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+ m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+ m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
+ m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
+ m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
+ 
+ # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+ # serial 1 (pkg-config-0.24)
+ # 
+ # Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
+ #
+ # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
+ 
+ # PKG_PROG_PKG_CONFIG([MIN-VERSION])
+ # ----------------------------------
+ AC_DEFUN([PKG_PROG_PKG_CONFIG],
+ [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+ m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+ m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+ AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+ AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+ AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+ 
+ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+ fi
+ if test -n "$PKG_CONFIG"; then
+ 	_pkg_min_version=m4_default([$1], [0.9.0])
+ 	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ 		AC_MSG_RESULT([yes])
+ 	else
+ 		AC_MSG_RESULT([no])
+ 		PKG_CONFIG=""
+ 	fi
+ fi[]dnl
+ ])# PKG_PROG_PKG_CONFIG
+ 
+ # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+ #
+ # Check to see whether a particular set of modules exists.  Similar
+ # to PKG_CHECK_MODULES(), but does not set variables or print errors.
+ #
+ # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ # only at the first occurence in configure.ac, so if the first place
+ # it's called might be skipped (such as if it is within an "if", you
+ # have to call PKG_CHECK_EXISTS manually
+ # --------------------------------------------------------------
+ AC_DEFUN([PKG_CHECK_EXISTS],
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+ if test -n "$PKG_CONFIG" && \
+     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+   m4_default([$2], [:])
+ m4_ifvaln([$3], [else
+   $3])dnl
+ fi])
+ 
+ # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+ # ---------------------------------------------
+ m4_define([_PKG_CONFIG],
+ [if test -n "$$1"; then
+     pkg_cv_[]$1="$$1"
+  elif test -n "$PKG_CONFIG"; then
+     PKG_CHECK_EXISTS([$3],
+                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ 		      test "x$?" != "x0" && pkg_failed=yes ],
+ 		     [pkg_failed=yes])
+  else
+     pkg_failed=untried
+ fi[]dnl
+ ])# _PKG_CONFIG
+ 
+ # _PKG_SHORT_ERRORS_SUPPORTED
+ # -----------------------------
+ AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+         _pkg_short_errors_supported=yes
+ else
+         _pkg_short_errors_supported=no
+ fi[]dnl
+ ])# _PKG_SHORT_ERRORS_SUPPORTED
+ 
+ 
+ # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+ # [ACTION-IF-NOT-FOUND])
+ #
+ #
+ # Note that if there is a possibility the first call to
+ # PKG_CHECK_MODULES might not happen, you should be sure to include an
+ # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+ #
+ #
+ # --------------------------------------------------------------
+ AC_DEFUN([PKG_CHECK_MODULES],
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+ 
+ pkg_failed=no
+ AC_MSG_CHECKING([for $1])
+ 
+ _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+ _PKG_CONFIG([$1][_LIBS], [libs], [$2])
+ 
+ m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+ and $1[]_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details.])
+ 
+ if test $pkg_failed = yes; then
+    	AC_MSG_RESULT([no])
+         _PKG_SHORT_ERRORS_SUPPORTED
+         if test $_pkg_short_errors_supported = yes; then
+ 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+         else 
+ 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+         fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+ 
+ 	m4_default([$4], [AC_MSG_ERROR(
+ [Package requirements ($2) were not met:
+ 
+ $$1_PKG_ERRORS
+ 
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
+ installed software in a non-standard prefix.
+ 
+ _PKG_TEXT])[]dnl
+         ])
+ elif test $pkg_failed = untried; then
+      	AC_MSG_RESULT([no])
+ 	m4_default([$4], [AC_MSG_FAILURE(
+ [The pkg-config script could not be found or is too old.  Make sure it
+ is in your PATH or set the PKG_CONFIG environment variable to the full
+ path to pkg-config.
+ 
+ _PKG_TEXT
+ 
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+         ])
+ else
+ 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+         AC_MSG_RESULT([yes])
+ 	$3
+ fi[]dnl
+ ])# PKG_CHECK_MODULES
+ 
+ # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
++=======
+ # serial 1
+ 
++>>>>>>> upstream/20131206+dfsg
  # AM_AUTOMAKE_VERSION(VERSION)
  # ----------------------------
  # Automake X.Y traces this macro to ensure aclocal.m4 has been
@@@ -34,7 -8786,7 +8805,11 @@@ AC_DEFUN([AM_AUTOMAKE_VERSION]
  [am__api_version='1.11'
  dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  dnl require some minimum version.  Point them to the right macro.
++<<<<<<< HEAD
 +m4_if([$1], [1.11.1], [],
++=======
+ m4_if([$1], [1.11.6], [],
++>>>>>>> upstream/20131206+dfsg
        [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  ])
  
@@@ -50,19 -8802,21 +8825,32 @@@ m4_define([_AM_AUTOCONF_VERSION], []
  # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
++<<<<<<< HEAD
 +[AM_AUTOMAKE_VERSION([1.11.1])dnl
++=======
+ [AM_AUTOMAKE_VERSION([1.11.6])dnl
++>>>>>>> upstream/20131206+dfsg
  m4_ifndef([AC_AUTOCONF_VERSION],
    [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  
  # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
  
++<<<<<<< HEAD
 +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
++=======
+ # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
++=======
+ # serial 1
+ 
++>>>>>>> upstream/20131206+dfsg
  # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
  # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@@ -144,14 -8898,14 +8932,23 @@@ AC_CONFIG_COMMANDS_PRE
  Usually this means the macro was only invoked conditionally.]])
  fi])])
  
++<<<<<<< HEAD
 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 +# Free Software Foundation, Inc.
++=======
+ # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+ # 2010, 2011 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
 +# serial 10
++=======
+ # serial 12
++>>>>>>> upstream/20131206+dfsg
  
  # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  # written in clear, in which case automake, when reading aclocal.m4,
@@@ -191,6 -8945,7 +8988,10 @@@ AC_CACHE_CHECK([dependency style of $de
    # 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'.
++<<<<<<< HEAD
++=======
+   rm -rf conftest.dir
++>>>>>>> upstream/20131206+dfsg
    mkdir conftest.dir
    # Copy depcomp to subdir because otherwise we won't find it if we're
    # using a relative directory.
@@@ -255,7 -9010,7 +9056,11 @@@
  	break
        fi
        ;;
++<<<<<<< HEAD
 +    msvisualcpp | msvcmsys)
++=======
+     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
++>>>>>>> upstream/20131206+dfsg
        # This compiler won't grok `-c -o', but also, the minuso test has
        # not run yet.  These depmodes are late enough in the game, and
        # so weak that their functioning should not be impacted.
@@@ -320,10 -9075,13 +9125,19 @@@ AC_DEFUN([AM_DEP_TRACK]
  if test "x$enable_dependency_tracking" != xno; then
    am_depcomp="$ac_aux_dir/depcomp"
    AMDEPBACKSLASH='\'
++<<<<<<< HEAD
++=======
+   am__nodep='_no'
++>>>>>>> upstream/20131206+dfsg
  fi
  AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  AC_SUBST([AMDEPBACKSLASH])dnl
  _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
++<<<<<<< HEAD
++=======
+ AC_SUBST([am__nodep])dnl
+ _AM_SUBST_NOTMAKE([am__nodep])dnl
++>>>>>>> upstream/20131206+dfsg
  ])
  
  # Generate code to set up dependency tracking.              -*- Autoconf -*-
@@@ -557,12 -9315,15 +9371,22 @@@ for _am_header in $config_headers :; d
  done
  echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  
++<<<<<<< HEAD
 +# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
++=======
+ # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+ # Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
++=======
+ # serial 1
+ 
++>>>>>>> upstream/20131206+dfsg
  # AM_PROG_INSTALL_SH
  # ------------------
  # Define $install_sh.
@@@ -602,8 -9363,8 +9426,13 @@@ AC_SUBST([am__leading_dot])]
  # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
  # From Jim Meyering
  
++<<<<<<< HEAD
 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 +# Free Software Foundation, Inc.
++=======
+ # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+ # 2011 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
@@@ -623,7 -9384,7 +9452,11 @@@ AC_DEFUN([AM_MAINTAINER_MODE]
         [disable], [m4_define([am_maintainer_other], [enable])],
         [m4_define([am_maintainer_other], [enable])
          m4_warn([syntax], [unexpected argument to AM@&t at _MAINTAINER_MODE: $1])])
++<<<<<<< HEAD
 +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
++=======
+ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
++>>>>>>> upstream/20131206+dfsg
    dnl maintainer-mode's default is 'disable' unless 'enable' is passed
    AC_ARG_ENABLE([maintainer-mode],
  [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
@@@ -769,12 -9530,15 +9602,22 @@@ els
  fi
  ])
  
++<<<<<<< HEAD
 +# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
++=======
+ # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+ # Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
++=======
+ # serial 1
+ 
++>>>>>>> upstream/20131206+dfsg
  # AM_PROG_MKDIR_P
  # ---------------
  # Check for `mkdir -p'.
@@@ -797,13 -9561,14 +9640,22 @@@ esa
  
  # Helper functions for option handling.                     -*- Autoconf -*-
  
++<<<<<<< HEAD
 +# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
++=======
+ # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
 +# serial 4
++=======
+ # serial 5
++>>>>>>> upstream/20131206+dfsg
  
  # _AM_MANGLE_OPTION(NAME)
  # -----------------------
@@@ -811,13 -9576,13 +9663,21 @@@ AC_DEFUN([_AM_MANGLE_OPTION]
  [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  
  # _AM_SET_OPTION(NAME)
++<<<<<<< HEAD
 +# ------------------------------
++=======
+ # --------------------
++>>>>>>> upstream/20131206+dfsg
  # Set option NAME.  Presently that only means defining a flag for this option.
  AC_DEFUN([_AM_SET_OPTION],
  [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  
  # _AM_SET_OPTIONS(OPTIONS)
++<<<<<<< HEAD
 +# ----------------------------------
++=======
+ # ------------------------
++>>>>>>> upstream/20131206+dfsg
  # OPTIONS is a space-separated list of Automake options.
  AC_DEFUN([_AM_SET_OPTIONS],
  [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@@ -893,12 -9658,14 +9753,21 @@@ Check your system clock]
  fi
  AC_MSG_RESULT(yes)])
  
++<<<<<<< HEAD
 +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
++=======
+ # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
++=======
+ # serial 1
+ 
++>>>>>>> upstream/20131206+dfsg
  # AM_PROG_INSTALL_STRIP
  # ---------------------
  # One issue with vendor `install' (even GNU) is that you can't
@@@ -921,13 -9688,13 +9790,21 @@@ f
  INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  AC_SUBST([INSTALL_STRIP_PROGRAM])])
  
++<<<<<<< HEAD
 +# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
++=======
+ # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
++<<<<<<< HEAD
 +# serial 2
++=======
+ # serial 3
++>>>>>>> upstream/20131206+dfsg
  
  # _AM_SUBST_NOTMAKE(VARIABLE)
  # ---------------------------
@@@ -936,13 -9703,13 +9813,21 @@@
  AC_DEFUN([_AM_SUBST_NOTMAKE])
  
  # AM_SUBST_NOTMAKE(VARIABLE)
++<<<<<<< HEAD
 +# ---------------------------
++=======
+ # --------------------------
++>>>>>>> upstream/20131206+dfsg
  # Public sister of _AM_SUBST_NOTMAKE.
  AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  
  # Check how to create a tarball.                            -*- Autoconf -*-
  
++<<<<<<< HEAD
 +# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
++=======
+ # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  # This file is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
@@@ -964,10 -9731,11 +9849,18 @@@
  # a tarball read from stdin.
  #     $(am__untar) < result.tar
  AC_DEFUN([_AM_PROG_TAR],
++<<<<<<< HEAD
 +[# Always define AMTAR for backward compatibility.
 +AM_MISSING_PROG([AMTAR], [tar])
 +m4_if([$1], [v7],
 +     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
++=======
+ [# Always define AMTAR for backward compatibility.  Yes, it's still used
+ # in the wild :-(  We should find a proper way to deprecate it ...
+ AC_SUBST([AMTAR], ['$${TAR-tar}'])
+ m4_if([$1], [v7],
+      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
++>>>>>>> upstream/20131206+dfsg
       [m4_case([$1], [ustar],, [pax],,
                [m4_fatal([Unknown tar format])])
  AC_MSG_CHECKING([how to create a $1 tar archive])
@@@ -1036,9 -9804,4 +9929,12 @@@ AC_SUBST([am__tar]
  AC_SUBST([am__untar])
  ]) # _AM_PROG_TAR
  
++<<<<<<< HEAD
 +m4_include([m4/libtool.m4])
 +m4_include([m4/ltoptions.m4])
 +m4_include([m4/ltsugar.m4])
 +m4_include([m4/ltversion.m4])
 +m4_include([m4/lt~obsolete.m4])
++=======
++>>>>>>> upstream/20131206+dfsg
  m4_include([acinclude.m4])
diff --cc compile
index c0096a7,862a14e..adb2378
--- a/compile
+++ b/compile
@@@ -1,10 -1,10 +1,19 @@@
  #! /bin/sh
++<<<<<<< HEAD
 +# Wrapper for compilers which do not understand `-c -o'.
 +
 +scriptversion=2009-10-06.20; # UTC
 +
 +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
 +# Foundation, Inc.
++=======
+ # Wrapper for compilers which do not understand '-c -o'.
+ 
+ scriptversion=2012-03-05.13; # UTC
+ 
+ # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
+ # Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # Written by Tom Tromey <tromey at cygnus.com>.
  #
  # This program is free software; you can redistribute it and/or modify
@@@ -29,21 -29,219 +38,234 @@@
  # bugs to <bug-automake at gnu.org> or send patches to
  # <automake-patches at gnu.org>.
  
++<<<<<<< HEAD
 +case $1 in
 +  '')
 +     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
++=======
+ nl='
+ '
+ 
+ # We need space, tab and new line, in precisely that order.  Quoting is
+ # there to prevent tools from complaining about whitespace usage.
+ IFS=" ""	$nl"
+ 
+ file_conv=
+ 
+ # func_file_conv build_file lazy
+ # Convert a $build file to $host form and store it in $file
+ # Currently only supports Windows hosts. If the determined conversion
+ # type is listed in (the comma separated) LAZY, no conversion will
+ # take place.
+ func_file_conv ()
+ {
+   file=$1
+   case $file in
+     / | /[!/]*) # absolute file, and not a UNC file
+       if test -z "$file_conv"; then
+ 	# lazily determine how to convert abs files
+ 	case `uname -s` in
+ 	  MINGW*)
+ 	    file_conv=mingw
+ 	    ;;
+ 	  CYGWIN*)
+ 	    file_conv=cygwin
+ 	    ;;
+ 	  *)
+ 	    file_conv=wine
+ 	    ;;
+ 	esac
+       fi
+       case $file_conv/,$2, in
+ 	*,$file_conv,*)
+ 	  ;;
+ 	mingw/*)
+ 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ 	  ;;
+ 	cygwin/*)
+ 	  file=`cygpath -m "$file" || echo "$file"`
+ 	  ;;
+ 	wine/*)
+ 	  file=`winepath -w "$file" || echo "$file"`
+ 	  ;;
+       esac
+       ;;
+   esac
+ }
+ 
+ # func_cl_dashL linkdir
+ # Make cl look for libraries in LINKDIR
+ func_cl_dashL ()
+ {
+   func_file_conv "$1"
+   if test -z "$lib_path"; then
+     lib_path=$file
+   else
+     lib_path="$lib_path;$file"
+   fi
+   linker_opts="$linker_opts -LIBPATH:$file"
+ }
+ 
+ # func_cl_dashl library
+ # Do a library search-path lookup for cl
+ func_cl_dashl ()
+ {
+   lib=$1
+   found=no
+   save_IFS=$IFS
+   IFS=';'
+   for dir in $lib_path $LIB
+   do
+     IFS=$save_IFS
+     if $shared && test -f "$dir/$lib.dll.lib"; then
+       found=yes
+       lib=$dir/$lib.dll.lib
+       break
+     fi
+     if test -f "$dir/$lib.lib"; then
+       found=yes
+       lib=$dir/$lib.lib
+       break
+     fi
+   done
+   IFS=$save_IFS
+ 
+   if test "$found" != yes; then
+     lib=$lib.lib
+   fi
+ }
+ 
+ # func_cl_wrapper cl arg...
+ # Adjust compile command to suit cl
+ func_cl_wrapper ()
+ {
+   # Assume a capable shell
+   lib_path=
+   shared=:
+   linker_opts=
+   for arg
+   do
+     if test -n "$eat"; then
+       eat=
+     else
+       case $1 in
+ 	-o)
+ 	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ 	  eat=1
+ 	  case $2 in
+ 	    *.o | *.[oO][bB][jJ])
+ 	      func_file_conv "$2"
+ 	      set x "$@" -Fo"$file"
+ 	      shift
+ 	      ;;
+ 	    *)
+ 	      func_file_conv "$2"
+ 	      set x "$@" -Fe"$file"
+ 	      shift
+ 	      ;;
+ 	  esac
+ 	  ;;
+ 	-I)
+ 	  eat=1
+ 	  func_file_conv "$2" mingw
+ 	  set x "$@" -I"$file"
+ 	  shift
+ 	  ;;
+ 	-I*)
+ 	  func_file_conv "${1#-I}" mingw
+ 	  set x "$@" -I"$file"
+ 	  shift
+ 	  ;;
+ 	-l)
+ 	  eat=1
+ 	  func_cl_dashl "$2"
+ 	  set x "$@" "$lib"
+ 	  shift
+ 	  ;;
+ 	-l*)
+ 	  func_cl_dashl "${1#-l}"
+ 	  set x "$@" "$lib"
+ 	  shift
+ 	  ;;
+ 	-L)
+ 	  eat=1
+ 	  func_cl_dashL "$2"
+ 	  ;;
+ 	-L*)
+ 	  func_cl_dashL "${1#-L}"
+ 	  ;;
+ 	-static)
+ 	  shared=false
+ 	  ;;
+ 	-Wl,*)
+ 	  arg=${1#-Wl,}
+ 	  save_ifs="$IFS"; IFS=','
+ 	  for flag in $arg; do
+ 	    IFS="$save_ifs"
+ 	    linker_opts="$linker_opts $flag"
+ 	  done
+ 	  IFS="$save_ifs"
+ 	  ;;
+ 	-Xlinker)
+ 	  eat=1
+ 	  linker_opts="$linker_opts $2"
+ 	  ;;
+ 	-*)
+ 	  set x "$@" "$1"
+ 	  shift
+ 	  ;;
+ 	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ 	  func_file_conv "$1"
+ 	  set x "$@" -Tp"$file"
+ 	  shift
+ 	  ;;
+ 	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ 	  func_file_conv "$1" mingw
+ 	  set x "$@" "$file"
+ 	  shift
+ 	  ;;
+ 	*)
+ 	  set x "$@" "$1"
+ 	  shift
+ 	  ;;
+       esac
+     fi
+     shift
+   done
+   if test -n "$linker_opts"; then
+     linker_opts="-link$linker_opts"
+   fi
+   exec "$@" $linker_opts
+   exit 1
+ }
+ 
+ eat=
+ 
+ case $1 in
+   '')
+      echo "$0: No command.  Try '$0 --help' for more information." 1>&2
++>>>>>>> upstream/20131206+dfsg
       exit 1;
       ;;
    -h | --h*)
      cat <<\EOF
  Usage: compile [--help] [--version] PROGRAM [ARGS]
  
++<<<<<<< HEAD
 +Wrapper for compilers which do not understand `-c -o'.
 +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
 +arguments, and rename the output as expected.
 +
 +If you are trying to build a whole package this is not the
 +right script to run: please start by reading the file `INSTALL'.
++=======
+ Wrapper for compilers which do not understand '-c -o'.
+ Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+ arguments, and rename the output as expected.
+ 
+ If you are trying to build a whole package this is not the
+ right script to run: please start by reading the file 'INSTALL'.
++>>>>>>> upstream/20131206+dfsg
  
  Report bugs to <bug-automake at gnu.org>.
  EOF
@@@ -53,11 -251,13 +275,20 @@@
      echo "compile $scriptversion"
      exit $?
      ;;
++<<<<<<< HEAD
++=======
+   cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+     func_cl_wrapper "$@"      # Doesn't return...
+     ;;
++>>>>>>> upstream/20131206+dfsg
  esac
  
  ofile=
  cfile=
++<<<<<<< HEAD
 +eat=
++=======
++>>>>>>> upstream/20131206+dfsg
  
  for arg
  do
@@@ -66,8 -266,8 +297,13 @@@
    else
      case $1 in
        -o)
++<<<<<<< HEAD
 +	# configure might choose to run compile as `compile cc -o foo foo.c'.
 +	# So we strip `-o arg' only if arg is an object.
++=======
+ 	# configure might choose to run compile as 'compile cc -o foo foo.c'.
+ 	# So we strip '-o arg' only if arg is an object.
++>>>>>>> upstream/20131206+dfsg
  	eat=1
  	case $2 in
  	  *.o | *.obj)
@@@ -94,10 -294,10 +330,17 @@@
  done
  
  if test -z "$ofile" || test -z "$cfile"; then
++<<<<<<< HEAD
 +  # If no `-o' option was seen then we might have been invoked from a
 +  # pattern rule where we don't need one.  That is ok -- this is a
 +  # normal compilation that the losing compiler can handle.  If no
 +  # `.c' file was seen then we are probably linking.  That is also
++=======
+   # If no '-o' option was seen then we might have been invoked from a
+   # pattern rule where we don't need one.  That is ok -- this is a
+   # normal compilation that the losing compiler can handle.  If no
+   # '.c' file was seen then we are probably linking.  That is also
++>>>>>>> upstream/20131206+dfsg
    # ok.
    exec "$@"
  fi
@@@ -106,7 -306,7 +349,11 @@@
  cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
  
  # Create the lock directory.
++<<<<<<< HEAD
 +# Note: use `[/\\:.-]' here to ensure that we don't use the same name
++=======
+ # Note: use '[/\\:.-]' here to ensure that we don't use the same name
++>>>>>>> upstream/20131206+dfsg
  # that we are using for the .o file.  Also, base the name on the expected
  # object file name, since that is what matters with a parallel build.
  lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
diff --cc config.guess
index dc84c68,d622a44..9b16360
--- a/config.guess
+++ b/config.guess
@@@ -1,10 -1,10 +1,17 @@@
  #! /bin/sh
  # Attempt to guess a canonical system name.
  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
++<<<<<<< HEAD
 +#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 +#   Free Software Foundation, Inc.
 +
 +timestamp='2009-11-20'
++=======
+ #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ #   2011, 2012 Free Software Foundation, Inc.
+ 
+ timestamp='2012-02-10'
++>>>>>>> upstream/20131206+dfsg
  
  # 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
@@@ -17,9 -17,7 +24,13 @@@
  # General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
++<<<<<<< HEAD
 +# along with this program; if not, write to the Free Software
 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
 +# 02110-1301, USA.
++=======
+ # along with this program; if not, see <http://www.gnu.org/licenses/>.
++>>>>>>> upstream/20131206+dfsg
  #
  # As a special exception to the GNU General Public License, if you
  # distribute this file as part of a program that contains a
@@@ -56,8 -54,9 +67,14 @@@ version="
  GNU config.guess ($timestamp)
  
  Originally written by Per Bothner.
++<<<<<<< HEAD
 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++=======
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@@ -144,7 -143,7 +161,11 @@@ UNAME_VERSION=`(uname -v) 2>/dev/null` 
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
      *:NetBSD:*:*)
  	# NetBSD (nbsd) targets should (where applicable) match one or
++<<<<<<< HEAD
 +	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
++=======
+ 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
++>>>>>>> upstream/20131206+dfsg
  	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
  	# switched to ELF, *-*-netbsd* would select the old
  	# object file format.  This provides both forward
@@@ -180,7 -179,7 +201,11 @@@
  		fi
  		;;
  	    *)
++<<<<<<< HEAD
 +	        os=netbsd
++=======
+ 		os=netbsd
++>>>>>>> upstream/20131206+dfsg
  		;;
  	esac
  	# The OS release
@@@ -223,7 -222,7 +248,11 @@@
  		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  		;;
  	*5.*)
++<<<<<<< HEAD
 +	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++=======
+ 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++>>>>>>> upstream/20131206+dfsg
  		;;
  	esac
  	# According to Compaq, /usr/sbin/psrinfo has been available on
@@@ -269,7 -268,10 +298,14 @@@
  	# 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 ;;
++<<<<<<< HEAD
++	exit ;;
++=======
+ 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ 	exitcode=$?
+ 	trap '' 0
+ 	exit $exitcode ;;
++>>>>>>> upstream/20131206+dfsg
      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
@@@ -295,7 -297,7 +331,11 @@@
  	echo s390-ibm-zvmoe
  	exit ;;
      *:OS400:*:*)
++<<<<<<< HEAD
 +        echo powerpc-ibm-os400
++=======
+ 	echo powerpc-ibm-os400
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  	echo arm-acorn-riscix${UNAME_RELEASE}
@@@ -394,23 -396,23 +434,43 @@@
      # MiNT.  But MiNT is downward compatible to TOS, so this should
      # be no problem.
      atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
++<<<<<<< HEAD
 +        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 ;;
++=======
+ 	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 ;;
++>>>>>>> upstream/20131206+dfsg
      m68k:machten:*:*)
  	echo m68k-apple-machten${UNAME_RELEASE}
  	exit ;;
@@@ -480,8 -482,8 +540,13 @@@ EO
  	echo m88k-motorola-sysv3
  	exit ;;
      AViiON:dgux:*:*)
++<<<<<<< HEAD
 +        # DG/UX returns AViiON for all architectures
 +        UNAME_PROCESSOR=`/usr/bin/uname -p`
++=======
+ 	# DG/UX returns AViiON for all architectures
+ 	UNAME_PROCESSOR=`/usr/bin/uname -p`
++>>>>>>> upstream/20131206+dfsg
  	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  	then
  	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@@ -494,7 -496,7 +559,11 @@@
  	else
  	    echo i586-dg-dgux${UNAME_RELEASE}
  	fi
++<<<<<<< HEAD
 + 	exit ;;
++=======
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
      M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
  	echo m88k-dolphin-sysv3
  	exit ;;
@@@ -551,7 -553,7 +620,11 @@@ EO
  		echo rs6000-ibm-aix3.2
  	fi
  	exit ;;
++<<<<<<< HEAD
 +    *:AIX:*:[456])
++=======
+     *:AIX:*:[4567])
++>>>>>>> upstream/20131206+dfsg
  	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
@@@ -594,52 -596,52 +667,101 @@@
  	    9000/[678][0-9][0-9])
  		if [ -x /usr/bin/getconf ]; then
  		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
++<<<<<<< HEAD
 +                    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);
 +              }
++=======
+ 		    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);
+ 		}
++>>>>>>> upstream/20131206+dfsg
  EOF
  		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@@ -730,22 -732,22 +852,39 @@@ EO
  	exit ;;
      C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  	echo c1-convex-bsd
++<<<<<<< HEAD
 +        exit ;;
++=======
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
      C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  	if getsysinfo -f scalar_acc
  	then echo c32-convex-bsd
  	else echo c2-convex-bsd
  	fi
++<<<<<<< HEAD
 +        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 ;;
++=======
+ 	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 ;;
++>>>>>>> upstream/20131206+dfsg
      CRAY*Y-MP:*:*:*)
  	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  	exit ;;
@@@ -769,14 -771,14 +908,25 @@@
  	exit ;;
      F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++<<<<<<< HEAD
 +        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}"
++=======
+ 	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}"
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@@ -788,13 -790,12 +938,22 @@@
  	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  	exit ;;
      *:FreeBSD:*:*)
++<<<<<<< HEAD
 +	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/[-(].*//'` ;;
++=======
+ 	UNAME_PROCESSOR=`/usr/bin/uname -p`
+ 	case ${UNAME_PROCESSOR} in
+ 	    amd64)
+ 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ 	    *)
+ 		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++>>>>>>> upstream/20131206+dfsg
  	esac
  	exit ;;
      i*:CYGWIN*:*)
@@@ -803,15 -804,18 +962,28 @@@
      *:MINGW*:*)
  	echo ${UNAME_MACHINE}-pc-mingw32
  	exit ;;
++<<<<<<< HEAD
 +    i*:windows32*:*)
 +    	# uname -m includes "-pc" on this system.
 +    	echo ${UNAME_MACHINE}-mingw32
++=======
+     i*:MSYS*:*)
+ 	echo ${UNAME_MACHINE}-pc-msys
+ 	exit ;;
+     i*:windows32*:*)
+ 	# uname -m includes "-pc" on this system.
+ 	echo ${UNAME_MACHINE}-mingw32
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      i*:PW*:*)
  	echo ${UNAME_MACHINE}-pc-pw32
  	exit ;;
      *:Interix*:*)
++<<<<<<< HEAD
 +    	case ${UNAME_MACHINE} in
++=======
+ 	case ${UNAME_MACHINE} in
++>>>>>>> upstream/20131206+dfsg
  	    x86)
  		echo i586-pc-interix${UNAME_RELEASE}
  		exit ;;
@@@ -857,6 -861,13 +1029,16 @@@
      i*86:Minix:*:*)
  	echo ${UNAME_MACHINE}-pc-minix
  	exit ;;
++<<<<<<< HEAD
++=======
+     aarch64:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     aarch64_be:Linux:*:*)
+ 	UNAME_MACHINE=aarch64_be
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
      alpha:Linux:*:*)
  	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@@ -866,7 -877,7 +1048,11 @@@
  	  EV6)   UNAME_MACHINE=alphaev6 ;;
  	  EV67)  UNAME_MACHINE=alphaev67 ;;
  	  EV68*) UNAME_MACHINE=alphaev68 ;;
++<<<<<<< HEAD
 +        esac
++=======
+ 	esac
++>>>>>>> upstream/20131206+dfsg
  	objdump --private-headers /bin/sh | grep -q ld.so.1
  	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@@ -878,20 -889,29 +1064,43 @@@
  	then
  	    echo ${UNAME_MACHINE}-unknown-linux-gnu
  	else
++<<<<<<< HEAD
 +	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++=======
+ 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ 		| grep -q __ARM_PCS_VFP
+ 	    then
+ 		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ 	    else
+ 		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ 	    fi
++>>>>>>> upstream/20131206+dfsg
  	fi
  	exit ;;
      avr32*:Linux:*:*)
  	echo ${UNAME_MACHINE}-unknown-linux-gnu
  	exit ;;
      cris:Linux:*:*)
++<<<<<<< HEAD
 +	echo cris-axis-linux-gnu
 +	exit ;;
 +    crisv32:Linux:*:*)
 +	echo crisv32-axis-linux-gnu
 +	exit ;;
 +    frv:Linux:*:*)
 +    	echo frv-unknown-linux-gnu
++=======
+ 	echo ${UNAME_MACHINE}-axis-linux-gnu
+ 	exit ;;
+     crisv32:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-axis-linux-gnu
+ 	exit ;;
+     frv:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     hexagon:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      i*86:Linux:*:*)
  	LIBC=gnu
@@@ -933,7 -953,7 +1142,11 @@@ EO
  	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  	;;
      or32:Linux:*:*)
++<<<<<<< HEAD
 +	echo or32-unknown-linux-gnu
++=======
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      padre:Linux:*:*)
  	echo sparc-unknown-linux-gnu
@@@ -959,7 -979,7 +1172,11 @@@
  	echo ${UNAME_MACHINE}-ibm-linux
  	exit ;;
      sh64*:Linux:*:*)
++<<<<<<< HEAD
 +    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++=======
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      sh*:Linux:*:*)
  	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@@ -967,14 -987,17 +1184,27 @@@
      sparc:Linux:*:* | sparc64:Linux:*:*)
  	echo ${UNAME_MACHINE}-unknown-linux-gnu
  	exit ;;
++<<<<<<< HEAD
++=======
+     tile*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
      vax:Linux:*:*)
  	echo ${UNAME_MACHINE}-dec-linux-gnu
  	exit ;;
      x86_64:Linux:*:*)
++<<<<<<< HEAD
 +	echo x86_64-unknown-linux-gnu
 +	exit ;;
 +    xtensa*:Linux:*:*)
 +    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++=======
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     xtensa*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      i*86:DYNIX/ptx:4*:*)
  	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@@ -983,11 -1006,11 +1213,19 @@@
  	echo i386-sequent-sysv4
  	exit ;;
      i*86:UNIX_SV:4.2MP:2.*)
++<<<<<<< HEAD
 +        # 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.
++=======
+ 	# 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.
++>>>>>>> upstream/20131206+dfsg
  	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  	exit ;;
      i*86:OS/2:*:*)
@@@ -1019,7 -1042,7 +1257,11 @@@
  	fi
  	exit ;;
      i*86:*:5:[678]*)
++<<<<<<< HEAD
 +    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
++=======
+ 	# UnixWare 7.x, OpenUNIX and OpenServer 6.
++>>>>>>> upstream/20131206+dfsg
  	case `/bin/uname -X | grep "^Machine"` in
  	    *486*)	     UNAME_MACHINE=i486 ;;
  	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@@ -1047,13 -1070,13 +1289,22 @@@
  	exit ;;
      pc:*:*:*)
  	# Left here for compatibility:
++<<<<<<< HEAD
 +        # uname -m prints for DJGPP always 'pc', but it prints nothing about
 +        # the processor, so we play safe by assuming i586.
++=======
+ 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+ 	# the processor, so we play safe by assuming i586.
++>>>>>>> upstream/20131206+dfsg
  	# Note: whatever this is, it MUST be the same as what config.sub
  	# prints for the "djgpp" host, or else GDB configury will decide that
  	# this is a cross-build.
  	echo i586-pc-msdosdjgpp
++<<<<<<< HEAD
 +        exit ;;
++=======
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
      Intel:Mach:3*:*)
  	echo i386-pc-mach3
  	exit ;;
@@@ -1088,8 -1111,8 +1339,13 @@@
  	/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:*)
++<<<<<<< HEAD
 +        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 +          && { echo i486-ncr-sysv4; exit; } ;;
++=======
+ 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ 	  && { echo i486-ncr-sysv4; exit; } ;;
++>>>>>>> upstream/20131206+dfsg
      NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  	OS_REL='.3'
  	test -r /etc/.relid \
@@@ -1132,10 -1155,10 +1388,17 @@@
  		echo ns32k-sni-sysv
  	fi
  	exit ;;
++<<<<<<< HEAD
 +    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
 +                      # says <Richard.M.Bartel at ccMail.Census.GOV>
 +        echo i586-unisys-sysv4
 +        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 ;;
++>>>>>>> upstream/20131206+dfsg
      *:UNIX_System_V:4*:FTX*)
  	# From Gerald Hewes <hewes at openmarket.com>.
  	# How about differentiating between stratus architectures? -djm
@@@ -1161,11 -1184,11 +1424,19 @@@
  	exit ;;
      R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  	if [ -d /usr/nec ]; then
++<<<<<<< HEAD
 +	        echo mips-nec-sysv${UNAME_RELEASE}
 +	else
 +	        echo mips-unknown-sysv${UNAME_RELEASE}
 +	fi
 +        exit ;;
++=======
+ 		echo mips-nec-sysv${UNAME_RELEASE}
+ 	else
+ 		echo mips-unknown-sysv${UNAME_RELEASE}
+ 	fi
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
      BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
  	echo powerpc-be-beos
  	exit ;;
@@@ -1230,6 -1253,9 +1501,12 @@@
      *:QNX:*:4*)
  	echo i386-pc-qnx
  	exit ;;
++<<<<<<< HEAD
++=======
+     NEO-?:NONSTOP_KERNEL:*:*)
+ 	echo neo-tandem-nsk${UNAME_RELEASE}
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
      NSE-?:NONSTOP_KERNEL:*:*)
  	echo nse-tandem-nsk${UNAME_RELEASE}
  	exit ;;
@@@ -1275,13 -1301,13 +1552,21 @@@
  	echo pdp10-unknown-its
  	exit ;;
      SEI:*:*:SEIUX)
++<<<<<<< HEAD
 +        echo mips-sei-seiux${UNAME_RELEASE}
++=======
+ 	echo mips-sei-seiux${UNAME_RELEASE}
++>>>>>>> upstream/20131206+dfsg
  	exit ;;
      *:DragonFly:*:*)
  	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  	exit ;;
      *:*VMS:*:*)
++<<<<<<< HEAD
 +    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
++=======
+ 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
++>>>>>>> upstream/20131206+dfsg
  	case "${UNAME_MACHINE}" in
  	    A*) echo alpha-dec-vms ; exit ;;
  	    I*) echo ia64-dec-vms ; exit ;;
@@@ -1299,6 -1325,9 +1584,12 @@@
      i*86:AROS:*:*)
  	echo ${UNAME_MACHINE}-pc-aros
  	exit ;;
++<<<<<<< HEAD
++=======
+     x86_64:VMkernel:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-esx
+ 	exit ;;
++>>>>>>> upstream/20131206+dfsg
  esac
  
  #echo '(No uname command or uname output not recognized.)' 1>&2
@@@ -1321,11 -1350,11 +1612,19 @@@ main (
  #include <sys/param.h>
    printf ("m68k-sony-newsos%s\n",
  #ifdef NEWSOS4
++<<<<<<< HEAD
 +          "4"
 +#else
 +	  ""
 +#endif
 +         ); exit (0);
++=======
+ 	"4"
+ #else
+ 	""
+ #endif
+ 	); exit (0);
++>>>>>>> upstream/20131206+dfsg
  #endif
  #endif
  
diff --cc config.h.in
index c7a9946,5aa265c..9106821
--- a/config.h.in
+++ b/config.h.in
@@@ -1,4 -1,18 +1,22 @@@
++<<<<<<< HEAD
 +/* config.h.in.  Generated from configure.in by autoheader.  */
++=======
+ /* config.h.in.  Generated from configure.ac by autoheader.  */
+ 
+ /* 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
++>>>>>>> upstream/20131206+dfsg
  
  /* Binary age */
  #undef GFS_BINARY_AGE
@@@ -27,12 -41,18 +45,24 @@@
  /* Define to 1 if you have the <fenv.h> header file. */
  #undef HAVE_FENV_H
  
++<<<<<<< HEAD
++=======
+ /* Define to 1 if you have the `funopen' function. */
+ #undef HAVE_FUNOPEN
+ 
++>>>>>>> upstream/20131206+dfsg
  /* Define to 1 if you have the <getopt.h> header file. */
  #undef HAVE_GETOPT_H
  
  /* Define to 1 if you have the `getopt_long' function. */
  #undef HAVE_GETOPT_LONG
  
++<<<<<<< HEAD
++=======
+ /* Define to 1 if you have the `g_mkdtemp' function. */
+ #undef HAVE_G_MKDTEMP
+ 
++>>>>>>> upstream/20131206+dfsg
  /* Define to 1 if you have the <HYPRE.h> header file. */
  #undef HAVE_HYPRE_H
  
@@@ -42,7 -62,7 +72,11 @@@
  /* Define to 1 if you have the <lis.h> header file. */
  #undef HAVE_LIS_H
  
++<<<<<<< HEAD
 +/* Define to 1 if gawk and m4 are available. */
++=======
+ /* Define to 1 if m4 is available. */
++>>>>>>> upstream/20131206+dfsg
  #undef HAVE_M4
  
  /* Define to 1 if you have the <memory.h> header file. */
@@@ -54,6 -74,9 +88,12 @@@
  /* Define to 1 if you have the <netcdf.h> header file. */
  #undef HAVE_NETCDF_H
  
++<<<<<<< HEAD
++=======
+ /* Define to 1 if you have the `open_memstream' function. */
+ #undef HAVE_OPEN_MEMSTREAM
+ 
++>>>>>>> upstream/20131206+dfsg
  /* Define to 1 if GModule are supported and if you have pkg-config. */
  #undef HAVE_PKG_CONFIG
  
@@@ -85,8 -108,11 +125,16 @@@
     */
  #undef LT_OBJDIR
  
++<<<<<<< HEAD
 +/* Linking flags to build modules. */
 +#undef MODULES_FLAGS
++=======
+ /* Options for m4 */
+ #undef M4_OPTIONS
+ 
+ /* Dynamic module suffix */
+ #undef MODULES_SUFFIX
++>>>>>>> upstream/20131206+dfsg
  
  /* Define to 1 if your C compiler doesn't accept -c and -o together. */
  #undef NO_MINUS_C_MINUS_O
diff --cc config.sub
index 2a55a50,6205f84..c780e94
--- a/config.sub
+++ b/config.sub
@@@ -1,10 -1,10 +1,17 @@@
  #! /bin/sh
  # Configuration validation subroutine script.
  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
++<<<<<<< HEAD
 +#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 +#   Free Software Foundation, Inc.
 +
 +timestamp='2009-11-20'
++=======
+ #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ #   2011, 2012 Free Software Foundation, Inc.
+ 
+ timestamp='2012-04-18'
++>>>>>>> upstream/20131206+dfsg
  
  # This file is (in principle) common to ALL GNU software.
  # The presence of a machine in this file suggests that SOME GNU software
@@@ -21,9 -21,7 +28,13 @@@
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
++<<<<<<< HEAD
 +# along with this program; if not, write to the Free Software
 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
 +# 02110-1301, USA.
++=======
+ # along with this program; if not, see <http://www.gnu.org/licenses/>.
++>>>>>>> upstream/20131206+dfsg
  #
  # As a special exception to the GNU General Public License, if you
  # distribute this file as part of a program that contains a
@@@ -75,8 -73,9 +86,14 @@@ Report bugs and patches to <config-patc
  version="\
  GNU config.sub ($timestamp)
  
++<<<<<<< HEAD
 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++=======
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@@ -123,13 -122,18 +140,26 @@@ esa
  # Here we must recognize all the valid KERNEL-OS combinations.
  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  case $maybe_os in
++<<<<<<< HEAD
 +  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
 +  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++=======
+   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+   linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+   knetbsd*-gnu* | netbsd*-gnu* | \
++>>>>>>> upstream/20131206+dfsg
    kopensolaris*-gnu* | \
    storm-chaos* | os2-emx* | rtmk-nova*)
      os=-$maybe_os
      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
      ;;
++<<<<<<< HEAD
++=======
+   android-linux)
+     os=-linux-android
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+     ;;
++>>>>>>> upstream/20131206+dfsg
    *)
      basic_machine=`echo $1 | sed 's/-[^-]*$//'`
      if [ $basic_machine != $1 ]
@@@ -156,8 -160,8 +186,13 @@@ case $os i
  		os=
  		basic_machine=$1
  		;;
++<<<<<<< HEAD
 +        -bluegene*)
 +	        os=-cnk
++=======
+ 	-bluegene*)
+ 		os=-cnk
++>>>>>>> upstream/20131206+dfsg
  		;;
  	-sim | -cisco | -oki | -wec | -winbond)
  		os=
@@@ -173,10 -177,10 +208,17 @@@
  		os=-chorusos
  		basic_machine=$1
  		;;
++<<<<<<< HEAD
 + 	-chorusrdb)
 + 		os=-chorusrdb
 +		basic_machine=$1
 + 		;;
++=======
+ 	-chorusrdb)
+ 		os=-chorusrdb
+ 		basic_machine=$1
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	-hiux*)
  		os=-hiuxwe2
  		;;
@@@ -221,6 -225,12 +263,15 @@@
  	-isc*)
  		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  		;;
++<<<<<<< HEAD
++=======
+ 	-lynx*178)
+ 		os=-lynxos178
+ 		;;
+ 	-lynx*5)
+ 		os=-lynxos5
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	-lynx*)
  		os=-lynxos
  		;;
@@@ -245,17 -255,22 +296,35 @@@ case $basic_machine i
  	# Some are omitted here because they have special meanings below.
  	1750a | 580 \
  	| a29k \
++<<<<<<< HEAD
++=======
+ 	| aarch64 | aarch64_be \
++>>>>>>> upstream/20131206+dfsg
  	| 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 \
++<<<<<<< HEAD
 +	| 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 \
++=======
+         | be32 | be64 \
+ 	| bfin \
+ 	| c4x | clipper \
+ 	| d10v | d30v | dlx | dsp16xx \
+ 	| epiphany \
+ 	| fido | fr30 | frv \
+ 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ 	| hexagon \
+ 	| i370 | i860 | i960 | ia64 \
+ 	| ip2k | iq2000 \
+ 	| le32 | le64 \
++>>>>>>> upstream/20131206+dfsg
  	| lm32 \
  	| m32c | m32r | m32rle | m68000 | m68k | m88k \
  	| maxq | mb | microblaze | mcore | mep | metag \
@@@ -281,29 -296,39 +350,63 @@@
  	| moxie \
  	| mt \
  	| msp430 \
++<<<<<<< HEAD
 +	| nios | nios2 \
 +	| ns16k | ns32k \
 +	| or32 \
 +	| pdp10 | pdp11 | pj | pjl \
 +	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 +	| pyramid \
 +	| rx \
++=======
+ 	| nds32 | nds32le | nds32be \
+ 	| nios | nios2 \
+ 	| ns16k | ns32k \
+ 	| open8 \
+ 	| or32 \
+ 	| pdp10 | pdp11 | pj | pjl \
+ 	| powerpc | powerpc64 | powerpc64le | powerpcle \
+ 	| pyramid \
+ 	| rl78 | rx \
++>>>>>>> upstream/20131206+dfsg
  	| score \
  	| sh | sh[1234] | sh[24]a | sh[24]aeb | 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 \
++<<<<<<< HEAD
 +	| spu | strongarm \
 +	| tahoe | thumb | tic4x | tic80 | tron \
 +	| ubicom32 \
 +	| v850 | v850e \
 +	| we32k \
 +	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
 +	| z8k | z80)
 +		basic_machine=$basic_machine-unknown
 +		;;
 +	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
 +		# Motorola 68HC11/12.
++=======
+ 	| spu \
+ 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ 	| ubicom32 \
+ 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ 	| we32k \
+ 	| x86 | xc16x | xstormy16 | xtensa \
+ 	| z8k | z80)
+ 		basic_machine=$basic_machine-unknown
+ 		;;
+ 	c54x)
+ 		basic_machine=tic54x-unknown
+ 		;;
+ 	c55x)
+ 		basic_machine=tic55x-unknown
+ 		;;
+ 	c6x)
+ 		basic_machine=tic6x-unknown
+ 		;;
+ 	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
++>>>>>>> upstream/20131206+dfsg
  		basic_machine=$basic_machine-unknown
  		os=-none
  		;;
@@@ -313,6 -338,21 +416,24 @@@
  		basic_machine=mt-unknown
  		;;
  
++<<<<<<< HEAD
++=======
+ 	strongarm | thumb | xscale)
+ 		basic_machine=arm-unknown
+ 		;;
+ 	xgate)
+ 		basic_machine=$basic_machine-unknown
+ 		os=-none
+ 		;;
+ 	xscaleeb)
+ 		basic_machine=armeb-unknown
+ 		;;
+ 
+ 	xscaleel)
+ 		basic_machine=armel-unknown
+ 		;;
+ 
++>>>>>>> upstream/20131206+dfsg
  	# We use `pc' rather than `unknown'
  	# because (1) that's what they normally are, and
  	# (2) the word "unknown" tends to confuse beginning users.
@@@ -327,21 -367,25 +448,38 @@@
  	# Recognize the basic CPU types with company name.
  	580-* \
  	| a29k-* \
++<<<<<<< HEAD
++=======
+ 	| aarch64-* | aarch64_be-* \
++>>>>>>> upstream/20131206+dfsg
  	| 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-* \
++<<<<<<< HEAD
 +	| bfin-* | bs2000-* \
 +	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
++=======
+ 	| be32-* | be64-* \
+ 	| bfin-* | bs2000-* \
+ 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
++>>>>>>> upstream/20131206+dfsg
  	| 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-* \
++<<<<<<< HEAD
 +	| i*86-* | i860-* | i960-* | ia64-* \
 +	| ip2k-* | iq2000-* \
++=======
+ 	| hexagon-* \
+ 	| i*86-* | i860-* | i960-* | ia64-* \
+ 	| ip2k-* | iq2000-* \
+ 	| le32-* | le64-* \
++>>>>>>> upstream/20131206+dfsg
  	| lm32-* \
  	| m32c-* | m32r-* | m32rle-* \
  	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@@@ -367,25 -411,29 +505,50 @@@
  	| mmix-* \
  	| mt-* \
  	| msp430-* \
++<<<<<<< HEAD
 +	| nios-* | nios2-* \
 +	| none-* | np1-* | ns16k-* | ns32k-* \
 +	| orion-* \
 +	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 +	| pyramid-* \
 +	| romp-* | rs6000-* | rx-* \
++=======
+ 	| nds32-* | nds32le-* | nds32be-* \
+ 	| nios-* | nios2-* \
+ 	| none-* | np1-* | ns16k-* | ns32k-* \
+ 	| open8-* \
+ 	| orion-* \
+ 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ 	| pyramid-* \
+ 	| rl78-* | romp-* | rs6000-* | rx-* \
++>>>>>>> upstream/20131206+dfsg
  	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
  	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
  	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
  	| sparclite-* \
++<<<<<<< HEAD
 +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
 +	| tahoe-* | thumb-* \
 +	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
 +	| tron-* \
 +	| ubicom32-* \
 +	| v850-* | v850e-* | vax-* \
 +	| we32k-* \
 +	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++=======
+ 	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ 	| tahoe-* \
+ 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ 	| tile*-* \
+ 	| tron-* \
+ 	| ubicom32-* \
+ 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ 	| vax-* \
+ 	| we32k-* \
+ 	| x86-* | x86_64-* | xc16x-* | xps100-* \
++>>>>>>> upstream/20131206+dfsg
  	| xstormy16-* | xtensa*-* \
  	| ymp-* \
  	| z8k-* | z80-*)
@@@ -410,7 -458,7 +573,11 @@@
  		basic_machine=a29k-amd
  		os=-udi
  		;;
++<<<<<<< HEAD
 +    	abacus)
++=======
+ 	abacus)
++>>>>>>> upstream/20131206+dfsg
  		basic_machine=abacus-unknown
  		;;
  	adobe68k)
@@@ -480,11 -528,20 +647,27 @@@
  		basic_machine=powerpc-ibm
  		os=-cnk
  		;;
++<<<<<<< HEAD
++=======
+ 	c54x-*)
+ 		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
+ 	c55x-*)
+ 		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
+ 	c6x-*)
+ 		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	c90)
  		basic_machine=c90-cray
  		os=-unicos
  		;;
++<<<<<<< HEAD
 +        cegcc)
++=======
+ 	cegcc)
++>>>>>>> upstream/20131206+dfsg
  		basic_machine=arm-unknown
  		os=-cegcc
  		;;
@@@ -516,7 -573,7 +699,11 @@@
  		basic_machine=craynv-cray
  		os=-unicosmp
  		;;
++<<<<<<< HEAD
 +	cr16)
++=======
+ 	cr16 | cr16-*)
++>>>>>>> upstream/20131206+dfsg
  		basic_machine=cr16-unknown
  		os=-elf
  		;;
@@@ -674,7 -731,6 +861,10 @@@
  	i370-ibm* | ibm*)
  		basic_machine=i370-ibm
  		;;
++<<<<<<< HEAD
 +# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
++=======
++>>>>>>> upstream/20131206+dfsg
  	i*86v32)
  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  		os=-sysv32
@@@ -732,7 -788,7 +922,11 @@@
  		basic_machine=ns32k-utek
  		os=-sysv
  		;;
++<<<<<<< HEAD
 +        microblaze)
++=======
+ 	microblaze)
++>>>>>>> upstream/20131206+dfsg
  		basic_machine=microblaze-xilinx
  		;;
  	mingw32)
@@@ -771,10 -827,18 +965,24 @@@
  	ms1-*)
  		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  		;;
++<<<<<<< HEAD
++=======
+ 	msys)
+ 		basic_machine=i386-pc
+ 		os=-msys
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	mvs)
  		basic_machine=i370-ibm
  		os=-mvs
  		;;
++<<<<<<< HEAD
++=======
+ 	nacl)
+ 		basic_machine=le32-unknown
+ 		os=-nacl
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	ncr3000)
  		basic_machine=i486-ncr
  		os=-sysv4
@@@ -839,6 -903,12 +1047,15 @@@
  	np1)
  		basic_machine=np1-gould
  		;;
++<<<<<<< HEAD
++=======
+ 	neo-tandem)
+ 		basic_machine=neo-tandem
+ 		;;
+ 	nse-tandem)
+ 		basic_machine=nse-tandem
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	nsr-tandem)
  		basic_machine=nsr-tandem
  		;;
@@@ -921,9 -991,10 +1138,16 @@@
  		;;
  	power)	basic_machine=power-ibm
  		;;
++<<<<<<< HEAD
 +	ppc)	basic_machine=powerpc-unknown
 +		;;
 +	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++=======
+ 	ppc | ppcbe)	basic_machine=powerpc-unknown
+ 		;;
+ 	ppc-* | ppcbe-*)
+ 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++>>>>>>> upstream/20131206+dfsg
  		;;
  	ppcle | powerpclittle | ppc-le | powerpc-little)
  		basic_machine=powerpcle-unknown
@@@ -1017,6 -1088,9 +1241,12 @@@
  		basic_machine=i860-stratus
  		os=-sysv4
  		;;
++<<<<<<< HEAD
++=======
+ 	strongarm-* | thumb-*)
+ 		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	sun2)
  		basic_machine=m68000-sun
  		;;
@@@ -1073,20 -1147,8 +1303,25 @@@
  		basic_machine=t90-cray
  		os=-unicos
  		;;
++<<<<<<< HEAD
 +	tic54x | c54x*)
 +		basic_machine=tic54x-unknown
 +		os=-coff
 +		;;
 +	tic55x | c55x*)
 +		basic_machine=tic55x-unknown
 +		os=-coff
 +		;;
 +	tic6x | c6x*)
 +		basic_machine=tic6x-unknown
 +		os=-coff
 +		;;
 +	tile*)
 +		basic_machine=tile-unknown
++=======
+ 	tile*)
+ 		basic_machine=$basic_machine-unknown
++>>>>>>> upstream/20131206+dfsg
  		os=-linux-gnu
  		;;
  	tx39)
@@@ -1156,6 -1218,9 +1391,12 @@@
  	xps | xps100)
  		basic_machine=xps100-honeywell
  		;;
++<<<<<<< HEAD
++=======
+ 	xscale-* | xscalee[bl]-*)
+ 		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	ymp)
  		basic_machine=ymp-cray
  		os=-unicos
@@@ -1253,11 -1318,11 +1494,19 @@@ esa
  if [ x"$os" != x"" ]
  then
  case $os in
++<<<<<<< HEAD
 +        # First match some system type aliases
 +        # that might get confused with valid system types.
 +	# -solaris* is a basic system type, with this one exception.
 +        -auroraux)
 +	        os=-auroraux
++=======
+ 	# First match some system type aliases
+ 	# that might get confused with valid system types.
+ 	# -solaris* is a basic system type, with this one exception.
+ 	-auroraux)
+ 		os=-auroraux
++>>>>>>> upstream/20131206+dfsg
  		;;
  	-solaris1 | -solaris1.*)
  		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@@ -1293,8 -1358,9 +1542,14 @@@
  	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  	      | -chorusos* | -chorusrdb* | -cegcc* \
++<<<<<<< HEAD
 +	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 +	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++=======
+ 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ 	      | -mingw32* | -linux-gnu* | -linux-android* \
+ 	      | -linux-newlib* | -linux-uclibc* \
++>>>>>>> upstream/20131206+dfsg
  	      | -uxpv* | -beos* | -mpeix* | -udk* \
  	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@@ -1341,7 -1407,7 +1596,11 @@@
  	-opened*)
  		os=-openedition
  		;;
++<<<<<<< HEAD
 +        -os400*)
++=======
+ 	-os400*)
++>>>>>>> upstream/20131206+dfsg
  		os=-os400
  		;;
  	-wince*)
@@@ -1390,7 -1456,7 +1649,11 @@@
  	-sinix*)
  		os=-sysv4
  		;;
++<<<<<<< HEAD
 +        -tpf*)
++=======
+ 	-tpf*)
++>>>>>>> upstream/20131206+dfsg
  		os=-tpf
  		;;
  	-triton*)
@@@ -1435,6 -1501,8 +1698,11 @@@
  	-dicos*)
  		os=-dicos
  		;;
++<<<<<<< HEAD
++=======
+ 	-nacl*)
+ 		;;
++>>>>>>> upstream/20131206+dfsg
  	-none)
  		;;
  	*)
@@@ -1457,10 -1525,10 +1725,17 @@@ els
  # system, and we'll never get to this point.
  
  case $basic_machine in
++<<<<<<< HEAD
 +        score-*)
 +		os=-elf
 +		;;
 +        spu-*)
++=======
+ 	score-*)
+ 		os=-elf
+ 		;;
+ 	spu-*)
++>>>>>>> upstream/20131206+dfsg
  		os=-elf
  		;;
  	*-acorn)
@@@ -1472,8 -1540,20 +1747,25 @@@
  	arm*-semi)
  		os=-aout
  		;;
++<<<<<<< HEAD
 +        c4x-* | tic4x-*)
 +        	os=-coff
++=======
+ 	c4x-* | tic4x-*)
+ 		os=-coff
+ 		;;
+ 	hexagon-*)
+ 		os=-elf
+ 		;;
+ 	tic54x-*)
+ 		os=-coff
+ 		;;
+ 	tic55x-*)
+ 		os=-coff
+ 		;;
+ 	tic6x-*)
+ 		os=-coff
++>>>>>>> upstream/20131206+dfsg
  		;;
  	# This must come before the *-dec entry.
  	pdp10-*)
@@@ -1493,14 -1573,11 +1785,21 @@@
  		;;
  	m68000-sun)
  		os=-sunos3
++<<<<<<< HEAD
 +		# This also exists in the configure program, but was not the
 +		# default.
 +		# os=-sunos4
++=======
++>>>>>>> upstream/20131206+dfsg
  		;;
  	m68*-cisco)
  		os=-aout
  		;;
++<<<<<<< HEAD
 +        mep-*)
++=======
+ 	mep-*)
++>>>>>>> upstream/20131206+dfsg
  		os=-elf
  		;;
  	mips*-cisco)
@@@ -1527,7 -1604,7 +1826,11 @@@
  	*-ibm)
  		os=-aix
  		;;
++<<<<<<< HEAD
 +    	*-knuth)
++=======
+ 	*-knuth)
++>>>>>>> upstream/20131206+dfsg
  		os=-mmixware
  		;;
  	*-wec)
diff --cc configure
index 4e7a0b7,104cd91..4dcec5d
--- a/configure
+++ b/configure
@@@ -1,11 -1,9 +1,18 @@@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
++<<<<<<< HEAD
 +# Generated by GNU Autoconf 2.67.
 +#
 +#
 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
 +# Foundation, Inc.
++=======
+ # Generated by GNU Autoconf 2.69.
+ #
+ #
+ # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #
  #
  # This configure script is free software; the Free Software Foundation
@@@ -89,6 -87,7 +96,10 @@@ f
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
++<<<<<<< HEAD
++=======
+ as_myself=
++>>>>>>> upstream/20131206+dfsg
  case $0 in #((
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@@ -133,6 -132,31 +144,34 @@@ export LANGUAG
  # CDPATH.
  (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  
++<<<<<<< HEAD
++=======
+ # Use a proper internal environment variable to ensure we don't fall
+   # into an infinite loop, continuously re-executing ourselves.
+   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+     _as_can_reexec=no; export _as_can_reexec;
+     # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ case $- in # ((((
+   *v*x* | *x*v* ) as_opts=-vx ;;
+   *v* ) as_opts=-v ;;
+   *x* ) as_opts=-x ;;
+   * ) as_opts= ;;
+ esac
+ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+ # Admittedly, this is quite paranoid, since all the known shells bail
+ # out after a failed `exec'.
+ $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+ as_fn_exit 255
+   fi
+   # We don't want this to propagate to other subprocesses.
+           { _as_can_reexec=; unset _as_can_reexec;}
++>>>>>>> upstream/20131206+dfsg
  if test "x$CONFIG_SHELL" = x; then
    as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
    emulate sh
@@@ -166,7 -190,8 +205,12 @@@ if ( set x; as_fn_ret_success y && tes
  else
    exitcode=1; echo positional parameters were not saved.
  fi
++<<<<<<< HEAD
 +test x\$exitcode = x0 || exit 1"
++=======
+ test x\$exitcode = x0 || exit 1
+ test -x / || exit 1"
++>>>>>>> upstream/20131206+dfsg
    as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
    as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
    eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@@ -219,14 -244,25 +263,36 @@@ IFS=$as_save_IF
  
  
        if test "x$CONFIG_SHELL" != x; then :
++<<<<<<< HEAD
 +  # We cannot yet assume a decent shell, so we have to provide a
 +	# neutralization value for shells without unset; and this also
 +	# works around shells that cannot unset nonexistent variables.
 +	BASH_ENV=/dev/null
 +	ENV=/dev/null
 +	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 +	export CONFIG_SHELL
 +	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
++=======
+   export CONFIG_SHELL
+              # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ case $- in # ((((
+   *v*x* | *x*v* ) as_opts=-vx ;;
+   *v* ) as_opts=-v ;;
+   *x* ) as_opts=-x ;;
+   * ) as_opts= ;;
+ esac
+ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+ # Admittedly, this is quite paranoid, since all the known shells bail
+ # out after a failed `exec'.
+ $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+ exit 255
++>>>>>>> upstream/20131206+dfsg
  fi
  
      if test x$as_have_required = xno; then :
@@@ -328,6 -364,14 +394,17 @@@ $as_echo X"$as_dir" 
  
  
  } # as_fn_mkdir_p
++<<<<<<< HEAD
++=======
+ 
+ # as_fn_executable_p FILE
+ # -----------------------
+ # Test if FILE is an executable regular file.
+ as_fn_executable_p ()
+ {
+   test -f "$1" && test -x "$1"
+ } # as_fn_executable_p
++>>>>>>> upstream/20131206+dfsg
  # as_fn_append VAR VALUE
  # ----------------------
  # Append the text in VALUE to the end of the definition contained in VAR. Take
@@@ -449,6 -493,10 +526,13 @@@ as_cr_alnum=$as_cr_Letters$as_cr_digit
    chmod +x "$as_me.lineno" ||
      { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
  
++<<<<<<< HEAD
++=======
+   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+   # already done that, so ensure we don't try to do so again and fall
+   # in an infinite loop.  This has already happened in practice.
+   _as_can_reexec=no; export _as_can_reexec
++>>>>>>> upstream/20131206+dfsg
    # Don't try to exec as it changes $[0], causing all sort of problems
    # (the dirname of $[0] is not the place where we might find the
    # original and so on.  Autoconf is especially sensitive to this).
@@@ -483,16 -531,16 +567,29 @@@ if (echo >conf$$.file) 2>/dev/null; the
      # ... but there are two gotchas:
      # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
      # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++<<<<<<< HEAD
 +    # In both cases, we have to default to `cp -p'.
 +    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 +      as_ln_s='cp -p'
 +  elif ln conf$$.file conf$$ 2>/dev/null; then
 +    as_ln_s=ln
 +  else
 +    as_ln_s='cp -p'
 +  fi
 +else
 +  as_ln_s='cp -p'
++=======
+     # In both cases, we have to default to `cp -pR'.
+     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+       as_ln_s='cp -pR'
+   elif ln conf$$.file conf$$ 2>/dev/null; then
+     as_ln_s=ln
+   else
+     as_ln_s='cp -pR'
+   fi
+ else
+   as_ln_s='cp -pR'
++>>>>>>> upstream/20131206+dfsg
  fi
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
@@@ -504,28 -552,8 +601,33 @@@ els
    as_mkdir_p=false
  fi
  
++<<<<<<< HEAD
 +if test -x / >/dev/null 2>&1; then
 +  as_test_x='test -x'
 +else
 +  if ls -dL / >/dev/null 2>&1; then
 +    as_ls_L_option=L
 +  else
 +    as_ls_L_option=
 +  fi
 +  as_test_x='
 +    eval sh -c '\''
 +      if test -d "$1"; then
 +	test -d "$1/.";
 +      else
 +	case $1 in #(
 +	-*)set "./$1";;
 +	esac;
 +	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 +	???[sx]*):;;*)false;;esac;fi
 +    '\'' sh
 +  '
 +fi
 +as_executable_p=$as_test_x
++=======
+ as_test_x='test -x'
+ as_executable_p=as_fn_executable_p
++>>>>>>> upstream/20131206+dfsg
  
  # 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'"
@@@ -564,7 -592,7 +666,11 @@@ PACKAGE_STRING
  PACKAGE_BUGREPORT=
  PACKAGE_URL=
  
++<<<<<<< HEAD
 +ac_unique_file="configure.in"
++=======
+ ac_unique_file="configure.ac"
++>>>>>>> upstream/20131206+dfsg
  # Factoring default headers for most tests.
  ac_includes_default="\
  #include <stdio.h>
@@@ -609,7 -637,12 +715,16 @@@ DARCS_CONTROLLED_FALS
  DARCS_CONTROLLED_TRUE
  GFS3D_LIBS
  GFS2D_LIBS
++<<<<<<< HEAD
 +MODULES
++=======
+ OPEN_MEMSTREAM_FALSE
+ OPEN_MEMSTREAM_TRUE
+ HAS_FFTW3_FALSE
+ HAS_FFTW3_TRUE
+ FFTW3_LIBS
+ FFTW3_CFLAGS
++>>>>>>> upstream/20131206+dfsg
  BUILD_LIS_FALSE
  BUILD_LIS_TRUE
  BUILD_HYPRE_FALSE
@@@ -629,6 -662,7 +744,10 @@@ FCFLAG
  FC
  BUILD_STOKES_FALSE
  BUILD_STOKES_TRUE
++<<<<<<< HEAD
++=======
+ FLIBS
++>>>>>>> upstream/20131206+dfsg
  ac_ct_F77
  FFLAGS
  F77
@@@ -643,18 -677,13 +762,28 @@@ GSL_CFLAG
  GSL_CONFIG
  HAS_LIBPROJ_FALSE
  HAS_LIBPROJ_TRUE
++<<<<<<< HEAD
 +HAVE_MODULES_FALSE
 +HAVE_MODULES_TRUE
 +have_gmodule
 +have_m4
 +have_awk
 +have_pkg_config
 +GTS_DEPLIBS
 +gts_libs
 +gts_cflags
 +GTS_LIBS
 +GTS_CFLAGS
 +GTS_CONFIG
++=======
+ have_m4
+ have_pkg_config
+ GTS_LIBS
+ GTS_CFLAGS
+ PKG_CONFIG_LIBDIR
+ PKG_CONFIG_PATH
+ PKG_CONFIG
++>>>>>>> upstream/20131206+dfsg
  NO_UNDEFINED
  CPP
  OTOOL64
@@@ -690,6 -719,7 +819,10 @@@ buil
  am__fastdepCC_FALSE
  am__fastdepCC_TRUE
  CCDEPMODE
++<<<<<<< HEAD
++=======
+ am__nodep
++>>>>>>> upstream/20131206+dfsg
  AMDEPBACKSLASH
  AMDEP_FALSE
  AMDEP_TRUE
@@@ -734,6 -764,7 +867,10 @@@ LT_AG
  LT_REVISION
  LT_CURRENT
  LT_RELEASE
++<<<<<<< HEAD
++=======
+ WEBROOT
++>>>>>>> upstream/20131206+dfsg
  GFS_COMPILATION_FLAGS
  GFS_VERSION
  GFS_MICRO_VERSION
@@@ -782,6 -813,7 +919,10 @@@ ac_user_opts=
  enable_option_checking
  enable_maintainer_mode
  with_mpicc
++<<<<<<< HEAD
++=======
+ with_suffix
++>>>>>>> upstream/20131206+dfsg
  enable_mpi
  enable_dependency_tracking
  enable_shared
@@@ -793,10 -825,6 +934,13 @@@ with_sysroo
  enable_libtool_lock
  enable_libtool_verbose
  enable_gts_check
++<<<<<<< HEAD
 +with_gts_prefix
 +with_gts_exec_prefix
 +enable_gtstest
 +enable_modules
++=======
++>>>>>>> upstream/20131206+dfsg
  with_gsl_prefix
  with_gsl_exec_prefix
  enable_gsltest
@@@ -811,10 -839,17 +955,24 @@@ LDFLAG
  LIBS
  CPPFLAGS
  CPP
++<<<<<<< HEAD
 +F77
 +FFLAGS
 +FC
 +FCFLAGS'
++=======
+ PKG_CONFIG
+ PKG_CONFIG_PATH
+ PKG_CONFIG_LIBDIR
+ GTS_CFLAGS
+ GTS_LIBS
+ F77
+ FFLAGS
+ FC
+ FCFLAGS
+ FFTW3_CFLAGS
+ FFTW3_LIBS'
++>>>>>>> upstream/20131206+dfsg
  
  
  # Initialize some variables set by options.
@@@ -1219,7 -1254,7 +1377,11 @@@ Try \`$0 --help' for more information
      $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
      expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
        $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++<<<<<<< HEAD
 +    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
++=======
+     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
++>>>>>>> upstream/20131206+dfsg
      ;;
  
    esac
@@@ -1270,8 -1305,6 +1432,11 @@@ target=$target_alia
  if test "x$host_alias" != x; then
    if test "x$build_alias" = x; then
      cross_compiling=maybe
++<<<<<<< HEAD
 +    $as_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
++=======
++>>>>>>> upstream/20131206+dfsg
    elif test "x$build_alias" != "x$host_alias"; then
      cross_compiling=yes
    fi
@@@ -1445,8 -1478,6 +1610,11 @@@ Optional Features
    --disable-libtool-lock  avoid locking (might break parallel builds)
    --enable-libtool-verbose enable verbose libtool output (default disabled)
    --enable-gts-check      enable object type cast checks in GTS
++<<<<<<< HEAD
 +  --disable-gtstest       Do not try to compile and run a test GTS program
 +  --disable-modules       link modules statically with the executables
++=======
++>>>>>>> upstream/20131206+dfsg
    --disable-gsltest       Do not try to compile and run a test GSL program
    --enable-agmg enable the AGMG module (beware of non-free license)
  
@@@ -1454,13 -1485,12 +1622,21 @@@ Optional Packages
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    --with-mpicc=path       pick a specific path to mpicc
++<<<<<<< HEAD
 +  --with-pic              try to use only PIC/non-PIC objects [default=use
++=======
+   --with-suffix=.a        override the glib dynamic module suffix
+   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
++>>>>>>> upstream/20131206+dfsg
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
    --with-sysroot=DIR Search for dependent libraries within DIR
                          (or the compiler's sysroot if not specified).
++<<<<<<< HEAD
 +  --with-gts-prefix=PFX   Prefix where GTS is installed (optional)
 +  --with-gts-exec-prefix=PFX Exec prefix where GTS is installed (optional)
++=======
++>>>>>>> upstream/20131206+dfsg
    --with-gsl-prefix=PFX   Prefix where GSL is installed (optional)
    --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional)
  
@@@ -1473,10 -1503,20 +1649,26 @@@ Some influential environment variables
    CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
                you have headers in a nonstandard directory <include dir>
    CPP         C preprocessor
++<<<<<<< HEAD
++=======
+   PKG_CONFIG  path to pkg-config utility
+   PKG_CONFIG_PATH
+               directories to add to pkg-config's search path
+   PKG_CONFIG_LIBDIR
+               path overriding pkg-config's built-in search path
+   GTS_CFLAGS  C compiler flags for GTS, overriding pkg-config
+   GTS_LIBS    linker flags for GTS, overriding pkg-config
++>>>>>>> upstream/20131206+dfsg
    F77         Fortran 77 compiler command
    FFLAGS      Fortran 77 compiler flags
    FC          Fortran compiler command
    FCFLAGS     Fortran compiler flags
++<<<<<<< HEAD
++=======
+   FFTW3_CFLAGS
+               C compiler flags for FFTW3, overriding pkg-config
+   FFTW3_LIBS  linker flags for FFTW3, overriding pkg-config
++>>>>>>> upstream/20131206+dfsg
  
  Use these variables to override the choices made by `configure' or to help
  it to find libraries and programs with nonstandard names/locations.
@@@ -1545,9 -1585,9 +1737,15 @@@ test -n "$ac_init_help" && exit $ac_sta
  if $ac_init_version; then
    cat <<\_ACEOF
  configure
++<<<<<<< HEAD
 +generated by GNU Autoconf 2.67
 +
 +Copyright (C) 2010 Free Software Foundation, Inc.
++=======
+ generated by GNU Autoconf 2.69
+ 
+ Copyright (C) 2012 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  This configure script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it.
  _ACEOF
@@@ -1591,7 -1631,7 +1789,11 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
  	ac_retval=1
  fi
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_c_try_compile
@@@ -1623,7 -1663,7 +1825,11 @@@ $as_echo "$ac_try_echo"; } >&
  	 test ! -s conftest.err
         } && test -s conftest$ac_exeext && {
  	 test "$cross_compiling" = yes ||
++<<<<<<< HEAD
 +	 $as_test_x conftest$ac_exeext
++=======
+ 	 test -x conftest$ac_exeext
++>>>>>>> upstream/20131206+dfsg
         }; then :
    ac_retval=0
  else
@@@ -1637,7 -1677,7 +1843,11 @@@ f
    # interfere with the next link command; also delete a directory that is
    # left behind by Apple's compiler.  We do this before executing the actions.
    rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_c_try_link
@@@ -1651,7 -1691,7 +1861,11 @@@ ac_fn_c_check_header_compile (
    as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  $as_echo_n "checking for $2... " >&6; }
++<<<<<<< HEAD
 +if eval "test \"\${$3+set}\"" = set; then :
++=======
+ if eval \${$3+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -1669,7 -1709,7 +1883,11 @@@ f
  eval ac_res=\$$3
  	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  $as_echo "$ac_res" >&6; }
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
  
  } # ac_fn_c_check_header_compile
  
@@@ -1705,7 -1745,7 +1923,11 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
      ac_retval=1
  fi
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_c_try_cpp
@@@ -1747,7 -1787,7 +1969,11 @@@ sed 's/^/| /' conftest.$ac_ext >&
         ac_retval=$ac_status
  fi
    rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_c_try_run
@@@ -1760,7 -1800,7 +1986,11 @@@ ac_fn_c_check_func (
    as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  $as_echo_n "checking for $2... " >&6; }
++<<<<<<< HEAD
 +if eval "test \"\${$3+set}\"" = set; then :
++=======
+ if eval \${$3+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -1815,7 -1855,7 +2045,11 @@@ f
  eval ac_res=\$$3
  	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  $as_echo "$ac_res" >&6; }
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
  
  } # ac_fn_c_check_func
  
@@@ -1827,10 -1867,10 +2061,17 @@@
  ac_fn_c_check_header_mongrel ()
  {
    as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++<<<<<<< HEAD
 +  if eval "test \"\${$3+set}\"" = set; then :
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 +$as_echo_n "checking for $2... " >&6; }
 +if eval "test \"\${$3+set}\"" = set; then :
++=======
+   if eval \${$3+:} false; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+ if eval \${$3+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  fi
  eval ac_res=\$$3
@@@ -1893,7 -1933,7 +2134,11 @@@ $as_echo "$as_me: WARNING: $2: proceedi
  esac
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
  $as_echo_n "checking for $2... " >&6; }
++<<<<<<< HEAD
 +if eval "test \"\${$3+set}\"" = set; then :
++=======
+ if eval \${$3+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    eval "$3=\$ac_header_compiler"
@@@ -1902,7 -1942,7 +2147,11 @@@ eval ac_res=\$$
  	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
  $as_echo "$ac_res" >&6; }
  fi
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
  
  } # ac_fn_c_check_header_mongrel
  
@@@ -1939,7 -1979,7 +2188,11 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
  	ac_retval=1
  fi
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_f77_try_compile
@@@ -1971,7 -2011,7 +2224,11 @@@ $as_echo "$ac_try_echo"; } >&
  	 test ! -s conftest.err
         } && test -s conftest$ac_exeext && {
  	 test "$cross_compiling" = yes ||
++<<<<<<< HEAD
 +	 $as_test_x conftest$ac_exeext
++=======
+ 	 test -x conftest$ac_exeext
++>>>>>>> upstream/20131206+dfsg
         }; then :
    ac_retval=0
  else
@@@ -1985,7 -2025,7 +2242,11 @@@ f
    # interfere with the next link command; also delete a directory that is
    # left behind by Apple's compiler.  We do this before executing the actions.
    rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_f77_try_link
@@@ -2023,7 -2063,7 +2284,11 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
  	ac_retval=1
  fi
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_fc_try_compile
@@@ -2055,7 -2095,7 +2320,11 @@@ $as_echo "$ac_try_echo"; } >&
  	 test ! -s conftest.err
         } && test -s conftest$ac_exeext && {
  	 test "$cross_compiling" = yes ||
++<<<<<<< HEAD
 +	 $as_test_x conftest$ac_exeext
++=======
+ 	 test -x conftest$ac_exeext
++>>>>>>> upstream/20131206+dfsg
         }; then :
    ac_retval=0
  else
@@@ -2069,7 -2109,7 +2338,11 @@@ f
    # interfere with the next link command; also delete a directory that is
    # left behind by Apple's compiler.  We do this before executing the actions.
    rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++<<<<<<< HEAD
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++=======
+   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++>>>>>>> upstream/20131206+dfsg
    as_fn_set_status $ac_retval
  
  } # ac_fn_fc_try_link
@@@ -2078,7 -2118,7 +2351,11 @@@ This file contains any messages produce
  running configure, to aid debugging if configure makes a mistake.
  
  It was created by $as_me, which was
++<<<<<<< HEAD
 +generated by GNU Autoconf 2.67.  Invocation command line was
++=======
+ generated by GNU Autoconf 2.69.  Invocation command line was
++>>>>>>> upstream/20131206+dfsg
  
    $ $0 $@
  
@@@ -2336,7 -2376,7 +2613,11 @@@ $as_echo "$as_me: loading site script $
        || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  as_fn_error $? "failed to load site script $ac_site_file
++<<<<<<< HEAD
 +See \`config.log' for more details" "$LINENO" 5 ; }
++=======
+ See \`config.log' for more details" "$LINENO" 5; }
++>>>>>>> upstream/20131206+dfsg
    fi
  done
  
@@@ -2452,6 -2492,10 +2733,13 @@@ GFS_COMPILATION_FLAGS=$CFLAG
  
  
  
++<<<<<<< HEAD
++=======
+ # change this to the gerris web site root
+ WEBROOT=/var/www/site-gerris/gerris
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
  # libtool versioning
  LT_RELEASE=$GFS_MAJOR_VERSION.$GFS_MINOR_VERSION
  LT_CURRENT=`expr $GFS_MICRO_VERSION - $GFS_INTERFACE_AGE`
@@@ -2514,7 -2558,7 +2802,11 @@@ ac_configure="$SHELL $ac_aux_dir/config
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
  $as_echo_n "checking for a BSD-compatible install... " >&6; }
  if test -z "$INSTALL"; then
++<<<<<<< HEAD
 +if test "${ac_cv_path_install+set}" = set; then :
++=======
+ if ${ac_cv_path_install+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@@ -2534,7 -2578,7 +2826,11 @@@ case $as_dir/ in #(
      # by default.
      for ac_prog in ginstall scoinst install; do
        for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
++=======
+ 	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
  	  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.
@@@ -2601,11 -2645,11 +2897,19 @@@ am_lf=
  '
  case `pwd` in
    *[\\\"\#\$\&\'\`$am_lf]*)
++<<<<<<< HEAD
 +    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
 +esac
 +case $srcdir in
 +  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
 +    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
++=======
+     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+ esac
+ case $srcdir in
+   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+     as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
++>>>>>>> upstream/20131206+dfsg
  esac
  
  # Do `set' in a subshell so we don't clobber the current shell's
@@@ -2691,7 -2735,7 +2995,11 @@@ if test "$cross_compiling" != no; the
  set dummy ${ac_tool_prefix}strip; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_STRIP+set}" = set; then :
++=======
+ if ${ac_cv_prog_STRIP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$STRIP"; then
@@@ -2703,7 -2747,7 +3011,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -2731,7 -2775,7 +3043,11 @@@ if test -z "$ac_cv_prog_STRIP"; the
  set dummy strip; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_STRIP"; then
@@@ -2743,7 -2787,7 +3059,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_STRIP="strip"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -2784,7 -2828,7 +3104,11 @@@ INSTALL_STRIP_PROGRAM="\$(install_sh) -
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
  $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
  if test -z "$MKDIR_P"; then
++<<<<<<< HEAD
 +  if test "${ac_cv_path_mkdir+set}" = set; then :
++=======
+   if ${ac_cv_path_mkdir+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@@ -2794,7 -2838,7 +3118,11 @@@ d
    test -z "$as_dir" && as_dir=.
      for ac_prog in mkdir gmkdir; do
  	 for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
++=======
+ 	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
++>>>>>>> upstream/20131206+dfsg
  	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
  	     'mkdir (GNU coreutils) '* | \
  	     'mkdir (coreutils) '* | \
@@@ -2835,7 -2879,7 +3163,11 @@@ d
  set dummy $ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_AWK+set}" = set; then :
++=======
+ if ${ac_cv_prog_AWK+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$AWK"; then
@@@ -2847,7 -2891,7 +3179,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_AWK="$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -2875,7 -2919,7 +3211,11 @@@ don
  $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
  set x ${MAKE-make}
  ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++<<<<<<< HEAD
 +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
++=======
+ if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat >conftest.make <<\_ACEOF
@@@ -2954,11 -2998,11 +3294,19 @@@ MAKEINFO=${MAKEINFO-"${am_missing_run}m
  
  # We need awk for the "check" target.  The system "awk" is bad on
  # some platforms.
++<<<<<<< HEAD
 +# Always define AMTAR for backward compatibility.
 +
 +AMTAR=${AMTAR-"${am_missing_run}tar"}
 +
 +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
++=======
+ # Always define AMTAR for backward compatibility.  Yes, it's still used
+ # in the wild :-(  We should find a proper way to deprecate it ...
+ AMTAR='$${TAR-tar}'
+ 
+ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
++>>>>>>> upstream/20131206+dfsg
  
  
  
@@@ -3038,6 -3082,22 +3386,25 @@@ els
  fi
  
  
++<<<<<<< HEAD
++=======
+ # Check whether --with-suffix was given.
+ if test "${with_suffix+set}" = set; then :
+   withval=$with_suffix; with_suffix=$withval
+ else
+   with_suffix=default
+ fi
+ 
+ 
+ if test ! "x$with_suffix" = "xdefault"; then
+ 
+ cat >>confdefs.h <<_ACEOF
+ #define MODULES_SUFFIX "$with_suffix"
+ _ACEOF
+ 
+ fi
+ 
++>>>>>>> upstream/20131206+dfsg
  # check if MPI support is disabled
  # Check whether --enable-mpi was given.
  if test "${enable_mpi+set}" = set; then :
@@@ -3059,7 -3119,7 +3426,11 @@@ if test "x$with_mpicc" != "xno" ; the
  set dummy mpicc; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_use_mpicc+set}" = set; then :
++=======
+ if ${ac_cv_prog_use_mpicc+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$use_mpicc"; then
@@@ -3071,7 -3131,7 +3442,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_use_mpicc="yes"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -3080,6 -3140,7 +3455,10 @@@ don
    done
  IFS=$as_save_IFS
  
++<<<<<<< HEAD
++=======
+   test -z "$ac_cv_prog_use_mpicc" && ac_cv_prog_use_mpicc="no"
++>>>>>>> upstream/20131206+dfsg
  fi
  fi
  use_mpicc=$ac_cv_prog_use_mpicc
@@@ -3104,6 -3165,8 +3483,11 @@@ $as_echo "#define HAVE_MPI 1" >>confdef
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPI not found. No MPI support will be compiled in." >&5
  $as_echo "$as_me: WARNING: MPI not found. No MPI support will be compiled in." >&2;}
    fi
++<<<<<<< HEAD
++=======
+ else
+   use_mpicc=no
++>>>>>>> upstream/20131206+dfsg
  fi
  
  ac_ext=c
@@@ -3116,7 -3179,7 +3500,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy ${ac_tool_prefix}gcc; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_CC+set}" = set; then :
++=======
+ if ${ac_cv_prog_CC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
@@@ -3128,7 -3191,7 +3516,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_CC="${ac_tool_prefix}gcc"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -3156,7 -3219,7 +3548,11 @@@ if test -z "$ac_cv_prog_CC"; the
  set dummy gcc; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_CC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
@@@ -3168,7 -3231,7 +3564,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_CC="gcc"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -3209,7 -3272,7 +3609,11 @@@ if test -z "$CC"; the
  set dummy ${ac_tool_prefix}cc; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_CC+set}" = set; then :
++=======
+ if ${ac_cv_prog_CC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
@@@ -3221,7 -3284,7 +3625,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_CC="${ac_tool_prefix}cc"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -3249,7 -3312,7 +3657,11 @@@ if test -z "$CC"; the
  set dummy cc; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_CC+set}" = set; then :
++=======
+ if ${ac_cv_prog_CC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
@@@ -3262,7 -3325,7 +3674,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
         ac_prog_rejected=yes
         continue
@@@ -3308,7 -3371,7 +3724,11 @@@ if test -z "$CC"; the
  set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_CC+set}" = set; then :
++=======
+ if ${ac_cv_prog_CC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
@@@ -3320,7 -3383,7 +3740,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -3352,7 -3415,7 +3776,11 @@@ d
  set dummy $ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_CC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
@@@ -3364,7 -3427,7 +3792,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_CC="$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -3407,7 -3470,7 +3839,11 @@@ f
  test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  as_fn_error $? "no acceptable C compiler found in \$PATH
++<<<<<<< HEAD
 +See \`config.log' for more details" "$LINENO" 5 ; }
++=======
+ See \`config.log' for more details" "$LINENO" 5; }
++>>>>>>> upstream/20131206+dfsg
  
  # Provide some information about the compiler.
  $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@@ -3522,7 -3585,7 +3958,11 @@@ sed 's/^/| /' conftest.$ac_ext >&
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  as_fn_error 77 "C compiler cannot create executables
++<<<<<<< HEAD
 +See \`config.log' for more details" "$LINENO" 5 ; }
++=======
+ See \`config.log' for more details" "$LINENO" 5; }
++>>>>>>> upstream/20131206+dfsg
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
@@@ -3565,7 -3628,7 +4005,11 @@@ els
    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  as_fn_error $? "cannot compute suffix of executables: cannot compile and link
++<<<<<<< HEAD
 +See \`config.log' for more details" "$LINENO" 5 ; }
++=======
+ See \`config.log' for more details" "$LINENO" 5; }
++>>>>>>> upstream/20131206+dfsg
  fi
  rm -f conftest conftest$ac_cv_exeext
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@@ -3624,7 -3687,7 +4068,11 @@@ $as_echo "$ac_try_echo"; } >&
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  as_fn_error $? "cannot run C compiled programs.
  If you meant to cross compile, use \`--host'.
++<<<<<<< HEAD
 +See \`config.log' for more details" "$LINENO" 5 ; }
++=======
+ See \`config.log' for more details" "$LINENO" 5; }
++>>>>>>> upstream/20131206+dfsg
      fi
    fi
  fi
@@@ -3635,7 -3698,7 +4083,11 @@@ rm -f conftest.$ac_ext conftest$ac_cv_e
  ac_clean_files=$ac_clean_files_save
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
  $as_echo_n "checking for suffix of object files... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_objext+set}" = set; then :
++=======
+ if ${ac_cv_objext+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -3676,7 -3739,7 +4128,11 @@@ sed 's/^/| /' conftest.$ac_ext >&
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  as_fn_error $? "cannot compute suffix of object files: cannot compile
++<<<<<<< HEAD
 +See \`config.log' for more details" "$LINENO" 5 ; }
++=======
+ See \`config.log' for more details" "$LINENO" 5; }
++>>>>>>> upstream/20131206+dfsg
  fi
  rm -f conftest.$ac_cv_objext conftest.$ac_ext
  fi
@@@ -3686,7 -3749,7 +4142,11 @@@ OBJEXT=$ac_cv_objex
  ac_objext=$OBJEXT
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
  $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_c_compiler_gnu+set}" = set; then :
++=======
+ if ${ac_cv_c_compiler_gnu+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -3723,7 -3786,7 +4183,11 @@@ ac_test_CFLAGS=${CFLAGS+set
  ac_save_CFLAGS=$CFLAGS
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
  $as_echo_n "checking whether $CC accepts -g... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_cc_g+set}" = set; then :
++=======
+ if ${ac_cv_prog_cc_g+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_save_c_werror_flag=$ac_c_werror_flag
@@@ -3801,7 -3864,7 +4265,11 @@@ els
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
  $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_cc_c89+set}" = set; then :
++=======
+ if ${ac_cv_prog_cc_c89+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_cv_prog_cc_c89=no
@@@ -3810,8 -3873,7 +4278,12 @@@ cat confdefs.h - <<_ACEOF >conftest.$ac
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdio.h>
++<<<<<<< HEAD
 +#include <sys/types.h>
 +#include <sys/stat.h>
++=======
+ struct stat;
++>>>>>>> upstream/20131206+dfsg
  /* 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);
@@@ -3947,6 -4009,7 +4419,10 @@@ f
  if test "x$enable_dependency_tracking" != xno; then
    am_depcomp="$ac_aux_dir/depcomp"
    AMDEPBACKSLASH='\'
++<<<<<<< HEAD
++=======
+   am__nodep='_no'
++>>>>>>> upstream/20131206+dfsg
  fi
   if test "x$enable_dependency_tracking" != xno; then
    AMDEP_TRUE=
@@@ -3962,7 -4025,7 +4438,11 @@@ depcc="$CC"   am_compiler_list
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
  $as_echo_n "checking dependency style of $depcc... " >&6; }
++<<<<<<< HEAD
 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
++=======
+ if ${am_cv_CC_dependencies_compiler_type+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@@ -3971,6 -4034,7 +4451,10 @@@
    # 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'.
++<<<<<<< HEAD
++=======
+   rm -rf conftest.dir
++>>>>>>> upstream/20131206+dfsg
    mkdir conftest.dir
    # Copy depcomp to subdir because otherwise we won't find it if we're
    # using a relative directory.
@@@ -4030,7 -4094,7 +4514,11 @@@
  	break
        fi
        ;;
++<<<<<<< HEAD
 +    msvisualcpp | msvcmsys)
++=======
+     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
++>>>>>>> upstream/20131206+dfsg
        # This compiler won't grok `-c -o', but also, the minuso test has
        # not run yet.  These depmodes are late enough in the game, and
        # so weak that their functioning should not be impacted.
@@@ -4086,8 -4150,10 +4574,15 @@@ f
  
  
  
++<<<<<<< HEAD
 +if test x$GCC = xyes ; then
 +  CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99 -D_XOPEN_SOURCE=500"
++=======
+ # -D_GNU_SOURCE is only necessary for old (< 2.10) glibc implementations of open_memstream()
+ CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE"
+ if test x$GCC = xyes ; then
+   CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99"
++>>>>>>> upstream/20131206+dfsg
  fi
  
  # Make sure we can run config.sub.
@@@ -4096,7 -4162,7 +4591,11 @@@ $SHELL "$ac_aux_dir/config.sub" sun4 >/
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
  $as_echo_n "checking build system type... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_build+set}" = set; then :
++=======
+ if ${ac_cv_build+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_build_alias=$build_alias
@@@ -4112,7 -4178,7 +4611,11 @@@ f
  $as_echo "$ac_cv_build" >&6; }
  case $ac_cv_build in
  *-*-*) ;;
++<<<<<<< HEAD
 +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
++=======
+ *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
++>>>>>>> upstream/20131206+dfsg
  esac
  build=$ac_cv_build
  ac_save_IFS=$IFS; IFS='-'
@@@ -4130,7 -4196,7 +4633,11 @@@ case $build_os in *\ *) build_os=`echo 
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
  $as_echo_n "checking host system type... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_host+set}" = set; then :
++=======
+ if ${ac_cv_host+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test "x$host_alias" = x; then
@@@ -4145,7 -4211,7 +4652,11 @@@ f
  $as_echo "$ac_cv_host" >&6; }
  case $ac_cv_host in
  *-*-*) ;;
++<<<<<<< HEAD
 +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
++=======
+ *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
++>>>>>>> upstream/20131206+dfsg
  esac
  host=$ac_cv_host
  ac_save_IFS=$IFS; IFS='-'
@@@ -4170,7 -4236,7 +4681,11 @@@ case $host i
  set dummy ${ac_tool_prefix}as; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_AS+set}" = set; then :
++=======
+ if ${ac_cv_prog_AS+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$AS"; then
@@@ -4182,7 -4248,7 +4697,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_AS="${ac_tool_prefix}as"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -4210,7 -4276,7 +4729,11 @@@ if test -z "$ac_cv_prog_AS"; the
  set dummy as; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_AS+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_AS"; then
@@@ -4222,7 -4288,7 +4745,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_AS="as"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -4262,7 -4328,7 +4789,11 @@@ f
  set dummy ${ac_tool_prefix}dlltool; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_DLLTOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$DLLTOOL"; then
@@@ -4274,7 -4340,7 +4805,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -4302,7 -4368,7 +4837,11 @@@ if test -z "$ac_cv_prog_DLLTOOL"; the
  set dummy dlltool; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_DLLTOOL"; then
@@@ -4314,7 -4380,7 +4853,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_DLLTOOL="dlltool"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -4354,7 -4420,7 +4897,11 @@@ f
  set dummy ${ac_tool_prefix}objdump; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
++=======
+ if ${ac_cv_prog_OBJDUMP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$OBJDUMP"; then
@@@ -4366,7 -4432,7 +4913,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -4394,7 -4460,7 +4945,11 @@@ if test -z "$ac_cv_prog_OBJDUMP"; the
  set dummy objdump; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_OBJDUMP"; then
@@@ -4406,7 -4472,7 +4961,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_OBJDUMP="objdump"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -4472,8 -4538,8 +5031,13 @@@ esa
  
  
  
++<<<<<<< HEAD
 +macro_version='2.4'
 +macro_revision='1.3293'
++=======
+ macro_version='2.4.2'
+ macro_revision='1.3337'
++>>>>>>> upstream/20131206+dfsg
  
  
  
@@@ -4560,7 -4626,7 +5124,11 @@@ esa
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
  $as_echo_n "checking for a sed that does not truncate output... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_path_SED+set}" = set; then :
++=======
+ if ${ac_cv_path_SED+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
              ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@@ -4580,7 -4646,7 +5148,11 @@@ d
      for ac_prog in sed gsed; do
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
++<<<<<<< HEAD
 +      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
++=======
+       as_fn_executable_p "$ac_path_SED" || continue
++>>>>>>> upstream/20131206+dfsg
  # Check for GNU ac_path_SED and select it if it is found.
    # Check for GNU $ac_path_SED
  case `"$ac_path_SED" --version 2>&1` in
@@@ -4642,7 -4708,7 +5214,11 @@@ Xsed="$SED -e 1s/^X//
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
  $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_path_GREP+set}" = set; then :
++=======
+ if ${ac_cv_path_GREP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -z "$GREP"; then
@@@ -4656,7 -4722,7 +5232,11 @@@ d
      for ac_prog in grep ggrep; do
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++<<<<<<< HEAD
 +      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
++=======
+       as_fn_executable_p "$ac_path_GREP" || continue
++>>>>>>> upstream/20131206+dfsg
  # Check for GNU ac_path_GREP and select it if it is found.
    # Check for GNU $ac_path_GREP
  case `"$ac_path_GREP" --version 2>&1` in
@@@ -4705,7 -4771,7 +5285,11 @@@ $as_echo "$ac_cv_path_GREP" >&6; 
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
  $as_echo_n "checking for egrep... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_path_EGREP+set}" = set; then :
++=======
+ if ${ac_cv_path_EGREP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@@ -4722,7 -4788,7 +5306,11 @@@ d
      for ac_prog in egrep; do
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++<<<<<<< HEAD
 +      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++=======
+       as_fn_executable_p "$ac_path_EGREP" || continue
++>>>>>>> upstream/20131206+dfsg
  # Check for GNU ac_path_EGREP and select it if it is found.
    # Check for GNU $ac_path_EGREP
  case `"$ac_path_EGREP" --version 2>&1` in
@@@ -4772,7 -4838,7 +5360,11 @@@ $as_echo "$ac_cv_path_EGREP" >&6; 
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
  $as_echo_n "checking for fgrep... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_path_FGREP+set}" = set; then :
++=======
+ if ${ac_cv_path_FGREP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@@ -4789,7 -4855,7 +5381,11 @@@ d
      for ac_prog in fgrep; do
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
++<<<<<<< HEAD
 +      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
++=======
+       as_fn_executable_p "$ac_path_FGREP" || continue
++>>>>>>> upstream/20131206+dfsg
  # Check for GNU ac_path_FGREP and select it if it is found.
    # Check for GNU $ac_path_FGREP
  case `"$ac_path_FGREP" --version 2>&1` in
@@@ -4903,7 -4969,7 +5499,11 @@@ els
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
  $as_echo_n "checking for non-GNU ld... " >&6; }
  fi
++<<<<<<< HEAD
 +if test "${lt_cv_path_LD+set}" = set; then :
++=======
+ if ${lt_cv_path_LD+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -z "$LD"; then
@@@ -4943,7 -5009,7 +5543,11 @@@ f
  test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
  $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_gnu_ld+set}" = set; then :
++=======
+ if ${lt_cv_prog_gnu_ld+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@@ -4970,7 -5036,7 +5574,11 @@@ with_gnu_ld=$lt_cv_prog_gnu_l
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
  $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_path_NM+set}" = set; then :
++=======
+ if ${lt_cv_path_NM+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$NM"; then
@@@ -5033,7 -5099,7 +5641,11 @@@ els
  set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
++=======
+ if ${ac_cv_prog_DUMPBIN+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$DUMPBIN"; then
@@@ -5045,7 -5111,7 +5657,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -5077,7 -5143,7 +5693,11 @@@ d
  set dummy $ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_DUMPBIN"; then
@@@ -5089,7 -5155,7 +5709,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -5149,7 -5215,7 +5773,11 @@@ test -z "$NM" && NM=n
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
  $as_echo_n "checking the name lister ($NM) interface... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_nm_interface+set}" = set; then :
++=======
+ if ${lt_cv_nm_interface+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_nm_interface="BSD nm"
@@@ -5184,7 -5250,7 +5812,11 @@@ f
  # find the maximum length of command line arguments
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
  $as_echo_n "checking the maximum length of command line arguments... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
++=======
+ if ${lt_cv_sys_max_cmd_len+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
      i=0
@@@ -5247,6 -5313,11 +5879,14 @@@
      lt_cv_sys_max_cmd_len=196608
      ;;
  
++<<<<<<< HEAD
++=======
+   os2*)
+     # The test takes a long time on OS/2.
+     lt_cv_sys_max_cmd_len=8192
+     ;;
+ 
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -5286,7 -5357,7 +5926,11 @@@
        # 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.
++<<<<<<< HEAD
 +      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
++=======
+       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
++>>>>>>> upstream/20131206+dfsg
  	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  	      test $i != 17 # 1/2 MB should be enough
        do
@@@ -5381,7 -5452,7 +6025,11 @@@ esa
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
  $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++=======
+ if ${lt_cv_to_host_file_cmd+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    case $host in
@@@ -5428,7 -5499,7 +6076,11 @@@ $as_echo "$lt_cv_to_host_file_cmd" >&6
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
  $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++=======
+ if ${lt_cv_to_tool_file_cmd+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    #assume ordinary cross tools, or native build.
@@@ -5455,7 -5526,7 +6107,11 @@@ $as_echo "$lt_cv_to_tool_file_cmd" >&6
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_ld_reload_flag+set}" = set; then :
++=======
+ if ${lt_cv_ld_reload_flag+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_ld_reload_flag='-r'
@@@ -5496,7 -5567,7 +6152,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy ${ac_tool_prefix}objdump; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
++=======
+ if ${ac_cv_prog_OBJDUMP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$OBJDUMP"; then
@@@ -5508,7 -5579,7 +6168,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -5536,7 -5607,7 +6200,11 @@@ if test -z "$ac_cv_prog_OBJDUMP"; the
  set dummy objdump; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_OBJDUMP"; then
@@@ -5548,7 -5619,7 +6216,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_OBJDUMP="objdump"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -5592,7 -5663,7 +6264,11 @@@ test -z "$OBJDUMP" && OBJDUMP=objdum
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
  $as_echo_n "checking how to recognize dependent libraries... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_deplibs_check_method+set}" = set; then :
++=======
+ if ${lt_cv_deplibs_check_method+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_file_magic_cmd='$MAGIC_CMD'
@@@ -5671,10 -5742,6 +6347,13 @@@ freebsd* | dragonfly*
    fi
    ;;
  
++<<<<<<< HEAD
 +gnu*)
 +  lt_cv_deplibs_check_method=pass_all
 +  ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  haiku*)
    lt_cv_deplibs_check_method=pass_all
    ;;
@@@ -5712,12 -5779,12 +6391,21 @@@ irix5* | irix6* | nonstopux*
    lt_cv_deplibs_check_method=pass_all
    ;;
  
++<<<<<<< HEAD
 +# This must be Linux ELF.
 +linux* | k*bsd*-gnu | kopensolaris*-gnu)
 +  lt_cv_deplibs_check_method=pass_all
 +  ;;
 +
 +netbsd*)
++=======
+ # This must be glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -5839,7 -5906,7 +6527,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy ${ac_tool_prefix}dlltool; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_DLLTOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$DLLTOOL"; then
@@@ -5851,7 -5918,7 +6543,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -5879,7 -5946,7 +6575,11 @@@ if test -z "$ac_cv_prog_DLLTOOL"; the
  set dummy dlltool; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_DLLTOOL"; then
@@@ -5891,7 -5958,7 +6591,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_DLLTOOL="dlltool"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -5936,7 -6003,7 +6640,11 @@@ test -z "$DLLTOOL" && DLLTOOL=dlltoo
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
  $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++=======
+ if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_sharedlib_from_linklib_cmd='unknown'
@@@ -5980,7 -6047,7 +6688,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_AR+set}" = set; then :
++=======
+ if ${ac_cv_prog_AR+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$AR"; then
@@@ -5992,7 -6059,7 +6704,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -6024,7 -6091,7 +6740,11 @@@ d
  set dummy $ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_AR"; then
@@@ -6036,7 -6103,7 +6756,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_AR="$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -6088,7 -6155,7 +6812,11 @@@ f
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
  $as_echo_n "checking for archiver @FILE support... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_ar_at_file+set}" = set; then :
++=======
+ if ${lt_cv_ar_at_file+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_ar_at_file=no
@@@ -6149,7 -6216,7 +6877,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy ${ac_tool_prefix}strip; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_STRIP+set}" = set; then :
++=======
+ if ${ac_cv_prog_STRIP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$STRIP"; then
@@@ -6161,7 -6228,7 +6893,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -6189,7 -6256,7 +6925,11 @@@ if test -z "$ac_cv_prog_STRIP"; the
  set dummy strip; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_STRIP"; then
@@@ -6201,7 -6268,7 +6941,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_STRIP="strip"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -6248,7 -6315,7 +6992,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_RANLIB+set}" = set; then :
++=======
+ if ${ac_cv_prog_RANLIB+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$RANLIB"; then
@@@ -6260,7 -6327,7 +7008,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -6288,7 -6355,7 +7040,11 @@@ if test -z "$ac_cv_prog_RANLIB"; the
  set dummy ranlib; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_RANLIB"; then
@@@ -6300,7 -6367,7 +7056,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_RANLIB="ranlib"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -6350,13 -6417,13 +7110,23 @@@ old_postuninstall_cmds
  if test -n "$RANLIB"; then
    case $host_os in
    openbsd*)
++<<<<<<< HEAD
 +    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"
++=======
+     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+     ;;
+   *)
+     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+     ;;
+   esac
+   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
++>>>>>>> upstream/20131206+dfsg
  fi
  
  case $host_os in
@@@ -6417,7 -6484,7 +7187,11 @@@ compiler=$C
  # Check for command to grab the raw symbol name followed by C symbol from nm.
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
  $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
++=======
+ if ${lt_cv_sys_global_symbol_pipe+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
  
@@@ -6503,6 -6570,7 +7277,10 @@@ for ac_symprfx in "" "_"; d
      # which start with @ or ?.
      lt_cv_sys_global_symbol_pipe="$AWK '"\
  "     {last_section=section; section=\$ 3};"\
++<<<<<<< HEAD
++=======
+ "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
++>>>>>>> upstream/20131206+dfsg
  "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  "     \$ 0!~/External *\|/{next};"\
  "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@@ -6850,7 -6918,7 +7628,11 @@@ s390*-*linux*|s390*-*tpf*|sparc*-*linux
    CFLAGS="$CFLAGS -belf"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
  $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_cc_needs_belf+set}" = set; then :
++=======
+ if ${lt_cv_cc_needs_belf+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_ext=c
@@@ -6891,7 -6959,7 +7673,11 @@@ $as_echo "$lt_cv_cc_needs_belf" >&6; 
      CFLAGS="$SAVE_CFLAGS"
    fi
    ;;
++<<<<<<< HEAD
 +sparc*-*solaris*)
++=======
+ *-*solaris*)
++>>>>>>> upstream/20131206+dfsg
    # Find out which ABI we are using.
    echo 'int i;' > conftest.$ac_ext
    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@@ -6902,7 -6970,20 +7688,24 @@@
      case `/usr/bin/file conftest.o` in
      *64-bit*)
        case $lt_cv_prog_gnu_ld in
++<<<<<<< HEAD
 +      yes*) LD="${LD-ld} -m elf64_sparc" ;;
++=======
+       yes*)
+         case $host in
+         i?86-*-solaris*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         sparc*-*-solaris*)
+           LD="${LD-ld} -m elf64_sparc"
+           ;;
+         esac
+         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+           LD="${LD-ld}_sol2"
+         fi
+         ;;
++>>>>>>> upstream/20131206+dfsg
        *)
  	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  	  LD="${LD-ld} -64"
@@@ -6923,7 -7004,7 +7726,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy ${ac_tool_prefix}mt; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$MANIFEST_TOOL"; then
@@@ -6935,7 -7016,7 +7742,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -6963,7 -7044,7 +7774,11 @@@ if test -z "$ac_cv_prog_MANIFEST_TOOL"
  set dummy mt; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_MANIFEST_TOOL"; then
@@@ -6975,7 -7056,7 +7790,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7013,7 -7094,7 +7832,11 @@@ f
  test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
  $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++=======
+ if ${lt_cv_path_mainfest_tool+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_path_mainfest_tool=no
@@@ -7043,7 -7124,7 +7866,11 @@@ f
  set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
++=======
+ if ${ac_cv_prog_DSYMUTIL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$DSYMUTIL"; then
@@@ -7055,7 -7136,7 +7882,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7083,7 -7164,7 +7914,11 @@@ if test -z "$ac_cv_prog_DSYMUTIL"; the
  set dummy dsymutil; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_DSYMUTIL"; then
@@@ -7095,7 -7176,7 +7930,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7135,7 -7216,7 +7974,11 @@@ f
  set dummy ${ac_tool_prefix}nmedit; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_NMEDIT+set}" = set; then :
++=======
+ if ${ac_cv_prog_NMEDIT+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$NMEDIT"; then
@@@ -7147,7 -7228,7 +7990,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7175,7 -7256,7 +8022,11 @@@ if test -z "$ac_cv_prog_NMEDIT"; the
  set dummy nmedit; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_NMEDIT"; then
@@@ -7187,7 -7268,7 +8038,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_NMEDIT="nmedit"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7227,7 -7308,7 +8082,11 @@@ f
  set dummy ${ac_tool_prefix}lipo; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_LIPO+set}" = set; then :
++=======
+ if ${ac_cv_prog_LIPO+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$LIPO"; then
@@@ -7239,7 -7320,7 +8098,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7267,7 -7348,7 +8130,11 @@@ if test -z "$ac_cv_prog_LIPO"; the
  set dummy lipo; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_LIPO"; then
@@@ -7279,7 -7360,7 +8146,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_LIPO="lipo"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7319,7 -7400,7 +8190,11 @@@ f
  set dummy ${ac_tool_prefix}otool; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_OTOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_OTOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$OTOOL"; then
@@@ -7331,7 -7412,7 +8206,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7359,7 -7440,7 +8238,11 @@@ if test -z "$ac_cv_prog_OTOOL"; the
  set dummy otool; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_OTOOL"; then
@@@ -7371,7 -7452,7 +8254,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_OTOOL="otool"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7411,7 -7492,7 +8298,11 @@@ f
  set dummy ${ac_tool_prefix}otool64; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_OTOOL64+set}" = set; then :
++=======
+ if ${ac_cv_prog_OTOOL64+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$OTOOL64"; then
@@@ -7423,7 -7504,7 +8314,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7451,7 -7532,7 +8346,11 @@@ if test -z "$ac_cv_prog_OTOOL64"; the
  set dummy otool64; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_OTOOL64"; then
@@@ -7463,7 -7544,7 +8362,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_OTOOL64="otool64"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -7526,7 -7607,7 +8429,11 @@@ f
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
  $as_echo_n "checking for -single_module linker flag... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
++=======
+ if ${lt_cv_apple_cc_single_mod+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_apple_cc_single_mod=no
@@@ -7542,7 -7623,13 +8449,17 @@@
  	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
          _lt_result=$?
++<<<<<<< HEAD
 +	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
++=======
+ 	# If there is a non-empty error log, and "single_module"
+ 	# appears in it, assume the flag caused a linker warning
+         if test -s conftest.err && $GREP single_module conftest.err; then
+ 	  cat conftest.err >&5
+ 	# Otherwise, if the output was created with a 0 exit code from
+ 	# the compiler, it worked.
+ 	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
++>>>>>>> upstream/20131206+dfsg
  	  lt_cv_apple_cc_single_mod=yes
  	else
  	  cat conftest.err >&5
@@@ -7553,9 -7640,10 +8470,16 @@@
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
  $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
++<<<<<<< HEAD
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
 +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
++=======
+ 
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+ $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+ if ${lt_cv_ld_exported_symbols_list+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_ld_exported_symbols_list=no
@@@ -7585,9 -7673,10 +8509,16 @@@ rm -f core conftest.err conftest.$ac_ob
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
  $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
++<<<<<<< HEAD
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
 +$as_echo_n "checking for -force_load linker flag... " >&6; }
 +if test "${lt_cv_ld_force_load+set}" = set; then :
++=======
+ 
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+ $as_echo_n "checking for -force_load linker flag... " >&6; }
+ if ${lt_cv_ld_force_load+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_ld_force_load=no
@@@ -7606,7 -7695,9 +8537,13 @@@ _LT_EO
        echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
        $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
        _lt_result=$?
++<<<<<<< HEAD
 +      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
++=======
+       if test -s conftest.err && $GREP force_load conftest.err; then
+ 	cat conftest.err >&5
+       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
++>>>>>>> upstream/20131206+dfsg
  	lt_cv_ld_force_load=yes
        else
  	cat conftest.err >&5
@@@ -7664,7 -7755,7 +8601,11 @@@ if test -n "$CPP" && test -d "$CPP"; th
    CPP=
  fi
  if test -z "$CPP"; then
++<<<<<<< HEAD
 +  if test "${ac_cv_prog_CPP+set}" = set; then :
++=======
+   if ${ac_cv_prog_CPP+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
        # Double quotes because CPP needs to be expanded
@@@ -7780,7 -7871,7 +8721,11 @@@ els
    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
++<<<<<<< HEAD
 +See \`config.log' for more details" "$LINENO" 5 ; }
++=======
+ See \`config.log' for more details" "$LINENO" 5; }
++>>>>>>> upstream/20131206+dfsg
  fi
  
  ac_ext=c
@@@ -7792,7 -7883,7 +8737,11 @@@ ac_compiler_gnu=$ac_cv_c_compiler_gn
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
  $as_echo_n "checking for ANSI C header files... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_header_stdc+set}" = set; then :
++=======
+ if ${ac_cv_header_stdc+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -7923,7 -8014,7 +8872,11 @@@ for ac_header in dlfcn.
  do :
    ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
  "
++<<<<<<< HEAD
 +if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
++=======
+ if test "x$ac_cv_header_dlfcn_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_DLFCN_H 1
  _ACEOF
@@@ -8009,7 -8100,22 +8962,26 @@@ f
  
  # Check whether --with-pic was given.
  if test "${with_pic+set}" = set; then :
++<<<<<<< HEAD
 +  withval=$with_pic; pic_mode="$withval"
++=======
+   withval=$with_pic; lt_p=${PACKAGE-default}
+     case $withval in
+     yes|no) pic_mode=$withval ;;
+     *)
+       pic_mode=default
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for lt_pkg in $withval; do
+ 	IFS="$lt_save_ifs"
+ 	if test "X$lt_pkg" = "X$lt_p"; then
+ 	  pic_mode=yes
+ 	fi
+       done
+       IFS="$lt_save_ifs"
+       ;;
+     esac
++>>>>>>> upstream/20131206+dfsg
  else
    pic_mode=default
  fi
@@@ -8087,6 -8193,10 +9059,13 @@@ LIBTOOL='$(SHELL) $(top_builddir)/libto
  
  
  
++<<<<<<< HEAD
++=======
+ 
+ 
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
  test -z "$LN_S" && LN_S="ln -s"
  
  
@@@ -8108,7 -8218,7 +9087,11 @@@ f
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
  $as_echo_n "checking for objdir... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_objdir+set}" = set; then :
++=======
+ if ${lt_cv_objdir+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    rm -f .libs 2>/dev/null
@@@ -8186,7 -8296,7 +9169,11 @@@ file_magic*
    if test "$file_magic_cmd" = '$MAGIC_CMD'; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
  $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
++=======
+ if ${lt_cv_path_MAGIC_CMD+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    case $MAGIC_CMD in
@@@ -8252,7 -8362,7 +9239,11 @@@ if test -z "$lt_cv_path_MAGIC_CMD"; the
    if test -n "$ac_tool_prefix"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
  $as_echo_n "checking for file... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
++=======
+ if ${lt_cv_path_MAGIC_CMD+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    case $MAGIC_CMD in
@@@ -8376,10 -8486,6 +9367,13 @@@ _lt_linker_boilerplate=`cat conftest.er
  $RM -r conftest*
  
  
++<<<<<<< HEAD
 +## 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...
++=======
++>>>>>>> upstream/20131206+dfsg
  if test -n "$compiler"; then
  
  lt_prog_compiler_no_builtin_flag=
@@@ -8394,7 -8500,7 +9388,11 @@@ if test "$GCC" = yes; the
  
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_rtti_exceptions=no
@@@ -8546,7 -8652,9 +9544,13 @@@ lt_prog_compiler_static
      case $cc_basename in
      nvcc*) # Cuda Compiler Driver 2.2
        lt_prog_compiler_wl='-Xlinker '
++<<<<<<< HEAD
 +      lt_prog_compiler_pic='-Xcompiler -fPIC'
++=======
+       if test -n "$lt_prog_compiler_pic"; then
+         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+       fi
++>>>>>>> upstream/20131206+dfsg
        ;;
      esac
    else
@@@ -8590,7 -8698,7 +9594,11 @@@
        lt_prog_compiler_static='-non_shared'
        ;;
  
++<<<<<<< HEAD
 +    linux* | k*bsd*-gnu | kopensolaris*-gnu)
++=======
+     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
++>>>>>>> upstream/20131206+dfsg
        case $cc_basename in
        # old Intel for x86_64 which still supported -KPIC.
        ecc*)
@@@ -8637,18 -8745,33 +9645,43 @@@
  	;;
        *)
  	case `$CC -V 2>&1 | sed 5q` in
++<<<<<<< HEAD
 +	*Sun\ F* | *Sun*Fortran*)
++=======
+ 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
++>>>>>>> upstream/20131206+dfsg
  	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
  	  lt_prog_compiler_pic='-KPIC'
  	  lt_prog_compiler_static='-Bstatic'
  	  lt_prog_compiler_wl=''
  	  ;;
++<<<<<<< HEAD
++=======
+ 	*Sun\ F* | *Sun*Fortran*)
+ 	  lt_prog_compiler_pic='-KPIC'
+ 	  lt_prog_compiler_static='-Bstatic'
+ 	  lt_prog_compiler_wl='-Qoption ld '
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	*Sun\ C*)
  	  # Sun C 5.9
  	  lt_prog_compiler_pic='-KPIC'
  	  lt_prog_compiler_static='-Bstatic'
  	  lt_prog_compiler_wl='-Wl,'
  	  ;;
++<<<<<<< HEAD
++=======
+         *Intel*\ [CF]*Compiler*)
+ 	  lt_prog_compiler_wl='-Wl,'
+ 	  lt_prog_compiler_pic='-fPIC'
+ 	  lt_prog_compiler_static='-static'
+ 	  ;;
+ 	*Portland\ Group*)
+ 	  lt_prog_compiler_wl='-Wl,'
+ 	  lt_prog_compiler_pic='-fpic'
+ 	  lt_prog_compiler_static='-Bstatic'
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	esac
  	;;
        esac
@@@ -8739,7 -8862,7 +9772,11 @@@ esa
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
  $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_pic+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
@@@ -8754,7 -8877,7 +9791,11 @@@ lt_prog_compiler_pic=$lt_cv_prog_compil
  if test -n "$lt_prog_compiler_pic"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
  $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_pic_works+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_pic_works=no
@@@ -8818,7 -8941,7 +9859,11 @@@ f
  wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
  $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_static_works+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_static_works=no
@@@ -8861,7 -8984,7 +9906,11 @@@ f
  
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_c_o+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_c_o=no
@@@ -8916,7 -9039,7 +9965,11 @@@ $as_echo "$lt_cv_prog_compiler_c_o" >&6
  
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_c_o+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_c_o=no
@@@ -9010,7 -9133,6 +10063,10 @@@ $as_echo_n "checking whether the $compi
    hardcode_direct=no
    hardcode_direct_absolute=no
    hardcode_libdir_flag_spec=
++<<<<<<< HEAD
 +  hardcode_libdir_flag_spec_ld=
++=======
++>>>>>>> upstream/20131206+dfsg
    hardcode_libdir_separator=
    hardcode_minus_L=no
    hardcode_shlibpath_var=unsupported
@@@ -9054,6 -9176,9 +10110,12 @@@
    openbsd*)
      with_gnu_ld=no
      ;;
++<<<<<<< HEAD
++=======
+   linux* | k*bsd*-gnu | gnu*)
+     link_all_deplibs=no
+     ;;
++>>>>>>> upstream/20131206+dfsg
    esac
  
    ld_shlibs=yes
@@@ -9260,8 -9385,7 +10322,12 @@@ _LT_EO
  	xlf* | bgf* | bgxlf* | mpixlf*)
  	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
++<<<<<<< HEAD
 +	  hardcode_libdir_flag_spec=
 +	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
++=======
+ 	  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++>>>>>>> upstream/20131206+dfsg
  	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  	  if test "x$supports_anon_versioning" = xyes; then
  	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
@@@ -9276,7 -9400,7 +10342,11 @@@
        fi
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
@@@ -9453,6 -9577,7 +10523,10 @@@ _LT_EO
  	if test "$aix_use_runtimelinking" = yes; then
  	  shared_flag="$shared_flag "'${wl}-G'
  	fi
++<<<<<<< HEAD
++=======
+ 	link_all_deplibs=no
++>>>>>>> upstream/20131206+dfsg
        else
  	# not using gcc
  	if test "$host_cpu" = ia64; then
@@@ -9481,7 -9606,7 +10555,11 @@@
          if test "${lt_cv_aix_libpath+set}" = set; then
    aix_libpath=$lt_cv_aix_libpath
  else
++<<<<<<< HEAD
 +  if test "${lt_cv_aix_libpath_+set}" = set; then :
++=======
+   if ${lt_cv_aix_libpath_+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -9534,7 -9659,7 +10612,11 @@@ f
  	 if test "${lt_cv_aix_libpath+set}" = set; then
    aix_libpath=$lt_cv_aix_libpath
  else
++<<<<<<< HEAD
 +  if test "${lt_cv_aix_libpath_+set}" = set; then :
++=======
+   if ${lt_cv_aix_libpath_+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -9640,6 -9765,7 +10722,10 @@@ f
  	# The linker will not automatically build a static lib if we build a DLL.
  	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
  	enable_shared_with_static_runtimes=yes
++<<<<<<< HEAD
++=======
+ 	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
++>>>>>>> upstream/20131206+dfsg
  	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
  	# Don't use ranlib
  	old_postinstall_cmds='chmod 644 $oldlib'
@@@ -9685,6 -9811,7 +10771,10 @@@
    hardcode_shlibpath_var=unsupported
    if test "$lt_cv_ld_force_load" = "yes"; then
      whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
++<<<<<<< HEAD
++=======
+ 
++>>>>>>> upstream/20131206+dfsg
    else
      whole_archive_flag_spec=''
    fi
@@@ -9713,10 -9840,6 +10803,13 @@@
        hardcode_shlibpath_var=no
        ;;
  
++<<<<<<< HEAD
 +    freebsd1*)
 +      ld_shlibs=no
 +      ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
      # 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
@@@ -9729,7 -9852,7 +10822,11 @@@
        ;;
  
      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++<<<<<<< HEAD
 +    freebsd2*)
++=======
+     freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
        hardcode_direct=yes
        hardcode_minus_L=yes
@@@ -9768,7 -9891,6 +10865,10 @@@
        fi
        if test "$with_gnu_ld" = no; then
  	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
++<<<<<<< HEAD
 +	hardcode_libdir_flag_spec_ld='+b $libdir'
++=======
++>>>>>>> upstream/20131206+dfsg
  	hardcode_libdir_separator=:
  	hardcode_direct=yes
  	hardcode_direct_absolute=yes
@@@ -9806,7 -9928,7 +10906,11 @@@
  	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
  $as_echo_n "checking if $CC understands -b... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler__b+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler__b+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler__b=no
@@@ -9875,7 -9997,7 +10979,11 @@@ f
  	# This should be the same for all languages, so no per-tag cache variable.
  	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
  $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++=======
+ if ${lt_cv_irix_exported_symbol+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    save_LDFLAGS="$LDFLAGS"
@@@ -9909,7 -10031,7 +11017,11 @@@ $as_echo "$lt_cv_irix_exported_symbol" 
        link_all_deplibs=yes
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
        else
@@@ -10191,7 -10313,7 +11303,11 @@@ x|xyes
        # to ld, don't add -lc before -lgcc.
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
  $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_archive_cmds_need_lc+set}" = set; then :
++=======
+ if ${lt_cv_archive_cmds_need_lc+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    $RM conftest*
@@@ -10392,11 -10514,6 +11508,14 @@@ esa
  
  
  
++<<<<<<< HEAD
 +
 +
 +
 +
 +
++=======
++>>>>>>> upstream/20131206+dfsg
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
  $as_echo_n "checking dynamic linker characteristics... " >&6; }
  
@@@ -10486,7 -10603,7 +11605,11 @@@ need_version=unknow
  
  case $host_os in
  aix3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
    shlibpath_var=LIBPATH
  
@@@ -10495,7 -10612,7 +11618,11 @@@
    ;;
  
  aix[4-9]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    hardcode_into_libs=yes
@@@ -10560,7 -10677,7 +11687,11 @@@ beos*
    ;;
  
  bsdi[45]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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'
@@@ -10699,7 -10816,7 +11830,11 @@@ darwin* | rhapsody*
    ;;
  
  dgux*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@@ -10707,10 -10824,6 +11842,13 @@@
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  
++<<<<<<< HEAD
 +freebsd1*)
 +  dynamic_linker=no
 +  ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  freebsd* | dragonfly*)
    # DragonFly does not have aout.  When/if they implement a new
    # versioning mechanism, adjust this.
@@@ -10718,7 -10831,7 +11856,11 @@@
      objformat=`/usr/bin/objformat`
    else
      case $host_os in
++<<<<<<< HEAD
 +    freebsd[123]*) objformat=aout ;;
++=======
+     freebsd[23].*) objformat=aout ;;
++>>>>>>> upstream/20131206+dfsg
      *) objformat=elf ;;
      esac
    fi
@@@ -10736,7 -10849,7 +11878,11 @@@
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case $host_os in
++<<<<<<< HEAD
 +  freebsd2*)
++=======
+   freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
      shlibpath_overrides_runpath=yes
      ;;
    freebsd3.[01]* | freebsdelf3.[01]*)
@@@ -10755,18 -10868,8 +11901,23 @@@
    esac
    ;;
  
++<<<<<<< HEAD
 +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
 +  ;;
 +
 +haiku*)
 +  version_type=linux
++=======
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    dynamic_linker="$host_os runtime_loader"
@@@ -10827,7 -10930,7 +11978,11 @@@ hpux9* | hpux10* | hpux11*
    ;;
  
  interix[3-9]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@@ -10843,7 -10946,7 +11998,11 @@@ irix5* | irix6* | nonstopux*
      nonstopux*) version_type=nonstopux ;;
      *)
  	if test "$lt_cv_prog_gnu_ld" = yes; then
++<<<<<<< HEAD
 +		version_type=linux
++=======
+ 		version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
  	else
  		version_type=irix
  	fi ;;
@@@ -10880,9 -10983,9 +12039,15 @@@ linux*oldld* | linux*aout* | linux*coff
    dynamic_linker=no
    ;;
  
++<<<<<<< HEAD
 +# This must be Linux ELF.
 +linux* | k*bsd*-gnu | kopensolaris*-gnu)
 +  version_type=linux
++=======
+ # This must be glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -10892,7 -10995,7 +12057,11 @@@
    shlibpath_overrides_runpath=no
  
    # Some binutils ld are patched to set DT_RUNPATH
++<<<<<<< HEAD
 +  if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
++=======
+   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_shlibpath_overrides_runpath=no
@@@ -10945,6 -11048,18 +12114,21 @@@ f
    dynamic_linker='GNU/Linux ld.so'
    ;;
  
++<<<<<<< HEAD
++=======
+ netbsdelf*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+   hardcode_into_libs=yes
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+ 
++>>>>>>> upstream/20131206+dfsg
  netbsd*)
    version_type=sunos
    need_lib_prefix=no
@@@ -10964,7 -11079,7 +12148,11 @@@
    ;;
  
  newsos6)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -11033,7 -11148,7 +12221,11 @@@ rdos*
    ;;
  
  solaris*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -11058,7 -11173,7 +12250,11 @@@ sunos4*
    ;;
  
  sysv4 | sysv4.3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -11082,7 -11197,7 +12278,11 @@@
  
  sysv4*MP*)
    if test -d /usr/nec ;then
++<<<<<<< HEAD
 +    version_type=linux
++=======
+     version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
      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
@@@ -11113,7 -11228,7 +12313,11 @@@ sysv5* | sco3.2v5* | sco5v6* | unixware
  
  tpf*)
    # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -11123,7 -11238,7 +12327,11 @@@
    ;;
  
  uts4*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -11312,7 -11427,7 +12520,11 @@@ els
    # if libdl is installed we need to link against it
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
  $as_echo_n "checking for dlopen in -ldl... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
++=======
+ if ${ac_cv_lib_dl_dlopen+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -11346,7 -11461,7 +12558,11 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
  $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  else
  
@@@ -11360,12 -11475,12 +12576,20 @@@ f
  
    *)
      ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
++<<<<<<< HEAD
 +if test "x$ac_cv_func_shl_load" = x""yes; then :
++=======
+ if test "x$ac_cv_func_shl_load" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lt_cv_dlopen="shl_load"
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
  $as_echo_n "checking for shl_load in -ldld... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
++=======
+ if ${ac_cv_lib_dld_shl_load+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -11399,16 -11514,16 +12623,28 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
  $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
 +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
 +else
 +  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
 +if test "x$ac_cv_func_dlopen" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+ else
+   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+ if test "x$ac_cv_func_dlopen" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lt_cv_dlopen="dlopen"
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
  $as_echo_n "checking for dlopen in -ldl... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
++=======
+ if ${ac_cv_lib_dl_dlopen+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -11442,12 -11557,12 +12678,20 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
  $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
  $as_echo_n "checking for dlopen in -lsvld... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
++=======
+ if ${ac_cv_lib_svld_dlopen+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -11481,12 -11596,12 +12725,20 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
  $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
  $as_echo_n "checking for dld_link in -ldld... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
++=======
+ if ${ac_cv_lib_dld_dld_link+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -11520,7 -11635,7 +12772,11 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
  $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
  fi
  
@@@ -11561,7 -11676,7 +12817,11 @@@ f
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
  $as_echo_n "checking whether a program can dlopen itself... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_dlopen_self+set}" = set; then :
++=======
+ if ${lt_cv_dlopen_self+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    	  if test "$cross_compiling" = yes; then :
@@@ -11667,7 -11782,7 +12927,11 @@@ $as_echo "$lt_cv_dlopen_self" >&6; 
        wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
  $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_dlopen_self_static+set}" = set; then :
++=======
+ if ${lt_cv_dlopen_self_static+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    	  if test "$cross_compiling" = yes; then :
@@@ -11905,6 -12020,8 +13169,11 @@@ CC="$lt_save_CC
  
  
  
++<<<<<<< HEAD
++=======
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
          ac_config_commands="$ac_config_commands libtool"
  
  
@@@ -11922,7 -12039,7 +13191,11 @@@ $as_echo_n "checking whether cc underst
  fi
  set dummy $CC; ac_cc=`$as_echo "$2" |
  		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
++<<<<<<< HEAD
 +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
++=======
+ if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -12053,7 -12170,10 +13326,14 @@@ the
  fi
  
  case "$build" in
++<<<<<<< HEAD
 +  *-apple-darwin*) NO_UNDEFINED="" ;;
++=======
+   *-apple-darwin*)
+   		   NO_UNDEFINED=""
+ 		   CFLAGS="$CFLAGS -D_DARWIN_C_SOURCE"
+   		   ;;
++>>>>>>> upstream/20131206+dfsg
    *-pc-cygwin*)    NO_UNDEFINED="" ;;
    *)               NO_UNDEFINED="-no-undefined" ;;
  esac
@@@ -12065,7 -12185,7 +13345,11 @@@ d
  set dummy $ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_AWK+set}" = set; then :
++=======
+ if ${ac_cv_prog_AWK+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$AWK"; then
@@@ -12077,7 -12197,7 +13361,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_AWK="$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -12103,7 -12223,7 +13391,11 @@@ don
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
  $as_echo_n "checking for library containing strerror... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_search_strerror+set}" = set; then :
++=======
+ if ${ac_cv_search_strerror+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_func_search_save_LIBS=$LIBS
@@@ -12137,11 -12257,11 +13429,19 @@@ for ac_lib in '' cposix; d
  fi
  rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext
++<<<<<<< HEAD
 +  if test "${ac_cv_search_strerror+set}" = set; then :
 +  break
 +fi
 +done
 +if test "${ac_cv_search_strerror+set}" = set; then :
++=======
+   if ${ac_cv_search_strerror+:} false; then :
+   break
+ fi
+ done
+ if ${ac_cv_search_strerror+:} false; then :
++>>>>>>> upstream/20131206+dfsg
  
  else
    ac_cv_search_strerror=no
@@@ -12159,7 -12279,7 +13459,11 @@@ f
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
  $as_echo_n "checking for ANSI C header files... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_header_stdc+set}" = set; then :
++=======
+ if ${ac_cv_header_stdc+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@@ -12302,82 -12422,68 +13606,147 @@@ if test x$can_store_pointers = xno ; th
  *** Pointers cannot be stored in doubles on this architecture." "$LINENO" 5
  fi
  
++<<<<<<< HEAD
 +# check if we want to enable GTS casts checks
 +# Check whether --enable-gts-check was given.
 +if test "${enable_gts_check+set}" = set; then :
 +  enableval=$enable_gts_check;  case "${enableval}" in
 +	*) gts_check_casts="--check" ;;
 +  esac
 +fi
 +
 +
 +if test x$with_gts = xyes ; then
 +  as_fn_error $? "
 +*** Directory must be specified for --with-gts" "$LINENO" 5
 +fi
 +
 +if test x$with_gts = x ; then
 +  # Look for separately installed gts
 +
 +
 +# Check whether --with-gts-prefix was given.
 +if test "${with_gts_prefix+set}" = set; then :
 +  withval=$with_gts_prefix; gts_config_prefix="$withval"
 +else
 +  gts_config_prefix=""
 +fi
 +
 +
 +# Check whether --with-gts-exec-prefix was given.
 +if test "${with_gts_exec_prefix+set}" = set; then :
 +  withval=$with_gts_exec_prefix; gts_config_exec_prefix="$withval"
 +else
 +  gts_config_exec_prefix=""
 +fi
 +
 +# Check whether --enable-gtstest was given.
 +if test "${enable_gtstest+set}" = set; then :
 +  enableval=$enable_gtstest;
 +else
 +  enable_gtstest=yes
 +fi
 +
 +
 +  if test x$gts_config_exec_prefix != x ; then
 +     gts_config_args="$gts_config_args --exec-prefix=$gts_config_exec_prefix"
 +     if test x${GTS_CONFIG+set} != xset ; then
 +        GTS_CONFIG=$gts_config_exec_prefix/bin/gts-config
 +     fi
 +  fi
 +  if test x$gts_config_prefix != x ; then
 +     gts_config_args="$gts_config_args --prefix=$gts_config_prefix"
 +     if test x${GTS_CONFIG+set} != xset ; then
 +        GTS_CONFIG=$gts_config_prefix/bin/gts-config
 +     fi
 +  fi
 +
 +  for module in .
 +  do
 +      case "$module" in
 +         gmodule)
 +             gts_config_args="$gts_config_args gmodule"
 +         ;;
 +         gthread)
 +             gts_config_args="$gts_config_args gthread"
 +         ;;
 +      esac
 +  done
 +
 +  # Extract the first word of "gts-config", so it can be a program name with args.
 +set dummy gts-config; ac_word=$2
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 +$as_echo_n "checking for $ac_word... " >&6; }
 +if test "${ac_cv_path_GTS_CONFIG+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  case $GTS_CONFIG in
 +  [\\/]* | ?:[\\/]*)
 +  ac_cv_path_GTS_CONFIG="$GTS_CONFIG" # Let the user override the test with a path.
++=======
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if ${ac_cv_path_PKG_CONFIG+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   case $PKG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+   done
+ IFS=$as_save_IFS
+ 
+   ;;
+ esac
+ fi
+ PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+ if test -n "$PKG_CONFIG"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+ $as_echo "$PKG_CONFIG" >&6; }
+ else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+ 
+ 
+ fi
+ if test -z "$ac_cv_path_PKG_CONFIG"; then
+   ac_pt_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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   case $ac_pt_PKG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
++>>>>>>> upstream/20131206+dfsg
    ;;
    *)
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@@ -12386,8 -12492,8 +13755,13 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 +    ac_cv_path_GTS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++>>>>>>> upstream/20131206+dfsg
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
@@@ -12395,254 -12501,161 +13769,406 @@@ don
    done
  IFS=$as_save_IFS
  
++<<<<<<< HEAD
 +  test -z "$ac_cv_path_GTS_CONFIG" && ac_cv_path_GTS_CONFIG="no"
 +  ;;
 +esac
 +fi
 +GTS_CONFIG=$ac_cv_path_GTS_CONFIG
 +if test -n "$GTS_CONFIG"; then
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTS_CONFIG" >&5
 +$as_echo "$GTS_CONFIG" >&6; }
++=======
+   ;;
+ esac
+ fi
+ ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+ if test -n "$ac_pt_PKG_CONFIG"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+ $as_echo "$ac_pt_PKG_CONFIG" >&6; }
++>>>>>>> upstream/20131206+dfsg
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  $as_echo "no" >&6; }
  fi
  
++<<<<<<< HEAD
 +
 +  min_gts_version=0.7.4
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTS - version >= $min_gts_version" >&5
 +$as_echo_n "checking for GTS - version >= $min_gts_version... " >&6; }
 +  no_gts=""
 +  if test "$GTS_CONFIG" = "no" ; then
 +    no_gts=yes
 +  else
 +    GTS_CFLAGS=`$GTS_CONFIG $gts_config_args --cflags`
 +    GTS_LIBS=`$GTS_CONFIG $gts_config_args --libs`
 +    gts_config_major_version=`$GTS_CONFIG $gts_config_args --version | \
 +           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
 +    gts_config_minor_version=`$GTS_CONFIG $gts_config_args --version | \
 +           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
 +    gts_config_micro_version=`$GTS_CONFIG $gts_config_args --version | \
 +           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
 +    if test "x$enable_gtstest" = "xyes" ; then
 +      ac_save_CFLAGS="$CFLAGS"
 +      ac_save_LIBS="$LIBS"
 +      CFLAGS="$CFLAGS $GTS_CFLAGS"
 +      LIBS="$GTS_LIBS $LIBS"
 +      rm -f conf.gtstest
 +      if test "$cross_compiling" = yes; then :
 +  echo $ac_n "cross compiling; assumed OK... $ac_c"
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +
 +#include <gts.h>
 +#include <stdio.h>
 +#include <stdlib.h>
 +
 +int
 +main ()
 +{
 +  int major, minor, micro;
 +  char *tmp_version;
 +
 +  system ("touch conf.gtstest");
 +
 +  /* HP/UX 9 (%@#!) writes to sscanf strings */
 +  tmp_version = g_strdup("$min_gts_version");
 +  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
 +     printf("%s, bad version string\n", "$min_gts_version");
 +     exit(1);
 +   }
 +
 +  if ((gts_major_version != $gts_config_major_version) ||
 +      (gts_minor_version != $gts_config_minor_version) ||
 +      (gts_micro_version != $gts_config_micro_version))
 +    {
 +      printf("\n*** 'gts-config --version' returned %d.%d.%d, but GTS (%d.%d.%d)\n",
 +             $gts_config_major_version, $gts_config_minor_version, $gts_config_micro_version,
 +             gts_major_version, gts_minor_version, gts_micro_version);
 +      printf ("*** was found! If gts-config was correct, then it is best\n");
 +      printf ("*** to remove the old version of GTS. You may also be able to fix the error\n");
 +      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
 +      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
 +      printf("*** required on your system.\n");
 +      printf("*** If gts-config was wrong, set the environment variable GTS_CONFIG\n");
 +      printf("*** to point to the correct copy of gts-config, and remove the file config.cache\n");
 +      printf("*** before re-running configure\n");
 +    }
 +  else if ((gts_major_version != GTS_MAJOR_VERSION) ||
 +	   (gts_minor_version != GTS_MINOR_VERSION) ||
 +           (gts_micro_version != GTS_MICRO_VERSION))
 +    {
 +      printf("*** GTS header files (version %d.%d.%d) do not match\n",
 +	     GTS_MAJOR_VERSION, GTS_MINOR_VERSION, GTS_MICRO_VERSION);
 +      printf("*** library (version %d.%d.%d)\n",
 +	     gts_major_version, gts_minor_version, gts_micro_version);
 +    }
 +  else
 +    {
 +      if ((gts_major_version > major) ||
 +        ((gts_major_version == major) && (gts_minor_version > minor)) ||
 +        ((gts_major_version == major) && (gts_minor_version == minor) && (gts_micro_version >= micro)))
 +      {
 +        return 0;
 +       }
 +     else
 +      {
 +        printf("\n*** An old version of GTS (%d.%d.%d) was found.\n",
 +               gts_major_version, gts_minor_version, gts_micro_version);
 +        printf("*** You need a version of GTS newer than %d.%d.%d. The latest version of\n",
 +	       major, minor, micro);
 +        printf("*** GTS is always available from http://gts.sourceforge.net.\n");
 +        printf("***\n");
 +        printf("*** If you have already installed a sufficiently new version, this error\n");
 +        printf("*** probably means that the wrong copy of the gts-config shell script is\n");
 +        printf("*** being found. The easiest way to fix this is to remove the old version\n");
 +        printf("*** of GTS, but you can also set the GTS_CONFIG environment to point to the\n");
 +        printf("*** correct copy of gts-config. (In this case, you will have to\n");
 +        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
 +        printf("*** so that the correct libraries are found at run-time))\n");
 +      }
 +    }
 +  return 1;
 +}
 +
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +
 +else
 +  no_gts=yes
 +fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +fi
 +
 +       CFLAGS="$ac_save_CFLAGS"
 +       LIBS="$ac_save_LIBS"
 +     fi
 +  fi
 +  if test "x$no_gts" = x ; then
 +     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
 +     :
 +  else
 +     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +     if test "$GTS_CONFIG" = "no" ; then
 +       echo "*** The gts-config script installed by GTS could not be found"
 +       echo "*** If GTS was installed in PREFIX, make sure PREFIX/bin is in"
 +       echo "*** your path, or set the GTS_CONFIG environment variable to the"
 +       echo "*** full path to gts-config."
 +     else
 +       if test -f conf.gtstest ; then
 +        :
 +       else
 +          echo "*** Could not run GTS test program, checking why..."
 +          CFLAGS="$CFLAGS $GTS_CFLAGS"
 +          LIBS="$LIBS $GTS_LIBS"
 +          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +
 +#include <gts.h>
 +#include <stdio.h>
 +
 +int
 +main ()
 +{
 + return ((gts_major_version) || (gts_minor_version) || (gts_micro_version));
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +   echo "*** The test program compiled, but did not run. This usually means"
 +          echo "*** that the run-time linker is not finding GTS or finding the wrong"
 +          echo "*** version of GTS. If it is not finding GTS, you'll need to set your"
 +          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 +          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 +          echo "*** is required on your system"
 +	  echo "***"
 +          echo "*** If you have an old version installed, it is best to remove it, although"
 +          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
 +          echo "***"
 +else
 +   echo "*** The test program failed to compile or link. See the file config.log for the"
 +          echo "*** exact error that occured. This usually means GTS was incorrectly installed"
 +          echo "*** or that you have moved GTS since it was installed. In the latter case, you"
 +          echo "*** may want to edit the gts-config script: $GTS_CONFIG"
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +          CFLAGS="$ac_save_CFLAGS"
 +          LIBS="$ac_save_LIBS"
 +       fi
 +     fi
 +     GTS_CFLAGS=""
 +     GTS_LIBS=""
 +     as_fn_error $? "
 +*** GTS 0.7.4 or better is required. The latest version of GTS
 +*** is always available from http://gts.sourceforge.net." "$LINENO" 5
 +  fi
 +
 +
 +  rm -f conf.gtstest
 +
 +
 +  gts_cflags=`$GTS_CONFIG --cflags $gts_check_casts gmodule`
 +  gts_libs=`$GTS_CONFIG --libs gmodule`
 +  GTS_LIBS="$gts_libs"
 +  GTS_DEPLIBS="$gts_libs"
 +else
 +  # Use uninstalled gts (assume they got the version right)
 +
 +  GTS_CONFIG=$with_gts/gts-config
 +  if test -x $GTS_CONFIG ; then
 +    :
 +  else
 +    as_fn_error $? "GTS directory ($with_gts) not present or not configured" "$LINENO" 5
 +  fi
 +
 +  # For use in gfs-config
 +  gts_cflags=`$GTS_CONFIG --cflags $gts_check_casts gmodule`
 +  gts_libs=`$GTS_CONFIG --libs gmodule`
 +  gts_release=`$GTS_CONFIG --version | sed 's%\\.[0-9]*$%%'`
 +
 +  # canonicalize relative paths
 +  case $with_gts in
 +    /*)
 +      gts_dir=$with_gts
 +      ;;
 +    *)
 +      gts_dir="\$(top_builddir)/$with_gts"
 +      ;;
 +  esac
 +
 +  GTS_CFLAGS="-I$gts_dir"
 +  if test -n "$gts_check_casts"; then
 +	 GTS_CFLAGS="$GTS_CFLAGS -DGTS_CHECK_CASTS"
 +  fi
 +  GTS_LIBS="$gts_dir/libgts.la"
 +  GTS_DEPLIBS=
 +
 +
 +fi
 +
++=======
+   if test "x$ac_pt_PKG_CONFIG" = x; then
+     PKG_CONFIG=""
+   else
+     case $cross_compiling:$ac_tool_warned in
+ yes:)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     PKG_CONFIG=$ac_pt_PKG_CONFIG
+   fi
+ else
+   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+ fi
+ 
+ fi
+ if test -n "$PKG_CONFIG"; then
+ 	_pkg_min_version=0.9.0
+ 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+ $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	else
+ 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 		PKG_CONFIG=""
+ 	fi
+ fi
+ 
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTS" >&5
+ $as_echo_n "checking for GTS... " >&6; }
+ 
+ if test -n "$GTS_CFLAGS"; then
+     pkg_cv_GTS_CFLAGS="$GTS_CFLAGS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gts >= 0.7.4\""; } >&5
+   ($PKG_CONFIG --exists --print-errors "gts >= 0.7.4") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+   pkg_cv_GTS_CFLAGS=`$PKG_CONFIG --cflags "gts >= 0.7.4" 2>/dev/null`
+ 		      test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+ fi
+  else
+     pkg_failed=untried
+ fi
+ if test -n "$GTS_LIBS"; then
+     pkg_cv_GTS_LIBS="$GTS_LIBS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gts >= 0.7.4\""; } >&5
+   ($PKG_CONFIG --exists --print-errors "gts >= 0.7.4") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+   pkg_cv_GTS_LIBS=`$PKG_CONFIG --libs "gts >= 0.7.4" 2>/dev/null`
+ 		      test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+ fi
+  else
+     pkg_failed=untried
+ fi
+ 
+ 
+ 
+ if test $pkg_failed = yes; then
+    	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+         _pkg_short_errors_supported=yes
+ else
+         _pkg_short_errors_supported=no
+ fi
+         if test $_pkg_short_errors_supported = yes; then
+ 	        GTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gts >= 0.7.4" 2>&1`
+         else
+ 	        GTS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gts >= 0.7.4" 2>&1`
+         fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$GTS_PKG_ERRORS" >&5
+ 
+ 	as_fn_error $? "Package requirements (gts >= 0.7.4) were not met:
+ 
+ $GTS_PKG_ERRORS
+ 
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
+ installed software in a non-standard prefix.
+ 
+ Alternatively, you may set the environment variables GTS_CFLAGS
+ and GTS_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details." "$LINENO" 5
+ elif test $pkg_failed = untried; then
+      	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+ is in your PATH or set the PKG_CONFIG environment variable to the full
+ path to pkg-config.
+ 
+ Alternatively, you may set the environment variables GTS_CFLAGS
+ and GTS_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details.
+ 
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+ See \`config.log' for more details" "$LINENO" 5; }
+ else
+ 	GTS_CFLAGS=$pkg_cv_GTS_CFLAGS
+ 	GTS_LIBS=$pkg_cv_GTS_LIBS
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 
+ fi
+ 
+ # check if we want to enable GTS casts checks
+ # Check whether --enable-gts-check was given.
+ if test "${enable_gts_check+set}" = set; then :
+   enableval=$enable_gts_check;  case "${enableval}" in
+ 	*) gts_check_casts="--check" ;;
+   esac
+ fi
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
  if test -n "$gts_check_casts"; then
    GTS_CFLAGS="$GTS_CFLAGS -DGTS_CHECK_CASTS"
  fi
  
  
  
++<<<<<<< HEAD
 +
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  # check whether GModules are supported
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modules are supported" >&5
  $as_echo_n "checking whether modules are supported... " >&6; }
  OLD_CFLAGS=$CFLAGS
++<<<<<<< HEAD
 +CFLAGS=$gts_cflags
 +OLD_LIBS=$LIBS
 +LIBS=$gts_libs
++=======
+ CFLAGS=$GTS_CFLAGS
+ OLD_LIBS=$LIBS
+ LIBS=$GTS_LIBS
++>>>>>>> upstream/20131206+dfsg
  if test "$cross_compiling" = yes; then :
    have_gmodule=yes; echo $ac_n "cross compiling; assumed OK... $ac_c"
  else
@@@ -12675,28 -12688,35 +14201,60 @@@ LIBS=$OLD_LIB
  
  # checking how to build modules
  if test "$have_gmodule" = "yes"; then
++<<<<<<< HEAD
 +   module_flags=""
 +   for flags in \
 +       "-fPIC -shared -x c" \
 +       "-fPIC -dynamiclib -x c -undefined dynamic_lookup" \
 +       "-fPIC -bundle -x c"
 +   do
 +	if test x"$module_flags" = x; then
 +	   if echo "test(){}" | gcc $flags - 2> /dev/null; then
 +	      module_flags=\"$flags\"
 +	   fi
 +	fi
 +   done
 +   if test x"$module_flags" = x; then
 +	have_gmodule=no
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not build module, functions in parameter files will not be supported." >&5
 +$as_echo "$as_me: WARNING: Could not build module, functions in parameter files will not be supported." >&2;}
 +   fi
 +
 +cat >>confdefs.h <<_ACEOF
 +#define MODULES_FLAGS $module_flags
 +_ACEOF
 +
++=======
+    # try gcc first
+    module_flags=""
+    if test x$GCC = xyes; then
+      gcc_flags="-fpic -x c"
+      for flags in \
+          "-shared" \
+          "-dynamiclib -undefined dynamic_lookup" \
+          "-bundle"
+      do
+ 	if test x"$module_flags" = x; then
+ 	   if echo "void test(){}" | $CC $flags $gcc_flags - 2> /dev/null; then
+ 	      module_flags="$flags"
+ 	   fi
+ 	fi
+      done
+    fi
+    if test x"$module_flags" = x; then
+        # use libtool if not using gcc
+        sed -e "s|PREFIX|$prefix|g" -e "s|COMPILER|$CC|g" < build_function_libtool > build_function
+    else
+        sed -e "s|MODULE_FLAGS|$module_flags|" -e "s|COMPILER|$CC|g" < build_function_gcc > build_function
+    fi
+ else
+    # cannot use modules
+    cat <<EOF > build_function
+ #!/bin/sh
+ echo "functions are not supported on this system"
+ exit 1
+ EOF
++>>>>>>> upstream/20131206+dfsg
  fi
  
  # checks for pkg-config
@@@ -12705,7 -12725,7 +14263,11 @@@ if test "$have_gmodule" = "yes"; the
  set dummy pkg-config; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_have_pkg_config+set}" = set; then :
++=======
+ if ${ac_cv_prog_have_pkg_config+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$have_pkg_config"; then
@@@ -12717,7 -12737,7 +14279,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_have_pkg_config="yes"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -12752,52 -12772,16 +14318,65 @@@ els
    $as_echo "#define HAVE_PKG_CONFIG 0" >>confdefs.h
  
  fi
++<<<<<<< HEAD
 +
 +# checks for gawk and m4
 +# Extract the first word of "gawk", so it can be a program name with args.
 +set dummy gawk; ac_word=$2
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 +$as_echo_n "checking for $ac_word... " >&6; }
 +if test "${ac_cv_prog_have_awk+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  if test -n "$have_awk"; then
 +  ac_cv_prog_have_awk="$have_awk" # Let the user override the test.
 +else
 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 +for as_dir in $PATH
 +do
 +  IFS=$as_save_IFS
 +  test -z "$as_dir" && as_dir=.
 +    for ac_exec_ext in '' $ac_executable_extensions; do
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 +    ac_cv_prog_have_awk="yes"
 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 +    break 2
 +  fi
 +done
 +  done
 +IFS=$as_save_IFS
 +
 +  test -z "$ac_cv_prog_have_awk" && ac_cv_prog_have_awk="no"
 +fi
 +fi
 +have_awk=$ac_cv_prog_have_awk
 +if test -n "$have_awk"; then
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_awk" >&5
 +$as_echo "$have_awk" >&6; }
 +else
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +fi
 +
 +
 +if test "$have_awk" = "yes"; then
 +   # Extract the first word of "m4", so it can be a program name with args.
 +set dummy m4; ac_word=$2
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 +$as_echo_n "checking for $ac_word... " >&6; }
 +if test "${ac_cv_prog_have_m4+set}" = set; then :
++=======
+ if test x"$have_pkg_config" = x""; then
+    have_pkg_config=undefined
+ fi
+ 
+ # checks for m4
+ # Extract the first word of "m4", so it can be a program name with args.
+ set dummy m4; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if ${ac_cv_prog_have_m4+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$have_m4"; then
@@@ -12809,7 -12793,7 +14388,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_have_m4="yes"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -12831,34 -12815,29 +14414,60 @@@ $as_echo "no" >&6; 
  fi
  
  
++<<<<<<< HEAD
 +   if test "$have_m4" = "yes"; then
 +
 +$as_echo "#define HAVE_M4 1" >>confdefs.h
 +
 +   else
 +      $as_echo "#define HAVE_M4 0" >>confdefs.h
 +
 +   fi
 +fi
 +
 +# check if module support is disabled
 +# Check whether --enable-modules was given.
 +if test "${enable_modules+set}" = set; then :
 +  enableval=$enable_modules;  case "${enableval}" in
 +	yes) ;;
 +	*) have_gmodule=no ;;
 +  esac
 +fi
 +
 +
 +
 + if test "$have_gmodule" = "yes"; then
 +  HAVE_MODULES_TRUE=
 +  HAVE_MODULES_FALSE='#'
 +else
 +  HAVE_MODULES_TRUE='#'
 +  HAVE_MODULES_FALSE=
 +fi
++=======
+ options_m4=""
+ if test "$have_m4" = "yes"; then
+ 
+ $as_echo "#define HAVE_M4 1" >>confdefs.h
+ 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking check whether m4 accepts the -P option" >&5
+ $as_echo_n "checking check whether m4 accepts the -P option... " >&6; }
+    if m4 -P < /dev/null 2> /dev/null; then
+       options_m4="-P"
+       accepts_P="yes"
+    else
+       accepts_P="no"
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $accepts_P" >&5
+ $as_echo "$accepts_P" >&6; }
+ else
+    $as_echo "#define HAVE_M4 0" >>confdefs.h
+ 
+ fi
+ 
+ cat >>confdefs.h <<_ACEOF
+ #define M4_OPTIONS "$options_m4"
+ _ACEOF
++>>>>>>> upstream/20131206+dfsg
  
  
  
@@@ -12868,7 -12847,7 +14477,11 @@@
  # checks for libproj
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_fwd in -lproj" >&5
  $as_echo_n "checking for pj_fwd in -lproj... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_proj_pj_fwd+set}" = set; then :
++=======
+ if ${ac_cv_lib_proj_pj_fwd+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -12902,7 -12881,7 +14515,11 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_fwd" >&5
  $as_echo "$ac_cv_lib_proj_pj_fwd" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_proj_pj_fwd" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_proj_pj_fwd" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    proj="yes"
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libproj not found. Map module will not be available." >&5
@@@ -12912,7 -12891,7 +14529,11 @@@ f
  for ac_header in proj_api.h
  do :
    ac_fn_c_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default"
++<<<<<<< HEAD
 +if test "x$ac_cv_header_proj_api_h" = x""yes; then :
++=======
+ if test "x$ac_cv_header_proj_api_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_PROJ_API_H 1
  _ACEOF
@@@ -12971,7 -12950,7 +14592,11 @@@ f
  set dummy gsl-config; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_path_GSL_CONFIG+set}" = set; then :
++=======
+ if ${ac_cv_path_GSL_CONFIG+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    case $GSL_CONFIG in
@@@ -12985,7 -12964,7 +14610,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_path_GSL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -13196,7 -13175,7 +14825,11 @@@ f
  # checks for netCDF
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nc_open in -lnetcdf" >&5
  $as_echo_n "checking for nc_open in -lnetcdf... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_netcdf_nc_open+set}" = set; then :
++=======
+ if ${ac_cv_lib_netcdf_nc_open+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -13230,7 -13209,7 +14863,11 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netcdf_nc_open" >&5
  $as_echo "$ac_cv_lib_netcdf_nc_open" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_netcdf_nc_open" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_netcdf_nc_open" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    netcdf="true"
  else
    netcdf="false"
@@@ -13239,7 -13218,7 +14876,11 @@@ f
  for ac_header in netcdf.h
  do :
    ac_fn_c_check_header_mongrel "$LINENO" "netcdf.h" "ac_cv_header_netcdf_h" "$ac_includes_default"
++<<<<<<< HEAD
 +if test "x$ac_cv_header_netcdf_h" = x""yes; then :
++=======
+ if test "x$ac_cv_header_netcdf_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_NETCDF_H 1
  _ACEOF
@@@ -13282,13 -13261,13 +14923,21 @@@ ac_compile='$F77 -c $FFLAGS conftest.$a
  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
++<<<<<<< HEAD
 +  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
++=======
+   for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
++>>>>>>> upstream/20131206+dfsg
    do
      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_F77+set}" = set; then :
++=======
+ if ${ac_cv_prog_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$F77"; then
@@@ -13300,7 -13279,7 +14949,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -13326,13 -13305,13 +14979,21 @@@ f
  fi
  if test -z "$F77"; then
    ac_ct_F77=$F77
++<<<<<<< HEAD
 +  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
++=======
+   for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
++>>>>>>> upstream/20131206+dfsg
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_F77"; then
@@@ -13344,7 -13323,7 +15005,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_F77="$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -13414,7 -13393,7 +15079,11 @@@ ac_save_ext=$ac_ex
  ac_ext=F
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
  $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then :
++=======
+ if ${ac_cv_f77_compiler_gnu+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat > conftest.$ac_ext <<_ACEOF
@@@ -13442,7 -13421,7 +15111,11 @@@ ac_save_FFLAGS=$FFLAG
  FFLAGS=
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
  $as_echo_n "checking whether $F77 accepts -g... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_f77_g+set}" = set; then :
++=======
+ if ${ac_cv_prog_f77_g+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    FFLAGS=-g
@@@ -13505,7 -13484,6 +15178,10 @@@ export_dynamic_flag_spec_F77
  hardcode_direct_F77=no
  hardcode_direct_absolute_F77=no
  hardcode_libdir_flag_spec_F77=
++<<<<<<< HEAD
 +hardcode_libdir_flag_spec_ld_F77=
++=======
++>>>>>>> upstream/20131206+dfsg
  hardcode_libdir_separator_F77=
  hardcode_minus_L_F77=no
  hardcode_automatic_F77=no
@@@ -13741,7 -13719,9 +15417,13 @@@ lt_prog_compiler_static_F77
      case $cc_basename in
      nvcc*) # Cuda Compiler Driver 2.2
        lt_prog_compiler_wl_F77='-Xlinker '
++<<<<<<< HEAD
 +      lt_prog_compiler_pic_F77='-Xcompiler -fPIC'
++=======
+       if test -n "$lt_prog_compiler_pic_F77"; then
+         lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77"
+       fi
++>>>>>>> upstream/20131206+dfsg
        ;;
      esac
    else
@@@ -13785,7 -13765,7 +15467,11 @@@
        lt_prog_compiler_static_F77='-non_shared'
        ;;
  
++<<<<<<< HEAD
 +    linux* | k*bsd*-gnu | kopensolaris*-gnu)
++=======
+     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
++>>>>>>> upstream/20131206+dfsg
        case $cc_basename in
        # old Intel for x86_64 which still supported -KPIC.
        ecc*)
@@@ -13832,18 -13812,33 +15518,43 @@@
  	;;
        *)
  	case `$CC -V 2>&1 | sed 5q` in
++<<<<<<< HEAD
 +	*Sun\ F* | *Sun*Fortran*)
++=======
+ 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
++>>>>>>> upstream/20131206+dfsg
  	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
  	  lt_prog_compiler_pic_F77='-KPIC'
  	  lt_prog_compiler_static_F77='-Bstatic'
  	  lt_prog_compiler_wl_F77=''
  	  ;;
++<<<<<<< HEAD
++=======
+ 	*Sun\ F* | *Sun*Fortran*)
+ 	  lt_prog_compiler_pic_F77='-KPIC'
+ 	  lt_prog_compiler_static_F77='-Bstatic'
+ 	  lt_prog_compiler_wl_F77='-Qoption ld '
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	*Sun\ C*)
  	  # Sun C 5.9
  	  lt_prog_compiler_pic_F77='-KPIC'
  	  lt_prog_compiler_static_F77='-Bstatic'
  	  lt_prog_compiler_wl_F77='-Wl,'
  	  ;;
++<<<<<<< HEAD
++=======
+         *Intel*\ [CF]*Compiler*)
+ 	  lt_prog_compiler_wl_F77='-Wl,'
+ 	  lt_prog_compiler_pic_F77='-fPIC'
+ 	  lt_prog_compiler_static_F77='-static'
+ 	  ;;
+ 	*Portland\ Group*)
+ 	  lt_prog_compiler_wl_F77='-Wl,'
+ 	  lt_prog_compiler_pic_F77='-fpic'
+ 	  lt_prog_compiler_static_F77='-Bstatic'
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	esac
  	;;
        esac
@@@ -13934,7 -13929,7 +15645,11 @@@ esa
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
  $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_pic_F77+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_pic_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77
@@@ -13949,7 -13944,7 +15664,11 @@@ lt_prog_compiler_pic_F77=$lt_cv_prog_co
  if test -n "$lt_prog_compiler_pic_F77"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
  $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_pic_works_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_pic_works_F77=no
@@@ -14007,7 -14002,7 +15726,11 @@@ f
  wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
  $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_static_works_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_static_works_F77=no
@@@ -14047,7 -14042,7 +15770,11 @@@ f
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_c_o_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_c_o_F77=no
@@@ -14099,7 -14094,7 +15826,11 @@@ $as_echo "$lt_cv_prog_compiler_c_o_F77
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_c_o_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_c_o_F77=no
@@@ -14190,7 -14185,6 +15921,10 @@@ $as_echo_n "checking whether the $compi
    hardcode_direct_F77=no
    hardcode_direct_absolute_F77=no
    hardcode_libdir_flag_spec_F77=
++<<<<<<< HEAD
 +  hardcode_libdir_flag_spec_ld_F77=
++=======
++>>>>>>> upstream/20131206+dfsg
    hardcode_libdir_separator_F77=
    hardcode_minus_L_F77=no
    hardcode_shlibpath_var_F77=unsupported
@@@ -14234,6 -14228,9 +15968,12 @@@
    openbsd*)
      with_gnu_ld=no
      ;;
++<<<<<<< HEAD
++=======
+   linux* | k*bsd*-gnu | gnu*)
+     link_all_deplibs_F77=no
+     ;;
++>>>>>>> upstream/20131206+dfsg
    esac
  
    ld_shlibs_F77=yes
@@@ -14440,8 -14437,7 +16180,12 @@@ _LT_EO
  	xlf* | bgf* | bgxlf* | mpixlf*)
  	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  	  whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive'
++<<<<<<< HEAD
 +	  hardcode_libdir_flag_spec_F77=
 +	  hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
++=======
+ 	  hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
++>>>>>>> upstream/20131206+dfsg
  	  archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  	  if test "x$supports_anon_versioning" = xyes; then
  	    archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
@@@ -14456,7 -14452,7 +16200,11 @@@
        fi
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
@@@ -14633,6 -14629,7 +16381,10 @@@ _LT_EO
  	if test "$aix_use_runtimelinking" = yes; then
  	  shared_flag="$shared_flag "'${wl}-G'
  	fi
++<<<<<<< HEAD
++=======
+ 	link_all_deplibs_F77=no
++>>>>>>> upstream/20131206+dfsg
        else
  	# not using gcc
  	if test "$host_cpu" = ia64; then
@@@ -14661,7 -14658,7 +16413,11 @@@
          if test "${lt_cv_aix_libpath+set}" = set; then
    aix_libpath=$lt_cv_aix_libpath
  else
++<<<<<<< HEAD
 +  if test "${lt_cv_aix_libpath__F77+set}" = set; then :
++=======
+   if ${lt_cv_aix_libpath__F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat > conftest.$ac_ext <<_ACEOF
@@@ -14708,7 -14705,7 +16464,11 @@@ f
  	 if test "${lt_cv_aix_libpath+set}" = set; then
    aix_libpath=$lt_cv_aix_libpath
  else
++<<<<<<< HEAD
 +  if test "${lt_cv_aix_libpath__F77+set}" = set; then :
++=======
+   if ${lt_cv_aix_libpath__F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat > conftest.$ac_ext <<_ACEOF
@@@ -14808,6 -14805,7 +16568,10 @@@ f
  	# The linker will not automatically build a static lib if we build a DLL.
  	# _LT_TAGVAR(old_archive_from_new_cmds, F77)='true'
  	enable_shared_with_static_runtimes_F77=yes
++<<<<<<< HEAD
++=======
+ 	exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
++>>>>>>> upstream/20131206+dfsg
  	export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
  	# Don't use ranlib
  	old_postinstall_cmds_F77='chmod 644 $oldlib'
@@@ -14853,6 -14851,7 +16617,10 @@@
    hardcode_shlibpath_var_F77=unsupported
    if test "$lt_cv_ld_force_load" = "yes"; then
      whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
++<<<<<<< HEAD
++=======
+     compiler_needs_object_F77=yes
++>>>>>>> upstream/20131206+dfsg
    else
      whole_archive_flag_spec_F77=''
    fi
@@@ -14881,10 -14880,6 +16649,13 @@@
        hardcode_shlibpath_var_F77=no
        ;;
  
++<<<<<<< HEAD
 +    freebsd1*)
 +      ld_shlibs_F77=no
 +      ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
      # 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
@@@ -14897,7 -14892,7 +16668,11 @@@
        ;;
  
      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++<<<<<<< HEAD
 +    freebsd2*)
++=======
+     freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
        archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
        hardcode_direct_F77=yes
        hardcode_minus_L_F77=yes
@@@ -14936,7 -14931,6 +16711,10 @@@
        fi
        if test "$with_gnu_ld" = no; then
  	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
++<<<<<<< HEAD
 +	hardcode_libdir_flag_spec_ld_F77='+b $libdir'
++=======
++>>>>>>> upstream/20131206+dfsg
  	hardcode_libdir_separator_F77=:
  	hardcode_direct_F77=yes
  	hardcode_direct_absolute_F77=yes
@@@ -15004,7 -14998,7 +16782,11 @@@
  	# This should be the same for all languages, so no per-tag cache variable.
  	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
  $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++=======
+ if ${lt_cv_irix_exported_symbol+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    save_LDFLAGS="$LDFLAGS"
@@@ -15039,7 -15033,7 +16821,11 @@@ $as_echo "$lt_cv_irix_exported_symbol" 
        link_all_deplibs_F77=yes
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
        else
@@@ -15312,7 -15306,7 +17098,11 @@@ x|xyes
        # to ld, don't add -lc before -lgcc.
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
  $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_archive_cmds_need_lc_F77+set}" = set; then :
++=======
+ if ${lt_cv_archive_cmds_need_lc_F77+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    $RM conftest*
@@@ -15423,8 -15417,6 +17213,11 @@@ esa
  
  
  
++<<<<<<< HEAD
 +
 +
++=======
++>>>>>>> upstream/20131206+dfsg
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
  $as_echo_n "checking dynamic linker characteristics... " >&6; }
  
@@@ -15450,7 -15442,7 +17243,11 @@@ need_version=unknow
  
  case $host_os in
  aix3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
    shlibpath_var=LIBPATH
  
@@@ -15459,7 -15451,7 +17256,11 @@@
    ;;
  
  aix[4-9]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    hardcode_into_libs=yes
@@@ -15524,7 -15516,7 +17325,11 @@@ beos*
    ;;
  
  bsdi[45]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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'
@@@ -15661,7 -15653,7 +17466,11 @@@ darwin* | rhapsody*
    ;;
  
  dgux*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@@ -15669,10 -15661,6 +17478,13 @@@
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  
++<<<<<<< HEAD
 +freebsd1*)
 +  dynamic_linker=no
 +  ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  freebsd* | dragonfly*)
    # DragonFly does not have aout.  When/if they implement a new
    # versioning mechanism, adjust this.
@@@ -15680,7 -15668,7 +17492,11 @@@
      objformat=`/usr/bin/objformat`
    else
      case $host_os in
++<<<<<<< HEAD
 +    freebsd[123]*) objformat=aout ;;
++=======
+     freebsd[23].*) objformat=aout ;;
++>>>>>>> upstream/20131206+dfsg
      *) objformat=elf ;;
      esac
    fi
@@@ -15698,7 -15686,7 +17514,11 @@@
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case $host_os in
++<<<<<<< HEAD
 +  freebsd2*)
++=======
+   freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
      shlibpath_overrides_runpath=yes
      ;;
    freebsd3.[01]* | freebsdelf3.[01]*)
@@@ -15717,18 -15705,8 +17537,23 @@@
    esac
    ;;
  
++<<<<<<< HEAD
 +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
 +  ;;
 +
 +haiku*)
 +  version_type=linux
++=======
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    dynamic_linker="$host_os runtime_loader"
@@@ -15789,7 -15767,7 +17614,11 @@@ hpux9* | hpux10* | hpux11*
    ;;
  
  interix[3-9]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@@ -15805,7 -15783,7 +17634,11 @@@ irix5* | irix6* | nonstopux*
      nonstopux*) version_type=nonstopux ;;
      *)
  	if test "$lt_cv_prog_gnu_ld" = yes; then
++<<<<<<< HEAD
 +		version_type=linux
++=======
+ 		version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
  	else
  		version_type=irix
  	fi ;;
@@@ -15842,9 -15820,9 +17675,15 @@@ linux*oldld* | linux*aout* | linux*coff
    dynamic_linker=no
    ;;
  
++<<<<<<< HEAD
 +# This must be Linux ELF.
 +linux* | k*bsd*-gnu | kopensolaris*-gnu)
 +  version_type=linux
++=======
+ # This must be glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -15854,7 -15832,7 +17693,11 @@@
    shlibpath_overrides_runpath=no
  
    # Some binutils ld are patched to set DT_RUNPATH
++<<<<<<< HEAD
 +  if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
++=======
+   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_shlibpath_overrides_runpath=no
@@@ -15901,6 -15879,18 +17744,21 @@@ f
    dynamic_linker='GNU/Linux ld.so'
    ;;
  
++<<<<<<< HEAD
++=======
+ netbsdelf*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+   hardcode_into_libs=yes
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+ 
++>>>>>>> upstream/20131206+dfsg
  netbsd*)
    version_type=sunos
    need_lib_prefix=no
@@@ -15920,7 -15910,7 +17778,11 @@@
    ;;
  
  newsos6)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -15989,7 -15979,7 +17851,11 @@@ rdos*
    ;;
  
  solaris*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -16014,7 -16004,7 +17880,11 @@@ sunos4*
    ;;
  
  sysv4 | sysv4.3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -16038,7 -16028,7 +17908,11 @@@
  
  sysv4*MP*)
    if test -d /usr/nec ;then
++<<<<<<< HEAD
 +    version_type=linux
++=======
+     version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
      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
@@@ -16069,7 -16059,7 +17943,11 @@@ sysv5* | sco3.2v5* | sco5v6* | unixware
  
  tpf*)
    # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -16079,7 -16069,7 +17957,11 @@@
    ;;
  
  uts4*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -16142,56 -16132,742 +18024,795 @@@ f
  
  
  
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
- $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
- hardcode_action_F77=
- if test -n "$hardcode_libdir_flag_spec_F77" ||
-    test -n "$runpath_var_F77" ||
-    test "X$hardcode_automatic_F77" = "Xyes" ; then
++<<<<<<< HEAD
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
++$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
++hardcode_action_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-existent 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_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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5
++$as_echo "$hardcode_action_F77" >&6; }
++
++if test "$hardcode_action_F77" = relink ||
++   test "$inherit_rpath_F77" = yes; then
++  # Fast installation is not supported
++  enable_fast_install=no
++elif test "$shlibpath_overrides_runpath" = yes ||
++     test "$enable_shared" = no; then
++  # Fast installation is not necessary
++  enable_fast_install=needless
++fi
++
++
++
++
++
++
++
++  fi # test -n "$compiler"
++
++  GCC=$lt_save_GCC
++  CC="$lt_save_CC"
++  CFLAGS="$lt_save_CFLAGS"
++fi # test "$_lt_disable_F77" != yes
++=======
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+ hardcode_action_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-existent 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_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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5
+ $as_echo "$hardcode_action_F77" >&6; }
+ 
+ if test "$hardcode_action_F77" = relink ||
+    test "$inherit_rpath_F77" = yes; then
+   # Fast installation is not supported
+   enable_fast_install=no
+ elif test "$shlibpath_overrides_runpath" = yes ||
+      test "$enable_shared" = no; then
+   # Fast installation is not necessary
+   enable_fast_install=needless
+ fi
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+   fi # test -n "$compiler"
+ 
+   GCC=$lt_save_GCC
+   CC="$lt_save_CC"
+   CFLAGS="$lt_save_CFLAGS"
+ fi # test "$_lt_disable_F77" != yes
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 
+ if test x$F77 != x; 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5
+ $as_echo_n "checking how to get verbose linking output from $F77... " >&6; }
+ if ${ac_cv_prog_f77_v+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   cat > conftest.$ac_ext <<_ACEOF
+       program main
+ 
+       end
+ _ACEOF
+ if ac_fn_f77_try_compile "$LINENO"; 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 "set x $ac_link"
+ shift
+ $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
+ # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+ # LIBRARY_PATH; skip all such settings.
+ ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
+   sed '/^Driving:/d; /^Configured with:/d;
+       '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
+ $as_echo "$ac_f77_v_output" >&5
+ FFLAGS=$ac_save_FFLAGS
+ 
+ rm -rf 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"
+ 
+ # FIXME: we keep getting bitten by quoted arguments; a more general fix
+ #        that detects unbalanced quotes in FLIBS should be implemented
+ #        and (ugh) tested at some point.
+ case $ac_f77_v_output in
+   # With xlf replace commas with spaces,
+   # and remove "-link" and closing parenthesis.
+   *xlfentry*)
+     ac_f77_v_output=`echo $ac_f77_v_output |
+       sed '
+         s/,/ /g
+         s/ -link / /g
+         s/) *$//
+       '
+     ` ;;
+ 
+   # 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'` ;;
+ 
+   # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+   # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+   # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+   *-cmdline\ * | *-ignore\ * | *-def\ *)
+     ac_f77_v_output=`echo $ac_f77_v_output | sed "\
+ 	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+ 	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+ 	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+ 
+   # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
+   *fort77*f2c*gcc*)
+     ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n '
+         /:[	 ]\+Running[	 ]\{1,\}"gcc"/{
+           /"-c"/d
+           /[.]c"*/d
+           s/^.*"gcc"/"gcc"/
+           s/"//gp
+         }'` ;;
+ 
+   # If we are using Cray Fortran then delete quotes.
+   *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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5
+ $as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
+ fi
+ else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5
+ $as_echo "$as_me: WARNING: compilation failed" >&2;}
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5
+ $as_echo "$ac_cv_prog_f77_v" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5
+ $as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; }
+ if ${ac_cv_f77_libs+:} false; then :
+   $as_echo_n "(cached) " >&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 "set x $ac_link"
+ shift
+ $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
+ # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+ # LIBRARY_PATH; skip all such settings.
+ ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
+   sed '/^Driving:/d; /^Configured with:/d;
+       '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
+ $as_echo "$ac_f77_v_output" >&5
+ FFLAGS=$ac_save_FFLAGS
+ 
+ rm -rf 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"
+ 
+ # FIXME: we keep getting bitten by quoted arguments; a more general fix
+ #        that detects unbalanced quotes in FLIBS should be implemented
+ #        and (ugh) tested at some point.
+ case $ac_f77_v_output in
+   # With xlf replace commas with spaces,
+   # and remove "-link" and closing parenthesis.
+   *xlfentry*)
+     ac_f77_v_output=`echo $ac_f77_v_output |
+       sed '
+         s/,/ /g
+         s/ -link / /g
+         s/) *$//
+       '
+     ` ;;
+ 
+   # 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'` ;;
+ 
+   # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+   # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+   # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+   *-cmdline\ * | *-ignore\ * | *-def\ *)
+     ac_f77_v_output=`echo $ac_f77_v_output | sed "\
+ 	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+ 	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+ 	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+ 
+   # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
+   *fort77*f2c*gcc*)
+     ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n '
+         /:[	 ]\+Running[	 ]\{1,\}"gcc"/{
+           /"-c"/d
+           /[.]c"*/d
+           s/^.*"gcc"/"gcc"/
+           s/"//gp
+         }'` ;;
+ 
+   # If we are using Cray Fortran then delete quotes.
+   *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*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
+ 	  |-LANG:=* | -LIST:* | -LNO:* | -link)
+ 	  ;;
+ 	-lkernel32)
+ 	  case $host_os in
+ 	  *cygwin*) ;;
+ 	  *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+ 	    ;;
+ 	  esac
+ 	  ;;
+ 	-[LRuYz])
+ 	  # 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 `$as_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
+ 	  ;;
+ 	-zallextract*| -zdefaultextract)
+ 	  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+ 	  ;;
+ 	  # 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=`$as_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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5
+ $as_echo "$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
+ 
+ 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
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5
+ $as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; }
+ if ${ac_cv_f77_dummy_main+:} false; then :
+   $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ #ifdef F77_DUMMY_MAIN
+ 
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ 
+ #endif
+ int
+ main ()
+ {
+ 
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_fortran_dummy_main=none
+ else
+   ac_cv_fortran_dummy_main=unknown
+ fi
+ rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* 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
+ if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_fortran_dummy_main=$ac_func; break
+ fi
+ rm -f core 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 -rf conftest*
+  LIBS=$ac_f77_dm_save_LIBS
+ 
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5
+ $as_echo "$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
+ 
+ $as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h
+ 
+   fi
+ fi
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "linking to Fortran libraries from C fails
+ See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5
+ $as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; }
+ if ${ac_cv_f77_mangling+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   cat > conftest.$ac_ext <<_ACEOF
+       subroutine foobar()
+       return
+       end
+       subroutine foo_bar()
+       return
+       end
+ _ACEOF
+ if ac_fn_f77_try_compile "$LINENO"; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+    builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ char $ac_func ();
+ #ifdef F77_DUMMY_MAIN
+ 
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ 
+ #endif
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+   ac_success=yes; break 2
+ fi
+ rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+    builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ char $ac_func ();
+ #ifdef F77_DUMMY_MAIN
+ 
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ 
+ #endif
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+   ac_success_extra=yes; break
+ fi
+ rm -f core 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
  
-   # We can hardcode non-existent 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_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
-      test "$hardcode_minus_L_F77" != no; then
-     # Linking always hardcodes the temporary library directory.
-     hardcode_action_F77=relink
+      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
-     # We can link without hardcoding, and we can hardcode nonexisting dirs.
-     hardcode_action_F77=immediate
+      ac_cv_f77_mangling="unknown"
    fi
+ 
+   LIBS=$ac_save_LIBS
+   rm -rf conftest*
+   rm -f cfortran_test*
  else
-   # We cannot hardcode anything, or else we can only hardcode existing
-   # directories.
-   hardcode_action_F77=unsupported
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "cannot compile a simple Fortran program
+ See \`config.log' for more details" "$LINENO" 5; }
  fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5
- $as_echo "$hardcode_action_F77" >&6; }
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
- if test "$hardcode_action_F77" = relink ||
-    test "$inherit_rpath_F77" = yes; then
-   # Fast installation is not supported
-   enable_fast_install=no
- elif test "$shlibpath_overrides_runpath" = yes ||
-      test "$enable_shared" = no; then
-   # Fast installation is not necessary
-   enable_fast_install=needless
  fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5
+ $as_echo "$ac_cv_f77_mangling" >&6; }
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 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")
+ 	  $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h
  
+ 	  $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h
+  ;;
+   "lower case, no underscore, extra underscore")
+ 	  $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h
  
+ 	  $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h
+  ;;
+   "lower case, underscore, no extra underscore")
+ 	  $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h
  
+ 	  $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h
+  ;;
+   "lower case, underscore, extra underscore")
+ 	  $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h
  
+ 	  $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h
+  ;;
+   "upper case, no underscore, no extra underscore")
+ 	  $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h
  
+ 	  $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h
+  ;;
+   "upper case, no underscore, extra underscore")
+ 	  $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h
  
+ 	  $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h
+  ;;
+   "upper case, underscore, no extra underscore")
+ 	  $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h
  
-   fi # test -n "$compiler"
+ 	  $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h
+  ;;
+   "upper case, underscore, extra underscore")
+ 	  $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h
  
-   GCC=$lt_save_GCC
-   CC="$lt_save_CC"
-   CFLAGS="$lt_save_CFLAGS"
- fi # test "$_lt_disable_F77" != yes
+ 	  $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h
+  ;;
+   *)
+ 	  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5
+ $as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
+ 	  ;;
+ esac
++>>>>>>> upstream/20131206+dfsg
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
@@@ -16199,7 -16875,7 +18820,11 @@@ ac_compile='$CC -c $CFLAGS $CPPFLAGS co
  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
++<<<<<<< HEAD
 +
++=======
+ fi
++>>>>>>> upstream/20131206+dfsg
   if test x$F77 != x; then
    BUILD_STOKES_TRUE=
    BUILD_STOKES_FALSE='#'
@@@ -16231,7 -16907,7 +18856,11 @@@ if test -n "$ac_tool_prefix"; the
  set dummy $ac_tool_prefix$ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_FC+set}" = set; then :
++=======
+ if ${ac_cv_prog_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$FC"; then
@@@ -16243,7 -16919,7 +18872,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -16275,7 -16951,7 +18908,11 @@@ d
  set dummy $ac_prog; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ac_ct_FC+set}" = set; then :
++=======
+ if ${ac_cv_prog_ac_ct_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_FC"; then
@@@ -16287,7 -16963,7 +18924,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ac_ct_FC="$ac_prog"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -16357,7 -17033,7 +18998,11 @@@ ac_save_ext=$ac_ex
  ac_ext=F
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
  $as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_fc_compiler_gnu+set}" = set; then :
++=======
+ if ${ac_cv_fc_compiler_gnu+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat > conftest.$ac_ext <<_ACEOF
@@@ -16385,7 -17061,7 +19030,11 @@@ ac_save_FCFLAGS=$FCFLAG
  FCFLAGS=
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
  $as_echo_n "checking whether $FC accepts -g... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_fc_g+set}" = set; then :
++=======
+ if ${ac_cv_prog_fc_g+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    FCFLAGS=-g
@@@ -16420,6 -17096,11 +19069,14 @@@ els
    fi
  fi
  
++<<<<<<< HEAD
++=======
+ if test $ac_compiler_gnu = yes; then
+   GFC=yes
+ else
+   GFC=
+ fi
++>>>>>>> upstream/20131206+dfsg
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@@ -16454,7 -17135,6 +19111,10 @@@ export_dynamic_flag_spec_FC
  hardcode_direct_FC=no
  hardcode_direct_absolute_FC=no
  hardcode_libdir_flag_spec_FC=
++<<<<<<< HEAD
 +hardcode_libdir_flag_spec_ld_FC=
++=======
++>>>>>>> upstream/20131206+dfsg
  hardcode_libdir_separator_FC=
  hardcode_minus_L_FC=no
  hardcode_automatic_FC=no
@@@ -16610,6 -17290,7 +19270,10 @@@ _lt_libdeps_save_CFLAGS=$CFLAG
  case "$CC $CFLAGS " in #(
  *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
++<<<<<<< HEAD
++=======
+ *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
++>>>>>>> upstream/20131206+dfsg
  esac
  
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@@ -16854,7 -17535,9 +19518,13 @@@ lt_prog_compiler_static_FC
      case $cc_basename in
      nvcc*) # Cuda Compiler Driver 2.2
        lt_prog_compiler_wl_FC='-Xlinker '
++<<<<<<< HEAD
 +      lt_prog_compiler_pic_FC='-Xcompiler -fPIC'
++=======
+       if test -n "$lt_prog_compiler_pic_FC"; then
+         lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC"
+       fi
++>>>>>>> upstream/20131206+dfsg
        ;;
      esac
    else
@@@ -16898,7 -17581,7 +19568,11 @@@
        lt_prog_compiler_static_FC='-non_shared'
        ;;
  
++<<<<<<< HEAD
 +    linux* | k*bsd*-gnu | kopensolaris*-gnu)
++=======
+     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
++>>>>>>> upstream/20131206+dfsg
        case $cc_basename in
        # old Intel for x86_64 which still supported -KPIC.
        ecc*)
@@@ -16945,18 -17628,33 +19619,43 @@@
  	;;
        *)
  	case `$CC -V 2>&1 | sed 5q` in
++<<<<<<< HEAD
 +	*Sun\ F* | *Sun*Fortran*)
++=======
+ 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
++>>>>>>> upstream/20131206+dfsg
  	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
  	  lt_prog_compiler_pic_FC='-KPIC'
  	  lt_prog_compiler_static_FC='-Bstatic'
  	  lt_prog_compiler_wl_FC=''
  	  ;;
++<<<<<<< HEAD
++=======
+ 	*Sun\ F* | *Sun*Fortran*)
+ 	  lt_prog_compiler_pic_FC='-KPIC'
+ 	  lt_prog_compiler_static_FC='-Bstatic'
+ 	  lt_prog_compiler_wl_FC='-Qoption ld '
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	*Sun\ C*)
  	  # Sun C 5.9
  	  lt_prog_compiler_pic_FC='-KPIC'
  	  lt_prog_compiler_static_FC='-Bstatic'
  	  lt_prog_compiler_wl_FC='-Wl,'
  	  ;;
++<<<<<<< HEAD
++=======
+         *Intel*\ [CF]*Compiler*)
+ 	  lt_prog_compiler_wl_FC='-Wl,'
+ 	  lt_prog_compiler_pic_FC='-fPIC'
+ 	  lt_prog_compiler_static_FC='-static'
+ 	  ;;
+ 	*Portland\ Group*)
+ 	  lt_prog_compiler_wl_FC='-Wl,'
+ 	  lt_prog_compiler_pic_FC='-fpic'
+ 	  lt_prog_compiler_static_FC='-Bstatic'
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	esac
  	;;
        esac
@@@ -17047,7 -17745,7 +19746,11 @@@ esa
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
  $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_pic_FC+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_pic_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC
@@@ -17062,7 -17760,7 +19765,11 @@@ lt_prog_compiler_pic_FC=$lt_cv_prog_com
  if test -n "$lt_prog_compiler_pic_FC"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_FC works" >&5
  $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_FC works... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_pic_works_FC+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_pic_works_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_pic_works_FC=no
@@@ -17120,7 -17818,7 +19827,11 @@@ f
  wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\"
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
  $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_static_works_FC+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_static_works_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_static_works_FC=no
@@@ -17160,7 -17858,7 +19871,11 @@@ f
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_c_o_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_c_o_FC=no
@@@ -17212,7 -17910,7 +19927,11 @@@ $as_echo "$lt_cv_prog_compiler_c_o_FC" 
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
  $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then :
++=======
+ if ${lt_cv_prog_compiler_c_o_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_prog_compiler_c_o_FC=no
@@@ -17303,7 -18001,6 +20022,10 @@@ $as_echo_n "checking whether the $compi
    hardcode_direct_FC=no
    hardcode_direct_absolute_FC=no
    hardcode_libdir_flag_spec_FC=
++<<<<<<< HEAD
 +  hardcode_libdir_flag_spec_ld_FC=
++=======
++>>>>>>> upstream/20131206+dfsg
    hardcode_libdir_separator_FC=
    hardcode_minus_L_FC=no
    hardcode_shlibpath_var_FC=unsupported
@@@ -17347,6 -18044,9 +20069,12 @@@
    openbsd*)
      with_gnu_ld=no
      ;;
++<<<<<<< HEAD
++=======
+   linux* | k*bsd*-gnu | gnu*)
+     link_all_deplibs_FC=no
+     ;;
++>>>>>>> upstream/20131206+dfsg
    esac
  
    ld_shlibs_FC=yes
@@@ -17553,8 -18253,7 +20281,12 @@@ _LT_EO
  	xlf* | bgf* | bgxlf* | mpixlf*)
  	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  	  whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive'
++<<<<<<< HEAD
 +	  hardcode_libdir_flag_spec_FC=
 +	  hardcode_libdir_flag_spec_ld_FC='-rpath $libdir'
++=======
+ 	  hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
++>>>>>>> upstream/20131206+dfsg
  	  archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  	  if test "x$supports_anon_versioning" = xyes; then
  	    archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
@@@ -17569,7 -18268,7 +20301,11 @@@
        fi
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
@@@ -17746,6 -18445,7 +20482,10 @@@ _LT_EO
  	if test "$aix_use_runtimelinking" = yes; then
  	  shared_flag="$shared_flag "'${wl}-G'
  	fi
++<<<<<<< HEAD
++=======
+ 	link_all_deplibs_FC=no
++>>>>>>> upstream/20131206+dfsg
        else
  	# not using gcc
  	if test "$host_cpu" = ia64; then
@@@ -17774,7 -18474,7 +20514,11 @@@
          if test "${lt_cv_aix_libpath+set}" = set; then
    aix_libpath=$lt_cv_aix_libpath
  else
++<<<<<<< HEAD
 +  if test "${lt_cv_aix_libpath__FC+set}" = set; then :
++=======
+   if ${lt_cv_aix_libpath__FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat > conftest.$ac_ext <<_ACEOF
@@@ -17821,7 -18521,7 +20565,11 @@@ f
  	 if test "${lt_cv_aix_libpath+set}" = set; then
    aix_libpath=$lt_cv_aix_libpath
  else
++<<<<<<< HEAD
 +  if test "${lt_cv_aix_libpath__FC+set}" = set; then :
++=======
+   if ${lt_cv_aix_libpath__FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    cat > conftest.$ac_ext <<_ACEOF
@@@ -17921,6 -18621,7 +20669,10 @@@ f
  	# The linker will not automatically build a static lib if we build a DLL.
  	# _LT_TAGVAR(old_archive_from_new_cmds, FC)='true'
  	enable_shared_with_static_runtimes_FC=yes
++<<<<<<< HEAD
++=======
+ 	exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
++>>>>>>> upstream/20131206+dfsg
  	export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
  	# Don't use ranlib
  	old_postinstall_cmds_FC='chmod 644 $oldlib'
@@@ -17966,6 -18667,7 +20718,10 @@@
    hardcode_shlibpath_var_FC=unsupported
    if test "$lt_cv_ld_force_load" = "yes"; then
      whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
++<<<<<<< HEAD
++=======
+     compiler_needs_object_FC=yes
++>>>>>>> upstream/20131206+dfsg
    else
      whole_archive_flag_spec_FC=''
    fi
@@@ -17994,10 -18696,6 +20750,13 @@@
        hardcode_shlibpath_var_FC=no
        ;;
  
++<<<<<<< HEAD
 +    freebsd1*)
 +      ld_shlibs_FC=no
 +      ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
      # 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
@@@ -18010,7 -18708,7 +20769,11 @@@
        ;;
  
      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++<<<<<<< HEAD
 +    freebsd2*)
++=======
+     freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
        archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
        hardcode_direct_FC=yes
        hardcode_minus_L_FC=yes
@@@ -18049,7 -18747,6 +20812,10 @@@
        fi
        if test "$with_gnu_ld" = no; then
  	hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
++<<<<<<< HEAD
 +	hardcode_libdir_flag_spec_ld_FC='+b $libdir'
++=======
++>>>>>>> upstream/20131206+dfsg
  	hardcode_libdir_separator_FC=:
  	hardcode_direct_FC=yes
  	hardcode_direct_absolute_FC=yes
@@@ -18117,7 -18814,7 +20883,11 @@@
  	# This should be the same for all languages, so no per-tag cache variable.
  	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
  $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++=======
+ if ${lt_cv_irix_exported_symbol+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    save_LDFLAGS="$LDFLAGS"
@@@ -18152,7 -18849,7 +20922,11 @@@ $as_echo "$lt_cv_irix_exported_symbol" 
        link_all_deplibs_FC=yes
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
        else
@@@ -18425,7 -19122,7 +21199,11 @@@ x|xyes
        # to ld, don't add -lc before -lgcc.
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
  $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
++<<<<<<< HEAD
 +if test "${lt_cv_archive_cmds_need_lc_FC+set}" = set; then :
++=======
+ if ${lt_cv_archive_cmds_need_lc_FC+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    $RM conftest*
@@@ -18536,8 -19233,6 +21314,11 @@@ esa
  
  
  
++<<<<<<< HEAD
 +
 +
++=======
++>>>>>>> upstream/20131206+dfsg
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
  $as_echo_n "checking dynamic linker characteristics... " >&6; }
  
@@@ -18563,7 -19258,7 +21344,11 @@@ need_version=unknow
  
  case $host_os in
  aix3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
    shlibpath_var=LIBPATH
  
@@@ -18572,7 -19267,7 +21357,11 @@@
    ;;
  
  aix[4-9]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    hardcode_into_libs=yes
@@@ -18637,7 -19332,7 +21426,11 @@@ beos*
    ;;
  
  bsdi[45]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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'
@@@ -18774,7 -19469,7 +21567,11 @@@ darwin* | rhapsody*
    ;;
  
  dgux*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@@ -18782,10 -19477,6 +21579,13 @@@
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  
++<<<<<<< HEAD
 +freebsd1*)
 +  dynamic_linker=no
 +  ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  freebsd* | dragonfly*)
    # DragonFly does not have aout.  When/if they implement a new
    # versioning mechanism, adjust this.
@@@ -18793,7 -19484,7 +21593,11 @@@
      objformat=`/usr/bin/objformat`
    else
      case $host_os in
++<<<<<<< HEAD
 +    freebsd[123]*) objformat=aout ;;
++=======
+     freebsd[23].*) objformat=aout ;;
++>>>>>>> upstream/20131206+dfsg
      *) objformat=elf ;;
      esac
    fi
@@@ -18811,7 -19502,7 +21615,11 @@@
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case $host_os in
++<<<<<<< HEAD
 +  freebsd2*)
++=======
+   freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
      shlibpath_overrides_runpath=yes
      ;;
    freebsd3.[01]* | freebsdelf3.[01]*)
@@@ -18830,18 -19521,8 +21638,23 @@@
    esac
    ;;
  
++<<<<<<< HEAD
 +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
 +  ;;
 +
 +haiku*)
 +  version_type=linux
++=======
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    dynamic_linker="$host_os runtime_loader"
@@@ -18902,7 -19583,7 +21715,11 @@@ hpux9* | hpux10* | hpux11*
    ;;
  
  interix[3-9]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@@ -18918,7 -19599,7 +21735,11 @@@ irix5* | irix6* | nonstopux*
      nonstopux*) version_type=nonstopux ;;
      *)
  	if test "$lt_cv_prog_gnu_ld" = yes; then
++<<<<<<< HEAD
 +		version_type=linux
++=======
+ 		version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
  	else
  		version_type=irix
  	fi ;;
@@@ -18955,9 -19636,9 +21776,15 @@@ linux*oldld* | linux*aout* | linux*coff
    dynamic_linker=no
    ;;
  
++<<<<<<< HEAD
 +# This must be Linux ELF.
 +linux* | k*bsd*-gnu | kopensolaris*-gnu)
 +  version_type=linux
++=======
+ # This must be glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -18967,7 -19648,7 +21794,11 @@@
    shlibpath_overrides_runpath=no
  
    # Some binutils ld are patched to set DT_RUNPATH
++<<<<<<< HEAD
 +  if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then :
++=======
+   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    lt_cv_shlibpath_overrides_runpath=no
@@@ -19014,6 -19695,18 +21845,21 @@@ f
    dynamic_linker='GNU/Linux ld.so'
    ;;
  
++<<<<<<< HEAD
++=======
+ netbsdelf*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+   hardcode_into_libs=yes
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+ 
++>>>>>>> upstream/20131206+dfsg
  netbsd*)
    version_type=sunos
    need_lib_prefix=no
@@@ -19033,7 -19726,7 +21879,11 @@@
    ;;
  
  newsos6)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -19102,7 -19795,7 +21952,11 @@@ rdos*
    ;;
  
  solaris*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -19127,7 -19820,7 +21981,11 @@@ sunos4*
    ;;
  
  sysv4 | sysv4.3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -19151,7 -19844,7 +22009,11 @@@
  
  sysv4*MP*)
    if test -d /usr/nec ;then
++<<<<<<< HEAD
 +    version_type=linux
++=======
+     version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
      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
@@@ -19182,7 -19875,7 +22044,11 @@@ sysv5* | sco3.2v5* | sco5v6* | unixware
  
  tpf*)
    # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -19192,7 -19885,7 +22058,11 @@@
    ;;
  
  uts4*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -19315,7 -20008,7 +22185,11 @@@ ac_compiler_gnu=$ac_cv_c_compiler_gn
  
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sorg2l_ in -llapack" >&5
  $as_echo_n "checking for sorg2l_ in -llapack... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_lapack_sorg2l_+set}" = set; then :
++=======
+ if ${ac_cv_lib_lapack_sorg2l_+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -19330,6 -20023,14 +22204,17 @@@ cat confdefs.h - <<_ACEOF >conftest.$ac
  extern "C"
  #endif
  char sorg2l_ ();
++<<<<<<< HEAD
++=======
+ #ifdef F77_DUMMY_MAIN
+ 
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ 
+ #endif
++>>>>>>> upstream/20131206+dfsg
  int
  main ()
  {
@@@ -19349,7 -20050,7 +22234,11 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lapack_sorg2l_" >&5
  $as_echo "$ac_cv_lib_lapack_sorg2l_" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_lapack_sorg2l_" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_lapack_sorg2l_" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lapack="true"
  else
    lapack="false"
@@@ -19393,7 -20094,7 +22282,11 @@@ f
  set dummy ode-config; ac_word=$2
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_prog_ode+set}" = set; then :
++=======
+ if ${ac_cv_prog_ode+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ode"; then
@@@ -19405,7 -20106,7 +22298,11 @@@ d
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
++<<<<<<< HEAD
 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++=======
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++>>>>>>> upstream/20131206+dfsg
      ac_cv_prog_ode="yes"
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
@@@ -19446,10 -20147,11 +22343,18 @@@ f
  
  
  # Build hypre module if HYPRE is installed
++<<<<<<< HEAD
 +if test "x$use_mpicc" = "xyes" ; then # HYPRE needs MPI
 +   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HYPRE_IJMatrixCreate in -lHYPRE" >&5
 +$as_echo_n "checking for HYPRE_IJMatrixCreate in -lHYPRE... " >&6; }
 +if test "${ac_cv_lib_HYPRE_HYPRE_IJMatrixCreate+set}" = set; then :
++=======
+ hypre=no
+ if test "x$use_mpicc" = "xyes" ; then # HYPRE needs MPI
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HYPRE_IJMatrixCreate in -lHYPRE" >&5
+ $as_echo_n "checking for HYPRE_IJMatrixCreate in -lHYPRE... " >&6; }
+ if ${ac_cv_lib_HYPRE_HYPRE_IJMatrixCreate+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -19464,6 -20166,14 +22369,17 @@@ cat confdefs.h - <<_ACEOF >conftest.$ac
  extern "C"
  #endif
  char HYPRE_IJMatrixCreate ();
++<<<<<<< HEAD
++=======
+ #ifdef F77_DUMMY_MAIN
+ 
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ 
+ #endif
++>>>>>>> upstream/20131206+dfsg
  int
  main ()
  {
@@@ -19483,7 -20193,7 +22399,11 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_HYPRE_HYPRE_IJMatrixCreate" >&5
  $as_echo "$ac_cv_lib_HYPRE_HYPRE_IJMatrixCreate" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_HYPRE_HYPRE_IJMatrixCreate" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_HYPRE_HYPRE_IJMatrixCreate" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    hypre="yes"
  else
    hypre="no"
@@@ -19493,7 -20203,7 +22413,11 @@@ f
        for ac_header in HYPRE.h
  do :
    ac_fn_c_check_header_mongrel "$LINENO" "HYPRE.h" "ac_cv_header_HYPRE_h" "$ac_includes_default"
++<<<<<<< HEAD
 +if test "x$ac_cv_header_HYPRE_h" = x""yes; then :
++=======
+ if test "x$ac_cv_header_HYPRE_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_HYPRE_H 1
  _ACEOF
@@@ -19522,7 -20232,7 +22446,11 @@@ f
  # Build lis module if lis is installed
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lis_initialize in -llis" >&5
  $as_echo_n "checking for lis_initialize in -llis... " >&6; }
++<<<<<<< HEAD
 +if test "${ac_cv_lib_lis_lis_initialize+set}" = set; then :
++=======
+ if ${ac_cv_lib_lis_lis_initialize+:} false; then :
++>>>>>>> upstream/20131206+dfsg
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@@ -19537,6 -20247,14 +22465,17 @@@ cat confdefs.h - <<_ACEOF >conftest.$ac
  extern "C"
  #endif
  char lis_initialize ();
++<<<<<<< HEAD
++=======
+ #ifdef F77_DUMMY_MAIN
+ 
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ 
+ #endif
++>>>>>>> upstream/20131206+dfsg
  int
  main ()
  {
@@@ -19556,7 -20274,7 +22495,11 @@@ LIBS=$ac_check_lib_save_LIB
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lis_lis_initialize" >&5
  $as_echo "$ac_cv_lib_lis_lis_initialize" >&6; }
++<<<<<<< HEAD
 +if test "x$ac_cv_lib_lis_lis_initialize" = x""yes; then :
++=======
+ if test "x$ac_cv_lib_lis_lis_initialize" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    lis="yes"
  else
    lis="no"
@@@ -19566,7 -20284,7 +22509,11 @@@ if test x$lis = xyes; the
     for ac_header in lis.h
  do :
    ac_fn_c_check_header_mongrel "$LINENO" "lis.h" "ac_cv_header_lis_h" "$ac_includes_default"
++<<<<<<< HEAD
 +if test "x$ac_cv_header_lis_h" = x""yes; then :
++=======
+ if test "x$ac_cv_header_lis_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIS_H 1
  _ACEOF
@@@ -19591,10 -20309,94 +22538,101 @@@ els
  fi
  
  
++<<<<<<< HEAD
 +for ac_header in fenv.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "fenv.h" "ac_cv_header_fenv_h" "$ac_includes_default"
 +if test "x$ac_cv_header_fenv_h" = x""yes; then :
++=======
+ # Build fft module if fttw3 is installed
+ 
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFTW3" >&5
+ $as_echo_n "checking for FFTW3... " >&6; }
+ 
+ if test -n "$FFTW3_CFLAGS"; then
+     pkg_cv_FFTW3_CFLAGS="$FFTW3_CFLAGS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" fftw3 >= 3 \""; } >&5
+   ($PKG_CONFIG --exists --print-errors " fftw3 >= 3 ") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+   pkg_cv_FFTW3_CFLAGS=`$PKG_CONFIG --cflags " fftw3 >= 3 " 2>/dev/null`
+ 		      test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+ fi
+  else
+     pkg_failed=untried
+ fi
+ if test -n "$FFTW3_LIBS"; then
+     pkg_cv_FFTW3_LIBS="$FFTW3_LIBS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" fftw3 >= 3 \""; } >&5
+   ($PKG_CONFIG --exists --print-errors " fftw3 >= 3 ") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+   pkg_cv_FFTW3_LIBS=`$PKG_CONFIG --libs " fftw3 >= 3 " 2>/dev/null`
+ 		      test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+ fi
+  else
+     pkg_failed=untried
+ fi
+ 
+ 
+ 
+ if test $pkg_failed = yes; then
+    	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+         _pkg_short_errors_supported=yes
+ else
+         _pkg_short_errors_supported=no
+ fi
+         if test $_pkg_short_errors_supported = yes; then
+ 	        FFTW3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " fftw3 >= 3 " 2>&1`
+         else
+ 	        FFTW3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " fftw3 >= 3 " 2>&1`
+         fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$FFTW3_PKG_ERRORS" >&5
+ 
+ 	 fftw3="no"
+ elif test $pkg_failed = untried; then
+      	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ 	 fftw3="no"
+ else
+ 	FFTW3_CFLAGS=$pkg_cv_FFTW3_CFLAGS
+ 	FFTW3_LIBS=$pkg_cv_FFTW3_LIBS
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	 fftw3="yes"
+ fi
+  if test x$fftw3 = xyes; then
+   HAS_FFTW3_TRUE=
+   HAS_FFTW3_FALSE='#'
+ else
+   HAS_FFTW3_TRUE='#'
+   HAS_FFTW3_FALSE=
+ fi
+ 
+ 
+ 
+ 
+ # header file checks
+ for ac_header in fenv.h
+ do :
+   ac_fn_c_check_header_mongrel "$LINENO" "fenv.h" "ac_cv_header_fenv_h" "$ac_includes_default"
+ if test "x$ac_cv_header_fenv_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_FENV_H 1
  _ACEOF
@@@ -19607,7 -20409,7 +22645,11 @@@ don
  for ac_header in unistd.h
  do :
    ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
++<<<<<<< HEAD
 +if test "x$ac_cv_header_unistd_h" = x""yes; then :
++=======
+ if test "x$ac_cv_header_unistd_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_UNISTD_H 1
  _ACEOF
@@@ -19620,7 -20422,7 +22662,11 @@@ don
  for ac_header in getopt.h
  do :
    ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
++<<<<<<< HEAD
 +if test "x$ac_cv_header_getopt_h" = x""yes; then :
++=======
+ if test "x$ac_cv_header_getopt_h" = xyes; then :
++>>>>>>> upstream/20131206+dfsg
    cat >>confdefs.h <<_ACEOF
  #define HAVE_GETOPT_H 1
  _ACEOF
@@@ -19631,39 -20433,52 +22677,86 @@@ f
  done
  
  
++<<<<<<< HEAD
 +for ac_func in getopt_long
 +do :
 +  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
 +if test "x$ac_cv_func_getopt_long" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETOPT_LONG 1
++=======
+ # functions checks
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS=$GTS_CFLAGS
+ OLD_LIBS=$LIBS
+ LIBS=$GTS_LIBS
+ for ac_func in getopt_long g_mkdtemp open_memstream funopen
+ do :
+   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+ if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++>>>>>>> upstream/20131206+dfsg
  _ACEOF
  
  fi
  done
  
++<<<<<<< HEAD
 +
 +ac_config_commands="$ac_config_commands default-1"
 +
 +
 +ac_config_commands="$ac_config_commands default-2"
 +
 +
 +MODULES=""
 +if test "$have_gmodule" = "no"; then
 +  for file in `ls modules/*.mod`; do
 +	name=`basename $file .mod`
 +	MODULES=" $MODULES ../modules/$name.o"
 +  done
 +fi
 +
 +GFS2D_LIBS="\$(top_builddir)/src/libgfs2D.la $GTS_LIBS $MODULES"
 +GFS3D_LIBS="\$(top_builddir)/src/libgfs3D.la $GTS_LIBS $MODULES"
 +
 +
 +
 +# check whether the code is under darcs
 +
++=======
+ CFLAGS=$OLD_CFLAGS
+ LIBS=$OLD_LIBS
+ 
+ # use alternative implementation of open_memstream() if the system
+ # (e.g. MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8.) does not
+ # support POSIX 2008 natively
+ ac_fn_c_check_func "$LINENO" "open_memstream" "ac_cv_func_open_memstream"
+ if test "x$ac_cv_func_open_memstream" = xyes; then :
+   have_open_memstream=yes
+ else
+   have_open_memstream=no
+ fi
+ 
+  if test x$have_open_memstream = xno; then
+   OPEN_MEMSTREAM_TRUE=
+   OPEN_MEMSTREAM_FALSE='#'
+ else
+   OPEN_MEMSTREAM_TRUE='#'
+   OPEN_MEMSTREAM_FALSE=
+ fi
+ 
+ 
+ # link flags
+ GFS2D_LIBS="\$(top_builddir)/src/libgfs2D.la $GTS_LIBS"
+ GFS3D_LIBS="\$(top_builddir)/src/libgfs3D.la $GTS_LIBS"
+ 
+ 
+ 
+ # check whether the code is under darcs
++>>>>>>> upstream/20131206+dfsg
   if test -d _darcs; then
    DARCS_CONTROLLED_TRUE=
    DARCS_CONTROLLED_FALSE='#'
@@@ -19673,7 -20488,7 +22766,11 @@@ els
  fi
  
  
++<<<<<<< HEAD
 +ac_config_files="$ac_config_files Makefile src/Makefile src/gfs-config src/gerris2D.pc src/gerris3D.pc tools/Makefile modules/Makefile modules/kdt/Makefile modules/wavewatch/Makefile test/Makefile doc/Makefile doc/tutorial/Makefile doc/examples/Makefile doc/manpages/Makefile doc/examples/gfs2doc doc/examples/gfs-highlight doc/examples/crossref.sh desktop/Makefile"
++=======
+ ac_config_files="$ac_config_files Makefile src/Makefile src/gerris2D.pc src/gerris3D.pc tools/Makefile modules/Makefile modules/RStarTree/Makefile modules/kdt/Makefile modules/fes2004/Makefile modules/wavewatch/Makefile modules/culvert/Makefile test/Makefile doc/Makefile doc/tutorial/Makefile doc/examples/Makefile doc/manpages/Makefile doc/examples/gfs2doc doc/examples/gfs-highlight doc/examples/crossref.sh desktop/Makefile debian/Makefile"
++>>>>>>> upstream/20131206+dfsg
  
  
  
@@@ -19741,10 -20556,21 +22838,28 @@@ $as_echo "$as_me: WARNING: cache variab
       :end' >>confcache
  if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
    if test -w "$cache_file"; then
++<<<<<<< HEAD
 +    test "x$cache_file" != "x/dev/null" &&
 +      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 +$as_echo "$as_me: updating cache $cache_file" >&6;}
 +    cat confcache >$cache_file
++=======
+     if test "x$cache_file" != "x/dev/null"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+ $as_echo "$as_me: updating cache $cache_file" >&6;}
+       if test ! -f "$cache_file" || test -h "$cache_file"; then
+ 	cat confcache >"$cache_file"
+       else
+         case $cache_file in #(
+         */* | ?:*)
+ 	  mv -f confcache "$cache_file"$$ &&
+ 	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+         *)
+ 	  mv -f confcache "$cache_file" ;;
+ 	esac
+       fi
+     fi
++>>>>>>> upstream/20131206+dfsg
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
  $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@@ -19795,10 -20621,6 +22910,13 @@@ if test -z "${am__fastdepCC_TRUE}" && t
    as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
++<<<<<<< HEAD
 +if test -z "${HAVE_MODULES_TRUE}" && test -z "${HAVE_MODULES_FALSE}"; then
 +  as_fn_error $? "conditional \"HAVE_MODULES\" was never defined.
 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
 +fi
++=======
++>>>>>>> upstream/20131206+dfsg
  if test -z "${HAS_LIBPROJ_TRUE}" && test -z "${HAS_LIBPROJ_FALSE}"; then
    as_fn_error $? "conditional \"HAS_LIBPROJ\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@@ -19839,12 -20661,20 +22957,27 @@@ if test -z "${BUILD_LIS_TRUE}" && test 
    as_fn_error $? "conditional \"BUILD_LIS\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
++<<<<<<< HEAD
++=======
+ if test -z "${HAS_FFTW3_TRUE}" && test -z "${HAS_FFTW3_FALSE}"; then
+   as_fn_error $? "conditional \"HAS_FFTW3\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${OPEN_MEMSTREAM_TRUE}" && test -z "${OPEN_MEMSTREAM_FALSE}"; then
+   as_fn_error $? "conditional \"OPEN_MEMSTREAM\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
++>>>>>>> upstream/20131206+dfsg
  if test -z "${DARCS_CONTROLLED_TRUE}" && test -z "${DARCS_CONTROLLED_FALSE}"; then
    as_fn_error $? "conditional \"DARCS_CONTROLLED\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
  
++<<<<<<< HEAD
 +: ${CONFIG_STATUS=./config.status}
++=======
+ : "${CONFIG_STATUS=./config.status}"
++>>>>>>> upstream/20131206+dfsg
  ac_write_fail=0
  ac_clean_files_save=$ac_clean_files
  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@@ -19945,6 -20775,7 +23078,10 @@@ f
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
++<<<<<<< HEAD
++=======
+ as_myself=
++>>>>>>> upstream/20131206+dfsg
  case $0 in #((
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@@ -20140,16 -20971,16 +23277,29 @@@ if (echo >conf$$.file) 2>/dev/null; the
      # ... but there are two gotchas:
      # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
      # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++<<<<<<< HEAD
 +    # In both cases, we have to default to `cp -p'.
 +    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 +      as_ln_s='cp -p'
 +  elif ln conf$$.file conf$$ 2>/dev/null; then
 +    as_ln_s=ln
 +  else
 +    as_ln_s='cp -p'
 +  fi
 +else
 +  as_ln_s='cp -p'
++=======
+     # In both cases, we have to default to `cp -pR'.
+     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+       as_ln_s='cp -pR'
+   elif ln conf$$.file conf$$ 2>/dev/null; then
+     as_ln_s=ln
+   else
+     as_ln_s='cp -pR'
+   fi
+ else
+   as_ln_s='cp -pR'
++>>>>>>> upstream/20131206+dfsg
  fi
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
@@@ -20209,28 -21040,16 +23359,41 @@@ els
    as_mkdir_p=false
  fi
  
++<<<<<<< HEAD
 +if test -x / >/dev/null 2>&1; then
 +  as_test_x='test -x'
 +else
 +  if ls -dL / >/dev/null 2>&1; then
 +    as_ls_L_option=L
 +  else
 +    as_ls_L_option=
 +  fi
 +  as_test_x='
 +    eval sh -c '\''
 +      if test -d "$1"; then
 +	test -d "$1/.";
 +      else
 +	case $1 in #(
 +	-*)set "./$1";;
 +	esac;
 +	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 +	???[sx]*):;;*)false;;esac;fi
 +    '\'' sh
 +  '
 +fi
 +as_executable_p=$as_test_x
++=======
+ 
+ # as_fn_executable_p FILE
+ # -----------------------
+ # Test if FILE is an executable regular file.
+ as_fn_executable_p ()
+ {
+   test -f "$1" && test -x "$1"
+ } # as_fn_executable_p
+ as_test_x='test -x'
+ as_executable_p=as_fn_executable_p
++>>>>>>> upstream/20131206+dfsg
  
  # 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'"
@@@ -20252,7 -21071,7 +23415,11 @@@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wr
  # values after options handling.
  ac_log="
  This file was extended by $as_me, which was
++<<<<<<< HEAD
 +generated by GNU Autoconf 2.67.  Invocation command line was
++=======
+ generated by GNU Autoconf 2.69.  Invocation command line was
++>>>>>>> upstream/20131206+dfsg
  
    CONFIG_FILES    = $CONFIG_FILES
    CONFIG_HEADERS  = $CONFIG_HEADERS
@@@ -20318,10 -21137,10 +23485,17 @@@ cat >>$CONFIG_STATUS <<_ACEOF || ac_wri
  ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  ac_cs_version="\\
  config.status
++<<<<<<< HEAD
 +configured by $0, generated by GNU Autoconf 2.67,
 +  with options \\"\$ac_cs_config\\"
 +
 +Copyright (C) 2010 Free Software Foundation, Inc.
++=======
+ configured by $0, generated by GNU Autoconf 2.69,
+   with options \\"\$ac_cs_config\\"
+ 
+ Copyright (C) 2012 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  This config.status script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it."
  
@@@ -20412,7 -21231,7 +23586,11 @@@ f
  _ACEOF
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  if \$ac_cs_recheck; then
++<<<<<<< HEAD
 +  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++=======
+   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++>>>>>>> upstream/20131206+dfsg
    shift
    \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
    CONFIG_SHELL='$SHELL'
@@@ -20457,6 -21276,7 +23635,10 @@@ pic_mode='`$ECHO "$pic_mode" | $SED "$d
  enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
  SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
  ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
++<<<<<<< HEAD
++=======
+ PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
++>>>>>>> upstream/20131206+dfsg
  host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
  host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
  host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
@@@ -20537,7 -21357,6 +23719,10 @@@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $S
  allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
  no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
  hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
++<<<<<<< HEAD
 +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
++=======
++>>>>>>> upstream/20131206+dfsg
  hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
  hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
  hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
@@@ -20635,8 -21454,6 +23820,11 @@@ no_undefined_flag_F77='`$ECHO "$no_unde
  no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`'
  hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
  hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`'
++<<<<<<< HEAD
 +hardcode_libdir_flag_spec_ld_F77='`$ECHO "$hardcode_libdir_flag_spec_ld_F77" | $SED "$delay_single_quote_subst"`'
 +hardcode_libdir_flag_spec_ld_FC='`$ECHO "$hardcode_libdir_flag_spec_ld_FC" | $SED "$delay_single_quote_subst"`'
++=======
++>>>>>>> upstream/20131206+dfsg
  hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`'
  hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`'
  hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`'
@@@ -20700,6 -21517,7 +23888,10 @@@ DLLTOOL 
  OBJDUMP \
  SHELL \
  ECHO \
++<<<<<<< HEAD
++=======
+ PATH_SEPARATOR \
++>>>>>>> upstream/20131206+dfsg
  SED \
  GREP \
  EGREP \
@@@ -20748,7 -21566,6 +23940,10 @@@ with_gnu_ld 
  allow_undefined_flag \
  no_undefined_flag \
  hardcode_libdir_flag_spec \
++<<<<<<< HEAD
 +hardcode_libdir_flag_spec_ld \
++=======
++>>>>>>> upstream/20131206+dfsg
  hardcode_libdir_separator \
  exclude_expsyms \
  include_expsyms \
@@@ -20797,8 -21614,6 +23992,11 @@@ no_undefined_flag_F77 
  no_undefined_flag_FC \
  hardcode_libdir_flag_spec_F77 \
  hardcode_libdir_flag_spec_FC \
++<<<<<<< HEAD
 +hardcode_libdir_flag_spec_ld_F77 \
 +hardcode_libdir_flag_spec_ld_FC \
++=======
++>>>>>>> upstream/20131206+dfsg
  hardcode_libdir_separator_F77 \
  hardcode_libdir_separator_FC \
  exclude_expsyms_F77 \
@@@ -20905,13 -21720,6 +24103,16 @@@ f
  
  
  
++<<<<<<< HEAD
 +	build="$build"
 +	have_gmodule="$have_gmodule"
 +
 +
 +	have_gmodule="$have_gmodule"
 +
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  _ACEOF
  
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@@ -20923,17 -21731,17 +24124,30 @@@ d
      "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
      "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
      "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
++<<<<<<< HEAD
 +    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
 +    "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
 +    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 +    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
 +    "src/gfs-config") CONFIG_FILES="$CONFIG_FILES src/gfs-config" ;;
++=======
+     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
++>>>>>>> upstream/20131206+dfsg
      "src/gerris2D.pc") CONFIG_FILES="$CONFIG_FILES src/gerris2D.pc" ;;
      "src/gerris3D.pc") CONFIG_FILES="$CONFIG_FILES src/gerris3D.pc" ;;
      "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
      "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;;
++<<<<<<< HEAD
++    "modules/kdt/Makefile") CONFIG_FILES="$CONFIG_FILES modules/kdt/Makefile" ;;
++    "modules/wavewatch/Makefile") CONFIG_FILES="$CONFIG_FILES modules/wavewatch/Makefile" ;;
++=======
+     "modules/RStarTree/Makefile") CONFIG_FILES="$CONFIG_FILES modules/RStarTree/Makefile" ;;
      "modules/kdt/Makefile") CONFIG_FILES="$CONFIG_FILES modules/kdt/Makefile" ;;
+     "modules/fes2004/Makefile") CONFIG_FILES="$CONFIG_FILES modules/fes2004/Makefile" ;;
      "modules/wavewatch/Makefile") CONFIG_FILES="$CONFIG_FILES modules/wavewatch/Makefile" ;;
+     "modules/culvert/Makefile") CONFIG_FILES="$CONFIG_FILES modules/culvert/Makefile" ;;
++>>>>>>> upstream/20131206+dfsg
      "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
      "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
      "doc/tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES doc/tutorial/Makefile" ;;
@@@ -20943,8 -21751,9 +24157,14 @@@
      "doc/examples/gfs-highlight") CONFIG_FILES="$CONFIG_FILES doc/examples/gfs-highlight" ;;
      "doc/examples/crossref.sh") CONFIG_FILES="$CONFIG_FILES doc/examples/crossref.sh" ;;
      "desktop/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/Makefile" ;;
++<<<<<<< HEAD
 +
 +  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
++=======
+     "debian/Makefile") CONFIG_FILES="$CONFIG_FILES debian/Makefile" ;;
+ 
+   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
++>>>>>>> upstream/20131206+dfsg
    esac
  done
  
@@@ -20967,9 -21776,10 +24187,16 @@@ f
  # after its creation but before its name has been assigned to `$tmp'.
  $debug ||
  {
++<<<<<<< HEAD
 +  tmp=
 +  trap 'exit_status=$?
 +  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
++=======
+   tmp= ac_tmp=
+   trap 'exit_status=$?
+   : "${ac_tmp:=$tmp}"
+   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
++>>>>>>> upstream/20131206+dfsg
  ' 0
    trap 'as_fn_exit 1' 1 2 13 15
  }
@@@ -20977,12 -21787,13 +24204,20 @@@
  
  {
    tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
++<<<<<<< HEAD
 +  test -n "$tmp" && test -d "$tmp"
++=======
+   test -d "$tmp"
++>>>>>>> upstream/20131206+dfsg
  }  ||
  {
    tmp=./conf$$-$RANDOM
    (umask 077 && mkdir "$tmp")
  } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
++<<<<<<< HEAD
++=======
+ ac_tmp=$tmp
++>>>>>>> upstream/20131206+dfsg
  
  # Set up the scripts for CONFIG_FILES section.
  # No need to generate them if there are no CONFIG_FILES.
@@@ -21004,7 -21815,7 +24239,11 @@@ els
    ac_cs_awk_cr=$ac_cr
  fi
  
++<<<<<<< HEAD
 +echo 'BEGIN {' >"$tmp/subs1.awk" &&
++=======
+ echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
++>>>>>>> upstream/20131206+dfsg
  _ACEOF
  
  
@@@ -21032,7 -21843,7 +24271,11 @@@ don
  rm -f conf$$subs.sh
  
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++<<<<<<< HEAD
 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
++=======
+ cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
++>>>>>>> upstream/20131206+dfsg
  _ACEOF
  sed -n '
  h
@@@ -21080,7 -21891,7 +24323,11 @@@ t deli
  rm -f conf$$subs.awk
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  _ACAWK
++<<<<<<< HEAD
 +cat >>"\$tmp/subs1.awk" <<_ACAWK &&
++=======
+ cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
++>>>>>>> upstream/20131206+dfsg
    for (key in S) S_is_set[key] = 1
    FS = ""
  
@@@ -21112,7 -21923,7 +24359,11 @@@ if sed "s/$ac_cr//" < /dev/null > /dev/
    sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
  else
    cat
++<<<<<<< HEAD
 +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
++=======
+ fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
++>>>>>>> upstream/20131206+dfsg
    || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
  _ACEOF
  
@@@ -21146,7 -21957,7 +24397,11 @@@ fi # test -n "$CONFIG_FILES
  # No need to generate them if there are no CONFIG_HEADERS.
  # This happens for instance with `./config.status Makefile'.
  if test -n "$CONFIG_HEADERS"; then
++<<<<<<< HEAD
 +cat >"$tmp/defines.awk" <<\_ACAWK ||
++=======
+ cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
++>>>>>>> upstream/20131206+dfsg
  BEGIN {
  _ACEOF
  
@@@ -21158,8 -21969,8 +24413,13 @@@
  # handling of long lines.
  ac_delim='%!_!# '
  for ac_last_try in false false :; do
++<<<<<<< HEAD
 +  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
 +  if test -z "$ac_t"; then
++=======
+   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+   if test -z "$ac_tt"; then
++>>>>>>> upstream/20131206+dfsg
      break
    elif $ac_last_try; then
      as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@@ -21260,7 -22071,7 +24520,11 @@@ d
    esac
    case $ac_mode$ac_tag in
    :[FHL]*:*);;
++<<<<<<< HEAD
 +  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
++=======
+   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
++>>>>>>> upstream/20131206+dfsg
    :[FH]-) ac_tag=-:-;;
    :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    esac
@@@ -21279,7 -22090,7 +24543,11 @@@
      for ac_f
      do
        case $ac_f in
++<<<<<<< HEAD
 +      -) ac_f="$tmp/stdin";;
++=======
+       -) ac_f="$ac_tmp/stdin";;
++>>>>>>> upstream/20131206+dfsg
        *) # Look for the file first in the build tree, then in the source tree
  	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
  	 # because $ac_f cannot contain `:'.
@@@ -21288,7 -22099,7 +24556,11 @@@
  	   [\\/$]*) false;;
  	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  	   esac ||
++<<<<<<< HEAD
 +	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
++=======
+ 	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
++>>>>>>> upstream/20131206+dfsg
        esac
        case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
        as_fn_append ac_file_inputs " '$ac_f'"
@@@ -21314,8 -22125,8 +24586,13 @@@ $as_echo "$as_me: creating $ac_file" >&
      esac
  
      case $ac_tag in
++<<<<<<< HEAD
 +    *:-:* | *:-) cat >"$tmp/stdin" \
 +      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
++=======
+     *:-:* | *:-) cat >"$ac_tmp/stdin" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
++>>>>>>> upstream/20131206+dfsg
      esac
      ;;
    esac
@@@ -21451,21 -22262,22 +24728,38 @@@ s&@INSTALL@&$ac_INSTALL&;t 
  s&@MKDIR_P@&$ac_MKDIR_P&;t t
  $ac_datarootdir_hack
  "
++<<<<<<< HEAD
 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
 +  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 +
 +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
 +  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
 +  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
++=======
+ eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ 
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+       "$ac_tmp/out"`; test -z "$ac_out"; } &&
++>>>>>>> upstream/20131206+dfsg
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  which seems to be undefined.  Please make sure it is defined" >&5
  $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
  which seems to be undefined.  Please make sure it is defined" >&2;}
  
++<<<<<<< HEAD
 +  rm -f "$tmp/stdin"
 +  case $ac_file in
 +  -) cat "$tmp/out" && rm -f "$tmp/out";;
 +  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
++=======
+   rm -f "$ac_tmp/stdin"
+   case $ac_file in
+   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
++>>>>>>> upstream/20131206+dfsg
    esac \
    || as_fn_error $? "could not create $ac_file" "$LINENO" 5
   ;;
@@@ -21476,20 -22288,20 +24770,35 @@@
    if test x"$ac_file" != x-; then
      {
        $as_echo "/* $configure_input  */" \
++<<<<<<< HEAD
 +      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
 +    } >"$tmp/config.h" \
 +      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 +    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
++=======
+       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+     } >"$ac_tmp/config.h" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
++>>>>>>> upstream/20131206+dfsg
        { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
  $as_echo "$as_me: $ac_file is unchanged" >&6;}
      else
        rm -f "$ac_file"
++<<<<<<< HEAD
 +      mv "$tmp/config.h" "$ac_file" \
++=======
+       mv "$ac_tmp/config.h" "$ac_file" \
++>>>>>>> upstream/20131206+dfsg
  	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
      fi
    else
      $as_echo "/* $configure_input  */" \
++<<<<<<< HEAD
 +      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
++=======
+       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
++>>>>>>> upstream/20131206+dfsg
        || as_fn_error $? "could not create -" "$LINENO" 5
    fi
  # Compute "$ac_file"'s index in $config_headers.
@@@ -21651,8 -22463,8 +24960,13 @@@ $as_echo X"$file" 
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++<<<<<<< HEAD
 +#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 +#                 Inc.
++=======
+ #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ #                 Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
@@@ -21715,6 -22527,9 +25029,12 @@@ SHELL=$lt_SHEL
  # An echo program that protects backslashes.
  ECHO=$lt_ECHO
  
++<<<<<<< HEAD
++=======
+ # The PATH separator for the build system.
+ PATH_SEPARATOR=$lt_PATH_SEPARATOR
+ 
++>>>>>>> upstream/20131206+dfsg
  # The host system.
  host_alias=$host_alias
  host=$host
@@@ -22010,10 -22825,6 +25330,13 @@@ no_undefined_flag=$lt_no_undefined_fla
  # This must work even if \$libdir does not exist
  hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
  
++<<<<<<< HEAD
 +# 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
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  # Whether we need a single "-rpath" flag with a separated argument.
  hardcode_libdir_separator=$lt_hardcode_libdir_separator
  
@@@ -22356,10 -23167,6 +25679,13 @@@ no_undefined_flag=$lt_no_undefined_flag
  # This must work even if \$libdir does not exist
  hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
  
++<<<<<<< HEAD
 +# 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
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  # Whether we need a single "-rpath" flag with a separated argument.
  hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
  
@@@ -22513,10 -23320,6 +25839,13 @@@ no_undefined_flag=$lt_no_undefined_flag
  # This must work even if \$libdir does not exist
  hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC
  
++<<<<<<< HEAD
 +# 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_FC
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  # Whether we need a single "-rpath" flag with a separated argument.
  hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC
  
@@@ -22592,97 -23395,6 +25921,100 @@@ compiler_lib_search_path=$lt_compiler_l
  _LT_EOF
  
   ;;
++<<<<<<< HEAD
 +    "default-1":C)
 +	echo creating src/gfsconfig.h
 +	cat >src/gfsconfig.h <<\__EOF
 +/* gfsconfig.h
 + *
 + * This is a generated file.  Please modify `configure.in'
 + */
 +
 +#ifndef GFSCONFIG_H
 +#define GFSCONFIG_H
 +
 +__EOF
 +	if test "$have_gmodule" = "yes"; then
 +	  cat >> src/gfsconfig.h <<\__EOF
 +#define GFS_HAS_MODULES 1
 +
 +__EOF
 +	fi
 +	case "$build" in
 +	*-cray-unicos*)
 +	  echo "/* CRAY inlining directives */" >> src/gfsconfig.h
 +	  for file in src/*.h; do
 +	  awk '
 +BEGIN {
 +  nc = 10;
 +  nf = 0;
 +}
 +{
 +  if ( == "G_INLINE_FUNC") {
 +    nc = 0;
 +    start = 2;
 +  }
 +  else
 +    start = 1;
 +  for (i = start; i <= NF; i++) {
 +    if (nc == 1) {
 +      if (substr ($i, 1, 1) != "*") {
 +	in_list = 0;
 +	for (j = 0; j < nf && !inlist; j++)
 +	  if ($i == f[j])
 +	    inlist = 1;
 +	if (!inlist)
 +          f[nf++] = $i;
 +	nc = 10;
 +      }
 +    }
 +    else
 +      nc++;
 +  }
 +}
 +END {
 +  if (nf > 0) {
 +    printf ("#pragma _CRI inline %s", f[0]);
 +    for (i = 1; i < nf; i++)
 +      printf (", %s", f[i]);
 +    printf ("\n");
 +  }
 +}
 +' < $file >> src/gfsconfig.h
 +	done
 +	;;
 +	esac
 +	cat >>src/gfsconfig.h <<__EOF
 +
 +#endif /* GFSCONFIG_H */
 +__EOF
 + ;;
 +    "default-2":C)
 +	echo creating src/modules.c
 +	cat > src/modules.c <<\__EOF
 +/* modules.c
 + *
 + * This is a generated file.  Please modify `configure.in'
 + */
 +
 +__EOF
 +	cat > src/modules.h <<\__EOF
 +/* modules.h
 + *
 + * This is a generated file.  Please modify `configure.in'
 + */
 +
 +__EOF
 +	if test "$have_gmodule" = "no"; then
 +	  for file in `ls modules/*.mod`; do
 +		name=`basename $file .mod`
 +		echo "void gfs_init_$name (void);" >> src/modules.h
 +		echo "gfs_init_$name ();" >> src/modules.c
 +	  done
 +	fi
 + ;;
++=======
++>>>>>>> upstream/20131206+dfsg
  
    esac
  done # for ac_tag
@@@ -22731,8 -23443,11 +26063,16 @@@ echo "  C   Flags         = $CFLAGS
  echo "  MPI enabled       = $use_mpicc"
  echo "  GModule support   = $have_gmodule"
  echo "  pkg-config        = $have_pkg_config"
++<<<<<<< HEAD
 +echo "  gawk              = $have_awk"
 +echo "  m4                = $have_m4"
++=======
+ echo "  m4                = $have_m4"
+ if test x$have_m4 = xyes; then
+    echo "  m4 options        = $options_m4"
+ fi
+ echo "  open_memstream    = $have_open_memstream"
++>>>>>>> upstream/20131206+dfsg
  echo
  echo "Modules"
  echo
@@@ -22762,4 -23477,9 +26102,12 @@@ echo "  bubbles           = yes
  else
  echo "  bubbles           = no"
  fi
++<<<<<<< HEAD
++=======
+ if test x$fftw3 != xno; then
+ echo "  fft               = yes"
+ else
+ echo "  fft               = no"
+ fi
++>>>>>>> upstream/20131206+dfsg
  echo
diff --cc configure.ac
index 9c3d023,d569f85..c01a275
--- a/configure.ac
+++ b/configure.ac
@@@ -1,4 -1,4 +1,8 @@@
++<<<<<<< HEAD:configure.in
 +AC_INIT(configure.in)
++=======
+ AC_INIT(configure.ac)
++>>>>>>> upstream/20131206+dfsg:configure.ac
  AC_CONFIG_MACRO_DIR([m4])
  
  dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
@@@ -93,8 -107,10 +111,14 @@@ f
  
  AC_PROG_CC
  
+ # -D_GNU_SOURCE is only necessary for old (< 2.10) glibc implementations of open_memstream()
+ CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE"
  if test x$GCC = xyes ; then
++<<<<<<< HEAD:configure.in
 +  CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99 -D_XOPEN_SOURCE=500"
++=======
+   CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99"
++>>>>>>> upstream/20131206+dfsg:configure.ac
  fi
  
  dnl Initialize libtool
@@@ -261,28 -240,27 +248,36 @@@ if test x"$have_pkg_config" = x"yes"; t
  else
    AC_DEFINE(HAVE_PKG_CONFIG, 0)
  fi
+ if test x"$have_pkg_config" = x""; then
+    have_pkg_config=undefined
+ fi
  
++<<<<<<< HEAD:configure.in
 +# checks for gawk and m4
 +AC_CHECK_PROG(have_awk, gawk, yes, no)
 +if test "$have_awk" = "yes"; then
 +   AC_CHECK_PROG(have_m4, m4, yes, no)
 +   if test "$have_m4" = "yes"; then
 +      AC_DEFINE(HAVE_M4, 1, [Define to 1 if gawk and m4 are available.])
++=======
+ # checks for m4
+ AC_CHECK_PROG(have_m4, m4, yes, no)
+ options_m4=""
+ if test "$have_m4" = "yes"; then
+    AC_DEFINE(HAVE_M4, 1, [Define to 1 if m4 is available.])
+    AC_MSG_CHECKING(check whether m4 accepts the -P option)
+    if m4 -P < /dev/null 2> /dev/null; then
+       options_m4="-P"
+       accepts_P="yes"
++>>>>>>> upstream/20131206+dfsg:configure.ac
     else
-       AC_DEFINE(HAVE_M4, 0)
+       accepts_P="no"
     fi
+    AC_MSG_RESULT($accepts_P)
+ else
+    AC_DEFINE(HAVE_M4, 0)
  fi
- 
- # check if module support is disabled
- AC_ARG_ENABLE(modules,
- [  --disable-modules       link modules statically with the executables],
- [ case "${enableval}" in
- 	yes) ;;
- 	*) have_gmodule=no ;;
-   esac])
- 
- AC_SUBST(have_gmodule)
- AM_CONDITIONAL(HAVE_MODULES, test "$have_gmodule" = "yes")
+ AC_DEFINE_UNQUOTED(M4_OPTIONS, "$options_m4", [Options for m4])
  
  AC_SUBST(CFLAGS)
  AC_SUBST(CPPFLAGS)
@@@ -340,160 -321,71 +338,122 @@@ if test -r $HOME/.wwatch3.env; the
     AC_SUBST(W3INIT)
     AC_DEFINE_UNQUOTED(WW3_VERSION, $ww3_version, [WaveWatch III version number])
  fi
++<<<<<<< HEAD:configure.in
 +
 +# Build ode module if ODE is installed
 +AC_CHECK_PROG(ode, ode-config, yes, no)
 +if test x$ode = xyes; then
 +  ODE_CFLAGS=`ode-config --cflags`
 +  ODE_LIBS="`ode-config --libs` -lstdc++"
 +  AC_SUBST(ODE_CFLAGS)
 +  AC_SUBST(ODE_LIBS)
 +else
 +  AC_MSG_WARN([ODE not found. ode module will not be available.])
 +fi
 +AM_CONDITIONAL(BUILD_ODE, test x$ode = xyes)
 +
 +# Build hypre module if HYPRE is installed
 +if test "x$use_mpicc" = "xyes" ; then # HYPRE needs MPI
 +   AC_CHECK_LIB(HYPRE, HYPRE_IJMatrixCreate, hypre="yes", hypre="no", [-lm])
 +   if test x$hypre = xyes; then
 +      AC_CHECK_HEADERS(HYPRE.h, hypre="yes", hypre="no")
 +   fi
 +   if test x$hypre = xno; then
 +      AC_MSG_WARN([HYPRE not found. hypre Module won't be available.])
 +   fi
 +fi
 +AM_CONDITIONAL(BUILD_HYPRE, test x$hypre = xyes)
 +
 +# Build lis module if lis is installed
 +AC_CHECK_LIB(lis, lis_initialize, lis="yes", lis="no", [-lgfortran -lm])
 +if test x$lis = xyes; then
 +   AC_CHECK_HEADERS(lis.h, lis="yes", lis="no")
 +fi
 +if test x$lis = xno; then
 +   AC_MSG_WARN([lis not found. lis Module won't be available.])
 +fi
 +AM_CONDITIONAL(BUILD_LIS, test x$lis = xyes)
++=======
++>>>>>>> upstream/20131206+dfsg:configure.ac
  
- dnl header file checks
- AC_CHECK_HEADERS(fenv.h, AC_DEFINE(HAVE_FENV_H))
- AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
- AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H))
+ # Build ode module if ODE is installed
+ AC_CHECK_PROG(ode, ode-config, yes, no)
+ if test x$ode = xyes; then
+   ODE_CFLAGS=`ode-config --cflags`
+   ODE_LIBS="`ode-config --libs` -lstdc++"
+   AC_SUBST(ODE_CFLAGS)
+   AC_SUBST(ODE_LIBS)
+ else
+   AC_MSG_WARN([ODE not found. ode module will not be available.])
+ fi
+ AM_CONDITIONAL(BUILD_ODE, test x$ode = xyes)
  
- dnl functions checks
- AC_CHECK_FUNCS(getopt_long)
+ # Build hypre module if HYPRE is installed
+ hypre=no
+ if test "x$use_mpicc" = "xyes" ; then # HYPRE needs MPI
+    AC_CHECK_LIB(HYPRE, HYPRE_IJMatrixCreate, hypre="yes", hypre="no", [-lm])
+    if test x$hypre = xyes; then
+       AC_CHECK_HEADERS(HYPRE.h, hypre="yes", hypre="no")
+    fi
+    if test x$hypre = xno; then
+       AC_MSG_WARN([HYPRE not found. hypre Module won't be available.])
+    fi
+ fi
+ AM_CONDITIONAL(BUILD_HYPRE, test x$hypre = xyes)
  
- dnl generate `src/gfsconfig.h'
- AC_OUTPUT_COMMANDS([
- 	echo creating src/gfsconfig.h
- 	cat >src/gfsconfig.h <<\__EOF
- /* gfsconfig.h
-  * 
-  * This is a generated file.  Please modify `configure.in'
-  */
+ # Build lis module if lis is installed
+ AC_CHECK_LIB(lis, lis_initialize, lis="yes", lis="no", [-lgfortran -lm])
+ if test x$lis = xyes; then
+    AC_CHECK_HEADERS(lis.h, lis="yes", lis="no")
+ fi
+ if test x$lis = xno; then
+    AC_MSG_WARN([lis not found. lis Module won't be available.])
+ fi
+ AM_CONDITIONAL(BUILD_LIS, test x$lis = xyes)
  
- #ifndef GFSCONFIG_H
- #define GFSCONFIG_H
+ # Build fft module if fttw3 is installed
+ PKG_CHECK_MODULES(FFTW3, [ fftw3 >= 3 ], [ fftw3="yes" ], [ fftw3="no" ])
+ AM_CONDITIONAL(HAS_FFTW3, test x$fftw3 = xyes)
+ AC_SUBST(FFTW3_CFLAGS)
+ AC_SUBST(FFTW3_LIBS)
  
- __EOF
- 	if test "$have_gmodule" = "yes"; then
- 	  cat >> src/gfsconfig.h <<\__EOF
- #define GFS_HAS_MODULES 1
+ # header file checks
+ AC_CHECK_HEADERS(fenv.h, AC_DEFINE(HAVE_FENV_H))
+ AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
+ AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H))
  
- __EOF
- 	fi
- 	case "$build" in
- 	*-cray-unicos*)
- 	  echo "/* CRAY inlining directives */" >> src/gfsconfig.h
- 	  for file in src/*.h; do
- 	  awk '
- BEGIN {
-   nc = 10;
-   nf = 0;
- }
- {
-   if ($1 == "G_INLINE_FUNC") {
-     nc = 0;
-     start = 2;
-   }
-   else
-     start = 1;
-   for (i = start; i <= NF; i++) {
-     if (nc == 1) {
-       if (substr ($i, 1, 1) != "*") {
- 	in_list = 0;
- 	for (j = 0; j < nf && !inlist; j++)
- 	  if ($i == f[j])
- 	    inlist = 1;
- 	if (!inlist)
-           f[nf++] = $i;
- 	nc = 10;
-       }
-     }
-     else
-       nc++;
-   }
- }
- END {
-   if (nf > 0) {
-     printf ("#pragma _CRI inline %s", f[0]);
-     for (i = 1; i < nf; i++)
-       printf (", %s", f[i]);
-     printf ("\n");
-   }
- }
- ' < $file >> src/gfsconfig.h
- 	done
- 	;;
- 	esac
- 	cat >>src/gfsconfig.h <<__EOF
- 
- #endif /* GFSCONFIG_H */
- __EOF
- ],[
- 	build="$build"
- 	have_gmodule="$have_gmodule"
- ])
+ # functions checks
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS=$GTS_CFLAGS
+ OLD_LIBS=$LIBS
+ LIBS=$GTS_LIBS
+ AC_CHECK_FUNCS(getopt_long g_mkdtemp open_memstream funopen)
+ CFLAGS=$OLD_CFLAGS
+ LIBS=$OLD_LIBS
  
- dnl generate `src/modules.c'
- AC_OUTPUT_COMMANDS([
- 	echo creating src/modules.c
- 	cat > src/modules.c <<\__EOF
- /* modules.c
-  * 
-  * This is a generated file.  Please modify `configure.in'
-  */
- 
- __EOF
- 	cat > src/modules.h <<\__EOF
- /* modules.h
-  * 
-  * This is a generated file.  Please modify `configure.in'
-  */
- 
- __EOF
- 	if test "$have_gmodule" = "no"; then
- 	  for file in `ls modules/*.mod`; do
- 		name=`basename $file .mod`
- 		echo "void gfs_init_$name (void);" >> src/modules.h
- 		echo "gfs_init_$name ();" >> src/modules.c
- 	  done
- 	fi
- ],[
- 	have_gmodule="$have_gmodule"
- ])
+ # use alternative implementation of open_memstream() if the system
+ # (e.g. MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8.) does not
+ # support POSIX 2008 natively
+ AC_CHECK_FUNC(open_memstream, have_open_memstream=yes, have_open_memstream=no)
+ AM_CONDITIONAL(OPEN_MEMSTREAM, test x$have_open_memstream = xno)
  
++<<<<<<< HEAD:configure.in
 +dnl export MODULES for src/Makefile.am
 +MODULES=""
 +if test "$have_gmodule" = "no"; then
 +  for file in `ls modules/*.mod`; do
 +	name=`basename $file .mod`
 +	MODULES=" $MODULES ../modules/$name.o"
 +  done	
 +fi
 +AC_SUBST(MODULES)
 +GFS2D_LIBS="\$(top_builddir)/src/libgfs2D.la $GTS_LIBS $MODULES"
 +GFS3D_LIBS="\$(top_builddir)/src/libgfs3D.la $GTS_LIBS $MODULES"
++=======
+ # link flags
+ GFS2D_LIBS="\$(top_builddir)/src/libgfs2D.la $GTS_LIBS"
+ GFS3D_LIBS="\$(top_builddir)/src/libgfs3D.la $GTS_LIBS"
++>>>>>>> upstream/20131206+dfsg:configure.ac
  AC_SUBST(GFS2D_LIBS)
  AC_SUBST(GFS3D_LIBS)
  
@@@ -509,8 -399,11 +467,15 @@@ src/gerris2D.p
  src/gerris3D.pc
  tools/Makefile
  modules/Makefile
++<<<<<<< HEAD:configure.in
 +modules/kdt/Makefile
++=======
+ modules/RStarTree/Makefile
+ modules/kdt/Makefile
+ modules/fes2004/Makefile
++>>>>>>> upstream/20131206+dfsg:configure.ac
  modules/wavewatch/Makefile
+ modules/culvert/Makefile
  test/Makefile
  doc/Makefile
  doc/tutorial/Makefile
@@@ -534,8 -428,11 +500,16 @@@ echo "  C   Flags         = $CFLAGS
  echo "  MPI enabled       = $use_mpicc"
  echo "  GModule support   = $have_gmodule"
  echo "  pkg-config        = $have_pkg_config"
++<<<<<<< HEAD:configure.in
 +echo "  gawk              = $have_awk"
 +echo "  m4                = $have_m4"
++=======
+ echo "  m4                = $have_m4"
+ if test x$have_m4 = xyes; then
+    echo "  m4 options        = $options_m4"
+ fi
+ echo "  open_memstream    = $have_open_memstream"
++>>>>>>> upstream/20131206+dfsg:configure.ac
  echo
  echo "Modules"
  echo
@@@ -565,4 -462,9 +539,12 @@@ echo "  bubbles           = yes
  else
  echo "  bubbles           = no"
  fi
++<<<<<<< HEAD:configure.in
++=======
+ if test x$fftw3 != xno; then
+ echo "  fft               = yes"
+ else
+ echo "  fft               = no"
+ fi
++>>>>>>> upstream/20131206+dfsg:configure.ac
  echo
diff --cc depcomp
index df8eea7,25a39e6..be46b0c
--- a/depcomp
+++ b/depcomp
@@@ -1,10 -1,10 +1,17 @@@
  #! /bin/sh
  # depcomp - compile a program generating dependencies as side-effects
  
++<<<<<<< HEAD
 +scriptversion=2009-04-28.21; # UTC
 +
 +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
 +# Software Foundation, Inc.
++=======
+ scriptversion=2012-03-27.16; # UTC
+ 
+ # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+ # 2011, 2012 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  
  # 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
@@@ -28,7 -28,7 +35,11 @@@
  
  case $1 in
    '')
++<<<<<<< HEAD
 +     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
++=======
+      echo "$0: No command.  Try '$0 --help' for more information." 1>&2
++>>>>>>> upstream/20131206+dfsg
       exit 1;
       ;;
    -h | --h*)
@@@ -40,11 -40,11 +51,19 @@@ as side-effects
  
  Environment variables:
    depmode     Dependency tracking mode.
++<<<<<<< HEAD
 +  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.
++=======
+   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 outputting dependencies.
++>>>>>>> upstream/20131206+dfsg
    libtool     Whether libtool is used (yes/no).
  
  Report bugs to <bug-automake at gnu.org>.
@@@ -57,6 -57,12 +76,15 @@@ EO
      ;;
  esac
  
++<<<<<<< HEAD
++=======
+ # A tabulation character.
+ tab='	'
+ # A newline character.
+ nl='
+ '
+ 
++>>>>>>> upstream/20131206+dfsg
  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
@@@ -90,10 -96,24 +118,31 @@@ if test "$depmode" = msvcmsys; the
     # This is just like msvisualcpp but w/o cygpath translation.
     # Just convert the backslash-escaped backslashes to single forward
     # slashes to satisfy depend.m4
++<<<<<<< HEAD
 +   cygpath_u="sed s,\\\\\\\\,/,g"
 +   depmode=msvisualcpp
 +fi
 +
++=======
+    cygpath_u='sed s,\\\\,/,g'
+    depmode=msvisualcpp
+ fi
+ 
+ if test "$depmode" = msvc7msys; then
+    # This is just like msvc7 but w/o cygpath translation.
+    # Just convert the backslash-escaped backslashes to single forward
+    # slashes to satisfy depend.m4
+    cygpath_u='sed s,\\\\,/,g'
+    depmode=msvc7
+ fi
+ 
+ if test "$depmode" = xlc; then
+    # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+    gccflag=-qmakedep=gcc,-MF
+    depmode=gcc
+ fi
+ 
++>>>>>>> upstream/20131206+dfsg
  case "$depmode" in
  gcc3)
  ## gcc 3 implements dependency tracking that does exactly what
@@@ -148,20 -168,21 +197,36 @@@ gcc
  ## The second -e expression handles DOS-style file names with drive letters.
    sed -e 's/^[^:]*: / /' \
        -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
++<<<<<<< HEAD
 +## This next piece of magic avoids the `deleted header file' problem.
++=======
+ ## This next piece of magic avoids the "deleted header file" problem.
++>>>>>>> upstream/20131206+dfsg
  ## 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.
++<<<<<<< HEAD
 +  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"
++=======
+   tr ' ' "$nl" < "$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.  hp depmode also adds that space, but also prefixes the VPATH
+ ## to the object.  Take care to not repeat it in the output.
+ ## 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 "s|.*$object$||" -e '/:$/d' \
+       | sed -e 's/$/ :/' >> "$depfile"
++>>>>>>> upstream/20131206+dfsg
    rm -f "$tmpdepfile"
    ;;
  
@@@ -193,18 -214,15 +258,30 @@@ sgi
      # 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;
++<<<<<<< HEAD
 +    # 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" \
++=======
+     # the IRIX cc adds comments like '#:fec' to the end of the
+     # dependency line.
+     tr ' ' "$nl" < "$tmpdepfile" \
+     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+     tr "$nl" ' ' >> "$depfile"
+     echo >> "$depfile"
+ 
+     # The second pass generates a dummy entry for each header file.
+     tr ' ' "$nl" < "$tmpdepfile" \
++>>>>>>> upstream/20131206+dfsg
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
     >> "$depfile"
    else
@@@ -216,10 -234,17 +293,24 @@@
    rm -f "$tmpdepfile"
    ;;
  
++<<<<<<< HEAD
 +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
++=======
+ xlc)
+   # 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
+   ;;
+ 
+ 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
++>>>>>>> upstream/20131206+dfsg
    # start of each line; $object doesn't have directory information.
    # Version 6 uses the directory in both cases.
    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@@@ -249,12 -274,11 +340,20 @@@
      test -f "$tmpdepfile" && break
    done
    if test -f "$tmpdepfile"; then
++<<<<<<< HEAD
 +    # Each line is of the form `foo.o: dependent.h'.
 +    # Do two passes, one to just change these to
 +    # `$object: dependent.h' and one to simply `dependent.h:'.
 +    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
 +    # That's a tab and a space in the [].
 +    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
++=======
+     # Each line is of the form 'foo.o: dependent.h'.
+     # Do two passes, one to just change these to
+     # '$object: dependent.h' and one to simply 'dependent.h:'.
+     sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+     sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
++>>>>>>> upstream/20131206+dfsg
    else
      # The sourcefile does not contain any dependencies, so just
      # store a dummy comment line, to avoid errors with the Makefile
@@@ -265,23 -289,26 +364,43 @@@
    ;;
  
  icc)
++<<<<<<< HEAD
 +  # 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:
++=======
+   # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+   # However on
+   #    $CC -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
++>>>>>>> upstream/20131206+dfsg
    #    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
++<<<<<<< HEAD
 +  # and will wrap long lines using \ :
 +  #    foo.o: sub/foo.c ... \
 +  #     sub/foo.h ... \
 +  #     ...
 +
++=======
+   # and will wrap long lines using '\':
+   #    foo.o: sub/foo.c ... \
+   #     sub/foo.h ... \
+   #     ...
+   # tcc 0.9.26 (FIXME still under development at the moment of writing)
+   # will emit a similar output, but also prepend the continuation lines
+   # with horizontal tabulation characters.
++>>>>>>> upstream/20131206+dfsg
    "$@" -MD -MF "$tmpdepfile"
    stat=$?
    if test $stat -eq 0; then :
@@@ -290,15 -317,21 +409,33 @@@
      exit $stat
    fi
    rm -f "$depfile"
++<<<<<<< HEAD
 +  # 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"
++=======
+   # 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 -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+     < "$tmpdepfile" > "$depfile"
+   sed '
+     s/[ '"$tab"'][ '"$tab"']*/ /g
+     s/^ *//
+     s/ *\\*$//
+     s/^[^:]*: *//
+     /^$/d
+     /:$/d
+     s/$/ :/
+   ' < "$tmpdepfile" >> "$depfile"
++>>>>>>> upstream/20131206+dfsg
    rm -f "$tmpdepfile"
    ;;
  
@@@ -334,7 -367,7 +471,11 @@@ hp2
    done
    if test -f "$tmpdepfile"; then
      sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
++<<<<<<< HEAD
 +    # Add `dependent.h:' lines.
++=======
+     # Add 'dependent.h:' lines.
++>>>>>>> upstream/20131206+dfsg
      sed -ne '2,${
  	       s/^ *//
  	       s/ \\*$//
@@@ -349,9 -382,9 +490,15 @@@
  
  tru64)
     # The Tru64 compiler uses -MD to generate dependencies as a side
++<<<<<<< HEAD
 +   # 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.
++=======
+    # 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.
++>>>>>>> upstream/20131206+dfsg
     # Subdirectories are respected.
     dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
     test "x$dir" = "x$object" && dir=
@@@ -397,14 -430,59 +544,67 @@@
     done
     if test -f "$tmpdepfile"; then
        sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
++<<<<<<< HEAD
 +      # That's a tab and a space in the [].
 +      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
++=======
+       sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
++>>>>>>> upstream/20131206+dfsg
     else
        echo "#dummy" > "$depfile"
     fi
     rm -f "$tmpdepfile"
     ;;
  
++<<<<<<< HEAD
++=======
+ msvc7)
+   if test "$libtool" = yes; then
+     showIncludes=-Wc,-showIncludes
+   else
+     showIncludes=-showIncludes
+   fi
+   "$@" $showIncludes > "$tmpdepfile"
+   stat=$?
+   grep -v '^Note: including file: ' "$tmpdepfile"
+   if test "$stat" = 0; then :
+   else
+     rm -f "$tmpdepfile"
+     exit $stat
+   fi
+   rm -f "$depfile"
+   echo "$object : \\" > "$depfile"
+   # The first sed program below extracts the file names and escapes
+   # backslashes for cygpath.  The second sed program outputs the file
+   # name when reading, but also accumulates all include files in the
+   # hold buffer in order to output them again at the end.  This only
+   # works with sed implementations that can handle large buffers.
+   sed < "$tmpdepfile" -n '
+ /^Note: including file:  *\(.*\)/ {
+   s//\1/
+   s/\\/\\\\/g
+   p
+ }' | $cygpath_u | sort -u | sed -n '
+ s/ /\\ /g
+ s/\(.*\)/'"$tab"'\1 \\/p
+ s/.\(.*\) \\/\1:/
+ H
+ $ {
+   s/.*/'"$tab"'/
+   G
+   p
+ }' >> "$depfile"
+   rm -f "$tmpdepfile"
+   ;;
+ 
+ msvc7msys)
+   # 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
+   ;;
+ 
++>>>>>>> upstream/20131206+dfsg
  #nosideeffect)
    # This comment above is used by automake to tell side-effect
    # dependency tracking mechanisms from slower ones.
@@@ -422,7 -500,7 +622,11 @@@ dashmstdout
      shift
    fi
  
++<<<<<<< HEAD
 +  # Remove `-o $object'.
++=======
+   # Remove '-o $object'.
++>>>>>>> upstream/20131206+dfsg
    IFS=" "
    for arg
    do
@@@ -442,15 -520,14 +646,26 @@@
    done
  
    test -z "$dashmflag" && dashmflag=-M
++<<<<<<< HEAD
 +  # 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" | \
++=======
+   # 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:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
+   rm -f "$depfile"
+   cat < "$tmpdepfile" > "$depfile"
+   tr ' ' "$nl" < "$tmpdepfile" | \
++>>>>>>> upstream/20131206+dfsg
  ## 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"
@@@ -503,9 -580,10 +718,16 @@@ makedepend
    touch "$tmpdepfile"
    ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
    rm -f "$depfile"
++<<<<<<< HEAD
 +  cat < "$tmpdepfile" > "$depfile"
 +  sed '1,2d' "$tmpdepfile" | tr ' ' '
 +' | \
++=======
+   # makedepend may prepend the VPATH from the source file name to the object.
+   # No need to regex-escape $object, excess matching of '.' is harmless.
+   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+   sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
++>>>>>>> upstream/20131206+dfsg
  ## 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"
@@@ -525,7 -603,7 +747,11 @@@ cpp
      shift
    fi
  
++<<<<<<< HEAD
 +  # Remove `-o $object'.
++=======
+   # Remove '-o $object'.
++>>>>>>> upstream/20131206+dfsg
    IFS=" "
    for arg
    do
@@@ -594,8 -672,8 +820,13 @@@ msvisualcpp
    sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
    rm -f "$depfile"
    echo "$object : \\" > "$depfile"
++<<<<<<< HEAD
 +  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
 +  echo "	" >> "$depfile"
++=======
+   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+   echo "$tab" >> "$depfile"
++>>>>>>> upstream/20131206+dfsg
    sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
    rm -f "$tmpdepfile"
    ;;
diff --cc desktop/Makefile.in
index 2ef6a0b,6a32bd6..cf5014f
--- a/desktop/Makefile.in
+++ b/desktop/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -16,6 -16,23 +25,26 @@@
  @SET_MAKE@
  
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -37,10 -54,8 +66,15 @@@ host_triplet = @host
  subdir = desktop
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -49,6 -64,11 +83,14 @@@ CONFIG_CLEAN_FILES 
  CONFIG_CLEAN_VPATH_FILES =
  SOURCES =
  DIST_SOURCES =
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
      $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@@ -70,6 -90,12 +112,15 @@@ am__nobase_list = $(am__nobase_strip_se
  am__base_list = \
    sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++<<<<<<< HEAD
++=======
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
++>>>>>>> upstream/20131206+dfsg
  am__installdirs = "$(DESTDIR)$(iconsdir)" "$(DESTDIR)$(mimedir)"
  DATA = $(icons_DATA) $(mime_DATA)
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@@ -101,7 -127,10 +152,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -114,8 -143,6 +172,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -138,7 -165,6 +199,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -156,6 -182,9 +220,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -163,6 -192,7 +233,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -189,10 -219,6 +263,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -276,8 -302,11 +353,16 @@@ clean-libtool
  	-rm -rf .libs _libs
  install-iconsDATA: $(icons_DATA)
  	@$(NORMAL_INSTALL)
++<<<<<<< HEAD
 +	test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)"
 +	@list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \
++=======
+ 	@list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; \
@@@ -291,13 -320,14 +376,24 @@@ uninstall-iconsDATA
  	@$(NORMAL_UNINSTALL)
  	@list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \
  	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
++<<<<<<< HEAD
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(iconsdir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(iconsdir)" && rm -f $$files
 +install-mimeDATA: $(mime_DATA)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(mimedir)" || $(MKDIR_P) "$(DESTDIR)$(mimedir)"
 +	@list='$(mime_DATA)'; test -n "$(mimedir)" || list=; \
++=======
+ 	dir='$(DESTDIR)$(iconsdir)'; $(am__uninstall_files_from_dir)
+ install-mimeDATA: $(mime_DATA)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(mime_DATA)'; test -n "$(mimedir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(mimedir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(mimedir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; \
@@@ -311,9 -341,7 +407,13 @@@ uninstall-mimeDATA
  	@$(NORMAL_UNINSTALL)
  	@list='$(mime_DATA)'; test -n "$(mimedir)" || list=; \
  	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
++<<<<<<< HEAD
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(mimedir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(mimedir)" && rm -f $$files
++=======
+ 	dir='$(DESTDIR)$(mimedir)'; $(am__uninstall_files_from_dir)
++>>>>>>> upstream/20131206+dfsg
  tags: TAGS
  TAGS:
  
@@@ -368,10 -396,15 +468,22 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
diff --cc doc/Makefile.am
index fae6595,55516cb..0fa06f2
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@@ -2,32 -2,30 +2,61 @@@
  
  SUBDIRS = tutorial examples manpages
  
++<<<<<<< HEAD
 +WEBROOT = /var/www/gerris
 +
 +EXTRA_DIST = figures share doxy.conf
 +
 +noinst_PROGRAMS = autoclass
 +
 +INCLUDES = -I$(top_srcdir)/src -I$(includedir) -DG_LOG_DOMAIN=\"Gfs-tools\"\
 +            $(GTS_CFLAGS)
 +
 +autoclass: autoclass.c $(top_srcdir)/src/init.c
 +	$(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(INCLUDES) -DFTT_2D=1 \
 +	autoclass.c -o autoclass $(GFS2D_LIBS)
 +
 +reference: Makefile.am autoclass share/autoclass.sh share/doxfilter share/renamemodules doxy.conf
 +	sh share/autoclass.sh | sort -k2,3 | ./autoclass > hierarchy.c
 +	@chmod +x share/doxfilter
 +	doxygen doxy.conf 2>&1 | grep -v 'explicit link request to .* could not be resolved' > doxy.log
 +	cd reference && sh ../share/renamemodules
 +	if grep [wW]arning doxy.log; then exit 1; fi
 +
 +publish: reference
 +	tar czf reference.tgz reference
 +	mv -f reference.tgz $(WEBROOT)
 +	cd $(WEBROOT) && tar xzf reference.tgz && rm -f reference.tgz
 +
 +Makefile.deps: Makefile.am ../src/Makefile.am
 +	ls ../src/*.[ch] | awk 'BEGIN{print "reference: \\"}{ print "\t" $$1 " \\"}' > Makefile.deps
 +
++=======
+ EXTRA_DIST = figures share doxy.conf gerris.bib
+ 
+ noinst_PROGRAMS = autoclass
+ 
+ INCLUDES = -I$(top_srcdir)/src -I$(includedir) -DG_LOG_DOMAIN=\"Gfs-tools\"\
+             $(GTS_CFLAGS)
+ 
+ autoclass: autoclass.c $(top_srcdir)/src/init.c
+ 	$(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(INCLUDES) -DFTT_2D=1 \
+ 	autoclass.c -o autoclass $(GFS2D_LIBS)
+ 
+ reference: Makefile.am autoclass share/autoclass.sh share/doxfilter share/renamemodules doxy.conf
+ 	sh share/autoclass.sh | sort -k2,3 | ./autoclass > hierarchy.c
+ 	@chmod +x share/doxfilter
+ 	doxygen doxy.conf 2>&1 | grep -v 'explicit link request to .* could not be resolved' > doxy.log
+ 	cd reference && sh ../share/renamemodules
+ 	if grep [wW]arning doxy.log; then exit 1; fi
+ 
+ publish: reference
+ 	tar czf reference.tgz reference
+ 	mv -f reference.tgz $(WEBROOT)
+ 	cd $(WEBROOT) && tar xzf reference.tgz && rm -f reference.tgz
+ 
+ Makefile.deps: Makefile.am ../src/Makefile.am
+ 	ls ../src/*.[ch] | awk 'BEGIN{print "reference: \\"}{ print "\t" $$1 " \\"}' > Makefile.deps
+ 
++>>>>>>> upstream/20131206+dfsg
  -include Makefile.deps
diff --cc doc/Makefile.in
index 3d7c6eb,4608631..334c78e
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -16,6 -16,23 +25,26 @@@
  @SET_MAKE@
  
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -38,10 -55,8 +67,15 @@@ noinst_PROGRAMS = autoclass$(EXEEXT
  subdir = doc
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -49,14 -64,9 +83,20 @@@ CONFIG_HEADER = $(top_builddir)/config.
  CONFIG_CLEAN_FILES =
  CONFIG_CLEAN_VPATH_FILES =
  PROGRAMS = $(noinst_PROGRAMS)
++<<<<<<< HEAD
 +am_autoclass_OBJECTS = autoclass-autoclass.$(OBJEXT) \
 +	autoclass-init.$(OBJEXT)
 +autoclass_OBJECTS = $(am_autoclass_OBJECTS)
 +am__DEPENDENCIES_1 =
 +autoclass_DEPENDENCIES = $(am__DEPENDENCIES_1)
 +autoclass_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 +	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(autoclass_CFLAGS) \
 +	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++=======
+ autoclass_SOURCES = autoclass.c
+ autoclass_OBJECTS = autoclass.$(OBJEXT)
+ autoclass_LDADD = $(LDADD)
++>>>>>>> upstream/20131206+dfsg
  DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
  depcomp = $(SHELL) $(top_srcdir)/depcomp
  am__depfiles_maybe = depfiles
@@@ -70,8 -80,8 +110,13 @@@ CCLD = $(CC
  LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
  	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
++<<<<<<< HEAD
 +SOURCES = $(autoclass_SOURCES)
 +DIST_SOURCES = $(autoclass_SOURCES)
++=======
+ SOURCES = autoclass.c
+ DIST_SOURCES = autoclass.c
++>>>>>>> upstream/20131206+dfsg
  RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
  	html-recursive info-recursive install-data-recursive \
  	install-dvi-recursive install-exec-recursive \
@@@ -79,6 -89,11 +124,14 @@@
  	install-pdf-recursive install-ps-recursive install-recursive \
  	installcheck-recursive installdirs-recursive pdf-recursive \
  	ps-recursive uninstall-recursive
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
    distclean-recursive maintainer-clean-recursive
  AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@@ -141,7 -156,10 +194,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
 +FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
+ FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -154,8 -172,6 +214,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -178,7 -194,6 +241,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -196,6 -211,9 +262,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -203,6 -221,7 +275,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -229,10 -248,6 +305,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -266,15 -281,10 +345,22 @@@ top_builddir = @top_builddir
  top_srcdir = @top_srcdir@
  use_mpicc = @use_mpicc@
  SUBDIRS = tutorial examples manpages
++<<<<<<< HEAD
 +WEBROOT = /var/www/gerris
 +EXTRA_DIST = figures share doxy.conf
 +INCLUDES = -I$(top_srcdir)/src -I$(includedir) -DG_LOG_DOMAIN=\"Gfs-tools\"\
 +            $(GTS_CFLAGS)
 +
 +autoclass_SOURCES = autoclass.c $(top_srcdir)/src/init.c
 +autoclass_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +autoclass_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src
 +autoclass_LDADD = $(GFS2D_LIBS)
++=======
+ EXTRA_DIST = figures share doxy.conf gerris.bib
+ INCLUDES = -I$(top_srcdir)/src -I$(includedir) -DG_LOG_DOMAIN=\"Gfs-tools\"\
+             $(GTS_CFLAGS)
+ 
++>>>>>>> upstream/20131206+dfsg
  all: all-recursive
  
  .SUFFIXES:
@@@ -318,9 -328,6 +404,12 @@@ clean-noinstPROGRAMS
  	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
  	echo " rm -f" $$list; \
  	rm -f $$list
++<<<<<<< HEAD
 +autoclass$(EXEEXT): $(autoclass_OBJECTS) $(autoclass_DEPENDENCIES) 
 +	@rm -f autoclass$(EXEEXT)
 +	$(autoclass_LINK) $(autoclass_OBJECTS) $(autoclass_LDADD) $(LIBS)
++=======
++>>>>>>> upstream/20131206+dfsg
  
  mostlyclean-compile:
  	-rm -f *.$(OBJEXT)
@@@ -328,8 -335,7 +417,12 @@@
  distclean-compile:
  	-rm -f *.tab.c
  
++<<<<<<< HEAD
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/autoclass-autoclass.Po at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/autoclass-init.Po at am__quote@
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/autoclass.Po at am__quote@
++>>>>>>> upstream/20131206+dfsg
  
  .c.o:
  @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@@ -352,34 -358,6 +445,37 @@@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
  
++<<<<<<< HEAD
 +autoclass-autoclass.o: autoclass.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -MT autoclass-autoclass.o -MD -MP -MF $(DEPDIR)/autoclass-autoclass.Tpo -c -o autoclass-autoclass.o `test -f 'autoclass.c' || echo '$(srcdir)/'`autoclass.c
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/autoclass-autoclass.Tpo $(DEPDIR)/autoclass-autoclass.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='autoclass.c' object='autoclass-autoclass.o' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -c -o autoclass-autoclass.o `test -f 'autoclass.c' || echo '$(srcdir)/'`autoclass.c
 +
 +autoclass-autoclass.obj: autoclass.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -MT autoclass-autoclass.obj -MD -MP -MF $(DEPDIR)/autoclass-autoclass.Tpo -c -o autoclass-autoclass.obj `if test -f 'autoclass.c'; then $(CYGPATH_W) 'autoclass.c'; else $(CYGPATH_W) '$(srcdir)/autoclass.c'; fi`
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/autoclass-autoclass.Tpo $(DEPDIR)/autoclass-autoclass.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='autoclass.c' object='autoclass-autoclass.obj' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -c -o autoclass-autoclass.obj `if test -f 'autoclass.c'; then $(CYGPATH_W) 'autoclass.c'; else $(CYGPATH_W) '$(srcdir)/autoclass.c'; fi`
 +
 +autoclass-init.o: $(top_srcdir)/src/init.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -MT autoclass-init.o -MD -MP -MF $(DEPDIR)/autoclass-init.Tpo -c -o autoclass-init.o `test -f '$(top_srcdir)/src/init.c' || echo '$(srcdir)/'`$(top_srcdir)/src/init.c
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/autoclass-init.Tpo $(DEPDIR)/autoclass-init.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/init.c' object='autoclass-init.o' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -c -o autoclass-init.o `test -f '$(top_srcdir)/src/init.c' || echo '$(srcdir)/'`$(top_srcdir)/src/init.c
 +
 +autoclass-init.obj: $(top_srcdir)/src/init.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -MT autoclass-init.obj -MD -MP -MF $(DEPDIR)/autoclass-init.Tpo -c -o autoclass-init.obj `if test -f '$(top_srcdir)/src/init.c'; then $(CYGPATH_W) '$(top_srcdir)/src/init.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/init.c'; fi`
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/autoclass-init.Tpo $(DEPDIR)/autoclass-init.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/init.c' object='autoclass-init.obj' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(autoclass_CPPFLAGS) $(CPPFLAGS) $(autoclass_CFLAGS) $(CFLAGS) -c -o autoclass-init.obj `if test -f '$(top_srcdir)/src/init.c'; then $(CYGPATH_W) '$(top_srcdir)/src/init.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/init.c'; fi`
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-libtool:
  	-rm -f *.lo
  
@@@ -553,13 -531,10 +649,20 @@@ distdir: $(DISTFILES
  	done
  	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
  	  if test "$$subdir" = .; then :; else \
++<<<<<<< HEAD
 +	    test -d "$(distdir)/$$subdir" \
 +	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 +	    || exit 1; \
 +	  fi; \
 +	done
 +	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 +	  if test "$$subdir" = .; then :; else \
++=======
+ 	    $(am__make_dryrun) \
+ 	      || test -d "$(distdir)/$$subdir" \
+ 	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+ 	      || exit 1; \
++>>>>>>> upstream/20131206+dfsg
  	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
  	    $(am__relativize); \
  	    new_distdir=$$reldir; \
@@@ -594,10 -569,15 +697,22 @@@ install-am: all-a
  
  installcheck: installcheck-recursive
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
@@@ -699,6 -679,10 +814,13 @@@ uninstall-am
  	uninstall uninstall-am
  
  
++<<<<<<< HEAD
++=======
+ autoclass: autoclass.c $(top_srcdir)/src/init.c
+ 	$(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(INCLUDES) -DFTT_2D=1 \
+ 	autoclass.c -o autoclass $(GFS2D_LIBS)
+ 
++>>>>>>> upstream/20131206+dfsg
  reference: Makefile.am autoclass share/autoclass.sh share/doxfilter share/renamemodules doxy.conf
  	sh share/autoclass.sh | sort -k2,3 | ./autoclass > hierarchy.c
  	@chmod +x share/doxfilter
diff --cc doc/examples/Makefile.am
index 1377926,49abc40..f0096e1
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@@ -1,27 -1,6 +1,30 @@@
  ## Process this file with automake to produce Makefile.in
  
  AUTOMAKE_OPTIONS = parallel-tests
++<<<<<<< HEAD
 +
 +EXAMPLES = \
 +	cylinder \
 +	rt \
 +	boussinesq \
 +	tangaroa \
 +	logo \
 +	column \
 +	tides \
 +	ship \
 +	forcedturbulence \
 +	garden \
 +	dam \
 +	hump \
 +	monai \
 +	tsunami \
 +	cyclone \
 +	plateau \
 +	atomisation
 +
 +WEBROOT = /var/www/gerris
++=======
++>>>>>>> upstream/20131206+dfsg
  
  EXTRA_DIST = \
  	template.tex \
@@@ -46,8 -24,7 +49,12 @@@ BUILT_SOURCES= 
  
  CLEANFILES = $(BUILT_SOURCES) Makefile.deps
  
++<<<<<<< HEAD
 +pkglib_DATA = gfs2tex.py
 +pkgdata_DATA = gfs.lang gerris.dic gfs-keywords.el gfs-mode.el gfs.sty gfs.hva kaltura.sh gfs.php
++=======
+ pkgdata_DATA = gfs2tex.py gfs.lang gerris.dic gfs-keywords.el gfs-mode.el gfs.sty gfs.hva kaltura.sh gfs.php
++>>>>>>> upstream/20131206+dfsg
  
  gerris.dic: classes modulesyms.sh $(top_srcdir)/modules/Makefile.am modules.list
  	($(srcdir)/classes && sh $(srcdir)/modulesyms.sh $(top_srcdir)/modules $(pkglibdir)) | sort > gerris.dic
@@@ -55,8 -32,8 +62,13 @@@
  gfs.lang: gerris.dic
  	echo "# Language file for source-highlight" > gfs.lang
  	echo "# Generated automatically by classes.c" >> gfs.lang
++<<<<<<< HEAD
 +	awk '{ printf ("gfs_keyword = \"%s\"\n", $$1) }' < gerris.dic >> gfs.lang
 +	echo "include \"cpp.lang\"" >> gfs.lang
++=======
+ 	awk '{ printf ("classname = \"%s\"\n", $$1) }' < gerris.dic >> gfs.lang
+ 	echo "include \"/usr/share/source-highlight/cpp.lang\"" >> gfs.lang
++>>>>>>> upstream/20131206+dfsg
  	echo "comment start \"#\"" >> gfs.lang
  	echo "redef preproc = \"C preprocessor command is not compatible with the use of # as comment character in GTS\"" >> gfs.lang
  
@@@ -104,9 -100,9 +135,15 @@@ examples: examples.dvi crossref.s
  	sh ./crossref.sh --url=http://gerris.dalembert.upmc.fr/gerris/examples/examples $(EXAMPLES)
  	mv references examples
  
++<<<<<<< HEAD
 +examples.dvi: examples.tex examples.bib
 +	- latex -interaction=nonstopmode examples.tex > /dev/null 2>&1
 +	bibtex examples
++=======
+ examples.dvi: examples.tex $(top_srcdir)/doc/gerris.bib
+ 	- latex -interaction=nonstopmode examples.tex > /dev/null 2>&1
+ 	BIBINPUTS=$(BIBINPUTS) bibtex examples
++>>>>>>> upstream/20131206+dfsg
  	- latex -interaction=nonstopmode examples.tex > /dev/null 2>&1
  	latex -interaction=nonstopmode examples.tex
  
@@@ -115,16 -111,6 +152,19 @@@ examples.pdf: examples.dv
  	ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true examples.ps examples.pdf
  	rm -f examples.ps
  
++<<<<<<< HEAD
 +examples.tex: template.tex Makefile.deps gfs2tex gfs2tex.py
 +	rm -r -f examples
 +	python gfs2tex $(EXAMPLES)
 +	sed "s/GFS_VERSION/`$(top_srcdir)/src/gerris2D -V 2>&1 | head -1 | cut -d' ' -f6-`/g" < template.tex | sed 's/\\today/'"`date +\"%B %e, %Y\"`/g" > examples.tex
 +
 +Makefile.deps: depend.py Makefile.am
 +	python depend.py $(EXAMPLES) > Makefile.deps
 +
 +include Makefile.deps
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  examples.tar.gz: examples.pdf examples $(DOCS)
  	tar czf examples.tar.gz examples $(DOCS)
  	rm -r -f examples
diff --cc doc/examples/Makefile.deps
index b50167e,6ad1ae3..a3dbe64
--- a/doc/examples/Makefile.deps
+++ b/doc/examples/Makefile.deps
@@@ -1,3 -1,5 +1,8 @@@
++<<<<<<< HEAD
++=======
+ ## File generated automatically by depend.py: do not modify by hand
+ 
++>>>>>>> upstream/20131206+dfsg
  DOCS = \
  	cylinder/cylinder.gfs.html\
  	cylinder/t.mpg\
@@@ -11,41 -13,51 +16,83 @@@
  	rt/vort.mpg\
  	boussinesq/boussinesq.gfs.html\
  	boussinesq/t.mpg\
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs.html\
 +	tangaroa/sections.mpg\
++=======
++>>>>>>> upstream/20131206+dfsg
  	logo/logo.gfs.html\
  	logo/logo.mpg\
  	logo/logo.png\
  	column/column.gfs.html\
  	column/movie.ogv\
++<<<<<<< HEAD
 +	tides/tides.gfs.html\
++=======
+ 	starting/starting.gfs.html\
+ 	starting/starting.mpg\
+ 	viscmix/viscmix.gfs.html\
+ 	viscmix/viscmix.mpg\
+ 	bubble/bubble.gfs.html\
+ 	bubble/cap/cap.gfs.html\
+ 	tangaroa/tangaroa.gfs.html\
+ 	tangaroa/sections.mpg\
+ 	plateau/plateau.gfs.html\
+ 	plateau/plateau.ogv\
+ 	plateau/white.ogv\
+ 	plateau/closeup.ogv\
+ 	plateau/plateau.png\
+ 	plateau/white.png\
+ 	plateau/closeup.png\
+ 	atomisation/atomisation.gfs.html\
+ 	atomisation/jet.ogv\
+ 	atomisation/back.ogv\
+ 	atomisation/jet.png\
+ 	atomisation/back.png\
++>>>>>>> upstream/20131206+dfsg
  	ship/ship.gfs.html\
  	ship/closeup.mpg\
  	forcedturbulence/forcedturbulence.gfs.html\
  	forcedturbulence/multiview.mpg\
++<<<<<<< HEAD
 +	garden/garden.gfs.html\
 +	dam/dam.gfs.html\
 +	hump/hump.gfs.html\
 +	hump/hump.mpg\
++=======
+ 	wingtip/wingtip.gfs.html\
+ 	wingtip/wingtip.mpg\
+ 	tides/tides.gfs.html\
+ 	dam/dam.gfs.html\
+ 	hump/hump.gfs.html\
+ 	hump/hump.mpg\
+ 	shock/shock.gfs.html\
+ 	shock/depth.mpg\
++>>>>>>> upstream/20131206+dfsg
  	monai/monai.gfs.html\
  	monai/monai.mpg\
  	monai/comparison.mp4\
  	tsunami/tsunami.gfs.html\
  	tsunami/h.mpg\
  	tsunami/level.mpg\
++<<<<<<< HEAD
 +	cyclone/cyclone.gfs.html\
 +	plateau/plateau.gfs.html\
 +	plateau/plateau.ogv\
 +	plateau/white.ogv\
 +	plateau/closeup.ogv\
 +	plateau/plateau.png\
 +	plateau/white.png\
 +	plateau/closeup.png\
 +	atomisation/atomisation.gfs.html\
 +	atomisation/jet.ogv\
 +	atomisation/back.ogv\
 +	atomisation/jet.png\
 +	atomisation/back.png\
++=======
+ 	garden/garden.gfs.html\
+ 	cyclone/cyclone.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	cylinder/cylinder.gfs\
  	cylinder/parallel/parallel.gfs\
  	cylinder/parallel/parallel.sh\
@@@ -55,9 -67,6 +102,12 @@@
  	rt/rt.gfv\
  	boussinesq/boussinesq.gfs\
  	boussinesq/boussinesq.gfv\
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs\
 +	tangaroa/tangaroa.gts\
 +	tangaroa/sections.gfv\
++=======
++>>>>>>> upstream/20131206+dfsg
  	logo/logo.gfs\
  	logo/logo.gfv\
  	column/column.gfs\
@@@ -65,6 -74,42 +115,45 @@@
  	column/column.gfv\
  	column/grains.tgz\
  	column/movie.gfv\
++<<<<<<< HEAD
++=======
+ 	starting/starting.gfs\
+ 	starting/starting.sh\
+ 	starting/starting.gfv\
+ 	starting/n2414.dat\
+ 	viscmix/viscmix.gfs\
+ 	viscmix/run.sh\
+ 	viscmix/viscmix.gfv\
+ 	bubble/bubble.gfs\
+ 	bubble/bubble.sh\
+ 	bubble/bubble.gfv\
+ 	bubble/cap/cap.gfs\
+ 	bubble/cap/bubble.sh\
+ 	bubble/cap/bubble.gfv\
+ 	tangaroa/tangaroa.gfs\
+ 	tangaroa/tangaroa.gts\
+ 	tangaroa/sections.gfv\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.gfv\
+ 	plateau/white.gfv\
+ 	plateau/closeup.gfv\
+ 	atomisation/atomisation.gfs\
+ 	atomisation/atomisation.sh\
+ 	atomisation/jet.gfv\
+ 	atomisation/back.gfv\
+ 	ship/ship.gfs\
+ 	ship/closeup.gfv\
+ 	ship/front.gfv\
+ 	ship/comparison.gfv\
+ 	ship/tank-data.png\
+ 	forcedturbulence/forcedturbulence.gfs\
+ 	forcedturbulence/spectral.dat\
+ 	forcedturbulence/multiview.gfv\
+ 	wingtip/wingtip.gfs\
+ 	wingtip/n2414.dat\
+ 	wingtip/wingtip.gfv\
+ 	wingtip/wingtip.sh\
++>>>>>>> upstream/20131206+dfsg
  	tides/tides.gfs\
  	tides/tides.sh\
  	tides/bathymetry\
@@@ -74,24 -119,15 +163,33 @@@
  	tides/phase.gfv\
  	tides/residual.gfv\
  	tides/tides.gfv\
++<<<<<<< HEAD
 +	ship/ship.gfs\
 +	ship/closeup.gfv\
 +	ship/front.gfv\
 +	ship/comparison.gfv\
 +	ship/tank-data.png\
 +	forcedturbulence/forcedturbulence.gfs\
 +	forcedturbulence/spectral.dat\
 +	forcedturbulence/multiview.gfv\
 +	garden/garden.gfs\
 +	garden/garden.sh\
 +	garden/end.gfv\
 +	garden/mesh.gfv\
++=======
++>>>>>>> upstream/20131206+dfsg
  	dam/dam.gfs\
  	dam/dam.plot\
  	hump/hump.gfs\
  	hump/hump.gfv\
  	hump/isolines.gfv\
  	hump/cells.gfv\
++<<<<<<< HEAD
++=======
+ 	shock/shock.gfs\
+ 	shock/depth.gfv\
+ 	shock/mesh.gfv\
++>>>>>>> upstream/20131206+dfsg
  	monai/monai.gfs\
  	monai/monai.sh\
  	monai/3D.gfv\
@@@ -113,21 -149,41 +211,58 @@@
  	tsunami/ganares.txt\
  	tsunami/jason.xy\
  	tsunami/jasonres.txt\
++<<<<<<< HEAD
++=======
+ 	garden/garden.gfs\
+ 	garden/garden.sh\
+ 	garden/end.gfv\
+ 	garden/mesh.gfv\
++>>>>>>> upstream/20131206+dfsg
  	cyclone/cyclone.gfs\
  	cyclone/cyclone.gfv\
  	cyclone/hs.gfv\
  	cyclone/mesh.gfv\
++<<<<<<< HEAD
 +	cyclone/shifted.gfv\
 +	plateau/plateau.gfs\
 +	plateau/plateau.gfv\
 +	plateau/white.gfv\
 +	plateau/closeup.gfv\
 +	atomisation/atomisation.gfs\
 +	atomisation/atomisation.sh\
 +	atomisation/jet.gfv\
 +	atomisation/back.gfv
 +
 +EXTRA_DIST += \
++=======
+ 	cyclone/shifted.gfv
+ 
+ TESTS = \
+ 	cylinder.sh\
+ 	rt.sh\
+ 	boussinesq.sh\
+ 	logo.sh\
+ 	column.sh\
+ 	starting.sh\
+ 	viscmix.sh\
+ 	bubble.sh\
+ 	tangaroa.sh\
+ 	plateau.sh\
+ 	atomisation.sh\
+ 	ship.sh\
+ 	forcedturbulence.sh\
+ 	wingtip.sh\
+ 	tides.sh\
+ 	dam.sh\
+ 	hump.sh\
+ 	shock.sh\
+ 	monai.sh\
+ 	tsunami.sh\
+ 	garden.sh\
+ 	cyclone.sh
+ 
+ EXTRA_DIST += $(TESTS)\
++>>>>>>> upstream/20131206+dfsg
  	cylinder/cylinder.gfs\
  	cylinder/parallel/parallel.gfs\
  	cylinder/parallel/parallel.sh\
@@@ -137,9 -193,6 +272,12 @@@
  	rt/rt.gfv\
  	boussinesq/boussinesq.gfs\
  	boussinesq/boussinesq.gfv\
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs\
 +	tangaroa/tangaroa.gts\
 +	tangaroa/sections.gfv\
++=======
++>>>>>>> upstream/20131206+dfsg
  	logo/logo.gfs\
  	logo/logo.gfv\
  	column/column.gfs\
@@@ -147,6 -200,42 +285,45 @@@
  	column/column.gfv\
  	column/grains.tgz\
  	column/movie.gfv\
++<<<<<<< HEAD
++=======
+ 	starting/starting.gfs\
+ 	starting/starting.sh\
+ 	starting/starting.gfv\
+ 	starting/n2414.dat\
+ 	viscmix/viscmix.gfs\
+ 	viscmix/run.sh\
+ 	viscmix/viscmix.gfv\
+ 	bubble/bubble.gfs\
+ 	bubble/bubble.sh\
+ 	bubble/bubble.gfv\
+ 	bubble/cap/cap.gfs\
+ 	bubble/cap/bubble.sh\
+ 	bubble/cap/bubble.gfv\
+ 	tangaroa/tangaroa.gfs\
+ 	tangaroa/tangaroa.gts\
+ 	tangaroa/sections.gfv\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.gfv\
+ 	plateau/white.gfv\
+ 	plateau/closeup.gfv\
+ 	atomisation/atomisation.gfs\
+ 	atomisation/atomisation.sh\
+ 	atomisation/jet.gfv\
+ 	atomisation/back.gfv\
+ 	ship/ship.gfs\
+ 	ship/closeup.gfv\
+ 	ship/front.gfv\
+ 	ship/comparison.gfv\
+ 	ship/tank-data.png\
+ 	forcedturbulence/forcedturbulence.gfs\
+ 	forcedturbulence/spectral.dat\
+ 	forcedturbulence/multiview.gfv\
+ 	wingtip/wingtip.gfs\
+ 	wingtip/n2414.dat\
+ 	wingtip/wingtip.gfv\
+ 	wingtip/wingtip.sh\
++>>>>>>> upstream/20131206+dfsg
  	tides/tides.gfs\
  	tides/tides.sh\
  	tides/bathymetry\
@@@ -156,24 -245,15 +333,33 @@@
  	tides/phase.gfv\
  	tides/residual.gfv\
  	tides/tides.gfv\
++<<<<<<< HEAD
 +	ship/ship.gfs\
 +	ship/closeup.gfv\
 +	ship/front.gfv\
 +	ship/comparison.gfv\
 +	ship/tank-data.png\
 +	forcedturbulence/forcedturbulence.gfs\
 +	forcedturbulence/spectral.dat\
 +	forcedturbulence/multiview.gfv\
 +	garden/garden.gfs\
 +	garden/garden.sh\
 +	garden/end.gfv\
 +	garden/mesh.gfv\
++=======
++>>>>>>> upstream/20131206+dfsg
  	dam/dam.gfs\
  	dam/dam.plot\
  	hump/hump.gfs\
  	hump/hump.gfv\
  	hump/isolines.gfv\
  	hump/cells.gfv\
++<<<<<<< HEAD
++=======
+ 	shock/shock.gfs\
+ 	shock/depth.gfv\
+ 	shock/mesh.gfv\
++>>>>>>> upstream/20131206+dfsg
  	monai/monai.gfs\
  	monai/monai.sh\
  	monai/3D.gfv\
@@@ -195,38 -275,15 +381,49 @@@
  	tsunami/ganares.txt\
  	tsunami/jason.xy\
  	tsunami/jasonres.txt\
++<<<<<<< HEAD
++=======
+ 	garden/garden.gfs\
+ 	garden/garden.sh\
+ 	garden/end.gfv\
+ 	garden/mesh.gfv\
++>>>>>>> upstream/20131206+dfsg
  	cyclone/cyclone.gfs\
  	cyclone/cyclone.gfv\
  	cyclone/hs.gfv\
  	cyclone/mesh.gfv\
++<<<<<<< HEAD
 +	cyclone/shifted.gfv\
 +	plateau/plateau.gfs\
 +	plateau/plateau.gfv\
 +	plateau/white.gfv\
 +	plateau/closeup.gfv\
 +	atomisation/atomisation.gfs\
 +	atomisation/atomisation.sh\
 +	atomisation/jet.gfv\
 +	atomisation/back.gfv
 +
 +TESTS = \
 +	cylinder.sh\
 +	rt.sh\
 +	boussinesq.sh\
 +	tangaroa.sh\
 +	logo.sh\
 +	column.sh\
 +	tides.sh\
 +	ship.sh\
 +	forcedturbulence.sh\
 +	garden.sh\
 +	dam.sh\
 +	hump.sh\
 +	monai.sh\
 +	tsunami.sh\
 +	cyclone.sh\
 +	plateau.sh\
 +	atomisation.sh
++=======
+ 	cyclone/shifted.gfv
++>>>>>>> upstream/20131206+dfsg
  
  examples.tex: \
  	cylinder/cylinder.gfs\
@@@ -254,9 -311,6 +451,12 @@@
  	boussinesq/boussinesq.gfs\
  	boussinesq/t.mpg\
  	boussinesq/t.eps\
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs\
 +	tangaroa/sections.mpg\
 +	tangaroa/sections.eps\
++=======
++>>>>>>> upstream/20131206+dfsg
  	logo/logo.gfs\
  	logo/logo.mpg\
  	logo/logo.png\
@@@ -270,13 -324,38 +470,48 @@@
  	column/comparison-2.28.eps\
  	column/movie.eps\
  	column/movie.ogv\
++<<<<<<< HEAD
 +	tides/tides.gfs\
 +	tides/a0.eps\
 +	tides/amplitude.eps\
 +	tides/ellipses.eps\
 +	tides/phase.eps\
 +	tides/pv.eps\
 +	tides/residual.eps\
++=======
+ 	starting/starting.gfs\
+ 	starting/starting.mpg\
+ 	starting/starting.eps\
+ 	viscmix/viscmix.gfs\
+ 	viscmix/viscmix.eps\
+ 	viscmix/viscmix.mpg\
+ 	bubble/bubble.gfs\
+ 	bubble/vel.eps\
+ 	bubble/cap/cap.gfs\
+ 	bubble/cap/vel.eps\
+ 	tangaroa/tangaroa.gfs\
+ 	tangaroa/sections.mpg\
+ 	tangaroa/sections.eps\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.ogv\
+ 	plateau/white.ogv\
+ 	plateau/closeup.ogv\
+ 	plateau/plateau.png\
+ 	plateau/white.png\
+ 	plateau/closeup.png\
+ 	plateau/plateau.eps\
+ 	plateau/white.eps\
+ 	plateau/closeup.eps\
+ 	plateau/size.eps\
+ 	atomisation/atomisation.gfs\
+ 	atomisation/jet.ogv\
+ 	atomisation/back.ogv\
+ 	atomisation/jet.eps\
+ 	atomisation/jet.png\
+ 	atomisation/back.eps\
+ 	atomisation/back.png\
+ 	atomisation/balance.eps\
++>>>>>>> upstream/20131206+dfsg
  	ship/ship.gfs\
  	ship/closeup.mpg\
  	ship/closeup.eps\
@@@ -290,10 -369,16 +525,23 @@@
  	forcedturbulence/Dissipation.eps\
  	forcedturbulence/Reynolds.eps\
  	forcedturbulence/size.eps\
++<<<<<<< HEAD
 +	garden/garden.gfs\
 +	garden/end.eps\
 +	garden/mesh.eps\
 +	garden/cpu.tex\
++=======
+ 	wingtip/wingtip.gfs\
+ 	wingtip/wingtip.mpg\
+ 	wingtip/wingtip.eps\
+ 	tides/tides.gfs\
+ 	tides/a0.eps\
+ 	tides/amplitude.eps\
+ 	tides/ellipses.eps\
+ 	tides/phase.eps\
+ 	tides/pv.eps\
+ 	tides/residual.eps\
++>>>>>>> upstream/20131206+dfsg
  	dam/dam.gfs\
  	dam/dam.gif\
  	hump/hump.gfs\
@@@ -309,6 -394,10 +557,13 @@@
  	hump/iso-1.8.eps\
  	hump/hump.eps\
  	hump/hump.mpg\
++<<<<<<< HEAD
++=======
+ 	shock/shock.gfs\
+ 	shock/depth.mpg\
+ 	shock/depth.eps\
+ 	shock/mesh.eps\
++>>>>>>> upstream/20131206+dfsg
  	monai/monai.gfs\
  	monai/monai.mpg\
  	monai/monai.eps\
@@@ -342,6 -431,10 +597,13 @@@
  	tsunami/colo.eps\
  	tsunami/gana.eps\
  	tsunami/jason.eps\
++<<<<<<< HEAD
++=======
+ 	garden/garden.gfs\
+ 	garden/end.eps\
+ 	garden/mesh.eps\
+ 	garden/cpu.tex\
++>>>>>>> upstream/20131206+dfsg
  	cyclone/cyclone.gfs\
  	cyclone/hs-12.eps\
  	cyclone/hs-36.eps\
@@@ -352,23 -445,6 +614,29 @@@
  	cyclone/mesh-24.eps\
  	cyclone/mesh-48.eps\
  	cyclone/hsmax.eps\
++<<<<<<< HEAD
 +	cyclone/shifted.eps\
 +	plateau/plateau.gfs\
 +	plateau/plateau.ogv\
 +	plateau/white.ogv\
 +	plateau/closeup.ogv\
 +	plateau/plateau.png\
 +	plateau/white.png\
 +	plateau/closeup.png\
 +	plateau/plateau.eps\
 +	plateau/white.eps\
 +	plateau/closeup.eps\
 +	plateau/size.eps\
 +	atomisation/atomisation.gfs\
 +	atomisation/jet.ogv\
 +	atomisation/back.ogv\
 +	atomisation/jet.eps\
 +	atomisation/jet.png\
 +	atomisation/back.eps\
 +	atomisation/back.png\
 +	atomisation/balance.eps
++=======
+ 	cyclone/shifted.eps
+ 
+ EXAMPLES = cylinder rt boussinesq logo column starting viscmix bubble tangaroa plateau atomisation ship forcedturbulence wingtip tides dam hump shock monai tsunami garden cyclone
++>>>>>>> upstream/20131206+dfsg
diff --cc doc/examples/Makefile.in
index e7301c6,fd380c7..458c869
--- a/doc/examples/Makefile.in
+++ b/doc/examples/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -18,6 -18,23 +27,26 @@@
  
  
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -42,10 -59,8 +71,15 @@@ DIST_COMMON = $(srcdir)/Makefile.am $(s
  noinst_PROGRAMS = classes$(EXEEXT) modules$(EXEEXT)
  subdir = doc/examples
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -53,19 -68,12 +87,28 @@@ CONFIG_HEADER = $(top_builddir)/config.
  CONFIG_CLEAN_FILES = gfs2doc gfs-highlight crossref.sh
  CONFIG_CLEAN_VPATH_FILES =
  PROGRAMS = $(noinst_PROGRAMS)
++<<<<<<< HEAD
 +am_classes_OBJECTS = classes-classes.$(OBJEXT) classes-init.$(OBJEXT)
 +classes_OBJECTS = $(am_classes_OBJECTS)
 +am__DEPENDENCIES_1 =
 +classes_DEPENDENCIES = $(am__DEPENDENCIES_1)
 +classes_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 +	--mode=link $(CCLD) $(classes_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 +	$(LDFLAGS) -o $@
 +am_modules_OBJECTS = modules-modules.$(OBJEXT)
 +modules_OBJECTS = $(am_modules_OBJECTS)
 +modules_DEPENDENCIES = $(am__DEPENDENCIES_1)
 +modules_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 +	--mode=link $(CCLD) $(modules_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 +	$(LDFLAGS) -o $@
++=======
+ classes_SOURCES = classes.c
+ classes_OBJECTS = classes.$(OBJEXT)
+ classes_LDADD = $(LDADD)
+ modules_SOURCES = modules.c
+ modules_OBJECTS = modules.$(OBJEXT)
+ modules_LDADD = $(LDADD)
++>>>>>>> upstream/20131206+dfsg
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
      $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@@ -87,8 -95,13 +130,18 @@@ am__nobase_list = $(am__nobase_strip_se
  am__base_list = \
    sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++<<<<<<< HEAD
 +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" \
 +	"$(DESTDIR)$(pkglibdir)"
++=======
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
+ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"
++>>>>>>> upstream/20131206+dfsg
  SCRIPTS = $(bin_SCRIPTS)
  DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
  depcomp = $(SHELL) $(top_srcdir)/depcomp
@@@ -103,9 -116,14 +156,20 @@@ CCLD = $(CC
  LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
  	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
++<<<<<<< HEAD
 +SOURCES = $(classes_SOURCES) $(modules_SOURCES)
 +DIST_SOURCES = $(classes_SOURCES) $(modules_SOURCES)
 +DATA = $(pkgdata_DATA) $(pkglib_DATA)
++=======
+ SOURCES = classes.c modules.c
+ DIST_SOURCES = classes.c modules.c
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
+ DATA = $(pkgdata_DATA)
++>>>>>>> upstream/20131206+dfsg
  ETAGS = etags
  CTAGS = ctags
  am__tty_colors = \
@@@ -114,18 -132,24 +178,39 @@@ red=; grn=; lgn=; blu=; std
  am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
  am__rst_section = sed 'p;s/./=/g;p;g'
  # Put stdin (possibly several lines separated by ".  ") in a box.
++<<<<<<< HEAD
 +am__text_box = $(AWK) '{				\
 +  n = split($$0, lines, "\\.  "); max = 0;		\
 +  for (i = 1; i <= n; ++i)				\
 +    if (max < length(lines[i]))				\
 +      max = length(lines[i]);				\
 +  for (i = 0; i < max; ++i) line = line "=";		\
 +  print line;						\
 +  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
 +  print line;						\
 +}'
 +# Solaris 10 'make', and several other traditional 'make' implementations,
 +# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
++=======
+ # Prefix each line by 'col' and terminate each with 'std', for coloring.
+ # Multi line coloring is problematic with "less -R", so we really need
+ # to color each line individually.
+ am__text_box = $(AWK) '{			\
+   n = split($$0, lines, "\\.  "); max = 0;	\
+   for (i = 1; i <= n; ++i)			\
+     if (max < length(lines[i]))			\
+       max = length(lines[i]);			\
+   for (i = 0; i < max; ++i)			\
+     line = line "=";				\
+   print col line std;				\
+   for (i = 1; i <= n; ++i)			\
+     if (lines[i])				\
+       print col lines[i] std;			\
+   print col line std;				\
+ }'
+ # Solaris 10 'make', and several other traditional 'make' implementations,
+ # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
++>>>>>>> upstream/20131206+dfsg
  # by disabling -e (using the XSI extension "set +e") if it's set.
  am__sh_e_setup = case $$- in *e*) set +e;; esac
  # To be inserted before the command running the test.  Creates the
@@@ -138,8 -162,9 +223,14 @@@ $(am__sh_e_setup);					
  $(am__vpath_adj_setup) $(am__vpath_adj)			\
  srcdir=$(srcdir); export srcdir;			\
  rm -f $@-t;						\
++<<<<<<< HEAD
 +trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \
 +  1 2 13 15;						\
++=======
+ am__trap='rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st'; \
+ trap "st=129; $$am__trap" 1; trap "st=130; $$am__trap" 2;	\
+ trap "st=141; $$am__trap" 13; trap "st=143; $$am__trap" 15; \
++>>>>>>> upstream/20131206+dfsg
  am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;		\
  test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?;	\
  if test -f "./$$f"; then dir=./;			\
@@@ -147,10 -172,39 +238,46 @@@ elif test -f "$$f"; then dir=;				
  else dir="$(srcdir)/"; fi;				\
  tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;		\
  $(TESTS_ENVIRONMENT)
++<<<<<<< HEAD
 +RECHECK_LOGS = $(TEST_LOGS)
 +AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 +TEST_SUITE_LOG = test-suite.log
 +TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
++=======
+ # To be appended to the command running the test.  Handle the stdout
+ # and stderr redirection, and catch the exit status.
+ am__check_post = \
+ >$@-t 2>&1;						\
+ estatus=$$?;						\
+ if test -n '$(DISABLE_HARD_ERRORS)'			\
+    && test $$estatus -eq 99; then			\
+   estatus=1;						\
+ fi;							\
+ TERM=$$__SAVED_TERM; export TERM;			\
+ $(am__tty_colors);					\
+ xfailed=PASS;						\
+ case " $(XFAIL_TESTS) " in				\
+   *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
+     xfailed=XFAIL;;					\
+ esac;							\
+ case $$estatus.$$xfailed in				\
+     0.XFAIL) col=$$red; res=XPASS;;			\
+     0.*)     col=$$grn; res=PASS ;;			\
+     77.*)    col=$$blu; res=SKIP ;;			\
+     99.*)    col=$$red; res=FAIL ;;			\
+     *.XFAIL) col=$$lgn; res=XFAIL;;			\
+     *.*)     col=$$red; res=FAIL ;;			\
+ esac;							\
+ echo "$${col}$$res$${std}: $$f";			\
+ echo "$$res: $$f (exit: $$estatus)" |			\
+   $(am__rst_section) >$@;				\
+ cat $@-t >>$@;						\
+ rm -f $@-t
+ RECHECK_LOGS = $(TEST_LOGS)
+ AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
+ TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+ TEST_SUITE_LOG = test-suite.log
++>>>>>>> upstream/20131206+dfsg
  TEST_EXTENSIONS = @EXEEXT@ .test
  LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
  am__test_logs1 = $(TESTS:=.log)
@@@ -188,7 -242,10 +315,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -201,8 -258,6 +335,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -225,7 -280,6 +362,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -243,6 -297,9 +383,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -250,6 -307,7 +396,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -276,10 -334,6 +426,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -313,58 -367,45 +466,97 @@@ top_builddir = @top_builddir
  top_srcdir = @top_srcdir@
  use_mpicc = @use_mpicc@
  AUTOMAKE_OPTIONS = parallel-tests
++<<<<<<< HEAD
 +EXAMPLES = \
 +	cylinder \
 +	rt \
 +	boussinesq \
 +	tangaroa \
 +	logo \
 +	column \
 +	tides \
 +	ship \
 +	forcedturbulence \
 +	garden \
 +	dam \
 +	hump \
 +	monai \
 +	tsunami \
 +	cyclone \
 +	plateau \
 +	atomisation
 +
 +WEBROOT = /var/www/gerris
 +EXTRA_DIST = template.tex examples.bib gfs2tex.py gfs2tex depend.py \
 +	test.py Makefile.deps crossref.sh.in gfsxref gfs-mode.el \
 +	modulesyms.sh gfs.sty gfs.hva kaltura.sh gfs.php.sh \
++=======
+ EXTRA_DIST = template.tex gfs2tex.py gfs2tex depend.py test.py \
+ 	Makefile.deps crossref.sh.in gfsxref gfs-mode.el modulesyms.sh \
+ 	gfs.sty gfs.hva kaltura.sh gfs.php.sh $(TESTS) \
++>>>>>>> upstream/20131206+dfsg
  	cylinder/cylinder.gfs cylinder/parallel/parallel.gfs \
  	cylinder/parallel/parallel.sh cylinder/parallel/pid.gfv \
  	cylinder/heated/heated.gfs rt/rt.gfs rt/rt.gfv \
  	boussinesq/boussinesq.gfs boussinesq/boussinesq.gfv \
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs tangaroa/tangaroa.gts \
 +	tangaroa/sections.gfv logo/logo.gfs logo/logo.gfv \
 +	column/column.gfs column/comparison.plot column/column.gfv \
 +	column/grains.tgz column/movie.gfv tides/tides.gfs \
 +	tides/tides.sh tides/bathymetry tides/coefficients \
 +	tides/amplitude.gfv tides/ellipses.gfv tides/phase.gfv \
 +	tides/residual.gfv tides/tides.gfv ship/ship.gfs \
 +	ship/closeup.gfv ship/front.gfv ship/comparison.gfv \
 +	ship/tank-data.png forcedturbulence/forcedturbulence.gfs \
 +	forcedturbulence/spectral.dat forcedturbulence/multiview.gfv \
 +	garden/garden.gfs garden/garden.sh garden/end.gfv \
 +	garden/mesh.gfv dam/dam.gfs dam/dam.plot hump/hump.gfs \
 +	hump/hump.gfv hump/isolines.gfv hump/cells.gfv monai/monai.gfs \
 +	monai/monai.sh monai/3D.gfv monai/leveque.gfv monai/mesh.gfv \
++=======
+ 	logo/logo.gfs logo/logo.gfv column/column.gfs \
+ 	column/comparison.plot column/column.gfv column/grains.tgz \
+ 	column/movie.gfv starting/starting.gfs starting/starting.sh \
+ 	starting/starting.gfv starting/n2414.dat viscmix/viscmix.gfs \
+ 	viscmix/run.sh viscmix/viscmix.gfv bubble/bubble.gfs \
+ 	bubble/bubble.sh bubble/bubble.gfv bubble/cap/cap.gfs \
+ 	bubble/cap/bubble.sh bubble/cap/bubble.gfv \
+ 	tangaroa/tangaroa.gfs tangaroa/tangaroa.gts \
+ 	tangaroa/sections.gfv plateau/plateau.gfs plateau/plateau.gfv \
+ 	plateau/white.gfv plateau/closeup.gfv \
+ 	atomisation/atomisation.gfs atomisation/atomisation.sh \
+ 	atomisation/jet.gfv atomisation/back.gfv ship/ship.gfs \
+ 	ship/closeup.gfv ship/front.gfv ship/comparison.gfv \
+ 	ship/tank-data.png forcedturbulence/forcedturbulence.gfs \
+ 	forcedturbulence/spectral.dat forcedturbulence/multiview.gfv \
+ 	wingtip/wingtip.gfs wingtip/n2414.dat wingtip/wingtip.gfv \
+ 	wingtip/wingtip.sh tides/tides.gfs tides/tides.sh \
+ 	tides/bathymetry tides/coefficients tides/amplitude.gfv \
+ 	tides/ellipses.gfv tides/phase.gfv tides/residual.gfv \
+ 	tides/tides.gfv dam/dam.gfs dam/dam.plot hump/hump.gfs \
+ 	hump/hump.gfv hump/isolines.gfv hump/cells.gfv shock/shock.gfs \
+ 	shock/depth.gfv shock/mesh.gfv monai/monai.gfs monai/monai.sh \
+ 	monai/3D.gfv monai/leveque.gfv monai/mesh.gfv \
++>>>>>>> upstream/20131206+dfsg
  	monai/overhead.gfv monai/probe.gfv tsunami/tsunami.gfs \
  	tsunami/output.gfs tsunami/tsunami.gfv tsunami/h.gfv \
  	tsunami/level.gfv tsunami/hmax.gfv tsunami/hmax-detail.gfv \
  	tsunami/hanires.txt tsunami/diegres.txt tsunami/maleres.txt \
  	tsunami/colores.txt tsunami/ganares.txt tsunami/jason.xy \
++<<<<<<< HEAD
 +	tsunami/jasonres.txt cyclone/cyclone.gfs cyclone/cyclone.gfv \
 +	cyclone/hs.gfv cyclone/mesh.gfv cyclone/shifted.gfv \
 +	plateau/plateau.gfs plateau/plateau.gfv plateau/white.gfv \
 +	plateau/closeup.gfv atomisation/atomisation.gfs \
 +	atomisation/atomisation.sh atomisation/jet.gfv \
 +	atomisation/back.gfv
++=======
+ 	tsunami/jasonres.txt garden/garden.gfs garden/garden.sh \
+ 	garden/end.gfv garden/mesh.gfv cyclone/cyclone.gfs \
+ 	cyclone/cyclone.gfv cyclone/hs.gfv cyclone/mesh.gfv \
+ 	cyclone/shifted.gfv
++>>>>>>> upstream/20131206+dfsg
  bin_SCRIPTS = \
  	gfs2doc gfs-highlight gfsxref
  
@@@ -372,9 -413,11 +564,17 @@@ BUILT_SOURCES = 
  	gfs2doc gfs-highlight gfs.lang gerris.dic gfs-keywords.el gfs.php
  
  CLEANFILES = $(BUILT_SOURCES) Makefile.deps
++<<<<<<< HEAD
 +pkglib_DATA = gfs2tex.py
 +pkgdata_DATA = gfs.lang gerris.dic gfs-keywords.el gfs-mode.el gfs.sty gfs.hva kaltura.sh gfs.php
 +DOC = examples
++=======
+ pkgdata_DATA = gfs2tex.py gfs.lang gerris.dic gfs-keywords.el gfs-mode.el gfs.sty gfs.hva kaltura.sh gfs.php
+ DOC = examples
+ 
+ # we need this for bibtex
+ BIBINPUTS = $(top_srcdir)/doc
++>>>>>>> upstream/20131206+dfsg
  DOCS = \
  	cylinder/cylinder.gfs.html\
  	cylinder/t.mpg\
@@@ -388,41 -431,51 +588,83 @@@
  	rt/vort.mpg\
  	boussinesq/boussinesq.gfs.html\
  	boussinesq/t.mpg\
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs.html\
 +	tangaroa/sections.mpg\
++=======
++>>>>>>> upstream/20131206+dfsg
  	logo/logo.gfs.html\
  	logo/logo.mpg\
  	logo/logo.png\
  	column/column.gfs.html\
  	column/movie.ogv\
++<<<<<<< HEAD
 +	tides/tides.gfs.html\
++=======
+ 	starting/starting.gfs.html\
+ 	starting/starting.mpg\
+ 	viscmix/viscmix.gfs.html\
+ 	viscmix/viscmix.mpg\
+ 	bubble/bubble.gfs.html\
+ 	bubble/cap/cap.gfs.html\
+ 	tangaroa/tangaroa.gfs.html\
+ 	tangaroa/sections.mpg\
+ 	plateau/plateau.gfs.html\
+ 	plateau/plateau.ogv\
+ 	plateau/white.ogv\
+ 	plateau/closeup.ogv\
+ 	plateau/plateau.png\
+ 	plateau/white.png\
+ 	plateau/closeup.png\
+ 	atomisation/atomisation.gfs.html\
+ 	atomisation/jet.ogv\
+ 	atomisation/back.ogv\
+ 	atomisation/jet.png\
+ 	atomisation/back.png\
++>>>>>>> upstream/20131206+dfsg
  	ship/ship.gfs.html\
  	ship/closeup.mpg\
  	forcedturbulence/forcedturbulence.gfs.html\
  	forcedturbulence/multiview.mpg\
++<<<<<<< HEAD
 +	garden/garden.gfs.html\
 +	dam/dam.gfs.html\
 +	hump/hump.gfs.html\
 +	hump/hump.mpg\
++=======
+ 	wingtip/wingtip.gfs.html\
+ 	wingtip/wingtip.mpg\
+ 	tides/tides.gfs.html\
+ 	dam/dam.gfs.html\
+ 	hump/hump.gfs.html\
+ 	hump/hump.mpg\
+ 	shock/shock.gfs.html\
+ 	shock/depth.mpg\
++>>>>>>> upstream/20131206+dfsg
  	monai/monai.gfs.html\
  	monai/monai.mpg\
  	monai/comparison.mp4\
  	tsunami/tsunami.gfs.html\
  	tsunami/h.mpg\
  	tsunami/level.mpg\
++<<<<<<< HEAD
 +	cyclone/cyclone.gfs.html\
 +	plateau/plateau.gfs.html\
 +	plateau/plateau.ogv\
 +	plateau/white.ogv\
 +	plateau/closeup.ogv\
 +	plateau/plateau.png\
 +	plateau/white.png\
 +	plateau/closeup.png\
 +	atomisation/atomisation.gfs.html\
 +	atomisation/jet.ogv\
 +	atomisation/back.ogv\
 +	atomisation/jet.png\
 +	atomisation/back.png\
++=======
+ 	garden/garden.gfs.html\
+ 	cyclone/cyclone.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	cylinder/cylinder.gfs\
  	cylinder/parallel/parallel.gfs\
  	cylinder/parallel/parallel.sh\
@@@ -432,9 -485,6 +674,12 @@@
  	rt/rt.gfv\
  	boussinesq/boussinesq.gfs\
  	boussinesq/boussinesq.gfv\
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs\
 +	tangaroa/tangaroa.gts\
 +	tangaroa/sections.gfv\
++=======
++>>>>>>> upstream/20131206+dfsg
  	logo/logo.gfs\
  	logo/logo.gfv\
  	column/column.gfs\
@@@ -442,6 -492,42 +687,45 @@@
  	column/column.gfv\
  	column/grains.tgz\
  	column/movie.gfv\
++<<<<<<< HEAD
++=======
+ 	starting/starting.gfs\
+ 	starting/starting.sh\
+ 	starting/starting.gfv\
+ 	starting/n2414.dat\
+ 	viscmix/viscmix.gfs\
+ 	viscmix/run.sh\
+ 	viscmix/viscmix.gfv\
+ 	bubble/bubble.gfs\
+ 	bubble/bubble.sh\
+ 	bubble/bubble.gfv\
+ 	bubble/cap/cap.gfs\
+ 	bubble/cap/bubble.sh\
+ 	bubble/cap/bubble.gfv\
+ 	tangaroa/tangaroa.gfs\
+ 	tangaroa/tangaroa.gts\
+ 	tangaroa/sections.gfv\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.gfv\
+ 	plateau/white.gfv\
+ 	plateau/closeup.gfv\
+ 	atomisation/atomisation.gfs\
+ 	atomisation/atomisation.sh\
+ 	atomisation/jet.gfv\
+ 	atomisation/back.gfv\
+ 	ship/ship.gfs\
+ 	ship/closeup.gfv\
+ 	ship/front.gfv\
+ 	ship/comparison.gfv\
+ 	ship/tank-data.png\
+ 	forcedturbulence/forcedturbulence.gfs\
+ 	forcedturbulence/spectral.dat\
+ 	forcedturbulence/multiview.gfv\
+ 	wingtip/wingtip.gfs\
+ 	wingtip/n2414.dat\
+ 	wingtip/wingtip.gfv\
+ 	wingtip/wingtip.sh\
++>>>>>>> upstream/20131206+dfsg
  	tides/tides.gfs\
  	tides/tides.sh\
  	tides/bathymetry\
@@@ -451,24 -537,15 +735,33 @@@
  	tides/phase.gfv\
  	tides/residual.gfv\
  	tides/tides.gfv\
++<<<<<<< HEAD
 +	ship/ship.gfs\
 +	ship/closeup.gfv\
 +	ship/front.gfv\
 +	ship/comparison.gfv\
 +	ship/tank-data.png\
 +	forcedturbulence/forcedturbulence.gfs\
 +	forcedturbulence/spectral.dat\
 +	forcedturbulence/multiview.gfv\
 +	garden/garden.gfs\
 +	garden/garden.sh\
 +	garden/end.gfv\
 +	garden/mesh.gfv\
++=======
++>>>>>>> upstream/20131206+dfsg
  	dam/dam.gfs\
  	dam/dam.plot\
  	hump/hump.gfs\
  	hump/hump.gfv\
  	hump/isolines.gfv\
  	hump/cells.gfv\
++<<<<<<< HEAD
++=======
+ 	shock/shock.gfs\
+ 	shock/depth.gfv\
+ 	shock/mesh.gfv\
++>>>>>>> upstream/20131206+dfsg
  	monai/monai.gfs\
  	monai/monai.sh\
  	monai/3D.gfv\
@@@ -490,50 -567,44 +783,88 @@@
  	tsunami/ganares.txt\
  	tsunami/jason.xy\
  	tsunami/jasonres.txt\
++<<<<<<< HEAD
++=======
+ 	garden/garden.gfs\
+ 	garden/garden.sh\
+ 	garden/end.gfv\
+ 	garden/mesh.gfv\
++>>>>>>> upstream/20131206+dfsg
  	cyclone/cyclone.gfs\
  	cyclone/cyclone.gfv\
  	cyclone/hs.gfv\
  	cyclone/mesh.gfv\
++<<<<<<< HEAD
 +	cyclone/shifted.gfv\
 +	plateau/plateau.gfs\
 +	plateau/plateau.gfv\
 +	plateau/white.gfv\
 +	plateau/closeup.gfv\
 +	atomisation/atomisation.gfs\
 +	atomisation/atomisation.sh\
 +	atomisation/jet.gfv\
 +	atomisation/back.gfv
++=======
+ 	cyclone/shifted.gfv
++>>>>>>> upstream/20131206+dfsg
  
  TESTS = \
  	cylinder.sh\
  	rt.sh\
  	boussinesq.sh\
++<<<<<<< HEAD
 +	tangaroa.sh\
 +	logo.sh\
 +	column.sh\
 +	tides.sh\
 +	ship.sh\
 +	forcedturbulence.sh\
 +	garden.sh\
 +	dam.sh\
 +	hump.sh\
 +	monai.sh\
 +	tsunami.sh\
 +	cyclone.sh\
 +	plateau.sh\
 +	atomisation.sh
 +
 +INCLUDES = -I$(top_srcdir)/src -I$(includedir) -DG_LOG_DOMAIN=\"Gfs-tools\"\
 +            $(GTS_CFLAGS)
 +
 +classes_SOURCES = classes.c $(top_srcdir)/src/init.c
 +classes_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +classes_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src
 +classes_LDADD = $(GFS2D_LIBS)
 +modules_SOURCES = modules.c
 +modules_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +modules_CPPFLAGS = $(INCLUDES)
 +modules_LDADD = $(GFS2D_LIBS)
++=======
+ 	logo.sh\
+ 	column.sh\
+ 	starting.sh\
+ 	viscmix.sh\
+ 	bubble.sh\
+ 	tangaroa.sh\
+ 	plateau.sh\
+ 	atomisation.sh\
+ 	ship.sh\
+ 	forcedturbulence.sh\
+ 	wingtip.sh\
+ 	tides.sh\
+ 	dam.sh\
+ 	hump.sh\
+ 	shock.sh\
+ 	monai.sh\
+ 	tsunami.sh\
+ 	garden.sh\
+ 	cyclone.sh
+ 
+ EXAMPLES = cylinder rt boussinesq logo column starting viscmix bubble tangaroa plateau atomisation ship forcedturbulence wingtip tides dam hump shock monai tsunami garden cyclone
+ INCLUDES = -I$(top_srcdir)/src -I$(includedir) -DG_LOG_DOMAIN=\"Gfs-tools\"\
+             $(GTS_CFLAGS)
+ 
++>>>>>>> upstream/20131206+dfsg
  all: $(BUILT_SOURCES)
  	$(MAKE) $(AM_MAKEFLAGS) all-am
  
@@@ -560,6 -631,7 +891,10 @@@ Makefile: $(srcdir)/Makefile.in $(top_b
  	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  	esac;
++<<<<<<< HEAD
++=======
+ $(srcdir)/Makefile.deps:
++>>>>>>> upstream/20131206+dfsg
  
  $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@@ -584,16 -656,13 +919,26 @@@ clean-noinstPROGRAMS
  	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
  	echo " rm -f" $$list; \
  	rm -f $$list
++<<<<<<< HEAD
 +classes$(EXEEXT): $(classes_OBJECTS) $(classes_DEPENDENCIES) 
 +	@rm -f classes$(EXEEXT)
 +	$(classes_LINK) $(classes_OBJECTS) $(classes_LDADD) $(LIBS)
 +modules$(EXEEXT): $(modules_OBJECTS) $(modules_DEPENDENCIES) 
 +	@rm -f modules$(EXEEXT)
 +	$(modules_LINK) $(modules_OBJECTS) $(modules_LDADD) $(LIBS)
 +install-binSCRIPTS: $(bin_SCRIPTS)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 +	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
++=======
+ install-binSCRIPTS: $(bin_SCRIPTS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@@@ -621,9 -690,7 +966,13 @@@ uninstall-binSCRIPTS
  	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
  	files=`for p in $$list; do echo "$$p"; done | \
  	       sed -e 's,.*/,,;$(transform)'`; \
++<<<<<<< HEAD
 +	test -n "$$list" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(bindir)" && rm -f $$files
++=======
+ 	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
++>>>>>>> upstream/20131206+dfsg
  
  mostlyclean-compile:
  	-rm -f *.$(OBJEXT)
@@@ -631,9 -698,8 +980,14 @@@
  distclean-compile:
  	-rm -f *.tab.c
  
++<<<<<<< HEAD
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/classes-classes.Po at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/classes-init.Po at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/modules-modules.Po at am__quote@
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/classes.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/modules.Po at am__quote@
++>>>>>>> upstream/20131206+dfsg
  
  .c.o:
  @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@@ -656,48 -722,6 +1010,51 @@@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
  
++<<<<<<< HEAD
 +classes-classes.o: classes.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -MT classes-classes.o -MD -MP -MF $(DEPDIR)/classes-classes.Tpo -c -o classes-classes.o `test -f 'classes.c' || echo '$(srcdir)/'`classes.c
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/classes-classes.Tpo $(DEPDIR)/classes-classes.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classes.c' object='classes-classes.o' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -c -o classes-classes.o `test -f 'classes.c' || echo '$(srcdir)/'`classes.c
 +
 +classes-classes.obj: classes.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -MT classes-classes.obj -MD -MP -MF $(DEPDIR)/classes-classes.Tpo -c -o classes-classes.obj `if test -f 'classes.c'; then $(CYGPATH_W) 'classes.c'; else $(CYGPATH_W) '$(srcdir)/classes.c'; fi`
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/classes-classes.Tpo $(DEPDIR)/classes-classes.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classes.c' object='classes-classes.obj' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -c -o classes-classes.obj `if test -f 'classes.c'; then $(CYGPATH_W) 'classes.c'; else $(CYGPATH_W) '$(srcdir)/classes.c'; fi`
 +
 +classes-init.o: $(top_srcdir)/src/init.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -MT classes-init.o -MD -MP -MF $(DEPDIR)/classes-init.Tpo -c -o classes-init.o `test -f '$(top_srcdir)/src/init.c' || echo '$(srcdir)/'`$(top_srcdir)/src/init.c
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/classes-init.Tpo $(DEPDIR)/classes-init.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/init.c' object='classes-init.o' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -c -o classes-init.o `test -f '$(top_srcdir)/src/init.c' || echo '$(srcdir)/'`$(top_srcdir)/src/init.c
 +
 +classes-init.obj: $(top_srcdir)/src/init.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -MT classes-init.obj -MD -MP -MF $(DEPDIR)/classes-init.Tpo -c -o classes-init.obj `if test -f '$(top_srcdir)/src/init.c'; then $(CYGPATH_W) '$(top_srcdir)/src/init.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/init.c'; fi`
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/classes-init.Tpo $(DEPDIR)/classes-init.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/init.c' object='classes-init.obj' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(classes_CPPFLAGS) $(CPPFLAGS) $(classes_CFLAGS) $(CFLAGS) -c -o classes-init.obj `if test -f '$(top_srcdir)/src/init.c'; then $(CYGPATH_W) '$(top_srcdir)/src/init.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/init.c'; fi`
 +
 +modules-modules.o: modules.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(modules_CPPFLAGS) $(CPPFLAGS) $(modules_CFLAGS) $(CFLAGS) -MT modules-modules.o -MD -MP -MF $(DEPDIR)/modules-modules.Tpo -c -o modules-modules.o `test -f 'modules.c' || echo '$(srcdir)/'`modules.c
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/modules-modules.Tpo $(DEPDIR)/modules-modules.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='modules.c' object='modules-modules.o' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(modules_CPPFLAGS) $(CPPFLAGS) $(modules_CFLAGS) $(CFLAGS) -c -o modules-modules.o `test -f 'modules.c' || echo '$(srcdir)/'`modules.c
 +
 +modules-modules.obj: modules.c
 + at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(modules_CPPFLAGS) $(CPPFLAGS) $(modules_CFLAGS) $(CFLAGS) -MT modules-modules.obj -MD -MP -MF $(DEPDIR)/modules-modules.Tpo -c -o modules-modules.obj `if test -f 'modules.c'; then $(CYGPATH_W) 'modules.c'; else $(CYGPATH_W) '$(srcdir)/modules.c'; fi`
 + at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/modules-modules.Tpo $(DEPDIR)/modules-modules.Po
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='modules.c' object='modules-modules.obj' libtool=no @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(modules_CPPFLAGS) $(CPPFLAGS) $(modules_CFLAGS) $(CFLAGS) -c -o modules-modules.obj `if test -f 'modules.c'; then $(CYGPATH_W) 'modules.c'; else $(CYGPATH_W) '$(srcdir)/modules.c'; fi`
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-libtool:
  	-rm -f *.lo
  
@@@ -705,8 -729,11 +1062,16 @@@ clean-libtool
  	-rm -rf .libs _libs
  install-pkgdataDATA: $(pkgdata_DATA)
  	@$(NORMAL_INSTALL)
++<<<<<<< HEAD
 +	test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
 +	@list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
++=======
+ 	@list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; \
@@@ -720,29 -747,7 +1085,33 @@@ uninstall-pkgdataDATA
  	@$(NORMAL_UNINSTALL)
  	@list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
  	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
++<<<<<<< HEAD
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
 +install-pkglibDATA: $(pkglib_DATA)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
 +	@list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
 +	for p in $$list; do \
 +	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 +	  echo "$$d$$p"; \
 +	done | $(am__base_list) | \
 +	while read files; do \
 +	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkglibdir)'"; \
 +	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkglibdir)" || exit $$?; \
 +	done
 +
 +uninstall-pkglibDATA:
 +	@$(NORMAL_UNINSTALL)
 +	@list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
 +	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
++=======
+ 	dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
++>>>>>>> upstream/20131206+dfsg
  
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@@ -796,41 -801,12 +1165,49 @@@ GTAGS
  distclean-tags:
  	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
++<<<<<<< HEAD
 +# To be appended to the command running the test.  Handle the stdout
 +# and stderr redirection, and catch the exit status.
 +am__check_post =					\
 +>$@-t 2>&1;						\
 +estatus=$$?;						\
 +if test -n '$(DISABLE_HARD_ERRORS)'			\
 +   && test $$estatus -eq 99; then			\
 +  estatus=1;						\
 +fi;							\
 +TERM=$$__SAVED_TERM; export TERM;			\
 +$(am__tty_colors);					\
 +xfailed=PASS;						\
 +case " $(XFAIL_TESTS) " in				\
 +  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
 +    xfailed=XFAIL;;					\
 +esac;							\
 +case $$estatus:$$xfailed in				\
 +    0:XFAIL) col=$$red; res=XPASS;;			\
 +    0:*)     col=$$grn; res=PASS ;;			\
 +    77:*)    col=$$blu; res=SKIP ;;			\
 +    99:*)    col=$$red; res=FAIL ;;			\
 +    *:XFAIL) col=$$lgn; res=XFAIL;;			\
 +    *:*)     col=$$red; res=FAIL ;;			\
 +esac;							\
 +echo "$${col}$$res$${std}: $$f";			\
 +echo "$$res: $$f (exit: $$estatus)" |			\
 +  $(am__rst_section) >$@;				\
 +cat $@-t >>$@;						\
 +rm -f $@-t
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  $(TEST_SUITE_LOG): $(TEST_LOGS)
  	@$(am__sh_e_setup);						\
  	list='$(TEST_LOGS)';						\
  	results=`for f in $$list; do					\
++<<<<<<< HEAD
 +		   read line < $$f && echo "$$line" || echo FAIL;	\
++=======
+ 		   test -r $$f && read line < $$f && echo "$$line"	\
+ 		     || echo FAIL;					\
++>>>>>>> upstream/20131206+dfsg
  		 done`;							\
  	all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[	 ]*//'`; \
  	fail=`echo "$$results" | grep -c '^FAIL'`;			\
@@@ -879,7 -855,7 +1256,11 @@@
  	  echo ".. contents:: :depth: 2";				\
  	  echo;								\
  	  for f in $$list; do						\
++<<<<<<< HEAD
 +	    read line < $$f;						\
++=======
+ 	    test -r $$f && read line < $$f || line=;			\
++>>>>>>> upstream/20131206+dfsg
  	    case $$line in						\
  	      PASS:*|XFAIL:*);;						\
  	      *) echo; cat $$f;;					\
@@@ -896,23 -872,37 +1277,57 @@@
  	test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);	\
  	$(am__tty_colors);						\
  	if $$exit; then							\
++<<<<<<< HEAD
 +	  echo $(ECHO_N) "$$grn$(ECHO_C)";				\
 +	 else								\
 +	  echo $(ECHO_N) "$$red$(ECHO_C)";				\
 +	fi;								\
 +	echo "$$msg" | $(am__text_box);					\
 +	echo $(ECHO_N) "$$std$(ECHO_C)";				\
 +	$$exit
 +
 +# Run all the tests.
 +check-TESTS:
 +	@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
 +	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 +	@list='$(TEST_LOGS)';						\
 +	list=`for f in $$list; do					\
 +	  test .log = $$f || echo $$f;					\
 +	done | tr '\012\015' '  '`;					\
 +	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
++=======
+ 	  col="$$grn";							\
+ 	 else								\
+ 	  col="$$red";							\
+ 	fi;								\
+ 	echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";		\
+ 	$$exit || exit 1
+ 
+ check-TESTS recheck:
+ 	@if test $@ != recheck; then \
+ 	   list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list; \
+ 	 fi
+ 	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ 	@list='' list2='$(TEST_LOGS)'; for f in $$list2; do \
+ 	  test .log = $$f && continue; \
+ 	  if test $@ = recheck; then \
+ 	    test -f $$f || continue; \
+ 	    if test -r $$f && read line < $$f; then \
+ 	      case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
+ 	    fi; \
+ 	  fi; \
+ 	  if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
+ 	done; \
+ 	if test $@ = recheck && test -n "$$list"; then \
+ 	  $(am__make_dryrun) || rm -f $$list || exit 1; \
+ 	fi; \
+ 	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+ recheck: 
+ 
+ am--mostlyclean-test-html:
+ 	list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
+ 	rm -f $(TEST_SUITE_HTML)
++>>>>>>> upstream/20131206+dfsg
  
  .log.html:
  	@list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';		\
@@@ -932,56 -922,55 +1347,101 @@@
  # Beware of concurrent executions.  Run "check" not "check-TESTS", as
  # check-SCRIPTS and other dependencies are rebuilt by the former only.
  # And expect check to fail.
++<<<<<<< HEAD
 +check-html:
 +	@if $(MAKE) $(AM_MAKEFLAGS) check; then			\
 +	  rv=0; else rv=$$?;					\
 +	fi;							\
 +	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;	\
 +	exit $$rv
 +recheck recheck-html:
 +	@target=`echo $@ | sed 's,^re,,'`;				\
 +	list='$(TEST_LOGS)';						\
 +	list=`for f in $$list; do					\
 +	        test -f $$f || continue;				\
 +	        if read line < $$f; then				\
 +	          case $$line in FAIL*|XPASS*) echo $$f;; esac;		\
 +	        else echo $$f; fi;					\
 +	      done | tr '\012\015' '  '`;				\
 +	$(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
++=======
+ check-html recheck-html:
+ 	@target=`echo $@ | sed 's/-html$$//'`; \
+ 	rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
+ 	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
+ 	exit $$rv
++>>>>>>> upstream/20131206+dfsg
  cylinder.sh.log: cylinder.sh
  	@p='cylinder.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
  rt.sh.log: rt.sh
  	@p='rt.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
  boussinesq.sh.log: boussinesq.sh
  	@p='boussinesq.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++<<<<<<< HEAD
 +tangaroa.sh.log: tangaroa.sh
 +	@p='tangaroa.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++=======
++>>>>>>> upstream/20131206+dfsg
  logo.sh.log: logo.sh
  	@p='logo.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
  column.sh.log: column.sh
  	@p='column.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++<<<<<<< HEAD
 +tides.sh.log: tides.sh
 +	@p='tides.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++=======
+ starting.sh.log: starting.sh
+ 	@p='starting.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ viscmix.sh.log: viscmix.sh
+ 	@p='viscmix.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ bubble.sh.log: bubble.sh
+ 	@p='bubble.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ tangaroa.sh.log: tangaroa.sh
+ 	@p='tangaroa.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ plateau.sh.log: plateau.sh
+ 	@p='plateau.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ atomisation.sh.log: atomisation.sh
+ 	@p='atomisation.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++>>>>>>> upstream/20131206+dfsg
  ship.sh.log: ship.sh
  	@p='ship.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
  forcedturbulence.sh.log: forcedturbulence.sh
  	@p='forcedturbulence.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++<<<<<<< HEAD
 +garden.sh.log: garden.sh
 +	@p='garden.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++=======
+ wingtip.sh.log: wingtip.sh
+ 	@p='wingtip.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ tides.sh.log: tides.sh
+ 	@p='tides.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++>>>>>>> upstream/20131206+dfsg
  dam.sh.log: dam.sh
  	@p='dam.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
  hump.sh.log: hump.sh
  	@p='hump.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++<<<<<<< HEAD
++=======
+ shock.sh.log: shock.sh
+ 	@p='shock.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++>>>>>>> upstream/20131206+dfsg
  monai.sh.log: monai.sh
  	@p='monai.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
  tsunami.sh.log: tsunami.sh
  	@p='tsunami.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++<<<<<<< HEAD
 +cyclone.sh.log: cyclone.sh
 +	@p='cyclone.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 +plateau.sh.log: plateau.sh
 +	@p='plateau.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 +atomisation.sh.log: atomisation.sh
 +	@p='atomisation.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++=======
+ garden.sh.log: garden.sh
+ 	@p='garden.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ cyclone.sh.log: cyclone.sh
+ 	@p='cyclone.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
++>>>>>>> upstream/20131206+dfsg
  .test.log:
  	@p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
  @am__EXEEXT_TRUE at .test$(EXEEXT).log:
@@@ -1023,7 -1012,7 +1483,11 @@@ check: $(BUILT_SOURCES
  	$(MAKE) $(AM_MAKEFLAGS) check-am
  all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
  installdirs:
++<<<<<<< HEAD
 +	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkglibdir)"; do \
++=======
+ 	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"; do \
++>>>>>>> upstream/20131206+dfsg
  	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
  	done
  install: $(BUILT_SOURCES)
@@@ -1037,14 -1026,18 +1501,29 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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:
 +	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
 +	-test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
 +	-test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML)
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
+ mostlyclean-generic:
+ 	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ 	-test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
++>>>>>>> upstream/20131206+dfsg
  	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
  
  distclean-generic:
@@@ -1084,7 -1077,7 +1563,11 @@@ install-dvi: install-dvi-a
  
  install-dvi-am:
  
++<<<<<<< HEAD
 +install-exec-am: install-binSCRIPTS install-pkglibDATA
++=======
+ install-exec-am: install-binSCRIPTS
++>>>>>>> upstream/20131206+dfsg
  
  install-html: install-html-am
  
@@@ -1113,8 -1106,8 +1596,13 @@@ maintainer-clean-am: distclean-am maint
  
  mostlyclean: mostlyclean-am
  
++<<<<<<< HEAD
 +mostlyclean-am: mostlyclean-compile mostlyclean-generic \
 +	mostlyclean-libtool
++=======
+ mostlyclean-am: am--mostlyclean-test-html mostlyclean-compile \
+ 	mostlyclean-generic mostlyclean-libtool
++>>>>>>> upstream/20131206+dfsg
  
  pdf: pdf-am
  
@@@ -1124,43 -1117,41 +1612,79 @@@ ps: ps-a
  
  ps-am:
  
++<<<<<<< HEAD
 +uninstall-am: uninstall-binSCRIPTS uninstall-pkgdataDATA \
 +	uninstall-pkglibDATA
 +
 +.MAKE: all check check-am check-html install install-am install-strip \
 +	recheck recheck-html
 +
 +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-html \
 +	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-binSCRIPTS \
 +	install-data install-data-am install-dvi install-dvi-am \
 +	install-exec install-exec-am install-html install-html-am \
 +	install-info install-info-am install-man install-pdf \
 +	install-pdf-am install-pkgdataDATA install-pkglibDATA \
 +	install-ps install-ps-am install-strip installcheck \
 +	installcheck-am installdirs maintainer-clean \
 +	maintainer-clean-generic mostlyclean mostlyclean-compile \
 +	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 +	recheck recheck-html tags uninstall uninstall-am \
 +	uninstall-binSCRIPTS uninstall-pkgdataDATA \
 +	uninstall-pkglibDATA
 +
 +
 +gerris.dic: classes modulesyms.sh $(top_srcdir)/modules/Makefile.am modules.list
 +	($(builddir)/classes && sh $(srcdir)/modulesyms.sh $(top_srcdir)/modules $(pkglibdir)) | sort > gerris.dic
++=======
+ uninstall-am: uninstall-binSCRIPTS uninstall-pkgdataDATA
+ 
+ .MAKE: all check check-am check-html install install-am install-strip \
+ 	recheck-html
+ 
+ .PHONY: CTAGS GTAGS all all-am am--mostlyclean-test-html check \
+ 	check-TESTS check-am check-html 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-binSCRIPTS install-data \
+ 	install-data-am install-dvi install-dvi-am install-exec \
+ 	install-exec-am install-html install-html-am install-info \
+ 	install-info-am install-man install-pdf install-pdf-am \
+ 	install-pkgdataDATA install-ps install-ps-am install-strip \
+ 	installcheck installcheck-am installdirs maintainer-clean \
+ 	maintainer-clean-generic mostlyclean mostlyclean-compile \
+ 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ 	recheck recheck-html tags uninstall uninstall-am \
+ 	uninstall-binSCRIPTS uninstall-pkgdataDATA
+ 
+ 
+ gerris.dic: classes modulesyms.sh $(top_srcdir)/modules/Makefile.am modules.list
+ 	($(srcdir)/classes && sh $(srcdir)/modulesyms.sh $(top_srcdir)/modules $(pkglibdir)) | sort > gerris.dic
++>>>>>>> upstream/20131206+dfsg
  
  gfs.lang: gerris.dic
  	echo "# Language file for source-highlight" > gfs.lang
  	echo "# Generated automatically by classes.c" >> gfs.lang
++<<<<<<< HEAD
 +	awk '{ printf ("gfs_keyword = \"%s\"\n", $$1) }' < gerris.dic >> gfs.lang
 +	echo "include \"cpp.lang\"" >> gfs.lang
++=======
+ 	awk '{ printf ("classname = \"%s\"\n", $$1) }' < gerris.dic >> gfs.lang
+ 	echo "include \"/usr/share/source-highlight/cpp.lang\"" >> gfs.lang
++>>>>>>> upstream/20131206+dfsg
  	echo "comment start \"#\"" >> gfs.lang
  	echo "redef preproc = \"C preprocessor command is not compatible with the use of # as comment character in GTS\"" >> gfs.lang
  
  modules.list: modules $(top_srcdir)/modules/Makefile.am
++<<<<<<< HEAD
 +	$(builddir)/modules $(top_srcdir)/modules/*.la $(pkglibdir)/*.so | sort | uniq > modules.list
++=======
+ 	$(srcdir)/modules $(top_srcdir)/modules/*.la $(pkglibdir)/*.so | sort | uniq > modules.list
++>>>>>>> upstream/20131206+dfsg
  
  gfs-keywords.el: gerris.dic modules.list
  	echo "(defvar gfs-abbrevs '(" > gfs-keywords.el
@@@ -1174,7 -1165,7 +1698,11 @@@
  	echo "(provide 'gfs-keywords)" >> gfs-keywords.el
  
  gfs.php: gerris.dic modules.list gfs.php.sh
++<<<<<<< HEAD
 +	sh $(srcdir)/gfs.php.sh > gfs.php
++=======
+ 	sh gfs.php.sh > gfs.php
++>>>>>>> upstream/20131206+dfsg
  
  gfs2doc: gfs2doc.in
  
@@@ -1184,39 -1175,11 +1712,47 @@@ clean-generic
  	$(RM) *.dvi *.aux *.log *.toc *.out examples.tex *.pyc test.sh gfs2doc
  	$(RM) -r examples
  
++<<<<<<< HEAD
 +examples: examples.dvi crossref.sh
 +	hevea -fix $(DOC).tex
 +	imagen -res 600 -extra "pnmscale 0.24" $(DOC)
 +	hacha $(DOC).html
 +	rm -f $(DOC).html
 +	mv -f $(DOC)[0-9][0-9][0-9].png $(DOC)
 +	mv -f *.html $(DOC)
 +	cat $(DOC).css ../share/darcs.css > $(DOC)/$(DOC).css
 +	for f in $(DOC)/*.html; do sh kaltura.sh $$f; done
 +	sh ../share/fixnav.sh $(DOC)
 +	cp -f ../share/contents.png ../share/next.png ../share/prev.png $(DOC)
 +	rm -f *_motif.gif $(DOC).h{tml,aux,ind,toc} $(DOC).image.tex $(DOC).css
 +	sh ./crossref.sh --url=http://gerris.dalembert.upmc.fr/gerris/examples/examples $(EXAMPLES)
 +	mv references examples
 +
 +examples.dvi: examples.tex examples.bib
 +	- latex -interaction=nonstopmode examples.tex > /dev/null 2>&1
 +	bibtex examples
 +	- latex -interaction=nonstopmode examples.tex > /dev/null 2>&1
 +	latex -interaction=nonstopmode examples.tex
 +
 +examples.pdf: examples.dvi
 +	dvips -Ppdf -G0 examples.dvi -o examples.ps
 +	ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true examples.ps examples.pdf
 +	rm -f examples.ps
 +
 +examples.tex: template.tex Makefile.deps gfs2tex gfs2tex.py
 +	rm -r -f examples
 +	python gfs2tex $(EXAMPLES)
 +	sed "s/GFS_VERSION/`$(top_srcdir)/src/gerris2D -V 2>&1 | head -1 | cut -d' ' -f6-`/g" < template.tex | sed 's/\\today/'"`date +\"%B %e, %Y\"`/g" > examples.tex
 +
 +Makefile.deps: depend.py Makefile.am
 +	python depend.py $(EXAMPLES) > Makefile.deps
++=======
+ Makefile.deps: template.tex depend.py Makefile.am
+ 	python depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
+ 	echo "" >> Makefile.deps
+ 	echo -n "EXAMPLES = " >> Makefile.deps
+ 	echo `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` >> Makefile.deps
++>>>>>>> upstream/20131206+dfsg
  
  examples.tex: \
  	cylinder/cylinder.gfs\
@@@ -1244,9 -1207,6 +1780,12 @@@
  	boussinesq/boussinesq.gfs\
  	boussinesq/t.mpg\
  	boussinesq/t.eps\
++<<<<<<< HEAD
 +	tangaroa/tangaroa.gfs\
 +	tangaroa/sections.mpg\
 +	tangaroa/sections.eps\
++=======
++>>>>>>> upstream/20131206+dfsg
  	logo/logo.gfs\
  	logo/logo.mpg\
  	logo/logo.png\
@@@ -1260,13 -1220,38 +1799,48 @@@
  	column/comparison-2.28.eps\
  	column/movie.eps\
  	column/movie.ogv\
++<<<<<<< HEAD
 +	tides/tides.gfs\
 +	tides/a0.eps\
 +	tides/amplitude.eps\
 +	tides/ellipses.eps\
 +	tides/phase.eps\
 +	tides/pv.eps\
 +	tides/residual.eps\
++=======
+ 	starting/starting.gfs\
+ 	starting/starting.mpg\
+ 	starting/starting.eps\
+ 	viscmix/viscmix.gfs\
+ 	viscmix/viscmix.eps\
+ 	viscmix/viscmix.mpg\
+ 	bubble/bubble.gfs\
+ 	bubble/vel.eps\
+ 	bubble/cap/cap.gfs\
+ 	bubble/cap/vel.eps\
+ 	tangaroa/tangaroa.gfs\
+ 	tangaroa/sections.mpg\
+ 	tangaroa/sections.eps\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.ogv\
+ 	plateau/white.ogv\
+ 	plateau/closeup.ogv\
+ 	plateau/plateau.png\
+ 	plateau/white.png\
+ 	plateau/closeup.png\
+ 	plateau/plateau.eps\
+ 	plateau/white.eps\
+ 	plateau/closeup.eps\
+ 	plateau/size.eps\
+ 	atomisation/atomisation.gfs\
+ 	atomisation/jet.ogv\
+ 	atomisation/back.ogv\
+ 	atomisation/jet.eps\
+ 	atomisation/jet.png\
+ 	atomisation/back.eps\
+ 	atomisation/back.png\
+ 	atomisation/balance.eps\
++>>>>>>> upstream/20131206+dfsg
  	ship/ship.gfs\
  	ship/closeup.mpg\
  	ship/closeup.eps\
@@@ -1280,10 -1265,16 +1854,23 @@@
  	forcedturbulence/Dissipation.eps\
  	forcedturbulence/Reynolds.eps\
  	forcedturbulence/size.eps\
++<<<<<<< HEAD
 +	garden/garden.gfs\
 +	garden/end.eps\
 +	garden/mesh.eps\
 +	garden/cpu.tex\
++=======
+ 	wingtip/wingtip.gfs\
+ 	wingtip/wingtip.mpg\
+ 	wingtip/wingtip.eps\
+ 	tides/tides.gfs\
+ 	tides/a0.eps\
+ 	tides/amplitude.eps\
+ 	tides/ellipses.eps\
+ 	tides/phase.eps\
+ 	tides/pv.eps\
+ 	tides/residual.eps\
++>>>>>>> upstream/20131206+dfsg
  	dam/dam.gfs\
  	dam/dam.gif\
  	hump/hump.gfs\
@@@ -1299,6 -1290,10 +1886,13 @@@
  	hump/iso-1.8.eps\
  	hump/hump.eps\
  	hump/hump.mpg\
++<<<<<<< HEAD
++=======
+ 	shock/shock.gfs\
+ 	shock/depth.mpg\
+ 	shock/depth.eps\
+ 	shock/mesh.eps\
++>>>>>>> upstream/20131206+dfsg
  	monai/monai.gfs\
  	monai/monai.mpg\
  	monai/monai.eps\
@@@ -1332,6 -1327,10 +1926,13 @@@
  	tsunami/colo.eps\
  	tsunami/gana.eps\
  	tsunami/jason.eps\
++<<<<<<< HEAD
++=======
+ 	garden/garden.gfs\
+ 	garden/end.eps\
+ 	garden/mesh.eps\
+ 	garden/cpu.tex\
++>>>>>>> upstream/20131206+dfsg
  	cyclone/cyclone.gfs\
  	cyclone/hs-12.eps\
  	cyclone/hs-36.eps\
@@@ -1342,31 -1341,54 +1943,80 @@@
  	cyclone/mesh-24.eps\
  	cyclone/mesh-48.eps\
  	cyclone/hsmax.eps\
++<<<<<<< HEAD
 +	cyclone/shifted.eps\
 +	plateau/plateau.gfs\
 +	plateau/plateau.ogv\
 +	plateau/white.ogv\
 +	plateau/closeup.ogv\
 +	plateau/plateau.png\
 +	plateau/white.png\
 +	plateau/closeup.png\
 +	plateau/plateau.eps\
 +	plateau/white.eps\
 +	plateau/closeup.eps\
 +	plateau/size.eps\
 +	atomisation/atomisation.gfs\
 +	atomisation/jet.ogv\
 +	atomisation/back.ogv\
 +	atomisation/jet.eps\
 +	atomisation/jet.png\
 +	atomisation/back.eps\
 +	atomisation/back.png\
 +	atomisation/balance.eps
++=======
+ 	cyclone/shifted.eps
+ 
+ examples.tex: template.tex Makefile.deps gfs2tex gfs2tex.py
+ 	rm -r -f examples
+ 	python gfs2tex $(EXAMPLES)
+ 	sed -e "s/GFS_VERSION/`$(top_srcdir)/src/gerris2D -V 2>&1 | head -1 | cut -d' ' -f6-`/g" \
+ 	    -e 's/\\test{\(.*\)\/\(.*\)}/\\input{\1\/\2\/\2.tex}/g' \
+ 	    -e 's/\\test{\(.*\)}/\\input{\1\/\1.tex}/g' \
+             -e 's/\\today/'"`date +\"%B %e, %Y\"`/g" < template.tex > examples.tex
+ 
+ examples: examples.dvi crossref.sh
+ 	hevea -fix $(DOC).tex
+ 	imagen -res 600 -extra "pnmscale 0.24" $(DOC)
+ 	hacha $(DOC).html
+ 	rm -f $(DOC).html
+ 	mv -f $(DOC)[0-9][0-9][0-9].png $(DOC)
+ 	mv -f *.html $(DOC)
+ 	cat $(DOC).css ../share/darcs.css > $(DOC)/$(DOC).css
+ 	for f in $(DOC)/*.html; do sh kaltura.sh $$f; done
+ 	sh ../share/fixnav.sh $(DOC)
+ 	cp -f ../share/contents.png ../share/next.png ../share/prev.png $(DOC)
+ 	rm -f *_motif.gif $(DOC).h{tml,aux,ind,toc} $(DOC).image.tex $(DOC).css
+ 	sh ./crossref.sh --url=http://gerris.dalembert.upmc.fr/gerris/examples/examples $(EXAMPLES)
+ 	mv references examples
+ 
+ examples.dvi: examples.tex $(top_srcdir)/doc/gerris.bib
+ 	- latex -interaction=nonstopmode examples.tex > /dev/null 2>&1
+ 	BIBINPUTS=$(BIBINPUTS) bibtex examples
+ 	- latex -interaction=nonstopmode examples.tex > /dev/null 2>&1
+ 	latex -interaction=nonstopmode examples.tex
+ 
+ examples.pdf: examples.dvi
+ 	dvips -Ppdf -G0 examples.dvi -o examples.ps
+ 	ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true examples.ps examples.pdf
+ 	rm -f examples.ps
++>>>>>>> upstream/20131206+dfsg
  
  examples.tar.gz: examples.pdf examples $(DOCS)
  	tar czf examples.tar.gz examples $(DOCS)
  	rm -r -f examples
  
++<<<<<<< HEAD
++=======
+ classes: classes.c $(top_srcdir)/src/init.c
+ 	$(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(INCLUDES) -DFTT_2D=1 \
+ 	classes.c -o classes $(GFS2D_LIBS)
+ 
+ modules: modules.c
+ 	$(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(INCLUDES) -DFTT_2D=1 \
+ 	modules.c -o modules $(GFS2D_LIBS)
+ 
++>>>>>>> upstream/20131206+dfsg
  publish: examples.tar.gz
  	cp examples.tar.gz $(WEBROOT)/examples
  	cd $(WEBROOT)/examples && tar xzf examples.tar.gz && rm -f examples.tar.gz
diff --cc doc/examples/column/column.gfs
index cb57309,f4fbd6c..94b5d92
--- a/doc/examples/column/column.gfs
+++ b/doc/examples/column/column.gfs
@@@ -100,7 -100,6 +100,10 @@@ Define LEVEL 1
      Time { end = 5.8 dtmax = 1e-2 }
  
      # We need to tune the solver
++<<<<<<< HEAD
 +    AdvectionParams { gc = 1 }
++=======
++>>>>>>> upstream/20131206+dfsg
      ApproxProjectionParams { tolerance = 1e-4 }
      ProjectionParams { tolerance = 1e-4 }
  
diff --cc doc/examples/dam/dam.gfs
index d01264a,29959d5..260a433
--- a/doc/examples/dam/dam.gfs
+++ b/doc/examples/dam/dam.gfs
@@@ -28,11 -28,10 +28,18 @@@
  # Use the GfsRiver Saint-Venant solver
  1 0 GfsRiver GfsBox GfsGEdge {} {
      PhysicalParams { L = 8. }
++<<<<<<< HEAD
 +    RefineSolid 9
 +
 +    # Set a solid boundary close to the top boundary to limit the
 +    # domain width to one cell (i.e. a 1D domain)
 +    Solid (y - 3.9999)
++=======
+     
+     # Define a 1D domain using cell masking
+     RefineSurface 9 (y - 8.*(0.5 - 1./512.))
+     InitMask {} (y < 8.*(0.5 - 1./512.))
++>>>>>>> upstream/20131206+dfsg
  
      # Set the topography Zb and the initial water surface elevation P
      Init {} {
diff --cc doc/examples/depend.py
index 42ab4f9,0e46ee9..e2f7139
--- a/doc/examples/depend.py
+++ b/doc/examples/depend.py
@@@ -32,8 -35,8 +35,10 @@@ for start in sys.argv[1:]
  
  print "DOCS = " + docs + dists
  print ""
- print "EXTRA_DIST += " + dists
+ print "TESTS = " + tests
+ print ""
+ print "EXTRA_DIST += $(TESTS)" + dists
  print ""
 +print "TESTS = " + tests
 +print ""
  print "examples.tex: " + depends
diff --cc doc/examples/plateau/plateau.gfs
index 1181cad,a32ecac..cc03ce8
--- a/doc/examples/plateau/plateau.gfs
+++ b/doc/examples/plateau/plateau.gfs
@@@ -58,7 -58,7 +58,11 @@@
  # (2009), Journal of Computational Physics, 228.
  #
  # Author: St\'ephane Popinet
++<<<<<<< HEAD
 +# Command: gerris3D -m plateau.gfs | gfsview-batch3D
++=======
+ # Command: gerris3D -m plateau.gfs
++>>>>>>> upstream/20131206+dfsg
  # Version: 100529
  # Required files: plateau.gfv white.gfv closeup.gfv
  # Running time: 2 hours
@@@ -124,23 -124,16 +128,36 @@@ Define MUR(T)           VAR(T, MU_G/MU_
      EventScript { istep = 1000 } { gzip -f -q plateau-*.gfs }
  
      # Generate three movies on the fly
++<<<<<<< HEAD
 +    EventScript { start = 0 } {
 +	movies="plateau closeup white"
 +	rm -f $movies
 +	mkfifo $movies
 +	for movie in $movies; do
 +	    ppm2theora -s 480x480 < $movie > $movie.ogv &
 +	done
 +    }
 +    OutputSimulation { istep = 7 } stdout
 +    EventScript { istep = 7 } {
 +	movies="plateau closeup white"
 +	for movie in $movies; do
 +	    echo "Clear"
 +	    cat $movie.gfv
 +	    echo "Append $movie { width = 960 height = 960 }"
 +	done
 +    }
++=======
+     GModule gfsview
+     OutputView { istep = 7 } { ppm2theora -s 480x480 > plateau.ogv } { 
+     	width = 960 height = 960 
+     } plateau.gfv
+     OutputView { istep = 7 } { ppm2theora -s 480x480 > closeup.ogv } { 
+     	width = 960 height = 960 
+     } closeup.gfv
+     OutputView { istep = 7 } { ppm2theora -s 480x480 > white.ogv } { 
+     	width = 960 height = 960 
+     } white.gfv
++>>>>>>> upstream/20131206+dfsg
  
      # Generate figures
      EventScript { start = end } {
diff --cc doc/examples/template.tex
index 1b98e2b,e83dc6a..ace038c
--- a/doc/examples/template.tex
+++ b/doc/examples/template.tex
@@@ -41,21 -41,25 +41,43 @@@ The usefulness and quality of this docu
  
  \section{2D}
  
++<<<<<<< HEAD
 +\input{cylinder/cylinder.tex}
 +\input{cylinder/heated/heated.tex}
 +\input{cylinder/parallel/parallel.tex}
 +\input{rt/rt.tex}
 +\input{boussinesq/boussinesq.tex}
 +\input{logo/logo.tex}
 +\input{column/column.tex}
 +
 +\section{3D}
 +
 +\input{tangaroa/tangaroa.tex}
 +\input{plateau/plateau.tex}
 +\input{atomisation/atomisation.tex}
 +\input{ship/ship.tex}
 +\input{forcedturbulence/forcedturbulence.tex}
++=======
+ \test{cylinder}
+ \test{cylinder/heated}
+ \test{cylinder/parallel}
+ \test{rt}
+ \test{boussinesq}
+ \test{logo}
+ \test{column}
+ \test{starting}
+ \test{viscmix}
+ \test{bubble}
+ 
+ \section{3D}
+ 
+ \test{tangaroa}
+ \test{plateau}
+ \test{atomisation}
+ \test{ship}
+ \test{forcedturbulence}
+ \test{wingtip}
++>>>>>>> upstream/20131206+dfsg
  
  \section{Shallow-water}
  
@@@ -63,15 -67,16 +85,28 @@@
  
  \section{Saint-Venant (non-linear shallow-water)}
  
++<<<<<<< HEAD
 +\input{dam/dam.tex}
 +\input{hump/hump.tex}
 +\input{monai/monai.tex}
 +\input{tsunami/tsunami.tex}
 +
 +\section{Waves}
 +
 +\input{garden/garden.tex}
 +\input{cyclone/cyclone.tex}
++=======
+ \test{dam}
+ \test{hump}
+ \test{shock}
+ \test{monai}
+ \test{tsunami}
+ 
+ \section{Waves}
+ 
+ \test{garden}
+ \test{cyclone}
++>>>>>>> upstream/20131206+dfsg
  
  \section{\label{howto}How to write examples}
  
@@@ -108,6 -113,6 +143,10 @@@ Note that this script requires \footahr
  \end{enumerate}
  
  \bibliographystyle{plain}
++<<<<<<< HEAD
 +\bibliography{examples}
++=======
+ \bibliography{gerris}
++>>>>>>> upstream/20131206+dfsg
  
  \end{document}
diff --cc doc/manpages/Makefile.in
index 2e07ae4,34cea53..39f997c
--- a/doc/manpages/Makefile.in
+++ b/doc/manpages/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -15,6 -15,23 +24,26 @@@
  
  @SET_MAKE@
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -37,10 -54,8 +66,15 @@@ subdir = doc/manpage
  DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
  	$(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -49,6 -64,11 +83,14 @@@ CONFIG_CLEAN_FILES 
  CONFIG_CLEAN_VPATH_FILES =
  SOURCES =
  DIST_SOURCES =
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
      $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@@ -70,6 -90,12 +112,15 @@@ am__nobase_list = $(am__nobase_strip_se
  am__base_list = \
    sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++<<<<<<< HEAD
++=======
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
++>>>>>>> upstream/20131206+dfsg
  man1dir = $(mandir)/man1
  am__installdirs = "$(DESTDIR)$(man1dir)"
  NROFF = nroff
@@@ -103,7 -129,10 +154,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -116,8 -145,6 +174,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -140,7 -167,6 +201,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -158,6 -184,9 +222,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -165,6 -194,7 +235,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -191,10 -221,6 +265,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -291,11 -317,18 +368,26 @@@ clean-libtool
  	-rm -rf .libs _libs
  install-man1: $(dist_man_MANS)
  	@$(NORMAL_INSTALL)
++<<<<<<< HEAD
 +	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
 +	@list=''; test -n "$(man1dir)" || exit 0; \
 +	{ for i in $$list; do echo "$$i"; done; \
 +	l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
 +	  sed -n '/\.1[a-z]*$$/p'; \
++=======
+ 	@list1=''; \
+ 	list2='$(dist_man_MANS)'; \
+ 	test -n "$(man1dir)" \
+ 	  && test -n "`echo $$list1$$list2`" \
+ 	  || exit 0; \
+ 	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ 	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ 	{ for i in $$list1; do echo "$$i"; done;  \
+ 	if test -n "$$list2"; then \
+ 	  for i in $$list2; do echo "$$i"; done \
+ 	    | sed -n '/\.1[a-z]*$$/p'; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	} | while read p; do \
  	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; echo "$$p"; \
@@@ -324,9 -357,7 +416,13 @@@ uninstall-man1
  	  sed -n '/\.1[a-z]*$$/p'; \
  	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
  	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
++<<<<<<< HEAD
 +	test -z "$$files" || { \
 +	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
 +	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
++=======
+ 	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
++>>>>>>> upstream/20131206+dfsg
  tags: TAGS
  TAGS:
  
@@@ -394,10 -425,15 +490,22 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
diff --cc doc/tutorial/Makefile.in
index 4a48de9,892531a..f90ab33
--- a/doc/tutorial/Makefile.in
+++ b/doc/tutorial/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -15,6 -15,23 +24,26 @@@
  
  @SET_MAKE@
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -36,10 -53,8 +65,15 @@@ host_triplet = @host
  subdir = doc/tutorial
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -48,6 -63,11 +82,14 @@@ CONFIG_CLEAN_FILES 
  CONFIG_CLEAN_VPATH_FILES =
  SOURCES =
  DIST_SOURCES =
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  ACLOCAL = @ACLOCAL@
  AMTAR = @AMTAR@
@@@ -77,7 -97,10 +119,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -90,8 -113,6 +139,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -114,7 -135,6 +166,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -132,6 -152,9 +187,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -139,6 -162,7 +200,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -165,10 -189,6 +230,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -293,10 -313,15 +361,22 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  distclean-generic:
diff --cc install-sh
index 6781b98,a9244eb..9808832
--- a/install-sh
+++ b/install-sh
@@@ -1,7 -1,7 +1,11 @@@
  #!/bin/sh
  # install - install a program, script, or datafile
  
++<<<<<<< HEAD
 +scriptversion=2009-04-28.21; # UTC
++=======
+ scriptversion=2011-01-19.21; # UTC
++>>>>>>> upstream/20131206+dfsg
  
  # This originates from X11R5 (mit/util/scripts/install.sh), which was
  # later released in X11R6 (xc/config/util/install.sh) with the
@@@ -156,6 -156,10 +160,13 @@@ while test $# -ne 0; d
      -s) stripcmd=$stripprog;;
  
      -t) dst_arg=$2
++<<<<<<< HEAD
++=======
+ 	# Protect names problematic for `test' and other utilities.
+ 	case $dst_arg in
+ 	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ 	esac
++>>>>>>> upstream/20131206+dfsg
  	shift;;
  
      -T) no_target_directory=true;;
@@@ -186,6 -190,10 +197,13 @@@ if test $# -ne 0 && test -z "$dir_arg$d
      fi
      shift # arg
      dst_arg=$arg
++<<<<<<< HEAD
++=======
+     # Protect names problematic for `test' and other utilities.
+     case $dst_arg in
+       -* | [=\(\)!]) dst_arg=./$dst_arg;;
+     esac
++>>>>>>> upstream/20131206+dfsg
    done
  fi
  
@@@ -200,7 -208,11 +218,15 @@@ if test $# -eq 0; the
  fi
  
  if test -z "$dir_arg"; then
++<<<<<<< HEAD
 +  trap '(exit $?); exit' 1 2 13 15
++=======
+   do_exit='(exit $ret); exit $ret'
+   trap "ret=129; $do_exit" 1
+   trap "ret=130; $do_exit" 2
+   trap "ret=141; $do_exit" 13
+   trap "ret=143; $do_exit" 15
++>>>>>>> upstream/20131206+dfsg
  
    # Set umask so as not to create temps with too-generous modes.
    # However, 'strip' requires both read and write access to temps.
@@@ -228,9 -240,9 +254,15 @@@ f
  
  for src
  do
++<<<<<<< HEAD
 +  # Protect names starting with `-'.
 +  case $src in
 +    -*) src=./$src;;
++=======
+   # Protect names problematic for `test' and other utilities.
+   case $src in
+     -* | [=\(\)!]) src=./$src;;
++>>>>>>> upstream/20131206+dfsg
    esac
  
    if test -n "$dir_arg"; then
@@@ -252,12 -264,7 +284,16 @@@
        echo "$0: no destination specified." >&2
        exit 1
      fi
++<<<<<<< HEAD
 +
 +    dst=$dst_arg
 +    # Protect names starting with `-'.
 +    case $dst in
 +      -*) dst=./$dst;;
 +    esac
++=======
+     dst=$dst_arg
++>>>>>>> upstream/20131206+dfsg
  
      # If destination is a directory, append the input filename; won't work
      # if double slashes aren't ignored.
@@@ -385,7 -392,7 +421,11 @@@
  
        case $dstdir in
  	/*) prefix='/';;
++<<<<<<< HEAD
 +	-*) prefix='./';;
++=======
+ 	[-=\(\)!]*) prefix='./';;
++>>>>>>> upstream/20131206+dfsg
  	*)  prefix='';;
        esac
  
@@@ -403,7 -410,7 +443,11 @@@
  
        for d
        do
++<<<<<<< HEAD
 +	test -z "$d" && continue
++=======
+ 	test X"$d" = X && continue
++>>>>>>> upstream/20131206+dfsg
  
  	prefix=$prefix$d
  	if test -d "$prefix"; then
diff --cc ltmain.sh
index 3061e3c,33f642a..e6e86fd
mode 100755,100644..100755
--- a/ltmain.sh
+++ b/ltmain.sh
@@@ -1,9 -1,9 +1,17 @@@
  
++<<<<<<< HEAD
 +# libtool (GNU libtool) 2.4
 +# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 +
 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
 +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
++=======
+ # libtool (GNU libtool) 2.4.2
+ # Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+ 
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+ # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # This is free software; see the source for copying conditions.  There is NO
  # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  
@@@ -41,6 -41,7 +49,10 @@@
  #       --quiet, --silent    don't print informational messages
  #       --no-quiet, --no-silent
  #                            print informational messages (default)
++<<<<<<< HEAD
++=======
+ #       --no-warn            don't display warning messages
++>>>>>>> upstream/20131206+dfsg
  #       --tag=TAG            use configuration variables from tag TAG
  #   -v, --verbose            print more informational messages than default
  #       --no-verbose         don't print the extra informational messages
@@@ -69,7 -70,7 +81,11 @@@
  #         compiler:		$LTCC
  #         compiler flags:		$LTCFLAGS
  #         linker:		$LD (gnu? $with_gnu_ld)
++<<<<<<< HEAD
 +#         $progname:	(GNU libtool) 2.4
++=======
+ #         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.1
++>>>>>>> upstream/20131206+dfsg
  #         automake:	$automake_version
  #         autoconf:	$autoconf_version
  #
@@@ -79,9 -80,9 +95,15 @@@
  
  PROGRAM=libtool
  PACKAGE=libtool
++<<<<<<< HEAD
 +VERSION=2.4
 +TIMESTAMP=""
 +package_revision=1.3293
++=======
+ VERSION="2.4.2 Debian-2.4.2-1.1"
+ TIMESTAMP=""
+ package_revision=1.3337
++>>>>>>> upstream/20131206+dfsg
  
  # Be Bourne compatible
  if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@@ -136,15 -137,10 +158,21 @@@ progpath="$0
  
  : ${CP="cp -f"}
  test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
++<<<<<<< HEAD
 +: ${EGREP="grep -E"}
 +: ${FGREP="grep -F"}
 +: ${GREP="grep"}
 +: ${LN_S="ln -s"}
++=======
++>>>>>>> upstream/20131206+dfsg
  : ${MAKE="make"}
  : ${MKDIR="mkdir"}
  : ${MV="mv -f"}
  : ${RM="rm -f"}
++<<<<<<< HEAD
 +: ${SED="sed"}
++=======
++>>>>>>> upstream/20131206+dfsg
  : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
  : ${Xsed="$SED -e 1s/^X//"}
  
@@@ -387,7 -383,7 +415,11 @@@ case $progpath i
       ;;
    *)
       save_IFS="$IFS"
++<<<<<<< HEAD
 +     IFS=:
++=======
+      IFS=${PATH_SEPARATOR-:}
++>>>>>>> upstream/20131206+dfsg
       for progdir in $PATH; do
         IFS="$save_IFS"
         test -x "$progdir/$progname" && break
@@@ -771,8 -767,8 +803,13 @@@ func_help (
  	s*\$LTCFLAGS*'"$LTCFLAGS"'*
  	s*\$LD*'"$LD"'*
  	s/\$with_gnu_ld/'"$with_gnu_ld"'/
++<<<<<<< HEAD
 +	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
 +	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
++=======
+ 	s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ 	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
++>>>>>>> upstream/20131206+dfsg
  	p
  	d
       }
@@@ -1052,6 -1048,7 +1089,10 @@@ opt_finish=fals
  opt_help=false
  opt_help_all=false
  opt_silent=:
++<<<<<<< HEAD
++=======
+ opt_warning=:
++>>>>>>> upstream/20131206+dfsg
  opt_verbose=:
  opt_silent=false
  opt_verbose=false
@@@ -1120,6 -1117,10 +1161,13 @@@ esa
  			opt_silent=false
  func_append preserve_args " $opt"
  			;;
++<<<<<<< HEAD
++=======
+       --no-warning|--no-warn)
+ 			opt_warning=false
+ func_append preserve_args " $opt"
+ 			;;
++>>>>>>> upstream/20131206+dfsg
        --no-verbose)
  			opt_verbose=false
  func_append preserve_args " $opt"
@@@ -2059,7 -2060,7 +2107,11 @@@ func_mode_compile (
      *.[cCFSifmso] | \
      *.ada | *.adb | *.ads | *.asm | \
      *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
++<<<<<<< HEAD
 +    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
++=======
+     *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
++>>>>>>> upstream/20131206+dfsg
        func_xform "$libobj"
        libobj=$func_xform_result
        ;;
@@@ -3201,11 -3202,13 +3253,20 @@@ func_mode_install (
  
        # Set up the ranlib parameters.
        oldlib="$destdir/$name"
++<<<<<<< HEAD
++=======
+       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+       tool_oldlib=$func_to_tool_file_result
++>>>>>>> upstream/20131206+dfsg
  
        func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
  
        if test -n "$stripme" && test -n "$old_striplib"; then
++<<<<<<< HEAD
 +	func_show_eval "$old_striplib $oldlib" 'exit $?'
++=======
+ 	func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
++>>>>>>> upstream/20131206+dfsg
        fi
  
        # Do each command in the postinstall commands.
@@@ -3470,7 -3473,7 +3531,11 @@@ static const void *lt_preloaded_setup(
  	  # 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.
++<<<<<<< HEAD
 +	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
++=======
+ 	  *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
++>>>>>>> upstream/20131206+dfsg
  	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
  	  *-*-hpux*)
  	    pic_flag_for_symtable=" $pic_flag"  ;;
@@@ -3982,14 -3985,17 +4047,28 @@@ func_exec_program_core (
  # launches target application with the remaining arguments.
  func_exec_program ()
  {
++<<<<<<< HEAD
 +  for lt_wr_arg
 +  do
 +    case \$lt_wr_arg in
 +    --lt-*) ;;
 +    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
 +    esac
 +    shift
 +  done
++=======
+   case \" \$* \" in
+   *\\ --lt-*)
+     for lt_wr_arg
+     do
+       case \$lt_wr_arg in
+       --lt-*) ;;
+       *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+       esac
+       shift
+     done ;;
+   esac
++>>>>>>> upstream/20131206+dfsg
    func_exec_program_core \${1+\"\$@\"}
  }
  
@@@ -5057,9 -5063,15 +5136,21 @@@ void lt_dump_script (FILE* f
  {
  EOF
  	    func_emit_wrapper yes |
++<<<<<<< HEAD
 +              $SED -e 's/\([\\"]\)/\\\1/g' \
 +	           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
 +
++=======
+ 	      $SED -n -e '
+ s/^\(.\{79\}\)\(..*\)/\1\
+ \2/
+ h
+ s/\([\\"]\)/\\\1/g
+ s/$/\\n/
+ s/\([^\n]*\).*/  fputs ("\1", f);/p
+ g
+ D'
++>>>>>>> upstream/20131206+dfsg
              cat <<"EOF"
  }
  EOF
@@@ -5643,7 -5655,8 +5734,12 @@@ func_mode_link (
  	continue
  	;;
  
++<<<<<<< HEAD
 +      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
++=======
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+       |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
++>>>>>>> upstream/20131206+dfsg
  	func_append compiler_flags " $arg"
  	func_append compile_command " $arg"
  	func_append finalize_command " $arg"
@@@ -6111,7 -6124,10 +6207,14 @@@
  	case $pass in
  	dlopen) libs="$dlfiles" ;;
  	dlpreopen) libs="$dlprefiles" ;;
++<<<<<<< HEAD
 +	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
++=======
+ 	link)
+ 	  libs="$deplibs %DEPLIBS%"
+ 	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	esac
        fi
        if test "$linkmode,$pass" = "lib,dlpreopen"; then
@@@ -6147,7 -6163,8 +6250,12 @@@
  	lib=
  	found=no
  	case $deplib in
++<<<<<<< HEAD
 +	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
++=======
+ 	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+         |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
++>>>>>>> upstream/20131206+dfsg
  	  if test "$linkmode,$pass" = "prog,link"; then
  	    compile_deplibs="$deplib $compile_deplibs"
  	    finalize_deplibs="$deplib $finalize_deplibs"
@@@ -6430,19 -6447,19 +6538,35 @@@
  	    # It is a libtool convenience library, so add in its objects.
  	    func_append convenience " $ladir/$objdir/$old_library"
  	    func_append old_convenience " $ladir/$objdir/$old_library"
++<<<<<<< HEAD
 +	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
 +	    func_fatal_error "\`$lib' is not a convenience library"
 +	  fi
 +	  tmp_libs=
 +	  for deplib in $dependency_libs; do
 +	    deplibs="$deplib $deplibs"
 +	    if $opt_preserve_dup_deps ; then
 +	      case "$tmp_libs " in
 +	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 +	      esac
 +	    fi
 +	    func_append tmp_libs " $deplib"
 +	  done
++=======
+ 	    tmp_libs=
+ 	    for deplib in $dependency_libs; do
+ 	      deplibs="$deplib $deplibs"
+ 	      if $opt_preserve_dup_deps ; then
+ 		case "$tmp_libs " in
+ 		*" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ 		esac
+ 	      fi
+ 	      func_append tmp_libs " $deplib"
+ 	    done
+ 	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ 	    func_fatal_error "\`$lib' is not a convenience library"
+ 	  fi
++>>>>>>> upstream/20131206+dfsg
  	  continue
  	fi # $pass = conv
  
@@@ -6831,7 -6848,7 +6955,11 @@@
  	         test "$hardcode_direct_absolute" = no; then
  		add="$dir/$linklib"
  	      elif test "$hardcode_minus_L" = yes; then
++<<<<<<< HEAD
 +		add_dir="-L$dir"
++=======
+ 		add_dir="-L$absdir"
++>>>>>>> upstream/20131206+dfsg
  		# Try looking first in the location we're being installed to.
  		if test -n "$inst_prefix_dir"; then
  		  case $libdir in
@@@ -7316,6 -7333,7 +7444,10 @@@
  	  # which has an extra 1 added just for fun
  	  #
  	  case $version_type in
++<<<<<<< HEAD
++=======
+ 	  # correct linux to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
  	  darwin|linux|osf|windows|none)
  	    func_arith $number_major + $number_minor
  	    current=$func_arith_result
@@@ -7334,6 -7352,9 +7466,12 @@@
  	    revision="$number_minor"
  	    lt_irix_increment=no
  	    ;;
++<<<<<<< HEAD
++=======
+ 	  *)
+ 	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+ 	    ;;
++>>>>>>> upstream/20131206+dfsg
  	  esac
  	  ;;
  	no)
@@@ -7432,7 -7453,7 +7570,11 @@@
  	  versuffix="$major.$revision"
  	  ;;
  
++<<<<<<< HEAD
 +	linux)
++=======
+ 	linux) # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
  	  func_arith $current - $age
  	  major=.$func_arith_result
  	  versuffix="$major.$age.$revision"
@@@ -8020,6 -8041,11 +8162,14 @@@ EO
  
        # Test again, we may have decided not to build it any more
        if test "$build_libtool_libs" = yes; then
++<<<<<<< HEAD
++=======
+ 	# Remove ${wl} instances when linking with ld.
+ 	# FIXME: should test the right _cmds variable.
+ 	case $archive_cmds in
+ 	  *\$LD\ *) wl= ;;
+         esac
++>>>>>>> upstream/20131206+dfsg
  	if test "$hardcode_into_libs" = yes; then
  	  # Hardcode the library paths
  	  hardcode_libdirs=
@@@ -8050,7 -8076,7 +8200,11 @@@
  	    elif test -n "$runpath_var"; then
  	      case "$perm_rpath " in
  	      *" $libdir "*) ;;
++<<<<<<< HEAD
 +	      *) func_apped perm_rpath " $libdir" ;;
++=======
+ 	      *) func_append perm_rpath " $libdir" ;;
++>>>>>>> upstream/20131206+dfsg
  	      esac
  	    fi
  	  done
@@@ -8058,11 -8084,7 +8212,15 @@@
  	  if test -n "$hardcode_libdir_separator" &&
  	     test -n "$hardcode_libdirs"; then
  	    libdir="$hardcode_libdirs"
++<<<<<<< HEAD
 +	    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
++=======
+ 	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
++>>>>>>> upstream/20131206+dfsg
  	  fi
  	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
  	    # We should set the runpath_var.
@@@ -9152,6 -9174,8 +9310,11 @@@
  	    esac
  	  done
  	fi
++<<<<<<< HEAD
++=======
+ 	func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ 	tool_oldlib=$func_to_tool_file_result
++>>>>>>> upstream/20131206+dfsg
  	eval cmds=\"$old_archive_cmds\"
  
  	func_len " $cmds"
@@@ -9261,7 -9285,8 +9424,12 @@@
  	      *.la)
  		func_basename "$deplib"
  		name="$func_basename_result"
++<<<<<<< HEAD
 +		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++=======
+ 		func_resolve_sysroot "$deplib"
+ 		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
++>>>>>>> upstream/20131206+dfsg
  		test -z "$libdir" && \
  		  func_fatal_error "\`$deplib' is not a valid libtool archive"
  		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
diff --cc m4/libtool.m4
index d812584,534d1cc..4086866
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@@ -1,8 -1,8 +1,13 @@@
  # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++<<<<<<< HEAD
 +#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 +#                 Inc.
++=======
+ #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ #                 Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #   Written by Gordon Matzigkeit, 1996
  #
  # This file is free software; the Free Software Foundation gives
@@@ -11,8 -11,8 +16,13 @@@
  
  m4_define([_LT_COPYING], [dnl
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
++<<<<<<< HEAD
 +#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 +#                 Inc.
++=======
+ #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ #                 Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
@@@ -146,6 -146,8 +156,11 @@@ AC_REQUIRE([AC_CANONICAL_BUILD])dn
  AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  
++<<<<<<< HEAD
++=======
+ _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+ dnl
++>>>>>>> upstream/20131206+dfsg
  _LT_DECL([], [host_alias], [0], [The host system])dnl
  _LT_DECL([], [host], [0])dnl
  _LT_DECL([], [host_os], [0])dnl
@@@ -637,7 -639,7 +652,11 @@@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE
  m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  configured by $[0], generated by m4_PACKAGE_STRING.
  
++<<<<<<< HEAD
 +Copyright (C) 2010 Free Software Foundation, Inc.
++=======
+ Copyright (C) 2011 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  This config.lt script is free software; the Free Software Foundation
  gives unlimited permision to copy, distribute and modify it."
  
@@@ -801,6 -803,7 +820,10 @@@ AC_DEFUN([LT_LANG]
  m4_case([$1],
    [C],			[_LT_LANG(C)],
    [C++],		[_LT_LANG(CXX)],
++<<<<<<< HEAD
++=======
+   [Go],			[_LT_LANG(GO)],
++>>>>>>> upstream/20131206+dfsg
    [Java],		[_LT_LANG(GCJ)],
    [Fortran 77],		[_LT_LANG(F77)],
    [Fortran],		[_LT_LANG(FC)],
@@@ -822,6 -825,31 +845,34 @@@ m4_defun([_LT_LANG]
  ])# _LT_LANG
  
  
++<<<<<<< HEAD
++=======
+ m4_ifndef([AC_PROG_GO], [
+ ############################################################
+ # NOTE: This macro has been submitted for inclusion into   #
+ #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+ #  a released version of Autoconf we should remove this    #
+ #  macro and use it instead.                               #
+ ############################################################
+ m4_defun([AC_PROG_GO],
+ [AC_LANG_PUSH(Go)dnl
+ AC_ARG_VAR([GOC],     [Go compiler command])dnl
+ AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+ _AC_ARG_VAR_LDFLAGS()dnl
+ AC_CHECK_TOOL(GOC, gccgo)
+ if test -z "$GOC"; then
+   if test -n "$ac_tool_prefix"; then
+     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+   fi
+ fi
+ if test -z "$GOC"; then
+   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+ fi
+ ])#m4_defun
+ ])#m4_ifndef
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
  # _LT_LANG_DEFAULT_CONFIG
  # -----------------------
  m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@@ -852,6 -880,10 +903,13 @@@ AC_PROVIDE_IFELSE([AC_PROG_GCJ]
         m4_ifdef([LT_PROG_GCJ],
  	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  
++<<<<<<< HEAD
++=======
+ AC_PROVIDE_IFELSE([AC_PROG_GO],
+   [LT_LANG(GO)],
+   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+ 
++>>>>>>> upstream/20131206+dfsg
  AC_PROVIDE_IFELSE([LT_PROG_RC],
    [LT_LANG(RC)],
    [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@@ -954,7 -986,13 +1012,17 @@@ m4_defun_once([_LT_REQUIRED_DARWIN_CHEC
  	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
          _lt_result=$?
++<<<<<<< HEAD
 +	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
++=======
+ 	# If there is a non-empty error log, and "single_module"
+ 	# appears in it, assume the flag caused a linker warning
+         if test -s conftest.err && $GREP single_module conftest.err; then
+ 	  cat conftest.err >&AS_MESSAGE_LOG_FD
+ 	# Otherwise, if the output was created with a 0 exit code from
+ 	# the compiler, it worked.
+ 	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
++>>>>>>> upstream/20131206+dfsg
  	  lt_cv_apple_cc_single_mod=yes
  	else
  	  cat conftest.err >&AS_MESSAGE_LOG_FD
@@@ -962,6 -1000,7 +1030,10 @@@
  	rm -rf libconftest.dylib*
  	rm -f conftest.*
        fi])
++<<<<<<< HEAD
++=======
+ 
++>>>>>>> upstream/20131206+dfsg
      AC_CACHE_CHECK([for -exported_symbols_list linker flag],
        [lt_cv_ld_exported_symbols_list],
        [lt_cv_ld_exported_symbols_list=no
@@@ -973,6 -1012,7 +1045,10 @@@
  	[lt_cv_ld_exported_symbols_list=no])
  	LDFLAGS="$save_LDFLAGS"
      ])
++<<<<<<< HEAD
++=======
+ 
++>>>>>>> upstream/20131206+dfsg
      AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
        [lt_cv_ld_force_load=no
        cat > conftest.c << _LT_EOF
@@@ -990,7 -1030,9 +1066,13 @@@ _LT_EO
        echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
        $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
        _lt_result=$?
++<<<<<<< HEAD
 +      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
++=======
+       if test -s conftest.err && $GREP force_load conftest.err; then
+ 	cat conftest.err >&AS_MESSAGE_LOG_FD
+       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
++>>>>>>> upstream/20131206+dfsg
  	lt_cv_ld_force_load=yes
        else
  	cat conftest.err >&AS_MESSAGE_LOG_FD
@@@ -1035,8 -1077,8 +1117,13 @@@
  ])
  
  
++<<<<<<< HEAD
 +# _LT_DARWIN_LINKER_FEATURES
 +# --------------------------
++=======
+ # _LT_DARWIN_LINKER_FEATURES([TAG])
+ # ---------------------------------
++>>>>>>> upstream/20131206+dfsg
  # Checks for linker and compiler features on darwin
  m4_defun([_LT_DARWIN_LINKER_FEATURES],
  [
@@@ -1047,6 -1089,8 +1134,11 @@@
    _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    if test "$lt_cv_ld_force_load" = "yes"; then
      _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
++<<<<<<< HEAD
++=======
+     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
++>>>>>>> upstream/20131206+dfsg
    else
      _LT_TAGVAR(whole_archive_flag_spec, $1)=''
    fi
@@@ -1330,14 -1374,27 +1422,35 @@@ s390*-*linux*|s390*-*tpf*|sparc*-*linux
      CFLAGS="$SAVE_CFLAGS"
    fi
    ;;
++<<<<<<< HEAD
 +sparc*-*solaris*)
++=======
+ *-*solaris*)
++>>>>>>> upstream/20131206+dfsg
    # Find out which ABI we are using.
    echo 'int i;' > conftest.$ac_ext
    if AC_TRY_EVAL(ac_compile); then
      case `/usr/bin/file conftest.o` in
      *64-bit*)
        case $lt_cv_prog_gnu_ld in
++<<<<<<< HEAD
 +      yes*) LD="${LD-ld} -m elf64_sparc" ;;
++=======
+       yes*)
+         case $host in
+         i?86-*-solaris*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         sparc*-*-solaris*)
+           LD="${LD-ld} -m elf64_sparc"
+           ;;
+         esac
+         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+           LD="${LD-ld}_sol2"
+         fi
+         ;;
++>>>>>>> upstream/20131206+dfsg
        *)
  	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  	  LD="${LD-ld} -64"
@@@ -1414,13 -1471,13 +1527,23 @@@ old_postuninstall_cmds
  if test -n "$RANLIB"; then
    case $host_os in
    openbsd*)
++<<<<<<< HEAD
 +    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"
++=======
+     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+     ;;
+   *)
+     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+     ;;
+   esac
+   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
++>>>>>>> upstream/20131206+dfsg
  fi
  
  case $host_os in
@@@ -1600,6 -1657,11 +1723,14 @@@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [
      lt_cv_sys_max_cmd_len=196608
      ;;
  
++<<<<<<< HEAD
++=======
+   os2*)
+     # The test takes a long time on OS/2.
+     lt_cv_sys_max_cmd_len=8192
+     ;;
+ 
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -1639,7 -1701,7 +1770,11 @@@
        # 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.
++<<<<<<< HEAD
 +      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
++=======
+       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
++>>>>>>> upstream/20131206+dfsg
  	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  	      test $i != 17 # 1/2 MB should be enough
        do
@@@ -2185,7 -2247,7 +2320,11 @@@ need_version=unknow
  
  case $host_os in
  aix3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
    shlibpath_var=LIBPATH
  
@@@ -2194,7 -2256,7 +2333,11 @@@
    ;;
  
  aix[[4-9]]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    hardcode_into_libs=yes
@@@ -2259,7 -2321,7 +2402,11 @@@ beos*
    ;;
  
  bsdi[[45]]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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'
@@@ -2398,7 -2460,7 +2545,11 @@@ m4_if([$1], [],
    ;;
  
  dgux*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@@ -2406,10 -2468,6 +2557,13 @@@
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  
++<<<<<<< HEAD
 +freebsd1*)
 +  dynamic_linker=no
 +  ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  freebsd* | dragonfly*)
    # DragonFly does not have aout.  When/if they implement a new
    # versioning mechanism, adjust this.
@@@ -2417,7 -2475,7 +2571,11 @@@
      objformat=`/usr/bin/objformat`
    else
      case $host_os in
++<<<<<<< HEAD
 +    freebsd[[123]]*) objformat=aout ;;
++=======
+     freebsd[[23]].*) objformat=aout ;;
++>>>>>>> upstream/20131206+dfsg
      *) objformat=elf ;;
      esac
    fi
@@@ -2435,7 -2493,7 +2593,11 @@@
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case $host_os in
++<<<<<<< HEAD
 +  freebsd2*)
++=======
+   freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
      shlibpath_overrides_runpath=yes
      ;;
    freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@@ -2454,18 -2512,8 +2616,23 @@@
    esac
    ;;
  
++<<<<<<< HEAD
 +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
 +  ;;
 +
 +haiku*)
 +  version_type=linux
++=======
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    dynamic_linker="$host_os runtime_loader"
@@@ -2526,7 -2574,7 +2693,11 @@@ hpux9* | hpux10* | hpux11*
    ;;
  
  interix[[3-9]]*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@@ -2542,7 -2590,7 +2713,11 @@@ irix5* | irix6* | nonstopux*
      nonstopux*) version_type=nonstopux ;;
      *)
  	if test "$lt_cv_prog_gnu_ld" = yes; then
++<<<<<<< HEAD
 +		version_type=linux
++=======
+ 		version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
  	else
  		version_type=irix
  	fi ;;
@@@ -2579,9 -2627,9 +2754,15 @@@ linux*oldld* | linux*aout* | linux*coff
    dynamic_linker=no
    ;;
  
++<<<<<<< HEAD
 +# This must be Linux ELF.
 +linux* | k*bsd*-gnu | kopensolaris*-gnu)
 +  version_type=linux
++=======
+ # This must be glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -2625,6 -2673,18 +2806,21 @@@
    dynamic_linker='GNU/Linux ld.so'
    ;;
  
++<<<<<<< HEAD
++=======
+ netbsdelf*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=no
+   hardcode_into_libs=yes
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+ 
++>>>>>>> upstream/20131206+dfsg
  netbsd*)
    version_type=sunos
    need_lib_prefix=no
@@@ -2644,7 -2704,7 +2840,11 @@@
    ;;
  
  newsos6)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -2713,7 -2773,7 +2913,11 @@@ rdos*
    ;;
  
  solaris*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -2738,7 -2798,7 +2942,11 @@@ sunos4*
    ;;
  
  sysv4 | sysv4.3*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -2762,7 -2822,7 +2970,11 @@@
  
  sysv4*MP*)
    if test -d /usr/nec ;then
++<<<<<<< HEAD
 +    version_type=linux
++=======
+     version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
      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
@@@ -2793,7 -2853,7 +3005,11 @@@ sysv5* | sco3.2v5* | sco5v6* | unixware
  
  tpf*)
    # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    need_lib_prefix=no
    need_version=no
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@@ -2803,7 -2863,7 +3019,11 @@@
    ;;
  
  uts4*)
++<<<<<<< HEAD
 +  version_type=linux
++=======
+   version_type=linux # correct to gnu/linux during the next big refactor
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -3184,10 -3244,6 +3404,13 @@@ freebsd* | dragonfly*
    fi
    ;;
  
++<<<<<<< HEAD
 +gnu*)
 +  lt_cv_deplibs_check_method=pass_all
 +  ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  haiku*)
    lt_cv_deplibs_check_method=pass_all
    ;;
@@@ -3225,12 -3281,12 +3448,21 @@@ irix5* | irix6* | nonstopux*
    lt_cv_deplibs_check_method=pass_all
    ;;
  
++<<<<<<< HEAD
 +# This must be Linux ELF.
 +linux* | k*bsd*-gnu | kopensolaris*-gnu)
 +  lt_cv_deplibs_check_method=pass_all
 +  ;;
 +
 +netbsd*)
++=======
+ # This must be glibc/ELF.
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+ netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
    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
@@@ -3645,6 -3701,7 +3877,10 @@@ for ac_symprfx in "" "_"; d
      # which start with @ or ?.
      lt_cv_sys_global_symbol_pipe="$AWK ['"\
  "     {last_section=section; section=\$ 3};"\
++<<<<<<< HEAD
++=======
+ "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
++>>>>>>> upstream/20131206+dfsg
  "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  "     \$ 0!~/External *\|/{next};"\
  "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@@ -3977,7 -4034,7 +4213,11 @@@ m4_if([$1], [CXX], 
  	    ;;
  	esac
  	;;
++<<<<<<< HEAD
 +      linux* | k*bsd*-gnu | kopensolaris*-gnu)
++=======
+       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
++>>>>>>> upstream/20131206+dfsg
  	case $cc_basename in
  	  KCC*)
  	    # KAI C++ Compiler
@@@ -4041,7 -4098,7 +4281,11 @@@
  	    ;;
  	esac
  	;;
++<<<<<<< HEAD
 +      netbsd*)
++=======
+       netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
  	;;
        *qnx* | *nto*)
          # QNX uses GNU C++, but need to define -shared option too, otherwise
@@@ -4229,7 -4286,9 +4473,13 @@@
      case $cc_basename in
      nvcc*) # Cuda Compiler Driver 2.2
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
++<<<<<<< HEAD
 +      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
++=======
+       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+       fi
++>>>>>>> upstream/20131206+dfsg
        ;;
      esac
    else
@@@ -4274,7 -4333,7 +4524,11 @@@
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        ;;
  
++<<<<<<< HEAD
 +    linux* | k*bsd*-gnu | kopensolaris*-gnu)
++=======
+     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
++>>>>>>> upstream/20131206+dfsg
        case $cc_basename in
        # old Intel for x86_64 which still supported -KPIC.
        ecc*)
@@@ -4321,18 -4380,33 +4575,43 @@@
  	;;
        *)
  	case `$CC -V 2>&1 | sed 5q` in
++<<<<<<< HEAD
 +	*Sun\ F* | *Sun*Fortran*)
++=======
+ 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
++>>>>>>> upstream/20131206+dfsg
  	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
  	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  	  ;;
++<<<<<<< HEAD
++=======
+ 	*Sun\ F* | *Sun*Fortran*)
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	*Sun\ C*)
  	  # Sun C 5.9
  	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  	  ;;
++<<<<<<< HEAD
++=======
+         *Intel*\ [[CF]]*Compiler*)
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ 	  ;;
+ 	*Portland\ Group*)
+ 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	  ;;
++>>>>>>> upstream/20131206+dfsg
  	esac
  	;;
        esac
@@@ -4492,13 -4566,18 +4771,25 @@@ m4_if([$1], [CXX], 
      ;;
    cygwin* | mingw* | cegcc*)
      case $cc_basename in
++<<<<<<< HEAD
 +    cl*) ;;
++=======
+     cl*)
+       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+       ;;
++>>>>>>> upstream/20131206+dfsg
      *)
        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
        _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
        ;;
      esac
      ;;
++<<<<<<< HEAD
++=======
+   linux* | k*bsd*-gnu | gnu*)
+     _LT_TAGVAR(link_all_deplibs, $1)=no
+     ;;
++>>>>>>> upstream/20131206+dfsg
    *)
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
      ;;
@@@ -4517,7 -4596,6 +4808,10 @@@
    _LT_TAGVAR(hardcode_direct, $1)=no
    _LT_TAGVAR(hardcode_direct_absolute, $1)=no
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++<<<<<<< HEAD
 +  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++=======
++>>>>>>> upstream/20131206+dfsg
    _LT_TAGVAR(hardcode_libdir_separator, $1)=
    _LT_TAGVAR(hardcode_minus_L, $1)=no
    _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@@ -4562,6 -4640,9 +4856,12 @@@ dnl Note also adjust exclude_expsyms fo
    openbsd*)
      with_gnu_ld=no
      ;;
++<<<<<<< HEAD
++=======
+   linux* | k*bsd*-gnu | gnu*)
+     _LT_TAGVAR(link_all_deplibs, $1)=no
+     ;;
++>>>>>>> upstream/20131206+dfsg
    esac
  
    _LT_TAGVAR(ld_shlibs, $1)=yes
@@@ -4768,8 -4849,7 +5068,12 @@@ _LT_EO
  	xlf* | bgf* | bgxlf* | mpixlf*)
  	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
++<<<<<<< HEAD
 +	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 +	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
++=======
+ 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
++>>>>>>> upstream/20131206+dfsg
  	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  	  if test "x$supports_anon_versioning" = xyes; then
  	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
@@@ -4784,7 -4864,7 +5088,11 @@@
        fi
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
@@@ -4961,6 -5041,7 +5269,10 @@@ _LT_EO
  	if test "$aix_use_runtimelinking" = yes; then
  	  shared_flag="$shared_flag "'${wl}-G'
  	fi
++<<<<<<< HEAD
++=======
+ 	_LT_TAGVAR(link_all_deplibs, $1)=no
++>>>>>>> upstream/20131206+dfsg
        else
  	# not using gcc
  	if test "$host_cpu" = ia64; then
@@@ -5064,6 -5145,7 +5376,10 @@@
  	# The linker will not automatically build a static lib if we build a DLL.
  	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++<<<<<<< HEAD
++=======
+ 	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
++>>>>>>> upstream/20131206+dfsg
  	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  	# Don't use ranlib
  	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
@@@ -5110,10 -5192,6 +5426,13 @@@
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
        ;;
  
++<<<<<<< HEAD
 +    freebsd1*)
 +      _LT_TAGVAR(ld_shlibs, $1)=no
 +      ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
      # 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
@@@ -5126,7 -5204,7 +5445,11 @@@
        ;;
  
      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++<<<<<<< HEAD
 +    freebsd2*)
++=======
+     freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@@ -5165,7 -5243,6 +5488,10 @@@
        fi
        if test "$with_gnu_ld" = no; then
  	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
++<<<<<<< HEAD
 +	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
++=======
++>>>>>>> upstream/20131206+dfsg
  	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
  	_LT_TAGVAR(hardcode_direct, $1)=yes
  	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
@@@ -5269,7 -5346,7 +5595,11 @@@
        _LT_TAGVAR(link_all_deplibs, $1)=yes
        ;;
  
++<<<<<<< HEAD
 +    netbsd*)
++=======
+     netbsd* | netbsdelf*-gnu)
++>>>>>>> upstream/20131206+dfsg
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
        else
@@@ -5607,9 -5684,6 +5937,12 @@@ _LT_TAGDECL([], [no_undefined_flag], [1
  _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
      [Flag to hardcode $libdir into a binary during linking.
      This must work even if $libdir does not exist])
++<<<<<<< HEAD
 +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
 +    [[If ld is used when linking, flag to hardcode $libdir into a binary
 +    during linking.  This must work even if $libdir does not exist]])
++=======
++>>>>>>> upstream/20131206+dfsg
  _LT_TAGDECL([], [hardcode_libdir_separator], [1],
      [Whether we need a single "-rpath" flag with a separated argument])
  _LT_TAGDECL([], [hardcode_direct], [0],
@@@ -5767,7 -5841,6 +6100,10 @@@ _LT_TAGVAR(export_dynamic_flag_spec, $1
  _LT_TAGVAR(hardcode_direct, $1)=no
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++<<<<<<< HEAD
 +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++=======
++>>>>>>> upstream/20131206+dfsg
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
  _LT_TAGVAR(hardcode_minus_L, $1)=no
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@@ -6137,7 -6210,7 +6473,11 @@@ if test "$_lt_caught_CXX_error" != yes
          esac
          ;;
  
++<<<<<<< HEAD
 +      freebsd[[12]]*)
++=======
+       freebsd2.*)
++>>>>>>> upstream/20131206+dfsg
          # C++ shared libraries reported to be fairly broken before
  	# switch to ELF
          _LT_TAGVAR(ld_shlibs, $1)=no
@@@ -6153,9 -6226,6 +6493,12 @@@
          _LT_TAGVAR(ld_shlibs, $1)=yes
          ;;
  
++<<<<<<< HEAD
 +      gnu*)
 +        ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
        haiku*)
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
          _LT_TAGVAR(link_all_deplibs, $1)=yes
@@@ -6317,7 -6387,7 +6660,11 @@@
          _LT_TAGVAR(inherit_rpath, $1)=yes
          ;;
  
++<<<<<<< HEAD
 +      linux* | k*bsd*-gnu | kopensolaris*-gnu)
++=======
+       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
++>>>>>>> upstream/20131206+dfsg
          case $cc_basename in
            KCC*)
  	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@@ -6898,12 -6968,18 +7245,24 @@@ public class foo 
    }
  };
  _LT_EOF
++<<<<<<< HEAD
++=======
+ ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+ package foo
+ func foo() {
+ }
+ _LT_EOF
++>>>>>>> upstream/20131206+dfsg
  ])
  
  _lt_libdeps_save_CFLAGS=$CFLAGS
  case "$CC $CFLAGS " in #(
  *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
++<<<<<<< HEAD
++=======
+ *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
++>>>>>>> upstream/20131206+dfsg
  esac
  
  dnl Parse the compiler output and extract the necessary
@@@ -7100,7 -7176,6 +7459,10 @@@ _LT_TAGVAR(export_dynamic_flag_spec, $1
  _LT_TAGVAR(hardcode_direct, $1)=no
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++<<<<<<< HEAD
 +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++=======
++>>>>>>> upstream/20131206+dfsg
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
  _LT_TAGVAR(hardcode_minus_L, $1)=no
  _LT_TAGVAR(hardcode_automatic, $1)=no
@@@ -7233,7 -7308,6 +7595,10 @@@ _LT_TAGVAR(export_dynamic_flag_spec, $1
  _LT_TAGVAR(hardcode_direct, $1)=no
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
++<<<<<<< HEAD
 +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
++=======
++>>>>>>> upstream/20131206+dfsg
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
  _LT_TAGVAR(hardcode_minus_L, $1)=no
  _LT_TAGVAR(hardcode_automatic, $1)=no
@@@ -7420,6 -7494,77 +7785,80 @@@ CFLAGS=$lt_save_CFLAG
  ])# _LT_LANG_GCJ_CONFIG
  
  
++<<<<<<< HEAD
++=======
+ # _LT_LANG_GO_CONFIG([TAG])
+ # --------------------------
+ # Ensure that the configuration variables for the GNU Go compiler
+ # are suitably defined.  These variables are subsequently used by _LT_CONFIG
+ # to write the compiler configuration to `libtool'.
+ m4_defun([_LT_LANG_GO_CONFIG],
+ [AC_REQUIRE([LT_PROG_GO])dnl
+ AC_LANG_SAVE
+ 
+ # Source file extension for Go test sources.
+ ac_ext=go
+ 
+ # Object file extension for compiled Go test sources.
+ objext=o
+ _LT_TAGVAR(objext, $1)=$objext
+ 
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="package main; func main() { }"
+ 
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='package main; func main() { }'
+ 
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+ 
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+ 
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_GCC=$GCC
+ GCC=yes
+ CC=${GOC-"gccgo"}
+ CFLAGS=$GOFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_TAGVAR(LD, $1)="$LD"
+ _LT_CC_BASENAME([$compiler])
+ 
+ # Go did not exist at the time GCC didn't implicitly link libc in.
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ 
+ _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+ _LT_TAGVAR(reload_flag, $1)=$reload_flag
+ _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+ 
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ if test -n "$compiler"; then
+   _LT_COMPILER_NO_RTTI($1)
+   _LT_COMPILER_PIC($1)
+   _LT_COMPILER_C_O($1)
+   _LT_COMPILER_FILE_LOCKS($1)
+   _LT_LINKER_SHLIBS($1)
+   _LT_LINKER_HARDCODE_LIBPATH($1)
+ 
+   _LT_CONFIG($1)
+ fi
+ 
+ AC_LANG_RESTORE
+ 
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ ])# _LT_LANG_GO_CONFIG
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
  # _LT_LANG_RC_CONFIG([TAG])
  # -------------------------
  # Ensure that the configuration variables for the Windows resource compiler
@@@ -7489,6 -7634,13 +7928,16 @@@ dnl aclocal-1.4 backwards compatibility
  dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  
  
++<<<<<<< HEAD
++=======
+ # LT_PROG_GO
+ # ----------
+ AC_DEFUN([LT_PROG_GO],
+ [AC_CHECK_TOOL(GOC, gccgo,)
+ ])
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
  # LT_PROG_RC
  # ----------
  AC_DEFUN([LT_PROG_RC],
diff --cc m4/ltoptions.m4
index 17cfd51,5d9acd8..b41fdd3
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@@ -326,9 -326,24 +326,30 @@@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL]
  # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
  m4_define([_LT_WITH_PIC],
  [AC_ARG_WITH([pic],
++<<<<<<< HEAD
 +    [AS_HELP_STRING([--with-pic],
 +	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 +    [pic_mode="$withval"],
++=======
+     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+     [lt_p=${PACKAGE-default}
+     case $withval in
+     yes|no) pic_mode=$withval ;;
+     *)
+       pic_mode=default
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for lt_pkg in $withval; do
+ 	IFS="$lt_save_ifs"
+ 	if test "X$lt_pkg" = "X$lt_p"; then
+ 	  pic_mode=yes
+ 	fi
+       done
+       IFS="$lt_save_ifs"
+       ;;
+     esac],
++>>>>>>> upstream/20131206+dfsg
      [pic_mode=default])
  
  test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
diff --cc m4/ltversion.m4
index 9c7b5d4,07a8602..633cf42
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@@ -9,15 -9,15 +9,27 @@@
  
  # @configure_input@
  
++<<<<<<< HEAD
 +# serial 3293 ltversion.m4
 +# This file is part of GNU Libtool
 +
 +m4_define([LT_PACKAGE_VERSION], [2.4])
 +m4_define([LT_PACKAGE_REVISION], [1.3293])
 +
 +AC_DEFUN([LTVERSION_VERSION],
 +[macro_version='2.4'
 +macro_revision='1.3293'
++=======
+ # serial 3337 ltversion.m4
+ # This file is part of GNU Libtool
+ 
+ m4_define([LT_PACKAGE_VERSION], [2.4.2])
+ m4_define([LT_PACKAGE_REVISION], [1.3337])
+ 
+ AC_DEFUN([LTVERSION_VERSION],
+ [macro_version='2.4.2'
+ macro_revision='1.3337'
++>>>>>>> upstream/20131206+dfsg
  _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  _LT_DECL(, macro_revision, 0)
  ])
diff --cc missing
index 28055d2,86a8fc3..e69d221
--- a/missing
+++ b/missing
@@@ -1,10 -1,10 +1,17 @@@
  #! /bin/sh
  # Common stub for a few missing GNU programs while installing.
  
++<<<<<<< HEAD
 +scriptversion=2009-04-28.21; # UTC
 +
 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
 +# 2008, 2009 Free Software Foundation, Inc.
++=======
+ scriptversion=2012-01-06.13; # UTC
+ 
+ # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+ # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
  
  # This program is free software; you can redistribute it and/or modify
@@@ -84,7 -84,6 +91,10 @@@ Supported PROGRAM values
    help2man     touch the output file
    lex          create \`lex.yy.c', if possible, from existing .c
    makeinfo     touch the output file
++<<<<<<< HEAD
 +  tar          try tar, gnutar, gtar, then tar without non-portable flags
++=======
++>>>>>>> upstream/20131206+dfsg
    yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
  
  Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@@ -122,15 -121,6 +132,18 @@@ case $1 i
      # Not GNU programs, they don't have --version.
      ;;
  
++<<<<<<< HEAD
 +  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
 +    ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
    *)
      if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
         # We have it, but it failed.
@@@ -226,7 -216,7 +239,11 @@@ WARNING: \`$1' $msg.  You should only n
           \`Bison' from any GNU archive site."
      rm -f y.tab.c y.tab.h
      if test $# -ne 1; then
++<<<<<<< HEAD
 +        eval LASTARG="\${$#}"
++=======
+         eval LASTARG=\${$#}
++>>>>>>> upstream/20131206+dfsg
  	case $LASTARG in
  	*.y)
  	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@@ -256,7 -246,7 +273,11 @@@ WARNING: \`$1' is $msg.  You should onl
           \`Flex' from any GNU archive site."
      rm -f lex.yy.c
      if test $# -ne 1; then
++<<<<<<< HEAD
 +        eval LASTARG="\${$#}"
++=======
+         eval LASTARG=\${$#}
++>>>>>>> upstream/20131206+dfsg
  	case $LASTARG in
  	*.l)
  	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@@ -318,41 -308,6 +339,44 @@@ WARNING: \`$1' is $msg.  You should onl
      touch $file
      ;;
  
++<<<<<<< HEAD
 +  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
 +    ;;
 +
++=======
++>>>>>>> upstream/20131206+dfsg
    *)
      echo 1>&2 "\
  WARNING: \`$1' is needed, and is $msg.
diff --cc modules/Makefile.am
index 9126762,71c9176..6968ca0
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@@ -1,7 -1,6 +1,11 @@@
  ## Process this file with automake to produce Makefile.in
  
++<<<<<<< HEAD
 +#SUBDIRS = RStarTree kdt fes2004 wavewatch
 +SUBDIRS = kdt wavewatch
++=======
+ SUBDIRS = RStarTree kdt fes2004 wavewatch culvert
++>>>>>>> upstream/20131206+dfsg
  
  AM_CPPFLAGS = -DGFS_MODULES_DIR=\"$(libdir)/gerris\"
  
@@@ -35,9 -34,14 +39,20 @@@ endi
  if HAS_GSL
  BUBBLES = libbubbles2D.la libbubbles3D.la
  endif
++<<<<<<< HEAD
 +
 +pkglib_LTLIBRARIES = \
 +	$(MAP) \
++=======
+ if HAS_FFTW3
+ FFT = libfft2D.la libfft3D.la
+ endif
+ 
+ pkglib_LTLIBRARIES = \
+ 	$(MAP) \
+ 	libterrain2D.la \
+ 	libterrain3D.la \
++>>>>>>> upstream/20131206+dfsg
  	libparticulates2D.la \
  	libparticulates3D.la \
  	libokada2D.la \
@@@ -45,66 -49,63 +60,113 @@@
  	libdf33D.la \
  	libelectrohydro2D.la \
  	libelectrohydro3D.la \
++<<<<<<< HEAD
++=======
+ 	libskewsymmetric2D.la \
+ 	libskewsymmetric3D.la \
+ 	libtopics2D.la \
+ 	libtopics3D.la \
+ 	libculvert2D.la \
+ 	liblayered2D.la \
+ 	$(TIDE) \
++>>>>>>> upstream/20131206+dfsg
  	$(STOKES) \
  	$(WAVEWATCH) \
  	$(HYPRE) \
  	$(LIS) \
  	$(AGMG) \
  	$(ODE) \
++<<<<<<< HEAD
 +        $(BUBBLES)
 +
 +EXTRA_DIST = \
 +	map.mod \
 +	tide.mod \
 +	terrain.mod \
 +	stokes.mod \
 +	wavewatch.mod \
 +	particulates.mod \
 +	bubbles.mod \
 +	df3.mod \
 +	electrohydro.mod \
 +	okada.mod \
 +	hypre.mod \
 +	lis.mod \
 +	agmg.mod \
 +	ode.mod
 +
 +BUILT_SOURCES = \
 +	map.c \
 +	tide.c \
 +	terrain.c \
 +	stokes.c \
 +	wavewatch.c \
 +	particulates.c \
 +	bubbles.c \
 +	df3.c \
 +	electrohydro.c \
 +	okada.c \
 +	hypre.c \
 +	lis.c \
 +	agmg.c \
 +	ode.c
++=======
+         $(BUBBLES) \
+ 	$(FFT)
+ 
+ bin_PROGRAMS = \
+ 	rsurface2kdt
++>>>>>>> upstream/20131206+dfsg
  
  AM_LDFLAGS = $(NO_UNDEFINED)\
          -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\
  	-release $(LT_RELEASE) -export-dynamic -module
  
  libmap3D_la_SOURCES = map.c
- libmap3D_la_LIBADD = -lproj
+ libmap3D_la_LIBADD = $(GFS3D_LIBS) -lproj
  libmap2D_la_SOURCES = map.c
  libmap2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
++<<<<<<< HEAD
 +libmap2D_la_LIBADD = -lproj
 +
 +KDTLIBS = -Lkdt -lkdt
 +KDTDEPS = kdt/libkdt.la
++=======
+ libmap2D_la_LIBADD = $(GFS2D_LIBS) -lproj
+ 
+ KDTLIBS = -Lkdt -lkdt -lm
+ KDTDEPS = kdt/libkdt.la
+ 
+ libterrain3D_la_SOURCES = terrain.c
+ libterrain3D_la_LIBADD = $(GFS3D_LIBS) $(KDTLIBS)
+ libterrain3D_la_DEPENDENCIES = $(KDTDEPS)
+ 
+ libterrain2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libterrain2D_la_SOURCES = terrain.c
+ libterrain2D_la_LIBADD = $(GFS2D_LIBS) $(KDTLIBS)
+ libterrain2D_la_DEPENDENCIES = $(KDTDEPS)
+ 
+ libtide3D_la_SOURCES = tide.c
+ libtide3D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS)
+ libtide3D_la_LIBADD = $(GFS3D_LIBS) -Lfes2004 -lfes -lnetcdf $(GSL_LIBS)
+ libtide2D_la_SOURCES = tide.c
+ libtide2D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS) -DFTT_2D=1
+ libtide2D_la_LIBADD = $(GFS2D_LIBS) -Lfes2004 -lfes -lnetcdf $(GSL_LIBS)
++>>>>>>> upstream/20131206+dfsg
  
  libstokes3D_la_SOURCES = stokes.c CW263.f
  libstokes3D_la_CFLAGS = $(AM_CFLAGS)
+ libstokes3D_la_LIBADD = $(GFS3D_LIBS)
  libstokes2D_la_SOURCES = stokes.c CW263.f
  libstokes2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libstokes2D_la_LIBADD = $(GFS2D_LIBS)
  
  libwavewatch2D_la_SOURCES = wavewatch.c
++<<<<<<< HEAD
 +libwavewatch2D_la_LIBADD = -Lwavewatch -lwavewatch -L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran
++=======
+ libwavewatch2D_la_LIBADD = $(GFS2D_LIBS) -Lwavewatch -lwavewatch -L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran
++>>>>>>> upstream/20131206+dfsg
  libwavewatch2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1 \
    -DW3SRCE=`nm wavewatch/libwavewatch.a | grep w3srce | awk '{ if ($$2 == "T") print $$3; }'` \
    -DGFSW3INIT=`nm wavewatch/libwavewatch.a | grep gfsw3_init | awk '{ if ($$2 == "T") print $$3; }'`
@@@ -112,76 -113,106 +174,182 @@@ libwavewatch2D_la_DEPENDENCIES = wavewa
  
  libode3D_la_SOURCES = ode.c
  libode3D_la_CFLAGS = $(AM_CFLAGS) $(ODE_CFLAGS)
++<<<<<<< HEAD
 +libode3D_la_LIBADD = $(ODE_LIBS)
 +libode2D_la_SOURCES = ode.c
 +libode2D_la_CFLAGS = $(AM_CFLAGS) $(ODE_CFLAGS) -DFTT_2D=1
 +libode2D_la_LIBADD = $(ODE_LIBS)
 +
 +libparticulates3D_la_SOURCES = particulates.c particulates.h
 +libparticulates3D_la_CFLAGS = $(AM_CFLAGS)
 +libparticulates2D_la_SOURCES = particulates.c particulates.h
 +libparticulates2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +
 +libbubbles3D_la_SOURCES = bubbles.c
 +libbubbles3D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS)
 +libbubbles3D_la_LIBADD = $(GSL_LIBS)
 +libbubbles2D_la_SOURCES = bubbles.c
 +libbubbles2D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS) -DFTT_2D=1
 +libbubbles2D_la_LIBADD = $(GSL_LIBS)
 +
 +libhypre3D_la_SOURCES = hypre.c
 +libhypre3D_la_CFLAGS = $(AM_CFLAGS)
 +libhypre3D_la_LIBADD = -lHYPRE -lm
 +libhypre2D_la_SOURCES = hypre.c
 +libhypre2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libhypre2D_la_LIBADD = -lHYPRE -lm
 +
 +liblis3D_la_SOURCES = lis.c
 +liblis3D_la_CFLAGS = $(AM_CFLAGS)
 +liblis3D_la_LIBADD = -llis -lgfortran -lm
 +liblis2D_la_SOURCES = lis.c
 +liblis2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +liblis2D_la_LIBADD = -llis -lgfortran -lm
 +
 +libagmg3D_la_SOURCES = agmg.c dagmg.f90
 +libagmg3D_la_CFLAGS = $(AM_CFLAGS)
 +libagmg3D_la_LIBADD = -llapack -lblas -lgfortran -lm
 +libagmg2D_la_SOURCES = agmg.c dagmg.f90
 +libagmg2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libagmg2D_la_LIBADD = -llapack -lblas -lgfortran -lm
 +
 +libokada3D_la_SOURCES = okada.c
 +libokada3D_la_CFLAGS = $(AM_CFLAGS)
 +libokada2D_la_SOURCES = okada.c
 +libokada2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +
 +libdf33D_la_SOURCES = df3.c
 +libdf33D_la_CFLAGS = $(AM_CFLAGS)
 +
 +libelectrohydro3D_la_SOURCES = electrohydro.c
 +libelectrohydro3D_la_CFLAGS = $(AM_CFLAGS)
 +libelectrohydro2D_la_SOURCES = electrohydro.c
 +libelectrohydro2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +
 +if HAVE_MODULES
 +.mod.c:
 +	@echo "/* $@" > $@
 +	@echo " * This is a generated file.  Please modify \`$<'" >> $@
 +	@echo " */" >> $@
 +	@echo "#line 1 \""$<"\"" >> $@
 +	@cat $< >> $@
 +else
 +.mod.c:
 +	@echo "/* $@" > $@
 +	@echo " * This is a generated file.  Please modify \`$<'" >> $@
 +	@echo " */" >> $@
 +	@echo "#line 1 \""$<"\"" >> $@
 +	@replace="s/g_module_check_init/gfs_init_`basename $< .mod`/g";\
 +	 sed $$replace < $< >> $@
 +endif
 +
 +clean-generic:
 +	$(RM) $(BUILT_SOURCES)
 +
 +dist-hook:
 +	for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
++=======
+ libode3D_la_LIBADD = $(GFS3D_LIBS) $(ODE_LIBS)
+ libode2D_la_SOURCES = ode.c
+ libode2D_la_CFLAGS = $(AM_CFLAGS) $(ODE_CFLAGS) -DFTT_2D=1
+ libode2D_la_LIBADD = $(GFS2D_LIBS) $(ODE_LIBS)
+ 
+ rsurface2kdt_SOURCES = rsurface2kdt.c rsurface.c rsurface.h
+ rsurface2kdt_LDADD = -LRStarTree -lcSmRST $(KDTLIBS)
+ rsurface2kdt_CFLAGS = $(AM_CFLAGS)
+ rsurface2kdt_DEPENDENCIES = $(KDTDEPS)
+ 
+ noinst_LTLIBRARIES = libparticulatecommon2D.la libparticulatecommon3D.la
+ 
+ libparticulatecommon3D_la_SOURCES = particulatecommon.c particulatecommon.h
+ libparticulatecommon3D_la_CFLAGS = $(AM_CFLAGS)
+ libparticulatecommon2D_la_SOURCES = particulatecommon.c particulatecommon.h
+ libparticulatecommon2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ 
+ libparticulates3D_la_SOURCES = particulates.c
+ libparticulates3D_la_CFLAGS = $(AM_CFLAGS)
+ libparticulates3D_la_LIBADD = libparticulatecommon3D.la $(GFS3D_LIBS)
+ libparticulates3D_la_DEPENDENCIES = libparticulatecommon3D.la
+ libparticulates2D_la_SOURCES = particulates.c
+ libparticulates2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libparticulates2D_la_LIBADD = libparticulatecommon2D.la $(GFS2D_LIBS)
+ libparticulates2D_la_DEPENDENCIES = libparticulatecommon2D.la
+ 
+ libbubbles3D_la_SOURCES = bubbles.c
+ libbubbles3D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS)
+ libbubbles3D_la_LIBADD = libparticulatecommon3D.la $(GFS3D_LIBS) $(GSL_LIBS)
+ libbubbles3D_la_DEPENDENCIES = libparticulatecommon3D.la
+ libbubbles2D_la_SOURCES = bubbles.c
+ libbubbles2D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS) -DFTT_2D=1
+ libbubbles2D_la_LIBADD = libparticulatecommon2D.la $(GFS2D_LIBS) $(GSL_LIBS)
+ libbubbles2D_la_DEPENDENCIES = libparticulatecommon2D.la
+ 
+ libfft3D_la_SOURCES = fft.c
+ libfft3D_la_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS)
+ libfft3D_la_LIBADD = $(GFS3D_LIBS) $(FFTW3_LIBS)
+ libfft2D_la_SOURCES = fft.c
+ libfft2D_la_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS) -DFTT_2D=1
+ libfft2D_la_LIBADD = $(GFS2D_LIBS) $(FFTW3_LIBS)
+ 
+ libhypre3D_la_SOURCES = hypre.c
+ libhypre3D_la_CFLAGS = $(AM_CFLAGS)
+ libhypre3D_la_LIBADD = $(GFS3D_LIBS) -lHYPRE -lm
+ libhypre2D_la_SOURCES = hypre.c
+ libhypre2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libhypre2D_la_LIBADD = $(GFS2D_LIBS) -lHYPRE -lm
+ 
+ liblis3D_la_SOURCES = lis.c
+ liblis3D_la_CFLAGS = $(AM_CFLAGS)
+ liblis3D_la_LIBADD = $(GFS3D_LIBS) -llis -lgfortran -lm
+ liblis2D_la_SOURCES = lis.c
+ liblis2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ liblis2D_la_LIBADD = $(GFS2D_LIBS) -llis -lgfortran -lm
+ 
+ libagmg3D_la_SOURCES = agmg.c dagmg.f90
+ libagmg3D_la_CFLAGS = $(AM_CFLAGS)
+ libagmg3D_la_LIBADD = $(GFS3D_LIBS) -llapack -lblas -lgfortran -lm
+ libagmg2D_la_SOURCES = agmg.c dagmg.f90
+ libagmg2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libagmg2D_la_LIBADD = $(GFS2D_LIBS) -llapack -lblas -lgfortran -lm
+ 
+ libokada3D_la_SOURCES = okada.c
+ libokada3D_la_CFLAGS = $(AM_CFLAGS)
+ libokada3D_la_LIBADD = $(GFS3D_LIBS)
+ libokada2D_la_SOURCES = okada.c
+ libokada2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libokada2D_la_LIBADD = $(GFS2D_LIBS)
+ 
+ libdf33D_la_SOURCES = df3.c
+ libdf33D_la_CFLAGS = $(AM_CFLAGS)
+ libdf33D_la_LIBADD = $(GFS3D_LIBS)
+ 
+ libelectrohydro3D_la_SOURCES = electrohydro.c
+ libelectrohydro3D_la_CFLAGS = $(AM_CFLAGS)
+ libelectrohydro3D_la_LIBADD = $(GFS3D_LIBS)
+ libelectrohydro2D_la_SOURCES = electrohydro.c
+ libelectrohydro2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libelectrohydro2D_la_LIBADD = $(GFS2D_LIBS)
+ 
+ libskewsymmetric3D_la_SOURCES = skewsymmetric.c
+ libskewsymmetric3D_la_CFLAGS = $(AM_CFLAGS)
+ libskewsymmetric3D_la_LIBADD = $(GFS3D_LIBS)
+ libskewsymmetric2D_la_SOURCES = skewsymmetric.c
+ libskewsymmetric2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libskewsymmetric2D_la_LIBADD = $(GFS2D_LIBS)
+ 
+ libtopics3D_la_SOURCES = topics.c
+ libtopics3D_la_CFLAGS = $(AM_CFLAGS)
+ libtopics3D_la_LIBADD = $(GFS3D_LIBS)
+ libtopics2D_la_SOURCES = topics.c
+ libtopics2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libtopics2D_la_LIBADD = $(GFS2D_LIBS)
+ 
+ libculvert2D_la_SOURCES = culvert.c
+ libculvert2D_la_CFLAGS = $(AM_CFLAGS)
+ libculvert2D_la_LIBADD = $(GFS2D_LIBS) -Lculvert -lboyd87 -lm
+ libculvert2D_la_DEPENDENCIES = culvert/libboyd87.la
+ 
+ liblayered2D_la_SOURCES = layered.c
+ liblayered2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ liblayered2D_la_LIBADD = $(GFS2D_LIBS)
++>>>>>>> upstream/20131206+dfsg
diff --cc modules/Makefile.in
index c0d1cd8,4108f63..25b23e5
--- a/modules/Makefile.in
+++ b/modules/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -15,7 -15,25 +24,29 @@@
  
  @SET_MAKE@
  
++<<<<<<< HEAD
 +VPATH = @srcdir@
++=======
+ 
+ VPATH = @srcdir@
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -34,13 -52,12 +65,22 @@@ PRE_UNINSTALL = 
  POST_UNINSTALL = :
  build_triplet = @build@
  host_triplet = @host@
++<<<<<<< HEAD
 +subdir = modules
 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ bin_PROGRAMS = rsurface2kdt$(EXEEXT)
+ subdir = modules
+ 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
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -68,38 -85,47 +108,74 @@@ am__nobase_list = $(am__nobase_strip_se
  am__base_list = \
    sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++<<<<<<< HEAD
 +am__installdirs = "$(DESTDIR)$(pkglibdir)"
 +LTLIBRARIES = $(pkglib_LTLIBRARIES)
 +libagmg2D_la_DEPENDENCIES =
 +am_libagmg2D_la_OBJECTS = libagmg2D_la-agmg.lo dagmg.lo
 +libagmg2D_la_OBJECTS = $(am_libagmg2D_la_OBJECTS)
 + at BUILD_AGMG_TRUE@am_libagmg2D_la_rpath = -rpath $(pkglibdir)
 +libagmg3D_la_DEPENDENCIES =
 +am_libagmg3D_la_OBJECTS = libagmg3D_la-agmg.lo dagmg.lo
 +libagmg3D_la_OBJECTS = $(am_libagmg3D_la_OBJECTS)
 + at BUILD_AGMG_TRUE@am_libagmg3D_la_rpath = -rpath $(pkglibdir)
 +am__DEPENDENCIES_1 =
 +libbubbles2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++=======
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
+ am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)"
+ LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+ am__DEPENDENCIES_1 =
+ libagmg2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libagmg2D_la_OBJECTS = libagmg2D_la-agmg.lo dagmg.lo
+ libagmg2D_la_OBJECTS = $(am_libagmg2D_la_OBJECTS)
+ @BUILD_AGMG_TRUE at am_libagmg2D_la_rpath = -rpath $(pkglibdir)
+ libagmg3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libagmg3D_la_OBJECTS = libagmg3D_la-agmg.lo dagmg.lo
+ libagmg3D_la_OBJECTS = $(am_libagmg3D_la_OBJECTS)
+ @BUILD_AGMG_TRUE at am_libagmg3D_la_rpath = -rpath $(pkglibdir)
++>>>>>>> upstream/20131206+dfsg
  am_libbubbles2D_la_OBJECTS = libbubbles2D_la-bubbles.lo
  libbubbles2D_la_OBJECTS = $(am_libbubbles2D_la_OBJECTS)
  libbubbles2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libbubbles2D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @HAS_GSL_TRUE at am_libbubbles2D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +libbubbles3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++=======
++>>>>>>> upstream/20131206+dfsg
  am_libbubbles3D_la_OBJECTS = libbubbles3D_la-bubbles.lo
  libbubbles3D_la_OBJECTS = $(am_libbubbles3D_la_OBJECTS)
  libbubbles3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libbubbles3D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @HAS_GSL_TRUE at am_libbubbles3D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +libdf33D_la_LIBADD =
++=======
+ am_libculvert2D_la_OBJECTS = libculvert2D_la-culvert.lo
+ libculvert2D_la_OBJECTS = $(am_libculvert2D_la_OBJECTS)
+ libculvert2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libculvert2D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ libdf33D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libdf33D_la_OBJECTS = libdf33D_la-df3.lo
  libdf33D_la_OBJECTS = $(am_libdf33D_la_OBJECTS)
  libdf33D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdf33D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libelectrohydro2D_la_LIBADD =
++=======
+ libelectrohydro2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libelectrohydro2D_la_OBJECTS =  \
  	libelectrohydro2D_la-electrohydro.lo
  libelectrohydro2D_la_OBJECTS = $(am_libelectrohydro2D_la_OBJECTS)
@@@ -107,7 -133,7 +183,11 @@@ libelectrohydro2D_la_LINK = $(LIBTOOL) 
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
  	$(libelectrohydro2D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libelectrohydro3D_la_LIBADD =
++=======
+ libelectrohydro3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libelectrohydro3D_la_OBJECTS =  \
  	libelectrohydro3D_la-electrohydro.lo
  libelectrohydro3D_la_OBJECTS = $(am_libelectrohydro3D_la_OBJECTS)
@@@ -115,72 -141,109 +195,153 @@@ libelectrohydro3D_la_LINK = $(LIBTOOL) 
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
  	$(libelectrohydro3D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libhypre2D_la_DEPENDENCIES =
++=======
+ libfft2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ am_libfft2D_la_OBJECTS = libfft2D_la-fft.lo
+ libfft2D_la_OBJECTS = $(am_libfft2D_la_OBJECTS)
+ libfft2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libfft2D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ @HAS_FFTW3_TRUE at am_libfft2D_la_rpath = -rpath $(pkglibdir)
+ libfft3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ am_libfft3D_la_OBJECTS = libfft3D_la-fft.lo
+ libfft3D_la_OBJECTS = $(am_libfft3D_la_OBJECTS)
+ libfft3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libfft3D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ @HAS_FFTW3_TRUE at am_libfft3D_la_rpath = -rpath $(pkglibdir)
+ libhypre2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libhypre2D_la_OBJECTS = libhypre2D_la-hypre.lo
  libhypre2D_la_OBJECTS = $(am_libhypre2D_la_OBJECTS)
  libhypre2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libhypre2D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @BUILD_HYPRE_TRUE at am_libhypre2D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +libhypre3D_la_DEPENDENCIES =
++=======
+ libhypre3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libhypre3D_la_OBJECTS = libhypre3D_la-hypre.lo
  libhypre3D_la_OBJECTS = $(am_libhypre3D_la_OBJECTS)
  libhypre3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libhypre3D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @BUILD_HYPRE_TRUE at am_libhypre3D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +liblis2D_la_DEPENDENCIES =
++=======
+ liblayered2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_liblayered2D_la_OBJECTS = liblayered2D_la-layered.lo
+ liblayered2D_la_OBJECTS = $(am_liblayered2D_la_OBJECTS)
+ liblayered2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(liblayered2D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ liblis2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_liblis2D_la_OBJECTS = liblis2D_la-lis.lo
  liblis2D_la_OBJECTS = $(am_liblis2D_la_OBJECTS)
  liblis2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(liblis2D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @BUILD_LIS_TRUE at am_liblis2D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +liblis3D_la_DEPENDENCIES =
++=======
+ liblis3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_liblis3D_la_OBJECTS = liblis3D_la-lis.lo
  liblis3D_la_OBJECTS = $(am_liblis3D_la_OBJECTS)
  liblis3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(liblis3D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @BUILD_LIS_TRUE at am_liblis3D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +libmap2D_la_DEPENDENCIES =
++=======
+ libmap2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libmap2D_la_OBJECTS = libmap2D_la-map.lo
  libmap2D_la_OBJECTS = $(am_libmap2D_la_OBJECTS)
  libmap2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmap2D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @HAS_LIBPROJ_TRUE at am_libmap2D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +libmap3D_la_DEPENDENCIES =
 +am_libmap3D_la_OBJECTS = map.lo
 +libmap3D_la_OBJECTS = $(am_libmap3D_la_OBJECTS)
 + at HAS_LIBPROJ_TRUE@am_libmap3D_la_rpath = -rpath $(pkglibdir)
 +libode2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++=======
+ libmap3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libmap3D_la_OBJECTS = map.lo
+ libmap3D_la_OBJECTS = $(am_libmap3D_la_OBJECTS)
+ @HAS_LIBPROJ_TRUE at am_libmap3D_la_rpath = -rpath $(pkglibdir)
+ libode2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libode2D_la_OBJECTS = libode2D_la-ode.lo
  libode2D_la_OBJECTS = $(am_libode2D_la_OBJECTS)
  libode2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libode2D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @BUILD_ODE_TRUE at am_libode2D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +libode3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++=======
+ libode3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libode3D_la_OBJECTS = libode3D_la-ode.lo
  libode3D_la_OBJECTS = $(am_libode3D_la_OBJECTS)
  libode3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libode3D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  @BUILD_ODE_TRUE at am_libode3D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
 +libokada2D_la_LIBADD =
++=======
+ libokada2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libokada2D_la_OBJECTS = libokada2D_la-okada.lo
  libokada2D_la_OBJECTS = $(am_libokada2D_la_OBJECTS)
  libokada2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libokada2D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libokada3D_la_LIBADD =
++=======
+ libokada3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_libokada3D_la_OBJECTS = libokada3D_la-okada.lo
  libokada3D_la_OBJECTS = $(am_libokada3D_la_OBJECTS)
  libokada3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libokada3D_la_CFLAGS) \
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libparticulates2D_la_LIBADD =
++=======
+ libparticulatecommon2D_la_LIBADD =
+ am_libparticulatecommon2D_la_OBJECTS =  \
+ 	libparticulatecommon2D_la-particulatecommon.lo
+ libparticulatecommon2D_la_OBJECTS =  \
+ 	$(am_libparticulatecommon2D_la_OBJECTS)
+ libparticulatecommon2D_la_LINK = $(LIBTOOL) --tag=CC \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ 	$(libparticulatecommon2D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
+ libparticulatecommon3D_la_LIBADD =
+ am_libparticulatecommon3D_la_OBJECTS =  \
+ 	libparticulatecommon3D_la-particulatecommon.lo
+ libparticulatecommon3D_la_OBJECTS =  \
+ 	$(am_libparticulatecommon3D_la_OBJECTS)
+ libparticulatecommon3D_la_LINK = $(LIBTOOL) --tag=CC \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ 	$(libparticulatecommon3D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
++>>>>>>> upstream/20131206+dfsg
  am_libparticulates2D_la_OBJECTS =  \
  	libparticulates2D_la-particulates.lo
  libparticulates2D_la_OBJECTS = $(am_libparticulates2D_la_OBJECTS)
@@@ -188,7 -251,6 +349,10 @@@ libparticulates2D_la_LINK = $(LIBTOOL) 
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
  	$(libparticulates2D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libparticulates3D_la_LIBADD =
++=======
++>>>>>>> upstream/20131206+dfsg
  am_libparticulates3D_la_OBJECTS =  \
  	libparticulates3D_la-particulates.lo
  libparticulates3D_la_OBJECTS = $(am_libparticulates3D_la_OBJECTS)
@@@ -196,14 -258,65 +360,76 @@@ libparticulates3D_la_LINK = $(LIBTOOL) 
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
  	$(libparticulates3D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libstokes2D_la_LIBADD =
 +am_libstokes2D_la_OBJECTS = libstokes2D_la-stokes.lo CW263.lo
 +libstokes2D_la_OBJECTS = $(am_libstokes2D_la_OBJECTS)
 + at BUILD_STOKES_TRUE@am_libstokes2D_la_rpath = -rpath $(pkglibdir)
 +libstokes3D_la_LIBADD =
 +am_libstokes3D_la_OBJECTS = libstokes3D_la-stokes.lo CW263.lo
 +libstokes3D_la_OBJECTS = $(am_libstokes3D_la_OBJECTS)
 + at BUILD_STOKES_TRUE@am_libstokes3D_la_rpath = -rpath $(pkglibdir)
++=======
+ libskewsymmetric2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libskewsymmetric2D_la_OBJECTS =  \
+ 	libskewsymmetric2D_la-skewsymmetric.lo
+ libskewsymmetric2D_la_OBJECTS = $(am_libskewsymmetric2D_la_OBJECTS)
+ libskewsymmetric2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ 	$(libskewsymmetric2D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
+ libskewsymmetric3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libskewsymmetric3D_la_OBJECTS =  \
+ 	libskewsymmetric3D_la-skewsymmetric.lo
+ libskewsymmetric3D_la_OBJECTS = $(am_libskewsymmetric3D_la_OBJECTS)
+ libskewsymmetric3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ 	$(libskewsymmetric3D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
+ libstokes2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libstokes2D_la_OBJECTS = libstokes2D_la-stokes.lo CW263.lo
+ libstokes2D_la_OBJECTS = $(am_libstokes2D_la_OBJECTS)
+ @BUILD_STOKES_TRUE at am_libstokes2D_la_rpath = -rpath $(pkglibdir)
+ libstokes3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libstokes3D_la_OBJECTS = libstokes3D_la-stokes.lo CW263.lo
+ libstokes3D_la_OBJECTS = $(am_libstokes3D_la_OBJECTS)
+ @BUILD_STOKES_TRUE at am_libstokes3D_la_rpath = -rpath $(pkglibdir)
+ am_libterrain2D_la_OBJECTS = libterrain2D_la-terrain.lo
+ libterrain2D_la_OBJECTS = $(am_libterrain2D_la_OBJECTS)
+ libterrain2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libterrain2D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ am_libterrain3D_la_OBJECTS = terrain.lo
+ libterrain3D_la_OBJECTS = $(am_libterrain3D_la_OBJECTS)
+ libtide2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_1)
+ am_libtide2D_la_OBJECTS = libtide2D_la-tide.lo
+ libtide2D_la_OBJECTS = $(am_libtide2D_la_OBJECTS)
+ libtide2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libtide2D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ @BUILD_TIDE_TRUE at am_libtide2D_la_rpath = -rpath $(pkglibdir)
+ libtide3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_1)
+ am_libtide3D_la_OBJECTS = libtide3D_la-tide.lo
+ libtide3D_la_OBJECTS = $(am_libtide3D_la_OBJECTS)
+ libtide3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libtide3D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ @BUILD_TIDE_TRUE at am_libtide3D_la_rpath = -rpath $(pkglibdir)
+ libtopics2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libtopics2D_la_OBJECTS = libtopics2D_la-topics.lo
+ libtopics2D_la_OBJECTS = $(am_libtopics2D_la_OBJECTS)
+ libtopics2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libtopics2D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ libtopics3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_libtopics3D_la_OBJECTS = libtopics3D_la-topics.lo
+ libtopics3D_la_OBJECTS = $(am_libtopics3D_la_OBJECTS)
+ libtopics3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libtopics3D_la_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++>>>>>>> upstream/20131206+dfsg
  am_libwavewatch2D_la_OBJECTS = libwavewatch2D_la-wavewatch.lo
  libwavewatch2D_la_OBJECTS = $(am_libwavewatch2D_la_OBJECTS)
  libwavewatch2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@@ -211,6 -324,13 +437,16 @@@
  	$(libwavewatch2D_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
  	-o $@
  @BUILD_WAVEWATCH_TRUE at am_libwavewatch2D_la_rpath = -rpath $(pkglibdir)
++<<<<<<< HEAD
++=======
+ PROGRAMS = $(bin_PROGRAMS)
+ am_rsurface2kdt_OBJECTS = rsurface2kdt-rsurface2kdt.$(OBJEXT) \
+ 	rsurface2kdt-rsurface.$(OBJEXT)
+ rsurface2kdt_OBJECTS = $(am_rsurface2kdt_OBJECTS)
+ rsurface2kdt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(rsurface2kdt_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
++>>>>>>> upstream/20131206+dfsg
  DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
  depcomp = $(SHELL) $(top_srcdir)/depcomp
  am__depfiles_maybe = depfiles
@@@ -240,26 -360,48 +476,71 @@@ FCLINK = $(LIBTOOL) --tag=FC $(AM_LIBTO
  	$(LDFLAGS) -o $@
  SOURCES = $(libagmg2D_la_SOURCES) $(libagmg3D_la_SOURCES) \
  	$(libbubbles2D_la_SOURCES) $(libbubbles3D_la_SOURCES) \
++<<<<<<< HEAD
 +	$(libdf33D_la_SOURCES) $(libelectrohydro2D_la_SOURCES) \
 +	$(libelectrohydro3D_la_SOURCES) $(libhypre2D_la_SOURCES) \
 +	$(libhypre3D_la_SOURCES) $(liblis2D_la_SOURCES) \
 +	$(liblis3D_la_SOURCES) $(libmap2D_la_SOURCES) \
 +	$(libmap3D_la_SOURCES) $(libode2D_la_SOURCES) \
 +	$(libode3D_la_SOURCES) $(libokada2D_la_SOURCES) \
 +	$(libokada3D_la_SOURCES) $(libparticulates2D_la_SOURCES) \
 +	$(libparticulates3D_la_SOURCES) $(libstokes2D_la_SOURCES) \
 +	$(libstokes3D_la_SOURCES) $(libwavewatch2D_la_SOURCES)
 +DIST_SOURCES = $(libagmg2D_la_SOURCES) $(libagmg3D_la_SOURCES) \
 +	$(libbubbles2D_la_SOURCES) $(libbubbles3D_la_SOURCES) \
 +	$(libdf33D_la_SOURCES) $(libelectrohydro2D_la_SOURCES) \
 +	$(libelectrohydro3D_la_SOURCES) $(libhypre2D_la_SOURCES) \
 +	$(libhypre3D_la_SOURCES) $(liblis2D_la_SOURCES) \
 +	$(liblis3D_la_SOURCES) $(libmap2D_la_SOURCES) \
 +	$(libmap3D_la_SOURCES) $(libode2D_la_SOURCES) \
 +	$(libode3D_la_SOURCES) $(libokada2D_la_SOURCES) \
 +	$(libokada3D_la_SOURCES) $(libparticulates2D_la_SOURCES) \
 +	$(libparticulates3D_la_SOURCES) $(libstokes2D_la_SOURCES) \
 +	$(libstokes3D_la_SOURCES) $(libwavewatch2D_la_SOURCES)
++=======
+ 	$(libculvert2D_la_SOURCES) $(libdf33D_la_SOURCES) \
+ 	$(libelectrohydro2D_la_SOURCES) \
+ 	$(libelectrohydro3D_la_SOURCES) $(libfft2D_la_SOURCES) \
+ 	$(libfft3D_la_SOURCES) $(libhypre2D_la_SOURCES) \
+ 	$(libhypre3D_la_SOURCES) $(liblayered2D_la_SOURCES) \
+ 	$(liblis2D_la_SOURCES) $(liblis3D_la_SOURCES) \
+ 	$(libmap2D_la_SOURCES) $(libmap3D_la_SOURCES) \
+ 	$(libode2D_la_SOURCES) $(libode3D_la_SOURCES) \
+ 	$(libokada2D_la_SOURCES) $(libokada3D_la_SOURCES) \
+ 	$(libparticulatecommon2D_la_SOURCES) \
+ 	$(libparticulatecommon3D_la_SOURCES) \
+ 	$(libparticulates2D_la_SOURCES) \
+ 	$(libparticulates3D_la_SOURCES) \
+ 	$(libskewsymmetric2D_la_SOURCES) \
+ 	$(libskewsymmetric3D_la_SOURCES) $(libstokes2D_la_SOURCES) \
+ 	$(libstokes3D_la_SOURCES) $(libterrain2D_la_SOURCES) \
+ 	$(libterrain3D_la_SOURCES) $(libtide2D_la_SOURCES) \
+ 	$(libtide3D_la_SOURCES) $(libtopics2D_la_SOURCES) \
+ 	$(libtopics3D_la_SOURCES) $(libwavewatch2D_la_SOURCES) \
+ 	$(rsurface2kdt_SOURCES)
+ DIST_SOURCES = $(libagmg2D_la_SOURCES) $(libagmg3D_la_SOURCES) \
+ 	$(libbubbles2D_la_SOURCES) $(libbubbles3D_la_SOURCES) \
+ 	$(libculvert2D_la_SOURCES) $(libdf33D_la_SOURCES) \
+ 	$(libelectrohydro2D_la_SOURCES) \
+ 	$(libelectrohydro3D_la_SOURCES) $(libfft2D_la_SOURCES) \
+ 	$(libfft3D_la_SOURCES) $(libhypre2D_la_SOURCES) \
+ 	$(libhypre3D_la_SOURCES) $(liblayered2D_la_SOURCES) \
+ 	$(liblis2D_la_SOURCES) $(liblis3D_la_SOURCES) \
+ 	$(libmap2D_la_SOURCES) $(libmap3D_la_SOURCES) \
+ 	$(libode2D_la_SOURCES) $(libode3D_la_SOURCES) \
+ 	$(libokada2D_la_SOURCES) $(libokada3D_la_SOURCES) \
+ 	$(libparticulatecommon2D_la_SOURCES) \
+ 	$(libparticulatecommon3D_la_SOURCES) \
+ 	$(libparticulates2D_la_SOURCES) \
+ 	$(libparticulates3D_la_SOURCES) \
+ 	$(libskewsymmetric2D_la_SOURCES) \
+ 	$(libskewsymmetric3D_la_SOURCES) $(libstokes2D_la_SOURCES) \
+ 	$(libstokes3D_la_SOURCES) $(libterrain2D_la_SOURCES) \
+ 	$(libterrain3D_la_SOURCES) $(libtide2D_la_SOURCES) \
+ 	$(libtide3D_la_SOURCES) $(libtopics2D_la_SOURCES) \
+ 	$(libtopics3D_la_SOURCES) $(libwavewatch2D_la_SOURCES) \
+ 	$(rsurface2kdt_SOURCES)
++>>>>>>> upstream/20131206+dfsg
  RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
  	html-recursive info-recursive install-data-recursive \
  	install-dvi-recursive install-exec-recursive \
@@@ -267,6 -409,11 +548,14 @@@
  	install-pdf-recursive install-ps-recursive install-recursive \
  	installcheck-recursive installdirs-recursive pdf-recursive \
  	ps-recursive uninstall-recursive
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
    distclean-recursive maintainer-clean-recursive
  AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@@ -329,7 -476,10 +618,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -342,8 -492,6 +638,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -366,7 -514,6 +665,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -384,6 -531,9 +686,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -391,6 -541,7 +699,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -417,10 -568,6 +729,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -453,9 -600,7 +768,13 @@@ top_build_prefix = @top_build_prefix
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
  use_mpicc = @use_mpicc@
++<<<<<<< HEAD
 +
 +#SUBDIRS = RStarTree kdt fes2004 wavewatch
 +SUBDIRS = kdt wavewatch
++=======
+ SUBDIRS = RStarTree kdt fes2004 wavewatch culvert
++>>>>>>> upstream/20131206+dfsg
  AM_CPPFLAGS = -DGFS_MODULES_DIR=\"$(libdir)/gerris\"
  INCLUDES = -I$(top_srcdir)/src -I$(includedir) \
             -DG_LOG_DOMAIN=\"Gfs-modules\" $(GTS_CFLAGS)
@@@ -469,8 -614,11 +788,16 @@@
  @BUILD_AGMG_TRUE at AGMG = libagmg2D.la libagmg3D.la
  @BUILD_ODE_TRUE at ODE = libode2D.la libode3D.la
  @HAS_GSL_TRUE at BUBBLES = libbubbles2D.la libbubbles3D.la
++<<<<<<< HEAD
 +pkglib_LTLIBRARIES = \
 +	$(MAP) \
++=======
+ @HAS_FFTW3_TRUE at FFT = libfft2D.la libfft3D.la
+ pkglib_LTLIBRARIES = \
+ 	$(MAP) \
+ 	libterrain2D.la \
+ 	libterrain3D.la \
++>>>>>>> upstream/20131206+dfsg
  	libparticulates2D.la \
  	libparticulates3D.la \
  	libokada2D.la \
@@@ -478,63 -626,54 +805,108 @@@
  	libdf33D.la \
  	libelectrohydro2D.la \
  	libelectrohydro3D.la \
++<<<<<<< HEAD
++=======
+ 	libskewsymmetric2D.la \
+ 	libskewsymmetric3D.la \
+ 	libtopics2D.la \
+ 	libtopics3D.la \
+ 	libculvert2D.la \
+ 	liblayered2D.la \
+ 	$(TIDE) \
++>>>>>>> upstream/20131206+dfsg
  	$(STOKES) \
  	$(WAVEWATCH) \
  	$(HYPRE) \
  	$(LIS) \
  	$(AGMG) \
  	$(ODE) \
++<<<<<<< HEAD
 +        $(BUBBLES)
 +
 +EXTRA_DIST = \
 +	map.mod \
 +	tide.mod \
 +	terrain.mod \
 +	stokes.mod \
 +	wavewatch.mod \
 +	particulates.mod \
 +	bubbles.mod \
 +	df3.mod \
 +	electrohydro.mod \
 +	okada.mod \
 +	hypre.mod \
 +	lis.mod \
 +	agmg.mod \
 +	ode.mod
 +
 +BUILT_SOURCES = \
 +	map.c \
 +	tide.c \
 +	terrain.c \
 +	stokes.c \
 +	wavewatch.c \
 +	particulates.c \
 +	bubbles.c \
 +	df3.c \
 +	electrohydro.c \
 +	okada.c \
 +	hypre.c \
 +	lis.c \
 +	agmg.c \
 +	ode.c
++=======
+         $(BUBBLES) \
+ 	$(FFT)
++>>>>>>> upstream/20131206+dfsg
  
  AM_LDFLAGS = $(NO_UNDEFINED)\
          -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\
  	-release $(LT_RELEASE) -export-dynamic -module
  
  libmap3D_la_SOURCES = map.c
++<<<<<<< HEAD
 +libmap3D_la_LIBADD = -lproj
 +libmap2D_la_SOURCES = map.c
 +libmap2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libmap2D_la_LIBADD = -lproj
 +KDTLIBS = -Lkdt -lkdt
 +KDTDEPS = kdt/libkdt.la
 +libstokes3D_la_SOURCES = stokes.c CW263.f
 +libstokes3D_la_CFLAGS = $(AM_CFLAGS)
 +libstokes2D_la_SOURCES = stokes.c CW263.f
 +libstokes2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libwavewatch2D_la_SOURCES = wavewatch.c
 +libwavewatch2D_la_LIBADD = -Lwavewatch -lwavewatch -L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran
++=======
+ libmap3D_la_LIBADD = $(GFS3D_LIBS) -lproj
+ libmap2D_la_SOURCES = map.c
+ libmap2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libmap2D_la_LIBADD = $(GFS2D_LIBS) -lproj
+ KDTLIBS = -Lkdt -lkdt -lm
+ KDTDEPS = kdt/libkdt.la
+ libterrain3D_la_SOURCES = terrain.c
+ libterrain3D_la_LIBADD = $(GFS3D_LIBS) $(KDTLIBS)
+ libterrain3D_la_DEPENDENCIES = $(KDTDEPS)
+ libterrain2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libterrain2D_la_SOURCES = terrain.c
+ libterrain2D_la_LIBADD = $(GFS2D_LIBS) $(KDTLIBS)
+ libterrain2D_la_DEPENDENCIES = $(KDTDEPS)
+ libtide3D_la_SOURCES = tide.c
+ libtide3D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS)
+ libtide3D_la_LIBADD = $(GFS3D_LIBS) -Lfes2004 -lfes -lnetcdf $(GSL_LIBS)
+ libtide2D_la_SOURCES = tide.c
+ libtide2D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS) -DFTT_2D=1
+ libtide2D_la_LIBADD = $(GFS2D_LIBS) -Lfes2004 -lfes -lnetcdf $(GSL_LIBS)
+ libstokes3D_la_SOURCES = stokes.c CW263.f
+ libstokes3D_la_CFLAGS = $(AM_CFLAGS)
+ libstokes3D_la_LIBADD = $(GFS3D_LIBS)
+ libstokes2D_la_SOURCES = stokes.c CW263.f
+ libstokes2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libstokes2D_la_LIBADD = $(GFS2D_LIBS)
+ libwavewatch2D_la_SOURCES = wavewatch.c
+ libwavewatch2D_la_LIBADD = $(GFS2D_LIBS) -Lwavewatch -lwavewatch -L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran
++>>>>>>> upstream/20131206+dfsg
  libwavewatch2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1 \
    -DW3SRCE=`nm wavewatch/libwavewatch.a | grep w3srce | awk '{ if ($$2 == "T") print $$3; }'` \
    -DGFSW3INIT=`nm wavewatch/libwavewatch.a | grep gfsw3_init | awk '{ if ($$2 == "T") print $$3; }'`
@@@ -542,53 -681,97 +914,147 @@@
  libwavewatch2D_la_DEPENDENCIES = wavewatch/libwavewatch.a
  libode3D_la_SOURCES = ode.c
  libode3D_la_CFLAGS = $(AM_CFLAGS) $(ODE_CFLAGS)
++<<<<<<< HEAD
 +libode3D_la_LIBADD = $(ODE_LIBS)
 +libode2D_la_SOURCES = ode.c
 +libode2D_la_CFLAGS = $(AM_CFLAGS) $(ODE_CFLAGS) -DFTT_2D=1
 +libode2D_la_LIBADD = $(ODE_LIBS)
 +libparticulates3D_la_SOURCES = particulates.c particulates.h
 +libparticulates3D_la_CFLAGS = $(AM_CFLAGS)
 +libparticulates2D_la_SOURCES = particulates.c particulates.h
 +libparticulates2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libbubbles3D_la_SOURCES = bubbles.c
 +libbubbles3D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS)
 +libbubbles3D_la_LIBADD = $(GSL_LIBS)
 +libbubbles2D_la_SOURCES = bubbles.c
 +libbubbles2D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS) -DFTT_2D=1
 +libbubbles2D_la_LIBADD = $(GSL_LIBS)
 +libhypre3D_la_SOURCES = hypre.c
 +libhypre3D_la_CFLAGS = $(AM_CFLAGS)
 +libhypre3D_la_LIBADD = -lHYPRE -lm
 +libhypre2D_la_SOURCES = hypre.c
 +libhypre2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libhypre2D_la_LIBADD = -lHYPRE -lm
 +liblis3D_la_SOURCES = lis.c
 +liblis3D_la_CFLAGS = $(AM_CFLAGS)
 +liblis3D_la_LIBADD = -llis -lgfortran -lm
 +liblis2D_la_SOURCES = lis.c
 +liblis2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +liblis2D_la_LIBADD = -llis -lgfortran -lm
 +libagmg3D_la_SOURCES = agmg.c dagmg.f90
 +libagmg3D_la_CFLAGS = $(AM_CFLAGS)
 +libagmg3D_la_LIBADD = -llapack -lblas -lgfortran -lm
 +libagmg2D_la_SOURCES = agmg.c dagmg.f90
 +libagmg2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libagmg2D_la_LIBADD = -llapack -lblas -lgfortran -lm
 +libokada3D_la_SOURCES = okada.c
 +libokada3D_la_CFLAGS = $(AM_CFLAGS)
 +libokada2D_la_SOURCES = okada.c
 +libokada2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +libdf33D_la_SOURCES = df3.c
 +libdf33D_la_CFLAGS = $(AM_CFLAGS)
 +libelectrohydro3D_la_SOURCES = electrohydro.c
 +libelectrohydro3D_la_CFLAGS = $(AM_CFLAGS)
 +libelectrohydro2D_la_SOURCES = electrohydro.c
 +libelectrohydro2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
 +all: $(BUILT_SOURCES)
 +	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 +
 +.SUFFIXES:
 +.SUFFIXES: .c .f .f90 .lo .mod .o .obj
++=======
+ libode3D_la_LIBADD = $(GFS3D_LIBS) $(ODE_LIBS)
+ libode2D_la_SOURCES = ode.c
+ libode2D_la_CFLAGS = $(AM_CFLAGS) $(ODE_CFLAGS) -DFTT_2D=1
+ libode2D_la_LIBADD = $(GFS2D_LIBS) $(ODE_LIBS)
+ rsurface2kdt_SOURCES = rsurface2kdt.c rsurface.c rsurface.h
+ rsurface2kdt_LDADD = -LRStarTree -lcSmRST $(KDTLIBS)
+ rsurface2kdt_CFLAGS = $(AM_CFLAGS)
+ rsurface2kdt_DEPENDENCIES = $(KDTDEPS)
+ noinst_LTLIBRARIES = libparticulatecommon2D.la libparticulatecommon3D.la
+ libparticulatecommon3D_la_SOURCES = particulatecommon.c particulatecommon.h
+ libparticulatecommon3D_la_CFLAGS = $(AM_CFLAGS)
+ libparticulatecommon2D_la_SOURCES = particulatecommon.c particulatecommon.h
+ libparticulatecommon2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libparticulates3D_la_SOURCES = particulates.c
+ libparticulates3D_la_CFLAGS = $(AM_CFLAGS)
+ libparticulates3D_la_LIBADD = libparticulatecommon3D.la $(GFS3D_LIBS)
+ libparticulates3D_la_DEPENDENCIES = libparticulatecommon3D.la
+ libparticulates2D_la_SOURCES = particulates.c
+ libparticulates2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libparticulates2D_la_LIBADD = libparticulatecommon2D.la $(GFS2D_LIBS)
+ libparticulates2D_la_DEPENDENCIES = libparticulatecommon2D.la
+ libbubbles3D_la_SOURCES = bubbles.c
+ libbubbles3D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS)
+ libbubbles3D_la_LIBADD = libparticulatecommon3D.la $(GFS3D_LIBS) $(GSL_LIBS)
+ libbubbles3D_la_DEPENDENCIES = libparticulatecommon3D.la
+ libbubbles2D_la_SOURCES = bubbles.c
+ libbubbles2D_la_CFLAGS = $(AM_CFLAGS) $(GSL_CFLAGS) -DFTT_2D=1
+ libbubbles2D_la_LIBADD = libparticulatecommon2D.la $(GFS2D_LIBS) $(GSL_LIBS)
+ libbubbles2D_la_DEPENDENCIES = libparticulatecommon2D.la
+ libfft3D_la_SOURCES = fft.c
+ libfft3D_la_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS)
+ libfft3D_la_LIBADD = $(GFS3D_LIBS) $(FFTW3_LIBS)
+ libfft2D_la_SOURCES = fft.c
+ libfft2D_la_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS) -DFTT_2D=1
+ libfft2D_la_LIBADD = $(GFS2D_LIBS) $(FFTW3_LIBS)
+ libhypre3D_la_SOURCES = hypre.c
+ libhypre3D_la_CFLAGS = $(AM_CFLAGS)
+ libhypre3D_la_LIBADD = $(GFS3D_LIBS) -lHYPRE -lm
+ libhypre2D_la_SOURCES = hypre.c
+ libhypre2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libhypre2D_la_LIBADD = $(GFS2D_LIBS) -lHYPRE -lm
+ liblis3D_la_SOURCES = lis.c
+ liblis3D_la_CFLAGS = $(AM_CFLAGS)
+ liblis3D_la_LIBADD = $(GFS3D_LIBS) -llis -lgfortran -lm
+ liblis2D_la_SOURCES = lis.c
+ liblis2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ liblis2D_la_LIBADD = $(GFS2D_LIBS) -llis -lgfortran -lm
+ libagmg3D_la_SOURCES = agmg.c dagmg.f90
+ libagmg3D_la_CFLAGS = $(AM_CFLAGS)
+ libagmg3D_la_LIBADD = $(GFS3D_LIBS) -llapack -lblas -lgfortran -lm
+ libagmg2D_la_SOURCES = agmg.c dagmg.f90
+ libagmg2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libagmg2D_la_LIBADD = $(GFS2D_LIBS) -llapack -lblas -lgfortran -lm
+ libokada3D_la_SOURCES = okada.c
+ libokada3D_la_CFLAGS = $(AM_CFLAGS)
+ libokada3D_la_LIBADD = $(GFS3D_LIBS)
+ libokada2D_la_SOURCES = okada.c
+ libokada2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libokada2D_la_LIBADD = $(GFS2D_LIBS)
+ libdf33D_la_SOURCES = df3.c
+ libdf33D_la_CFLAGS = $(AM_CFLAGS)
+ libdf33D_la_LIBADD = $(GFS3D_LIBS)
+ libelectrohydro3D_la_SOURCES = electrohydro.c
+ libelectrohydro3D_la_CFLAGS = $(AM_CFLAGS)
+ libelectrohydro3D_la_LIBADD = $(GFS3D_LIBS)
+ libelectrohydro2D_la_SOURCES = electrohydro.c
+ libelectrohydro2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libelectrohydro2D_la_LIBADD = $(GFS2D_LIBS)
+ libskewsymmetric3D_la_SOURCES = skewsymmetric.c
+ libskewsymmetric3D_la_CFLAGS = $(AM_CFLAGS)
+ libskewsymmetric3D_la_LIBADD = $(GFS3D_LIBS)
+ libskewsymmetric2D_la_SOURCES = skewsymmetric.c
+ libskewsymmetric2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libskewsymmetric2D_la_LIBADD = $(GFS2D_LIBS)
+ libtopics3D_la_SOURCES = topics.c
+ libtopics3D_la_CFLAGS = $(AM_CFLAGS)
+ libtopics3D_la_LIBADD = $(GFS3D_LIBS)
+ libtopics2D_la_SOURCES = topics.c
+ libtopics2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ libtopics2D_la_LIBADD = $(GFS2D_LIBS)
+ libculvert2D_la_SOURCES = culvert.c
+ libculvert2D_la_CFLAGS = $(AM_CFLAGS)
+ libculvert2D_la_LIBADD = $(GFS2D_LIBS) -Lculvert -lboyd87 -lm
+ libculvert2D_la_DEPENDENCIES = culvert/libboyd87.la
+ liblayered2D_la_SOURCES = layered.c
+ liblayered2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ liblayered2D_la_LIBADD = $(GFS2D_LIBS)
+ all: all-recursive
+ 
+ .SUFFIXES:
+ .SUFFIXES: .c .f .f90 .lo .o .obj
++>>>>>>> upstream/20131206+dfsg
  $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
  	@for dep in $?; do \
  	  case '$(am__configure_deps)' in \
@@@ -619,9 -802,17 +1085,23 @@@ $(top_srcdir)/configure: @MAINTAINER_MO
  $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(am__aclocal_m4_deps):
++<<<<<<< HEAD
 +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
++=======
+ 
+ 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
+ install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ 	@$(NORMAL_INSTALL)
++>>>>>>> upstream/20131206+dfsg
  	@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
  	list2=; for p in $$list; do \
  	  if test -f $$p; then \
@@@ -629,6 -820,8 +1109,11 @@@
  	  else :; fi; \
  	done; \
  	test -z "$$list2" || { \
++<<<<<<< HEAD
++=======
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
++>>>>>>> upstream/20131206+dfsg
  	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
  	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
  	}
@@@ -650,50 -843,127 +1135,174 @@@ clean-pkglibLTLIBRARIES
  	  echo "rm -f \"$${dir}/so_locations\""; \
  	  rm -f "$${dir}/so_locations"; \
  	done
++<<<<<<< HEAD
 +libagmg2D.la: $(libagmg2D_la_OBJECTS) $(libagmg2D_la_DEPENDENCIES) 
 +	$(FCLINK) $(am_libagmg2D_la_rpath) $(libagmg2D_la_OBJECTS) $(libagmg2D_la_LIBADD) $(LIBS)
 +libagmg3D.la: $(libagmg3D_la_OBJECTS) $(libagmg3D_la_DEPENDENCIES) 
 +	$(FCLINK) $(am_libagmg3D_la_rpath) $(libagmg3D_la_OBJECTS) $(libagmg3D_la_LIBADD) $(LIBS)
 +libbubbles2D.la: $(libbubbles2D_la_OBJECTS) $(libbubbles2D_la_DEPENDENCIES) 
 +	$(libbubbles2D_la_LINK) $(am_libbubbles2D_la_rpath) $(libbubbles2D_la_OBJECTS) $(libbubbles2D_la_LIBADD) $(LIBS)
 +libbubbles3D.la: $(libbubbles3D_la_OBJECTS) $(libbubbles3D_la_DEPENDENCIES) 
 +	$(libbubbles3D_la_LINK) $(am_libbubbles3D_la_rpath) $(libbubbles3D_la_OBJECTS) $(libbubbles3D_la_LIBADD) $(LIBS)
 +libdf33D.la: $(libdf33D_la_OBJECTS) $(libdf33D_la_DEPENDENCIES) 
 +	$(libdf33D_la_LINK) -rpath $(pkglibdir) $(libdf33D_la_OBJECTS) $(libdf33D_la_LIBADD) $(LIBS)
 +libelectrohydro2D.la: $(libelectrohydro2D_la_OBJECTS) $(libelectrohydro2D_la_DEPENDENCIES) 
 +	$(libelectrohydro2D_la_LINK) -rpath $(pkglibdir) $(libelectrohydro2D_la_OBJECTS) $(libelectrohydro2D_la_LIBADD) $(LIBS)
 +libelectrohydro3D.la: $(libelectrohydro3D_la_OBJECTS) $(libelectrohydro3D_la_DEPENDENCIES) 
 +	$(libelectrohydro3D_la_LINK) -rpath $(pkglibdir) $(libelectrohydro3D_la_OBJECTS) $(libelectrohydro3D_la_LIBADD) $(LIBS)
 +libhypre2D.la: $(libhypre2D_la_OBJECTS) $(libhypre2D_la_DEPENDENCIES) 
 +	$(libhypre2D_la_LINK) $(am_libhypre2D_la_rpath) $(libhypre2D_la_OBJECTS) $(libhypre2D_la_LIBADD) $(LIBS)
 +libhypre3D.la: $(libhypre3D_la_OBJECTS) $(libhypre3D_la_DEPENDENCIES) 
 +	$(libhypre3D_la_LINK) $(am_libhypre3D_la_rpath) $(libhypre3D_la_OBJECTS) $(libhypre3D_la_LIBADD) $(LIBS)
 +liblis2D.la: $(liblis2D_la_OBJECTS) $(liblis2D_la_DEPENDENCIES) 
 +	$(liblis2D_la_LINK) $(am_liblis2D_la_rpath) $(liblis2D_la_OBJECTS) $(liblis2D_la_LIBADD) $(LIBS)
 +liblis3D.la: $(liblis3D_la_OBJECTS) $(liblis3D_la_DEPENDENCIES) 
 +	$(liblis3D_la_LINK) $(am_liblis3D_la_rpath) $(liblis3D_la_OBJECTS) $(liblis3D_la_LIBADD) $(LIBS)
 +libmap2D.la: $(libmap2D_la_OBJECTS) $(libmap2D_la_DEPENDENCIES) 
 +	$(libmap2D_la_LINK) $(am_libmap2D_la_rpath) $(libmap2D_la_OBJECTS) $(libmap2D_la_LIBADD) $(LIBS)
 +libmap3D.la: $(libmap3D_la_OBJECTS) $(libmap3D_la_DEPENDENCIES) 
 +	$(LINK) $(am_libmap3D_la_rpath) $(libmap3D_la_OBJECTS) $(libmap3D_la_LIBADD) $(LIBS)
 +libode2D.la: $(libode2D_la_OBJECTS) $(libode2D_la_DEPENDENCIES) 
 +	$(libode2D_la_LINK) $(am_libode2D_la_rpath) $(libode2D_la_OBJECTS) $(libode2D_la_LIBADD) $(LIBS)
 +libode3D.la: $(libode3D_la_OBJECTS) $(libode3D_la_DEPENDENCIES) 
 +	$(libode3D_la_LINK) $(am_libode3D_la_rpath) $(libode3D_la_OBJECTS) $(libode3D_la_LIBADD) $(LIBS)
 +libokada2D.la: $(libokada2D_la_OBJECTS) $(libokada2D_la_DEPENDENCIES) 
 +	$(libokada2D_la_LINK) -rpath $(pkglibdir) $(libokada2D_la_OBJECTS) $(libokada2D_la_LIBADD) $(LIBS)
 +libokada3D.la: $(libokada3D_la_OBJECTS) $(libokada3D_la_DEPENDENCIES) 
 +	$(libokada3D_la_LINK) -rpath $(pkglibdir) $(libokada3D_la_OBJECTS) $(libokada3D_la_LIBADD) $(LIBS)
 +libparticulates2D.la: $(libparticulates2D_la_OBJECTS) $(libparticulates2D_la_DEPENDENCIES) 
 +	$(libparticulates2D_la_LINK) -rpath $(pkglibdir) $(libparticulates2D_la_OBJECTS) $(libparticulates2D_la_LIBADD) $(LIBS)
 +libparticulates3D.la: $(libparticulates3D_la_OBJECTS) $(libparticulates3D_la_DEPENDENCIES) 
 +	$(libparticulates3D_la_LINK) -rpath $(pkglibdir) $(libparticulates3D_la_OBJECTS) $(libparticulates3D_la_LIBADD) $(LIBS)
 +libstokes2D.la: $(libstokes2D_la_OBJECTS) $(libstokes2D_la_DEPENDENCIES) 
 +	$(F77LINK) $(am_libstokes2D_la_rpath) $(libstokes2D_la_OBJECTS) $(libstokes2D_la_LIBADD) $(LIBS)
 +libstokes3D.la: $(libstokes3D_la_OBJECTS) $(libstokes3D_la_DEPENDENCIES) 
 +	$(F77LINK) $(am_libstokes3D_la_rpath) $(libstokes3D_la_OBJECTS) $(libstokes3D_la_LIBADD) $(LIBS)
 +libwavewatch2D.la: $(libwavewatch2D_la_OBJECTS) $(libwavewatch2D_la_DEPENDENCIES) 
 +	$(libwavewatch2D_la_LINK) $(am_libwavewatch2D_la_rpath) $(libwavewatch2D_la_OBJECTS) $(libwavewatch2D_la_LIBADD) $(LIBS)
++=======
+ libagmg2D.la: $(libagmg2D_la_OBJECTS) $(libagmg2D_la_DEPENDENCIES) $(EXTRA_libagmg2D_la_DEPENDENCIES) 
+ 	$(FCLINK) $(am_libagmg2D_la_rpath) $(libagmg2D_la_OBJECTS) $(libagmg2D_la_LIBADD) $(LIBS)
+ libagmg3D.la: $(libagmg3D_la_OBJECTS) $(libagmg3D_la_DEPENDENCIES) $(EXTRA_libagmg3D_la_DEPENDENCIES) 
+ 	$(FCLINK) $(am_libagmg3D_la_rpath) $(libagmg3D_la_OBJECTS) $(libagmg3D_la_LIBADD) $(LIBS)
+ libbubbles2D.la: $(libbubbles2D_la_OBJECTS) $(libbubbles2D_la_DEPENDENCIES) $(EXTRA_libbubbles2D_la_DEPENDENCIES) 
+ 	$(libbubbles2D_la_LINK) $(am_libbubbles2D_la_rpath) $(libbubbles2D_la_OBJECTS) $(libbubbles2D_la_LIBADD) $(LIBS)
+ libbubbles3D.la: $(libbubbles3D_la_OBJECTS) $(libbubbles3D_la_DEPENDENCIES) $(EXTRA_libbubbles3D_la_DEPENDENCIES) 
+ 	$(libbubbles3D_la_LINK) $(am_libbubbles3D_la_rpath) $(libbubbles3D_la_OBJECTS) $(libbubbles3D_la_LIBADD) $(LIBS)
+ libculvert2D.la: $(libculvert2D_la_OBJECTS) $(libculvert2D_la_DEPENDENCIES) $(EXTRA_libculvert2D_la_DEPENDENCIES) 
+ 	$(libculvert2D_la_LINK) -rpath $(pkglibdir) $(libculvert2D_la_OBJECTS) $(libculvert2D_la_LIBADD) $(LIBS)
+ libdf33D.la: $(libdf33D_la_OBJECTS) $(libdf33D_la_DEPENDENCIES) $(EXTRA_libdf33D_la_DEPENDENCIES) 
+ 	$(libdf33D_la_LINK) -rpath $(pkglibdir) $(libdf33D_la_OBJECTS) $(libdf33D_la_LIBADD) $(LIBS)
+ libelectrohydro2D.la: $(libelectrohydro2D_la_OBJECTS) $(libelectrohydro2D_la_DEPENDENCIES) $(EXTRA_libelectrohydro2D_la_DEPENDENCIES) 
+ 	$(libelectrohydro2D_la_LINK) -rpath $(pkglibdir) $(libelectrohydro2D_la_OBJECTS) $(libelectrohydro2D_la_LIBADD) $(LIBS)
+ libelectrohydro3D.la: $(libelectrohydro3D_la_OBJECTS) $(libelectrohydro3D_la_DEPENDENCIES) $(EXTRA_libelectrohydro3D_la_DEPENDENCIES) 
+ 	$(libelectrohydro3D_la_LINK) -rpath $(pkglibdir) $(libelectrohydro3D_la_OBJECTS) $(libelectrohydro3D_la_LIBADD) $(LIBS)
+ libfft2D.la: $(libfft2D_la_OBJECTS) $(libfft2D_la_DEPENDENCIES) $(EXTRA_libfft2D_la_DEPENDENCIES) 
+ 	$(libfft2D_la_LINK) $(am_libfft2D_la_rpath) $(libfft2D_la_OBJECTS) $(libfft2D_la_LIBADD) $(LIBS)
+ libfft3D.la: $(libfft3D_la_OBJECTS) $(libfft3D_la_DEPENDENCIES) $(EXTRA_libfft3D_la_DEPENDENCIES) 
+ 	$(libfft3D_la_LINK) $(am_libfft3D_la_rpath) $(libfft3D_la_OBJECTS) $(libfft3D_la_LIBADD) $(LIBS)
+ libhypre2D.la: $(libhypre2D_la_OBJECTS) $(libhypre2D_la_DEPENDENCIES) $(EXTRA_libhypre2D_la_DEPENDENCIES) 
+ 	$(libhypre2D_la_LINK) $(am_libhypre2D_la_rpath) $(libhypre2D_la_OBJECTS) $(libhypre2D_la_LIBADD) $(LIBS)
+ libhypre3D.la: $(libhypre3D_la_OBJECTS) $(libhypre3D_la_DEPENDENCIES) $(EXTRA_libhypre3D_la_DEPENDENCIES) 
+ 	$(libhypre3D_la_LINK) $(am_libhypre3D_la_rpath) $(libhypre3D_la_OBJECTS) $(libhypre3D_la_LIBADD) $(LIBS)
+ liblayered2D.la: $(liblayered2D_la_OBJECTS) $(liblayered2D_la_DEPENDENCIES) $(EXTRA_liblayered2D_la_DEPENDENCIES) 
+ 	$(liblayered2D_la_LINK) -rpath $(pkglibdir) $(liblayered2D_la_OBJECTS) $(liblayered2D_la_LIBADD) $(LIBS)
+ liblis2D.la: $(liblis2D_la_OBJECTS) $(liblis2D_la_DEPENDENCIES) $(EXTRA_liblis2D_la_DEPENDENCIES) 
+ 	$(liblis2D_la_LINK) $(am_liblis2D_la_rpath) $(liblis2D_la_OBJECTS) $(liblis2D_la_LIBADD) $(LIBS)
+ liblis3D.la: $(liblis3D_la_OBJECTS) $(liblis3D_la_DEPENDENCIES) $(EXTRA_liblis3D_la_DEPENDENCIES) 
+ 	$(liblis3D_la_LINK) $(am_liblis3D_la_rpath) $(liblis3D_la_OBJECTS) $(liblis3D_la_LIBADD) $(LIBS)
+ libmap2D.la: $(libmap2D_la_OBJECTS) $(libmap2D_la_DEPENDENCIES) $(EXTRA_libmap2D_la_DEPENDENCIES) 
+ 	$(libmap2D_la_LINK) $(am_libmap2D_la_rpath) $(libmap2D_la_OBJECTS) $(libmap2D_la_LIBADD) $(LIBS)
+ libmap3D.la: $(libmap3D_la_OBJECTS) $(libmap3D_la_DEPENDENCIES) $(EXTRA_libmap3D_la_DEPENDENCIES) 
+ 	$(LINK) $(am_libmap3D_la_rpath) $(libmap3D_la_OBJECTS) $(libmap3D_la_LIBADD) $(LIBS)
+ libode2D.la: $(libode2D_la_OBJECTS) $(libode2D_la_DEPENDENCIES) $(EXTRA_libode2D_la_DEPENDENCIES) 
+ 	$(libode2D_la_LINK) $(am_libode2D_la_rpath) $(libode2D_la_OBJECTS) $(libode2D_la_LIBADD) $(LIBS)
+ libode3D.la: $(libode3D_la_OBJECTS) $(libode3D_la_DEPENDENCIES) $(EXTRA_libode3D_la_DEPENDENCIES) 
+ 	$(libode3D_la_LINK) $(am_libode3D_la_rpath) $(libode3D_la_OBJECTS) $(libode3D_la_LIBADD) $(LIBS)
+ libokada2D.la: $(libokada2D_la_OBJECTS) $(libokada2D_la_DEPENDENCIES) $(EXTRA_libokada2D_la_DEPENDENCIES) 
+ 	$(libokada2D_la_LINK) -rpath $(pkglibdir) $(libokada2D_la_OBJECTS) $(libokada2D_la_LIBADD) $(LIBS)
+ libokada3D.la: $(libokada3D_la_OBJECTS) $(libokada3D_la_DEPENDENCIES) $(EXTRA_libokada3D_la_DEPENDENCIES) 
+ 	$(libokada3D_la_LINK) -rpath $(pkglibdir) $(libokada3D_la_OBJECTS) $(libokada3D_la_LIBADD) $(LIBS)
+ libparticulatecommon2D.la: $(libparticulatecommon2D_la_OBJECTS) $(libparticulatecommon2D_la_DEPENDENCIES) $(EXTRA_libparticulatecommon2D_la_DEPENDENCIES) 
+ 	$(libparticulatecommon2D_la_LINK)  $(libparticulatecommon2D_la_OBJECTS) $(libparticulatecommon2D_la_LIBADD) $(LIBS)
+ libparticulatecommon3D.la: $(libparticulatecommon3D_la_OBJECTS) $(libparticulatecommon3D_la_DEPENDENCIES) $(EXTRA_libparticulatecommon3D_la_DEPENDENCIES) 
+ 	$(libparticulatecommon3D_la_LINK)  $(libparticulatecommon3D_la_OBJECTS) $(libparticulatecommon3D_la_LIBADD) $(LIBS)
+ libparticulates2D.la: $(libparticulates2D_la_OBJECTS) $(libparticulates2D_la_DEPENDENCIES) $(EXTRA_libparticulates2D_la_DEPENDENCIES) 
+ 	$(libparticulates2D_la_LINK) -rpath $(pkglibdir) $(libparticulates2D_la_OBJECTS) $(libparticulates2D_la_LIBADD) $(LIBS)
+ libparticulates3D.la: $(libparticulates3D_la_OBJECTS) $(libparticulates3D_la_DEPENDENCIES) $(EXTRA_libparticulates3D_la_DEPENDENCIES) 
+ 	$(libparticulates3D_la_LINK) -rpath $(pkglibdir) $(libparticulates3D_la_OBJECTS) $(libparticulates3D_la_LIBADD) $(LIBS)
+ libskewsymmetric2D.la: $(libskewsymmetric2D_la_OBJECTS) $(libskewsymmetric2D_la_DEPENDENCIES) $(EXTRA_libskewsymmetric2D_la_DEPENDENCIES) 
+ 	$(libskewsymmetric2D_la_LINK) -rpath $(pkglibdir) $(libskewsymmetric2D_la_OBJECTS) $(libskewsymmetric2D_la_LIBADD) $(LIBS)
+ libskewsymmetric3D.la: $(libskewsymmetric3D_la_OBJECTS) $(libskewsymmetric3D_la_DEPENDENCIES) $(EXTRA_libskewsymmetric3D_la_DEPENDENCIES) 
+ 	$(libskewsymmetric3D_la_LINK) -rpath $(pkglibdir) $(libskewsymmetric3D_la_OBJECTS) $(libskewsymmetric3D_la_LIBADD) $(LIBS)
+ libstokes2D.la: $(libstokes2D_la_OBJECTS) $(libstokes2D_la_DEPENDENCIES) $(EXTRA_libstokes2D_la_DEPENDENCIES) 
+ 	$(F77LINK) $(am_libstokes2D_la_rpath) $(libstokes2D_la_OBJECTS) $(libstokes2D_la_LIBADD) $(LIBS)
+ libstokes3D.la: $(libstokes3D_la_OBJECTS) $(libstokes3D_la_DEPENDENCIES) $(EXTRA_libstokes3D_la_DEPENDENCIES) 
+ 	$(F77LINK) $(am_libstokes3D_la_rpath) $(libstokes3D_la_OBJECTS) $(libstokes3D_la_LIBADD) $(LIBS)
+ libterrain2D.la: $(libterrain2D_la_OBJECTS) $(libterrain2D_la_DEPENDENCIES) $(EXTRA_libterrain2D_la_DEPENDENCIES) 
+ 	$(libterrain2D_la_LINK) -rpath $(pkglibdir) $(libterrain2D_la_OBJECTS) $(libterrain2D_la_LIBADD) $(LIBS)
+ libterrain3D.la: $(libterrain3D_la_OBJECTS) $(libterrain3D_la_DEPENDENCIES) $(EXTRA_libterrain3D_la_DEPENDENCIES) 
+ 	$(LINK) -rpath $(pkglibdir) $(libterrain3D_la_OBJECTS) $(libterrain3D_la_LIBADD) $(LIBS)
+ libtide2D.la: $(libtide2D_la_OBJECTS) $(libtide2D_la_DEPENDENCIES) $(EXTRA_libtide2D_la_DEPENDENCIES) 
+ 	$(libtide2D_la_LINK) $(am_libtide2D_la_rpath) $(libtide2D_la_OBJECTS) $(libtide2D_la_LIBADD) $(LIBS)
+ libtide3D.la: $(libtide3D_la_OBJECTS) $(libtide3D_la_DEPENDENCIES) $(EXTRA_libtide3D_la_DEPENDENCIES) 
+ 	$(libtide3D_la_LINK) $(am_libtide3D_la_rpath) $(libtide3D_la_OBJECTS) $(libtide3D_la_LIBADD) $(LIBS)
+ libtopics2D.la: $(libtopics2D_la_OBJECTS) $(libtopics2D_la_DEPENDENCIES) $(EXTRA_libtopics2D_la_DEPENDENCIES) 
+ 	$(libtopics2D_la_LINK) -rpath $(pkglibdir) $(libtopics2D_la_OBJECTS) $(libtopics2D_la_LIBADD) $(LIBS)
+ libtopics3D.la: $(libtopics3D_la_OBJECTS) $(libtopics3D_la_DEPENDENCIES) $(EXTRA_libtopics3D_la_DEPENDENCIES) 
+ 	$(libtopics3D_la_LINK) -rpath $(pkglibdir) $(libtopics3D_la_OBJECTS) $(libtopics3D_la_LIBADD) $(LIBS)
+ libwavewatch2D.la: $(libwavewatch2D_la_OBJECTS) $(libwavewatch2D_la_DEPENDENCIES) $(EXTRA_libwavewatch2D_la_DEPENDENCIES) 
+ 	$(libwavewatch2D_la_LINK) $(am_libwavewatch2D_la_rpath) $(libwavewatch2D_la_OBJECTS) $(libwavewatch2D_la_LIBADD) $(LIBS)
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ 	fi; \
+ 	for p in $$list; do echo "$$p $$p"; done | \
+ 	sed 's/$(EXEEXT)$$//' | \
+ 	while read p p1; do if test -f $$p || test -f $$p1; \
+ 	  then echo "$$p"; echo "$$p"; else :; fi; \
+ 	done | \
+ 	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ 	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ 	sed 'N;N;N;s,\n, ,g' | \
+ 	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ 	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ 	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ 	    else { print "f", $$3 "/" $$4, $$1; } } \
+ 	  END { for (d in files) print "f", d, files[d] }' | \
+ 	while read type dir files; do \
+ 	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ 	    test -z "$$files" || { \
+ 	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ 	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ 	    } \
+ 	; done
+ 
+ uninstall-binPROGRAMS:
+ 	@$(NORMAL_UNINSTALL)
+ 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ 	files=`for p in $$list; do echo "$$p"; done | \
+ 	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ 	      -e 's/$$/$(EXEEXT)/' `; \
+ 	test -n "$$list" || exit 0; \
+ 	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ 	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+ 
+ clean-binPROGRAMS:
+ 	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ 	echo " rm -f" $$list; \
+ 	rm -f $$list || exit $$?; \
+ 	test -n "$(EXEEXT)" || exit 0; \
+ 	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ 	echo " rm -f" $$list; \
+ 	rm -f $$list
+ rsurface2kdt$(EXEEXT): $(rsurface2kdt_OBJECTS) $(rsurface2kdt_DEPENDENCIES) $(EXTRA_rsurface2kdt_DEPENDENCIES) 
+ 	@rm -f rsurface2kdt$(EXEEXT)
+ 	$(rsurface2kdt_LINK) $(rsurface2kdt_OBJECTS) $(rsurface2kdt_LDADD) $(LIBS)
++>>>>>>> upstream/20131206+dfsg
  
  mostlyclean-compile:
  	-rm -f *.$(OBJEXT)
@@@ -705,11 -975,15 +1314,23 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libagmg3D_la-agmg.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libbubbles2D_la-bubbles.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libbubbles3D_la-bubbles.Plo at am__quote@
++<<<<<<< HEAD
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdf33D_la-df3.Plo at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libelectrohydro2D_la-electrohydro.Plo at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libelectrohydro3D_la-electrohydro.Plo at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhypre2D_la-hypre.Plo at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhypre3D_la-hypre.Plo at am__quote@
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libculvert2D_la-culvert.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libdf33D_la-df3.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libelectrohydro2D_la-electrohydro.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libelectrohydro3D_la-electrohydro.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libfft2D_la-fft.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libfft3D_la-fft.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhypre2D_la-hypre.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhypre3D_la-hypre.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblayered2D_la-layered.Plo at am__quote@
++>>>>>>> upstream/20131206+dfsg
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblis2D_la-lis.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblis3D_la-lis.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libmap2D_la-map.Plo at am__quote@
@@@ -717,12 -991,24 +1338,33 @@@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libode3D_la-ode.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libokada2D_la-okada.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libokada3D_la-okada.Plo at am__quote@
++<<<<<<< HEAD
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparticulates2D_la-particulates.Plo at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparticulates3D_la-particulates.Plo at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libstokes2D_la-stokes.Plo at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libstokes3D_la-stokes.Plo at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwavewatch2D_la-wavewatch.Plo at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/map.Plo at am__quote@
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparticulatecommon2D_la-particulatecommon.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparticulatecommon3D_la-particulatecommon.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparticulates2D_la-particulates.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libparticulates3D_la-particulates.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libskewsymmetric2D_la-skewsymmetric.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libskewsymmetric3D_la-skewsymmetric.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libstokes2D_la-stokes.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libstokes3D_la-stokes.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libterrain2D_la-terrain.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libtide2D_la-tide.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libtide3D_la-tide.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libtopics2D_la-topics.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libtopics3D_la-topics.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwavewatch2D_la-wavewatch.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/map.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rsurface2kdt-rsurface.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rsurface2kdt-rsurface2kdt.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/terrain.Plo at am__quote@
++>>>>>>> upstream/20131206+dfsg
  
  .c.o:
  @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@@ -773,6 -1059,13 +1415,16 @@@ libbubbles3D_la-bubbles.lo: bubbles.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbubbles3D_la_CFLAGS) $(CFLAGS) -c -o libbubbles3D_la-bubbles.lo `test -f 'bubbles.c' || echo '$(srcdir)/'`bubbles.c
  
++<<<<<<< HEAD
++=======
+ libculvert2D_la-culvert.lo: culvert.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libculvert2D_la_CFLAGS) $(CFLAGS) -MT libculvert2D_la-culvert.lo -MD -MP -MF $(DEPDIR)/libculvert2D_la-culvert.Tpo -c -o libculvert2D_la-culvert.lo `test -f 'culvert.c' || echo '$(srcdir)/'`culvert.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libculvert2D_la-culvert.Tpo $(DEPDIR)/libculvert2D_la-culvert.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='culvert.c' object='libculvert2D_la-culvert.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libculvert2D_la_CFLAGS) $(CFLAGS) -c -o libculvert2D_la-culvert.lo `test -f 'culvert.c' || echo '$(srcdir)/'`culvert.c
+ 
++>>>>>>> upstream/20131206+dfsg
  libdf33D_la-df3.lo: df3.c
  @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdf33D_la_CFLAGS) $(CFLAGS) -MT libdf33D_la-df3.lo -MD -MP -MF $(DEPDIR)/libdf33D_la-df3.Tpo -c -o libdf33D_la-df3.lo `test -f 'df3.c' || echo '$(srcdir)/'`df3.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libdf33D_la-df3.Tpo $(DEPDIR)/libdf33D_la-df3.Plo
@@@ -794,6 -1087,20 +1446,23 @@@ libelectrohydro3D_la-electrohydro.lo: e
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelectrohydro3D_la_CFLAGS) $(CFLAGS) -c -o libelectrohydro3D_la-electrohydro.lo `test -f 'electrohydro.c' || echo '$(srcdir)/'`electrohydro.c
  
++<<<<<<< HEAD
++=======
+ libfft2D_la-fft.lo: fft.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfft2D_la_CFLAGS) $(CFLAGS) -MT libfft2D_la-fft.lo -MD -MP -MF $(DEPDIR)/libfft2D_la-fft.Tpo -c -o libfft2D_la-fft.lo `test -f 'fft.c' || echo '$(srcdir)/'`fft.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libfft2D_la-fft.Tpo $(DEPDIR)/libfft2D_la-fft.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fft.c' object='libfft2D_la-fft.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfft2D_la_CFLAGS) $(CFLAGS) -c -o libfft2D_la-fft.lo `test -f 'fft.c' || echo '$(srcdir)/'`fft.c
+ 
+ libfft3D_la-fft.lo: fft.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfft3D_la_CFLAGS) $(CFLAGS) -MT libfft3D_la-fft.lo -MD -MP -MF $(DEPDIR)/libfft3D_la-fft.Tpo -c -o libfft3D_la-fft.lo `test -f 'fft.c' || echo '$(srcdir)/'`fft.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libfft3D_la-fft.Tpo $(DEPDIR)/libfft3D_la-fft.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fft.c' object='libfft3D_la-fft.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfft3D_la_CFLAGS) $(CFLAGS) -c -o libfft3D_la-fft.lo `test -f 'fft.c' || echo '$(srcdir)/'`fft.c
+ 
++>>>>>>> upstream/20131206+dfsg
  libhypre2D_la-hypre.lo: hypre.c
  @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhypre2D_la_CFLAGS) $(CFLAGS) -MT libhypre2D_la-hypre.lo -MD -MP -MF $(DEPDIR)/libhypre2D_la-hypre.Tpo -c -o libhypre2D_la-hypre.lo `test -f 'hypre.c' || echo '$(srcdir)/'`hypre.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libhypre2D_la-hypre.Tpo $(DEPDIR)/libhypre2D_la-hypre.Plo
@@@ -808,6 -1115,13 +1477,16 @@@ libhypre3D_la-hypre.lo: hypre.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhypre3D_la_CFLAGS) $(CFLAGS) -c -o libhypre3D_la-hypre.lo `test -f 'hypre.c' || echo '$(srcdir)/'`hypre.c
  
++<<<<<<< HEAD
++=======
+ liblayered2D_la-layered.lo: layered.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblayered2D_la_CFLAGS) $(CFLAGS) -MT liblayered2D_la-layered.lo -MD -MP -MF $(DEPDIR)/liblayered2D_la-layered.Tpo -c -o liblayered2D_la-layered.lo `test -f 'layered.c' || echo '$(srcdir)/'`layered.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/liblayered2D_la-layered.Tpo $(DEPDIR)/liblayered2D_la-layered.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='layered.c' object='liblayered2D_la-layered.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblayered2D_la_CFLAGS) $(CFLAGS) -c -o liblayered2D_la-layered.lo `test -f 'layered.c' || echo '$(srcdir)/'`layered.c
+ 
++>>>>>>> upstream/20131206+dfsg
  liblis2D_la-lis.lo: lis.c
  @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblis2D_la_CFLAGS) $(CFLAGS) -MT liblis2D_la-lis.lo -MD -MP -MF $(DEPDIR)/liblis2D_la-lis.Tpo -c -o liblis2D_la-lis.lo `test -f 'lis.c' || echo '$(srcdir)/'`lis.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/liblis2D_la-lis.Tpo $(DEPDIR)/liblis2D_la-lis.Plo
@@@ -857,6 -1171,20 +1536,23 @@@ libokada3D_la-okada.lo: okada.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libokada3D_la_CFLAGS) $(CFLAGS) -c -o libokada3D_la-okada.lo `test -f 'okada.c' || echo '$(srcdir)/'`okada.c
  
++<<<<<<< HEAD
++=======
+ libparticulatecommon2D_la-particulatecommon.lo: particulatecommon.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparticulatecommon2D_la_CFLAGS) $(CFLAGS) -MT libparticulatecommon2D_la-particulatecommon.lo -MD -MP -MF $(DEPDIR)/libparticulatecommon2D_la-particulatecommon.Tpo -c -o libparticulatecommon2D_la-particulatecommon.lo `test -f 'particulatecommon.c' || echo '$(srcdir)/'`particulatecommon.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libparticulatecommon2D_la-particulatecommon.Tpo $(DEPDIR)/libparticulatecommon2D_la-particulatecommon.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='particulatecommon.c' object='libparticulatecommon2D_la-particulatecommon.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparticulatecommon2D_la_CFLAGS) $(CFLAGS) -c -o libparticulatecommon2D_la-particulatecommon.lo `test -f 'particulatecommon.c' || echo '$(srcdir)/'`particulatecommon.c
+ 
+ libparticulatecommon3D_la-particulatecommon.lo: particulatecommon.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparticulatecommon3D_la_CFLAGS) $(CFLAGS) -MT libparticulatecommon3D_la-particulatecommon.lo -MD -MP -MF $(DEPDIR)/libparticulatecommon3D_la-particulatecommon.Tpo -c -o libparticulatecommon3D_la-particulatecommon.lo `test -f 'particulatecommon.c' || echo '$(srcdir)/'`particulatecommon.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libparticulatecommon3D_la-particulatecommon.Tpo $(DEPDIR)/libparticulatecommon3D_la-particulatecommon.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='particulatecommon.c' object='libparticulatecommon3D_la-particulatecommon.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparticulatecommon3D_la_CFLAGS) $(CFLAGS) -c -o libparticulatecommon3D_la-particulatecommon.lo `test -f 'particulatecommon.c' || echo '$(srcdir)/'`particulatecommon.c
+ 
++>>>>>>> upstream/20131206+dfsg
  libparticulates2D_la-particulates.lo: particulates.c
  @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparticulates2D_la_CFLAGS) $(CFLAGS) -MT libparticulates2D_la-particulates.lo -MD -MP -MF $(DEPDIR)/libparticulates2D_la-particulates.Tpo -c -o libparticulates2D_la-particulates.lo `test -f 'particulates.c' || echo '$(srcdir)/'`particulates.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libparticulates2D_la-particulates.Tpo $(DEPDIR)/libparticulates2D_la-particulates.Plo
@@@ -871,6 -1199,20 +1567,23 @@@ libparticulates3D_la-particulates.lo: p
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparticulates3D_la_CFLAGS) $(CFLAGS) -c -o libparticulates3D_la-particulates.lo `test -f 'particulates.c' || echo '$(srcdir)/'`particulates.c
  
++<<<<<<< HEAD
++=======
+ libskewsymmetric2D_la-skewsymmetric.lo: skewsymmetric.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libskewsymmetric2D_la_CFLAGS) $(CFLAGS) -MT libskewsymmetric2D_la-skewsymmetric.lo -MD -MP -MF $(DEPDIR)/libskewsymmetric2D_la-skewsymmetric.Tpo -c -o libskewsymmetric2D_la-skewsymmetric.lo `test -f 'skewsymmetric.c' || echo '$(srcdir)/'`skewsymmetric.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libskewsymmetric2D_la-skewsymmetric.Tpo $(DEPDIR)/libskewsymmetric2D_la-skewsymmetric.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='skewsymmetric.c' object='libskewsymmetric2D_la-skewsymmetric.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libskewsymmetric2D_la_CFLAGS) $(CFLAGS) -c -o libskewsymmetric2D_la-skewsymmetric.lo `test -f 'skewsymmetric.c' || echo '$(srcdir)/'`skewsymmetric.c
+ 
+ libskewsymmetric3D_la-skewsymmetric.lo: skewsymmetric.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libskewsymmetric3D_la_CFLAGS) $(CFLAGS) -MT libskewsymmetric3D_la-skewsymmetric.lo -MD -MP -MF $(DEPDIR)/libskewsymmetric3D_la-skewsymmetric.Tpo -c -o libskewsymmetric3D_la-skewsymmetric.lo `test -f 'skewsymmetric.c' || echo '$(srcdir)/'`skewsymmetric.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libskewsymmetric3D_la-skewsymmetric.Tpo $(DEPDIR)/libskewsymmetric3D_la-skewsymmetric.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='skewsymmetric.c' object='libskewsymmetric3D_la-skewsymmetric.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libskewsymmetric3D_la_CFLAGS) $(CFLAGS) -c -o libskewsymmetric3D_la-skewsymmetric.lo `test -f 'skewsymmetric.c' || echo '$(srcdir)/'`skewsymmetric.c
+ 
++>>>>>>> upstream/20131206+dfsg
  libstokes2D_la-stokes.lo: stokes.c
  @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstokes2D_la_CFLAGS) $(CFLAGS) -MT libstokes2D_la-stokes.lo -MD -MP -MF $(DEPDIR)/libstokes2D_la-stokes.Tpo -c -o libstokes2D_la-stokes.lo `test -f 'stokes.c' || echo '$(srcdir)/'`stokes.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libstokes2D_la-stokes.Tpo $(DEPDIR)/libstokes2D_la-stokes.Plo
@@@ -885,6 -1227,41 +1598,44 @@@ libstokes3D_la-stokes.lo: stokes.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libstokes3D_la_CFLAGS) $(CFLAGS) -c -o libstokes3D_la-stokes.lo `test -f 'stokes.c' || echo '$(srcdir)/'`stokes.c
  
++<<<<<<< HEAD
++=======
+ libterrain2D_la-terrain.lo: terrain.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libterrain2D_la_CFLAGS) $(CFLAGS) -MT libterrain2D_la-terrain.lo -MD -MP -MF $(DEPDIR)/libterrain2D_la-terrain.Tpo -c -o libterrain2D_la-terrain.lo `test -f 'terrain.c' || echo '$(srcdir)/'`terrain.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libterrain2D_la-terrain.Tpo $(DEPDIR)/libterrain2D_la-terrain.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='terrain.c' object='libterrain2D_la-terrain.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libterrain2D_la_CFLAGS) $(CFLAGS) -c -o libterrain2D_la-terrain.lo `test -f 'terrain.c' || echo '$(srcdir)/'`terrain.c
+ 
+ libtide2D_la-tide.lo: tide.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtide2D_la_CFLAGS) $(CFLAGS) -MT libtide2D_la-tide.lo -MD -MP -MF $(DEPDIR)/libtide2D_la-tide.Tpo -c -o libtide2D_la-tide.lo `test -f 'tide.c' || echo '$(srcdir)/'`tide.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libtide2D_la-tide.Tpo $(DEPDIR)/libtide2D_la-tide.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tide.c' object='libtide2D_la-tide.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtide2D_la_CFLAGS) $(CFLAGS) -c -o libtide2D_la-tide.lo `test -f 'tide.c' || echo '$(srcdir)/'`tide.c
+ 
+ libtide3D_la-tide.lo: tide.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtide3D_la_CFLAGS) $(CFLAGS) -MT libtide3D_la-tide.lo -MD -MP -MF $(DEPDIR)/libtide3D_la-tide.Tpo -c -o libtide3D_la-tide.lo `test -f 'tide.c' || echo '$(srcdir)/'`tide.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libtide3D_la-tide.Tpo $(DEPDIR)/libtide3D_la-tide.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tide.c' object='libtide3D_la-tide.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtide3D_la_CFLAGS) $(CFLAGS) -c -o libtide3D_la-tide.lo `test -f 'tide.c' || echo '$(srcdir)/'`tide.c
+ 
+ libtopics2D_la-topics.lo: topics.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtopics2D_la_CFLAGS) $(CFLAGS) -MT libtopics2D_la-topics.lo -MD -MP -MF $(DEPDIR)/libtopics2D_la-topics.Tpo -c -o libtopics2D_la-topics.lo `test -f 'topics.c' || echo '$(srcdir)/'`topics.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libtopics2D_la-topics.Tpo $(DEPDIR)/libtopics2D_la-topics.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='topics.c' object='libtopics2D_la-topics.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtopics2D_la_CFLAGS) $(CFLAGS) -c -o libtopics2D_la-topics.lo `test -f 'topics.c' || echo '$(srcdir)/'`topics.c
+ 
+ libtopics3D_la-topics.lo: topics.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtopics3D_la_CFLAGS) $(CFLAGS) -MT libtopics3D_la-topics.lo -MD -MP -MF $(DEPDIR)/libtopics3D_la-topics.Tpo -c -o libtopics3D_la-topics.lo `test -f 'topics.c' || echo '$(srcdir)/'`topics.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libtopics3D_la-topics.Tpo $(DEPDIR)/libtopics3D_la-topics.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='topics.c' object='libtopics3D_la-topics.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtopics3D_la_CFLAGS) $(CFLAGS) -c -o libtopics3D_la-topics.lo `test -f 'topics.c' || echo '$(srcdir)/'`topics.c
+ 
++>>>>>>> upstream/20131206+dfsg
  libwavewatch2D_la-wavewatch.lo: wavewatch.c
  @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwavewatch2D_la_CFLAGS) $(CFLAGS) -MT libwavewatch2D_la-wavewatch.lo -MD -MP -MF $(DEPDIR)/libwavewatch2D_la-wavewatch.Tpo -c -o libwavewatch2D_la-wavewatch.lo `test -f 'wavewatch.c' || echo '$(srcdir)/'`wavewatch.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwavewatch2D_la-wavewatch.Tpo $(DEPDIR)/libwavewatch2D_la-wavewatch.Plo
@@@ -892,6 -1269,34 +1643,37 @@@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwavewatch2D_la_CFLAGS) $(CFLAGS) -c -o libwavewatch2D_la-wavewatch.lo `test -f 'wavewatch.c' || echo '$(srcdir)/'`wavewatch.c
  
++<<<<<<< HEAD
++=======
+ rsurface2kdt-rsurface2kdt.o: rsurface2kdt.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -MT rsurface2kdt-rsurface2kdt.o -MD -MP -MF $(DEPDIR)/rsurface2kdt-rsurface2kdt.Tpo -c -o rsurface2kdt-rsurface2kdt.o `test -f 'rsurface2kdt.c' || echo '$(srcdir)/'`rsurface2kdt.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/rsurface2kdt-rsurface2kdt.Tpo $(DEPDIR)/rsurface2kdt-rsurface2kdt.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='rsurface2kdt.c' object='rsurface2kdt-rsurface2kdt.o' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -c -o rsurface2kdt-rsurface2kdt.o `test -f 'rsurface2kdt.c' || echo '$(srcdir)/'`rsurface2kdt.c
+ 
+ rsurface2kdt-rsurface2kdt.obj: rsurface2kdt.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -MT rsurface2kdt-rsurface2kdt.obj -MD -MP -MF $(DEPDIR)/rsurface2kdt-rsurface2kdt.Tpo -c -o rsurface2kdt-rsurface2kdt.obj `if test -f 'rsurface2kdt.c'; then $(CYGPATH_W) 'rsurface2kdt.c'; else $(CYGPATH_W) '$(srcdir)/rsurface2kdt.c'; fi`
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/rsurface2kdt-rsurface2kdt.Tpo $(DEPDIR)/rsurface2kdt-rsurface2kdt.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='rsurface2kdt.c' object='rsurface2kdt-rsurface2kdt.obj' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -c -o rsurface2kdt-rsurface2kdt.obj `if test -f 'rsurface2kdt.c'; then $(CYGPATH_W) 'rsurface2kdt.c'; else $(CYGPATH_W) '$(srcdir)/rsurface2kdt.c'; fi`
+ 
+ rsurface2kdt-rsurface.o: rsurface.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -MT rsurface2kdt-rsurface.o -MD -MP -MF $(DEPDIR)/rsurface2kdt-rsurface.Tpo -c -o rsurface2kdt-rsurface.o `test -f 'rsurface.c' || echo '$(srcdir)/'`rsurface.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/rsurface2kdt-rsurface.Tpo $(DEPDIR)/rsurface2kdt-rsurface.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='rsurface.c' object='rsurface2kdt-rsurface.o' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -c -o rsurface2kdt-rsurface.o `test -f 'rsurface.c' || echo '$(srcdir)/'`rsurface.c
+ 
+ rsurface2kdt-rsurface.obj: rsurface.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -MT rsurface2kdt-rsurface.obj -MD -MP -MF $(DEPDIR)/rsurface2kdt-rsurface.Tpo -c -o rsurface2kdt-rsurface.obj `if test -f 'rsurface.c'; then $(CYGPATH_W) 'rsurface.c'; else $(CYGPATH_W) '$(srcdir)/rsurface.c'; fi`
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/rsurface2kdt-rsurface.Tpo $(DEPDIR)/rsurface2kdt-rsurface.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='rsurface.c' object='rsurface2kdt-rsurface.obj' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rsurface2kdt_CFLAGS) $(CFLAGS) -c -o rsurface2kdt-rsurface.obj `if test -f 'rsurface.c'; then $(CYGPATH_W) 'rsurface.c'; else $(CYGPATH_W) '$(srcdir)/rsurface.c'; fi`
+ 
++>>>>>>> upstream/20131206+dfsg
  .f.o:
  	$(F77COMPILE) -c -o $@ $<
  
@@@ -1083,13 -1488,10 +1865,20 @@@ distdir: $(DISTFILES
  	done
  	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
  	  if test "$$subdir" = .; then :; else \
++<<<<<<< HEAD
 +	    test -d "$(distdir)/$$subdir" \
 +	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 +	    || exit 1; \
 +	  fi; \
 +	done
 +	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 +	  if test "$$subdir" = .; then :; else \
++=======
+ 	    $(am__make_dryrun) \
+ 	      || test -d "$(distdir)/$$subdir" \
+ 	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+ 	      || exit 1; \
++>>>>>>> upstream/20131206+dfsg
  	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
  	    $(am__relativize); \
  	    new_distdir=$$reldir; \
@@@ -1109,20 -1511,15 +1898,32 @@@
  	      || exit 1; \
  	  fi; \
  	done
++<<<<<<< HEAD
 +	$(MAKE) $(AM_MAKEFLAGS) \
 +	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
 +	  dist-hook
 +check-am: all-am
 +check: $(BUILT_SOURCES)
 +	$(MAKE) $(AM_MAKEFLAGS) check-recursive
 +all-am: Makefile $(LTLIBRARIES)
 +installdirs: installdirs-recursive
 +installdirs-am:
 +	for dir in "$(DESTDIR)$(pkglibdir)"; do \
 +	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 +	done
 +install: $(BUILT_SOURCES)
 +	$(MAKE) $(AM_MAKEFLAGS) install-recursive
++=======
+ check-am: all-am
+ check: check-recursive
+ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
+ installdirs: installdirs-recursive
+ installdirs-am:
+ 	for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)"; do \
+ 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ 	done
+ install: install-recursive
++>>>>>>> upstream/20131206+dfsg
  install-exec: install-exec-recursive
  install-data: install-data-recursive
  uninstall: uninstall-recursive
@@@ -1132,12 -1529,19 +1933,28 @@@ install-am: all-a
  
  installcheck: installcheck-recursive
  install-strip:
++<<<<<<< HEAD
 +	$(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:
 +
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
+ mostlyclean-generic:
+ 
+ clean-generic:
+ 
++>>>>>>> upstream/20131206+dfsg
  distclean-generic:
  	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
  	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
@@@ -1145,11 -1549,10 +1962,18 @@@
  maintainer-clean-generic:
  	@echo "This command is intended for maintainers to use"
  	@echo "it deletes files that may require special tools to rebuild."
++<<<<<<< HEAD
 +	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 +clean: clean-recursive
 +
 +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
 +	mostlyclean-am
++=======
+ clean: clean-recursive
+ 
+ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+ 	clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
++>>>>>>> upstream/20131206+dfsg
  
  distclean: distclean-recursive
  	-rm -rf ./$(DEPDIR)
@@@ -1175,7 -1578,7 +1999,11 @@@ install-dvi: install-dvi-recursiv
  
  install-dvi-am:
  
++<<<<<<< HEAD
 +install-exec-am: install-pkglibLTLIBRARIES
++=======
+ install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES
++>>>>>>> upstream/20131206+dfsg
  
  install-html: install-html-recursive
  
@@@ -1215,18 -1618,18 +2043,33 @@@ ps: ps-recursiv
  
  ps-am:
  
++<<<<<<< HEAD
 +uninstall-am: uninstall-pkglibLTLIBRARIES
 +
 +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
 +	ctags-recursive install install-am install-strip \
 +	tags-recursive
 +
 +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 +	all all-am check check-am clean clean-generic clean-libtool \
 +	clean-pkglibLTLIBRARIES ctags ctags-recursive dist-hook \
 +	distclean distclean-compile distclean-generic \
 +	distclean-libtool distclean-tags distdir dvi dvi-am html \
 +	html-am info info-am install install-am install-data \
++=======
+ uninstall-am: uninstall-binPROGRAMS uninstall-pkglibLTLIBRARIES
+ 
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ 	install-am install-strip tags-recursive
+ 
+ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ 	all all-am check check-am clean clean-binPROGRAMS \
+ 	clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ 	clean-pkglibLTLIBRARIES ctags ctags-recursive 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 \
++>>>>>>> upstream/20131206+dfsg
  	install-data-am install-dvi install-dvi-am install-exec \
  	install-exec-am install-html install-html-am install-info \
  	install-info-am install-man install-pdf install-pdf-am \
@@@ -1235,28 -1638,9 +2078,34 @@@
  	installdirs-am maintainer-clean maintainer-clean-generic \
  	mostlyclean mostlyclean-compile mostlyclean-generic \
  	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
++<<<<<<< HEAD
 +	uninstall uninstall-am uninstall-pkglibLTLIBRARIES
 +
 +
 + at HAVE_MODULES_TRUE@.mod.c:
 + at HAVE_MODULES_TRUE@	@echo "/* $@" > $@
 + at HAVE_MODULES_TRUE@	@echo " * This is a generated file.  Please modify \`$<'" >> $@
 + at HAVE_MODULES_TRUE@	@echo " */" >> $@
 + at HAVE_MODULES_TRUE@	@echo "#line 1 \""$<"\"" >> $@
 + at HAVE_MODULES_TRUE@	@cat $< >> $@
 + at HAVE_MODULES_FALSE@.mod.c:
 + at HAVE_MODULES_FALSE@	@echo "/* $@" > $@
 + at HAVE_MODULES_FALSE@	@echo " * This is a generated file.  Please modify \`$<'" >> $@
 + at HAVE_MODULES_FALSE@	@echo " */" >> $@
 + at HAVE_MODULES_FALSE@	@echo "#line 1 \""$<"\"" >> $@
 + at HAVE_MODULES_FALSE@	@replace="s/g_module_check_init/gfs_init_`basename $< .mod`/g";\
 + at HAVE_MODULES_FALSE@	 sed $$replace < $< >> $@
 +
 +clean-generic:
 +	$(RM) $(BUILT_SOURCES)
 +
 +dist-hook:
 +	for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
++=======
+ 	uninstall uninstall-am uninstall-binPROGRAMS \
+ 	uninstall-pkglibLTLIBRARIES
+ 
++>>>>>>> upstream/20131206+dfsg
  
  # 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.
diff --cc modules/kdt/Makefile.am
index 6aaa35f,a9e7954..3ac3408
--- a/modules/kdt/Makefile.am
+++ b/modules/kdt/Makefile.am
@@@ -4,6 -4,7 +4,10 @@@ noinst_LTLIBRARIES = libkdt.l
  
  bin_PROGRAMS = \
  	xyz2kdt \
++<<<<<<< HEAD
++=======
+ 	kdt2kdt \
++>>>>>>> upstream/20131206+dfsg
  	kdtquery
  
  libkdt_la_CFLAGS = $(AM_CFLAGS) -D_FILE_OFFSET_BITS=64
@@@ -12,11 -13,16 +16,25 @@@ libkdt_la_SOURCES = 
  	kdt.h
  
  xyz2kdt_SOURCES = xyz2kdt.c kdt.h
++<<<<<<< HEAD
 +xyz2kdt_LDADD = -lkdt
 +xyz2kdt_CFLAGS = $(AM_CFLAGS)
 +xyz2kdt_DEPENDENCIES = libkdt.la
 +
 +kdtquery_SOURCES = kdtquery.c kdt.h
 +kdtquery_LDADD = -lkdt
++=======
+ xyz2kdt_LDADD = -lkdt -lm
+ xyz2kdt_CFLAGS = $(AM_CFLAGS)
+ xyz2kdt_DEPENDENCIES = libkdt.la
+ 
+ kdt2kdt_SOURCES = kdt2kdt.c kdt.h
+ kdt2kdt_LDADD = -lkdt -lm
+ kdt2kdt_CFLAGS = $(AM_CFLAGS)
+ kdt2kdt_DEPENDENCIES = libkdt.la
+ 
+ kdtquery_SOURCES = kdtquery.c kdt.h
+ kdtquery_LDADD = -lkdt -lm
++>>>>>>> upstream/20131206+dfsg
  kdtquery_CFLAGS = $(AM_CFLAGS)
  kdtquery_DEPENDENCIES = libkdt.la
diff --cc modules/kdt/Makefile.in
index 5eb035d,2a72057..aaed726
--- a/modules/kdt/Makefile.in
+++ b/modules/kdt/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -17,6 -17,23 +26,26 @@@
  
  
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -35,14 -52,12 +64,23 @@@ PRE_UNINSTALL = 
  POST_UNINSTALL = :
  build_triplet = @build@
  host_triplet = @host@
++<<<<<<< HEAD
 +bin_PROGRAMS = xyz2kdt$(EXEEXT) kdtquery$(EXEEXT)
 +subdir = modules/kdt
 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ bin_PROGRAMS = xyz2kdt$(EXEEXT) kdt2kdt$(EXEEXT) kdtquery$(EXEEXT)
+ subdir = modules/kdt
+ 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
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -58,6 -73,11 +96,14 @@@ libkdt_la_LINK = $(LIBTOOL) --tag=CC $(
  	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  am__installdirs = "$(DESTDIR)$(bindir)"
  PROGRAMS = $(bin_PROGRAMS)
++<<<<<<< HEAD
++=======
+ am_kdt2kdt_OBJECTS = kdt2kdt-kdt2kdt.$(OBJEXT)
+ kdt2kdt_OBJECTS = $(am_kdt2kdt_OBJECTS)
+ kdt2kdt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CCLD) $(kdt2kdt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
++>>>>>>> upstream/20131206+dfsg
  am_kdtquery_OBJECTS = kdtquery-kdtquery.$(OBJEXT)
  kdtquery_OBJECTS = $(am_kdtquery_OBJECTS)
  kdtquery_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@@ -81,9 -101,15 +127,21 @@@ CCLD = $(CC
  LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
  	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
++<<<<<<< HEAD
 +SOURCES = $(libkdt_la_SOURCES) $(kdtquery_SOURCES) $(xyz2kdt_SOURCES)
 +DIST_SOURCES = $(libkdt_la_SOURCES) $(kdtquery_SOURCES) \
 +	$(xyz2kdt_SOURCES)
++=======
+ SOURCES = $(libkdt_la_SOURCES) $(kdt2kdt_SOURCES) $(kdtquery_SOURCES) \
+ 	$(xyz2kdt_SOURCES)
+ DIST_SOURCES = $(libkdt_la_SOURCES) $(kdt2kdt_SOURCES) \
+ 	$(kdtquery_SOURCES) $(xyz2kdt_SOURCES)
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@@ -115,7 -141,10 +173,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -128,8 -157,6 +193,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -152,7 -179,6 +220,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -170,6 -196,9 +241,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -177,6 -206,7 +254,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -203,10 -233,6 +284,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -246,11 -272,15 +330,23 @@@ libkdt_la_SOURCES = 
  	kdt.h
  
  xyz2kdt_SOURCES = xyz2kdt.c kdt.h
++<<<<<<< HEAD
 +xyz2kdt_LDADD = -lkdt
 +xyz2kdt_CFLAGS = $(AM_CFLAGS)
 +xyz2kdt_DEPENDENCIES = libkdt.la
 +kdtquery_SOURCES = kdtquery.c kdt.h
 +kdtquery_LDADD = -lkdt
++=======
+ xyz2kdt_LDADD = -lkdt -lm
+ xyz2kdt_CFLAGS = $(AM_CFLAGS)
+ xyz2kdt_DEPENDENCIES = libkdt.la
+ kdt2kdt_SOURCES = kdt2kdt.c kdt.h
+ kdt2kdt_LDADD = -lkdt -lm
+ kdt2kdt_CFLAGS = $(AM_CFLAGS)
+ kdt2kdt_DEPENDENCIES = libkdt.la
+ kdtquery_SOURCES = kdtquery.c kdt.h
+ kdtquery_LDADD = -lkdt -lm
++>>>>>>> upstream/20131206+dfsg
  kdtquery_CFLAGS = $(AM_CFLAGS)
  kdtquery_DEPENDENCIES = libkdt.la
  all: all-am
@@@ -296,12 -326,15 +392,24 @@@ clean-noinstLTLIBRARIES
  	  echo "rm -f \"$${dir}/so_locations\""; \
  	  rm -f "$${dir}/so_locations"; \
  	done
++<<<<<<< HEAD
 +libkdt.la: $(libkdt_la_OBJECTS) $(libkdt_la_DEPENDENCIES) 
 +	$(libkdt_la_LINK)  $(libkdt_la_OBJECTS) $(libkdt_la_LIBADD) $(LIBS)
 +install-binPROGRAMS: $(bin_PROGRAMS)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 +	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
++=======
+ libkdt.la: $(libkdt_la_OBJECTS) $(libkdt_la_DEPENDENCIES) $(EXTRA_libkdt_la_DEPENDENCIES) 
+ 	$(libkdt_la_LINK)  $(libkdt_la_OBJECTS) $(libkdt_la_LIBADD) $(LIBS)
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do echo "$$p $$p"; done | \
  	sed 's/$(EXEEXT)$$//' | \
  	while read p p1; do if test -f $$p || test -f $$p1; \
@@@ -341,10 -374,13 +449,20 @@@ clean-binPROGRAMS
  	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
  	echo " rm -f" $$list; \
  	rm -f $$list
++<<<<<<< HEAD
 +kdtquery$(EXEEXT): $(kdtquery_OBJECTS) $(kdtquery_DEPENDENCIES) 
 +	@rm -f kdtquery$(EXEEXT)
 +	$(kdtquery_LINK) $(kdtquery_OBJECTS) $(kdtquery_LDADD) $(LIBS)
 +xyz2kdt$(EXEEXT): $(xyz2kdt_OBJECTS) $(xyz2kdt_DEPENDENCIES) 
++=======
+ kdt2kdt$(EXEEXT): $(kdt2kdt_OBJECTS) $(kdt2kdt_DEPENDENCIES) $(EXTRA_kdt2kdt_DEPENDENCIES) 
+ 	@rm -f kdt2kdt$(EXEEXT)
+ 	$(kdt2kdt_LINK) $(kdt2kdt_OBJECTS) $(kdt2kdt_LDADD) $(LIBS)
+ kdtquery$(EXEEXT): $(kdtquery_OBJECTS) $(kdtquery_DEPENDENCIES) $(EXTRA_kdtquery_DEPENDENCIES) 
+ 	@rm -f kdtquery$(EXEEXT)
+ 	$(kdtquery_LINK) $(kdtquery_OBJECTS) $(kdtquery_LDADD) $(LIBS)
+ xyz2kdt$(EXEEXT): $(xyz2kdt_OBJECTS) $(xyz2kdt_DEPENDENCIES) $(EXTRA_xyz2kdt_DEPENDENCIES) 
++>>>>>>> upstream/20131206+dfsg
  	@rm -f xyz2kdt$(EXEEXT)
  	$(xyz2kdt_LINK) $(xyz2kdt_OBJECTS) $(xyz2kdt_LDADD) $(LIBS)
  
@@@ -354,6 -390,7 +472,10 @@@ mostlyclean-compile
  distclean-compile:
  	-rm -f *.tab.c
  
++<<<<<<< HEAD
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kdt2kdt-kdt2kdt.Po at am__quote@
++>>>>>>> upstream/20131206+dfsg
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kdtquery-kdtquery.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkdt_la-kdt.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xyz2kdt-xyz2kdt.Po at am__quote@
@@@ -386,6 -423,20 +508,23 @@@ libkdt_la-kdt.lo: kdt.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libkdt_la_CFLAGS) $(CFLAGS) -c -o libkdt_la-kdt.lo `test -f 'kdt.c' || echo '$(srcdir)/'`kdt.c
  
++<<<<<<< HEAD
++=======
+ kdt2kdt-kdt2kdt.o: kdt2kdt.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdt2kdt_CFLAGS) $(CFLAGS) -MT kdt2kdt-kdt2kdt.o -MD -MP -MF $(DEPDIR)/kdt2kdt-kdt2kdt.Tpo -c -o kdt2kdt-kdt2kdt.o `test -f 'kdt2kdt.c' || echo '$(srcdir)/'`kdt2kdt.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/kdt2kdt-kdt2kdt.Tpo $(DEPDIR)/kdt2kdt-kdt2kdt.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='kdt2kdt.c' object='kdt2kdt-kdt2kdt.o' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdt2kdt_CFLAGS) $(CFLAGS) -c -o kdt2kdt-kdt2kdt.o `test -f 'kdt2kdt.c' || echo '$(srcdir)/'`kdt2kdt.c
+ 
+ kdt2kdt-kdt2kdt.obj: kdt2kdt.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdt2kdt_CFLAGS) $(CFLAGS) -MT kdt2kdt-kdt2kdt.obj -MD -MP -MF $(DEPDIR)/kdt2kdt-kdt2kdt.Tpo -c -o kdt2kdt-kdt2kdt.obj `if test -f 'kdt2kdt.c'; then $(CYGPATH_W) 'kdt2kdt.c'; else $(CYGPATH_W) '$(srcdir)/kdt2kdt.c'; fi`
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/kdt2kdt-kdt2kdt.Tpo $(DEPDIR)/kdt2kdt-kdt2kdt.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='kdt2kdt.c' object='kdt2kdt-kdt2kdt.obj' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdt2kdt_CFLAGS) $(CFLAGS) -c -o kdt2kdt-kdt2kdt.obj `if test -f 'kdt2kdt.c'; then $(CYGPATH_W) 'kdt2kdt.c'; else $(CYGPATH_W) '$(srcdir)/kdt2kdt.c'; fi`
+ 
++>>>>>>> upstream/20131206+dfsg
  kdtquery-kdtquery.o: kdtquery.c
  @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdtquery_CFLAGS) $(CFLAGS) -MT kdtquery-kdtquery.o -MD -MP -MF $(DEPDIR)/kdtquery-kdtquery.Tpo -c -o kdtquery-kdtquery.o `test -f 'kdtquery.c' || echo '$(srcdir)/'`kdtquery.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/kdtquery-kdtquery.Tpo $(DEPDIR)/kdtquery-kdtquery.Po
@@@ -519,10 -570,15 +658,22 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
diff --cc modules/kdt/kdt.c
index e3787db,3064971..c8063ce
--- a/modules/kdt/kdt.c
+++ b/modules/kdt/kdt.c
@@@ -1,5 -1,5 +1,9 @@@
  /* Gerris - The GNU Flow Solver
++<<<<<<< HEAD
 + * Copyright (C) 2010 National Institute of Water and Atmospheric Research
++=======
+  * Copyright (C) 2010-2012 National Institute of Water and Atmospheric Research
++>>>>>>> upstream/20131206+dfsg
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License as
@@@ -20,6 -20,7 +24,10 @@@
  #include <stdlib.h>
  #include <string.h>
  #include <stdio.h>
++<<<<<<< HEAD
++=======
+ #include <math.h>
++>>>>>>> upstream/20131206+dfsg
  #include <assert.h>
  #include <sys/types.h>
  #include <sys/stat.h>
@@@ -32,42 -33,196 +40,232 @@@
  #define MIN(a,b) ((a) < (b) ? (a) : (b))
  #define MAX(a,b) ((a) > (b) ? (a) : (b))
  
++<<<<<<< HEAD
 +/* sort */
 +
 +/* threshold below which in-memory qsort() is used rather than on-disk
 +   mergesort */
 +#define LENMIN 1000000
 +
 +void kdt_heap_create (KdtHeap * h, int fd, long len)
 +{
 +  h->fd = fd;
 +  h->len = len;
 +  h->i = 0;
 +  h->p = malloc (len*sizeof (KdtPoint));
 +  h->end = read (fd, h->p, len*sizeof (KdtPoint));
 +  assert (h->end >= 0);
 +  h->end /= sizeof (KdtPoint);
++=======
+ #define VERSION 20120405 /* the file format version */
+ 
+ /* same as the system tmpfile() but uses the working directory (rather
+    than /tmp) */
+ FILE * kdt_tmpfile (void)
+ {
+   char name[] = "kdtXXXXXX";
+   int fd = mkstemp (name);
+   if (fd == -1) {
+     perror ("kdt_tmpfile");
+     exit (1);
+   }
+   FILE * fp = fdopen (fd, "r+w");
+   assert (unlink (name) == 0);
+   if (fp == NULL) {
+     perror ("kdt_tmpfile");
+     exit (1);
+   }
+   return fp;
+ }
+ 
+ /* refcounted buffer */
+ 
+ typedef struct {
+   KdtPoint * p;
+   int ref;
+ } Buffer;
+ 
+ static Buffer * buffer_new (long len)
+ {
+   Buffer * b = malloc (sizeof (Buffer));
+   b->p = malloc (len*sizeof (KdtPoint));
+   b->ref = 1;
+   return b;
+ }
+ 
+ static Buffer * buffer_ref (Buffer * b)
+ {
+   b->ref++;
+   return b;
+ }
+ 
+ static void buffer_unref (Buffer * b)
+ {
+   b->ref--;
+   if (b->ref == 0) {
+     free (b->p);
+     free (b);
+   }
+ }
+ 
+ /* KdtHeap */
+ 
+ void kdt_heap_resize (KdtHeap * h, long len)
+ {
+   assert (h->len < 0 || len < h->len);
+   if (h->len == h->buflen) {
+     h->buflen = len;
+     h->end = h->buflen;
+   }
+   else if (len <= h->buflen) {
+     h->buflen = len;
+     kdt_heap_rewind (h);
+     assert (h->end == len);
+   }
+   h->len = len;
+ }
+ 
+ static long heap_read (KdtHeap * h, long len)
+ {
+   if (ftell (h->fp) != h->current)
+     assert (fseek (h->fp, h->current, SEEK_SET) == 0);
+   if (h->len > 0) {
+     long maxlen = h->start + h->len - h->current/sizeof (KdtPoint);
+     if (len > maxlen)
+       len = maxlen;
+   }
+   long n = 0;
+   if (len > 0) {
+     n = fread (h->p, sizeof (KdtPoint), len, h->fp);
+     h->current = ftell (h->fp);
+   }
+   return n;
+ }
+ 
+ static void heap_write (KdtHeap * h, long len)
+ {
+   if (ftell (h->fp) != h->current)
+     assert (fseek (h->fp, h->current, SEEK_SET) == 0);
+   if (fwrite (h->p, sizeof (KdtPoint), len, h->fp) != len) {
+     perror ("heap_write");
+     exit (1);
+   }
+   h->current = ftell (h->fp);
+ }
+ 
+ void kdt_heap_create (KdtHeap * h, FILE * fp, long start, long len, long buflen)
+ {
+   h->fp = fp;
+   h->start = start;
+   if (len > 0 && len < buflen)
+     buflen = len;
+   h->len = len;
+   h->buflen = buflen;
+   h->i = 0;
+   h->buf = buffer_new (buflen);
+   h->p = ((Buffer *) h->buf)->p;
+   h->current = start*sizeof (KdtPoint);
+   if (fp != NULL) {
+     assert (fseek (fp, start*sizeof (KdtPoint), SEEK_SET) == 0);
+     assert (ftell (fp) == h->current);
+     h->end = heap_read (h, buflen);
+     if (buflen == len)
+       assert (h->end == len);
+   }
+   else
+     h->end = 0;
+ }
+ 
+ void kdt_heap_rewind (KdtHeap * h)
+ {
+   if (h->len == h->buflen) {
+     h->i = 0;
+     assert (h->end == h->buflen);
+   }
+   else {
+     assert (fseek (h->fp, h->start*sizeof (KdtPoint), SEEK_SET) == 0);
+     h->current = ftell (h->fp);
+     h->end = heap_read (h, h->buflen);
+     h->i = 0;
+   }
++>>>>>>> upstream/20131206+dfsg
  }
  
  int kdt_heap_get (KdtHeap * h, KdtPoint * p)
  {
++<<<<<<< HEAD
++=======
+   if (h->len == h->buflen && h->i >= h->len)
+     return 0;
++>>>>>>> upstream/20131206+dfsg
    if (h->i < h->end) {
      *p = h->p[h->i++];
      return 1;
    }
++<<<<<<< HEAD
 +  if (h->end < h->len)
 +    return 0;
 +  h->end = read (h->fd, h->p, h->len*sizeof (KdtPoint));
 +  assert (h->end >= 0);
 +  h->end /= sizeof (KdtPoint);
++=======
+   if (h->end < h->buflen)
+     return 0;
+   h->end = heap_read (h, h->buflen);
++>>>>>>> upstream/20131206+dfsg
    h->i = 0;
    return kdt_heap_get (h, p);
  }
  
++<<<<<<< HEAD
 +void kdt_heap_put (KdtHeap * h, KdtPoint * p)
 +{
 +  if (h->i == h->len) {
 +    assert (write (h->fd, h->p, h->len*sizeof (KdtPoint)) == h->len*sizeof (KdtPoint));
++=======
+ void kdt_heap_split (KdtHeap * h1, long len1, KdtHeap * h2)
+ {
+   assert (len1 < h1->len);
+   if (h1->len == h1->buflen) {
+     h2->fp = NULL;
+     h2->start = 0;
+     h2->len = h1->len - len1;
+     h2->buflen = h2->len;
+     h2->i = 0;
+     h2->p = &h1->p[len1];
+     h2->buf = buffer_ref (h1->buf);
+     h2->end = h2->len;
+     kdt_heap_resize (h1, len1);
+   }
+   else {
+     kdt_heap_create (h2, h1->fp, h1->start + len1, h1->len - len1, h1->buflen);
+ 
+     KdtHeap h;
+     kdt_heap_create (&h, NULL, 0, len1, h1->buflen);
+     if (len1 > h1->buflen)
+       h.fp = kdt_tmpfile ();
+     else
+       h.end = h.len;
+ 
+     kdt_heap_rewind (h1);
+     long i;
+     for (i = 0; i < len1; i++) {
+       KdtPoint p;
+       assert (kdt_heap_get (h1, &p));
+       kdt_heap_put (&h, &p);
+     }
+     kdt_heap_flush (&h);
+     h1->fp = NULL;
+     kdt_heap_free (h1);
+     *h1 = h;
+   }
+ }
+ 
+ void kdt_heap_put (KdtHeap * h, KdtPoint * p)
+ {
+   if (h->i == h->buflen) {
+     heap_write (h, h->buflen);
++>>>>>>> upstream/20131206+dfsg
      h->i = 0;
    }
    h->p[h->i++] = *p;
@@@ -75,123 -230,119 +273,231 @@@
  
  void kdt_heap_flush (KdtHeap * h)
  {
++<<<<<<< HEAD
 +  if (h->i > 0)
 +    assert (write (h->fd, h->p, h->i*sizeof (KdtPoint)) == h->i*sizeof (KdtPoint));
++=======
+   if (h->i > 0 && h->fp != NULL)
+     heap_write (h, h->i);
++>>>>>>> upstream/20131206+dfsg
  }
  
  void kdt_heap_free (KdtHeap * h)
  {
++<<<<<<< HEAD
 +  free (h->p);
 +}
 +
++=======
+   buffer_unref (h->buf);
+   if (h->fp != NULL)
+     assert (fclose (h->fp) == 0);
+ }
+ 
+ /* sort */
+ 
++>>>>>>> upstream/20131206+dfsg
  static int put (KdtHeap * h, KdtPoint * p, KdtHeap * merged)
  {
    kdt_heap_put (merged, p);
    return kdt_heap_get (h, p);
  }
  
++<<<<<<< HEAD
 +static int fdtemp (void)
 +{
 +  char name[] = "XXXXXX";
 +  int fd = mkstemp (name);
 +  assert (fd >= 0);
 +  assert (unlink (name) == 0);
 +  return fd;
 +}
 +
 +static int merge (int fd1, int fd2, int (*compar) (const void *, const void *), long len)
 +{
 +  KdtHeap h1, h2, hm;
 +  assert (lseek (fd1, 0, SEEK_SET) == 0);
 +  kdt_heap_create (&h1, fd1, LENMIN/3);
 +  assert (lseek (fd2, 0, SEEK_SET) == 0);
 +  kdt_heap_create (&h2, fd2, LENMIN/3);
 +  int merged = fdtemp ();
 +  kdt_heap_create (&hm, merged, LENMIN/3);
 +  KdtPoint p1, p2;
 +  int r1 = kdt_heap_get (&h1, &p1);
 +  int r2 = kdt_heap_get (&h2, &p2);
 +  while (r1 && r2) {
 +    if ((* compar) (&p2, &p1))
 +      r1 = put (&h1, &p1, &hm);
 +    else
 +      r2 = put (&h2, &p2, &hm);
 +  }
 +  while (r1)
 +    r1 = put (&h1, &p1, &hm);
 +  while (r2)
 +    r2 = put (&h2, &p2, &hm);
 +  kdt_heap_free (&h1);
 +  kdt_heap_free (&h2);
 +  close (fd1);
 +  close (fd2);
 +  kdt_heap_flush (&hm);
 +  kdt_heap_free (&hm);
 +  return merged;
 +}
 +
 +static int half (int fd, long len)
 +{
 +  long len1 = len/2;
 +  assert (lseek (fd, len1*sizeof (KdtPoint), SEEK_SET) > 0);
 +  int fd1 = fd, fd2 = fdtemp ();
 +  char a[4096];
 +  ssize_t size;
 +  while ((size = read (fd1, a, 4096)) > 0)
 +    assert (write (fd2, a, size) == size);
 +  assert (ftruncate (fd1, len1*sizeof (KdtPoint)) == 0);
 +  return fd2;
++=======
+ static void kdt_write (KdtHeap * h, FILE * fp)
+ {
+   kdt_heap_rewind (h);
+   long i = 0;
+   KdtPoint p;
+   while (kdt_heap_get (h, &p)) {
+     fprintf (fp, "%ld %g %g\n", i, p.x, p.y);
+     i++;
+   }
+ }
+ 
+ static void merge (KdtHeap * h1, KdtHeap * h2, 
+ 		   int (*compar) (const void *, const void *),
+ 		   long buflen)
+ {
+   KdtHeap hm;
+   assert (h1->len + h2->len > buflen);
+   kdt_heap_create (&hm, NULL, h2->start - h1->len, h1->len + h2->len, buflen);
+   hm.fp = h2->fp;
+   KdtPoint p1, p2;
+   kdt_heap_rewind (h1);
+   int r1 = kdt_heap_get (h1, &p1);
+   kdt_heap_rewind (h2);
+   int r2 = kdt_heap_get (h2, &p2);
+   while (r1 && r2) {
+     if ((* compar) (&p2, &p1))
+       r1 = put (h1, &p1, &hm);
+     else
+       r2 = put (h2, &p2, &hm);
+   }
+   while (r1)
+     r1 = put (h1, &p1, &hm);
+   while (r2)
+     r2 = put (h2, &p2, &hm);
+   kdt_heap_free (h1);
+   h2->fp = NULL;
+   kdt_heap_free (h2);
+   kdt_heap_flush (&hm);
+   *h1 = hm;
++>>>>>>> upstream/20131206+dfsg
  }
  
  #if TIMING
  static double elapsed (const struct timeval * start, const struct timeval * end)
  {
++<<<<<<< HEAD
 +  return (double) (end->tv_usec - start->tv_usec) + 1e6*(double) (end->tv_sec - start->tv_sec);
 +}
 +#endif
 +
 +static int sort (int fd, long len, 
 +		 int  (*compar)   (const void *, const void *),
 +		 void (*progress) (void *), void * data)
 +{
 +  struct timeval start;
 +  gettimeofday (&start, NULL);
 +  assert (lseek (fd, 0, SEEK_SET) == 0);
 +  if (len <= LENMIN) {
 +    KdtPoint * a = malloc (len*sizeof (KdtPoint));
 +    assert (read (fd, a, len*sizeof (KdtPoint)) == len*sizeof (KdtPoint));
 +    qsort (a, len, sizeof (KdtPoint), compar);
 +    assert (lseek (fd, 0, SEEK_SET) == 0);
 +    assert (write (fd, a, len*sizeof (KdtPoint)) == len*sizeof (KdtPoint));
 +    free (a);
 +#if TIMING
 +    struct timeval end;
 +    gettimeofday (&end, NULL);
 +    fprintf (stderr, "sort %ld %g\n", len, elapsed (&start, &end));
 +#endif
 +    if (progress)
 +      (* progress) (data);
 +    return fd;
 +  }
 +  else {
 +    long len1 = len/2, len2 = len - len1;
 +    int fd2 = half (fd, len);
 +    int fd3 = merge (sort (fd, len1, compar, progress, data), 
 +		     sort (fd2, len2, compar, progress, data), 
 +		     compar, len);
 +#if TIMING
 +    struct timeval end;
 +    gettimeofday (&end, NULL);
 +    fprintf (stderr, "sort %ld %g\n", len, elapsed (&start, &end));
 +#endif
 +    return fd3;
 +  }
++=======
+   return (double) (end->tv_usec - start->tv_usec) + 
+     1e6*(double) (end->tv_sec - start->tv_sec);
+ }
+ #endif
+ 
+ static void kdt_heap_sort (KdtHeap * h,
+ 			   int  (*compar)   (const void *, const void *),
+ 			   void (*progress) (void *), void * data)
+ {
+ #if TIMING
+   struct timeval start;
+   gettimeofday (&start, NULL);
+ #endif
+   if (h->len == h->buflen) {
+     qsort (h->p, h->len, sizeof (KdtPoint), compar);
+     if (progress)
+       (* progress) (data);
+   }
+   else {
+     KdtHeap h2;
+     long buflen = h->buflen;
+     kdt_heap_split (h, h->len/2, &h2);
+     kdt_heap_sort (h, compar, progress, data);
+     kdt_heap_sort (&h2, compar, progress, data);
+     merge (h, &h2, compar, buflen);
+   }
+ #if TIMING
+   struct timeval end;
+   gettimeofday (&end, NULL);
+   fprintf (stderr, "kdt_heap_sort %ld %g\n", len, elapsed (&start, &end));
+ #endif
+ }
+ 
+ /* number of qsort() calls for a given kdt_heap_sort() */
+ static int kdt_heap_sort_cost (long len, long buflen)
+ {
+   int m = 1;
+   while (len > buflen) {
+     m *= 2;
+     len /= 2;
+   }
+   return m;
++>>>>>>> upstream/20131206+dfsg
  }
  
  /* Kdt */
  
  typedef struct {
++<<<<<<< HEAD
 +  double split;
++=======
+   KdtRect bound1, bound2;
+   long len1;
+   int n1;
++>>>>>>> upstream/20131206+dfsg
  } Node;
  
  #define SYSTEM_32_BITS (!defined (__LP64__) && !defined (__64BIT__) && \
@@@ -200,11 -351,9 +506,17 @@@
  typedef struct {
    KdtRect bound;
    long len;
++<<<<<<< HEAD
 +  PADDING_32_BITS;
 +  long np;
 +#if SYSTEM_32_BITS
 +  int padding1;
 +#endif
++=======
+   PADDING_32_BITS
+   long np;
+   int version;
++>>>>>>> upstream/20131206+dfsg
  } Header;
  
  struct _Kdt {
@@@ -222,33 -371,19 +534,46 @@@ static int check_32_bits (const Kdt * k
  #if SYSTEM_32_BITS
    long maxlen = (1 << 31)/sizeof (KdtPoint);
    if (kdt->h.len > maxlen) {
++<<<<<<< HEAD
 +    fprintf (stderr, "kdt: 32-bits systems are limited to %ld data points\n", maxlen);
++=======
+     fprintf (stderr, "kdt: 32-bits systems are limited to %ld data points\n", 
+ 	     maxlen);
++>>>>>>> upstream/20131206+dfsg
      return 1;
    }
  #endif
    return 0;
  }
  
++<<<<<<< HEAD
 +#define KDTSIZE(len) (((len) - 1)*sizeof (Node) + (len)*sizeof (KdtPoint))
 +
 +int kdt_size (const Kdt * kdt, long len)
 +{
 +  long len1 = 1;
 +  while (len > kdt->h.np) {
 +    len /= 2; len1 *= 2;
 +  }
 +  return (len1 - 1)*sizeof (Node) + len1*sizeof (KdtPoint)*kdt->h.np;
 +}
 +
 +void kdt_sizes (const Kdt * kdt, long len, long * nodes, long * sums, long * leaves)
 +{
 +  long len1 = 1;
 +  while (len > kdt->h.np) {
 +    len /= 2; len1 *= 2;
 +  }
 +  *nodes = (len1 - 1)*sizeof (Node);
 +  *sums  = (len1 - 1)*sizeof (KdtSum);
 +  *leaves = len1*sizeof (KdtPoint)*kdt->h.np;
++=======
+ static void sizes (const Node * n, long * nodes, long * sums, long * leaves)
+ {
+   *nodes = n->n1*sizeof (Node);
+   *sums  = n->n1*sizeof (KdtSumCore);
+   *leaves = n->len1*sizeof (KdtPoint);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void relative (const KdtRect rect, double * o, double * h)
@@@ -260,7 -395,8 +585,12 @@@
      *h = ((double)rect[1].h) - ((double)rect[1].l);
  }
  
++<<<<<<< HEAD
 +static void sum_add_point (const KdtRect parent, KdtSum * sum, const KdtPoint * a)
++=======
+ static void sum_add_point (const KdtRect parent, KdtSumCore * sum, 
+ 			   const KdtPoint * a, double w)
++>>>>>>> upstream/20131206+dfsg
  {
    double p[3], o[2], h;
  
@@@ -273,214 -409,224 +603,425 @@@
    if (p[2] < sum->Hmin) sum->Hmin = p[2];
    if (p[2] > sum->Hmax) sum->Hmax = p[2];
  #else
++<<<<<<< HEAD
 +  sum->m01 += p[0];
 +  sum->m02 += p[1];
 +  sum->m03 += p[0]*p[1];
 +  sum->m11 += p[0]*p[0];
 +  sum->m13 += p[0]*p[0]*p[1];
 +  sum->m22 += p[1]*p[1];
 +  sum->m23 += p[0]*p[1]*p[1];
 +  sum->m33 += p[0]*p[0]*p[1]*p[1];
 +  sum->m44 += p[0]*p[0]*p[0];
 +  sum->m55 += p[1]*p[1]*p[1];
 +  sum->m66 += p[0]*p[0]*p[0]*p[0];
 +  sum->m77 += p[1]*p[1]*p[1]*p[1];
 +  sum->m67 += p[0]*p[0]*p[0]*p[1];
 +  sum->m76 += p[1]*p[1]*p[1]*p[0];
 +  sum->H0 += p[2];
 +  sum->H1 += p[0]*p[2];
 +  sum->H2 += p[1]*p[2];
 +  sum->H3 += p[0]*p[1]*p[2];
 +  sum->H4 += p[2]*p[2];
 +  sum->H5 += p[0]*p[0]*p[2];
 +  sum->H6 += p[1]*p[1]*p[2];
 +  sum->n++;
++=======
+   sum->m01 += w*p[0];
+   sum->m02 += w*p[1];
+   sum->m03 += w*p[0]*p[1];
+   sum->m11 += w*p[0]*p[0];
+   sum->m13 += w*p[0]*p[0]*p[1];
+   sum->m22 += w*p[1]*p[1];
+   sum->m23 += w*p[0]*p[1]*p[1];
+   sum->m33 += w*p[0]*p[0]*p[1]*p[1];
+   sum->m44 += w*p[0]*p[0]*p[0];
+   sum->m55 += w*p[1]*p[1]*p[1];
+   sum->m66 += w*p[0]*p[0]*p[0]*p[0];
+   sum->m77 += w*p[1]*p[1]*p[1]*p[1];
+   sum->m67 += w*p[0]*p[0]*p[0]*p[1];
+   sum->m76 += w*p[1]*p[1]*p[1]*p[0];
+   sum->H0 += w*p[2];
+   sum->H1 += w*p[0]*p[2];
+   sum->H2 += w*p[1]*p[2];
+   sum->H3 += w*p[0]*p[1]*p[2];
+   sum->H4 += w*p[2]*p[2];
+   sum->H5 += w*p[0]*p[0]*p[2];
+   sum->H6 += w*p[1]*p[1]*p[2];
+   sum->n ++;
++>>>>>>> upstream/20131206+dfsg
    if (p[2] < sum->Hmin) sum->Hmin = p[2];
    if (p[2] > sum->Hmax) sum->Hmax = p[2];
  #endif
  }
  
++<<<<<<< HEAD
 +static void sum_add_sum (const KdtRect parent, KdtSum * sum, const KdtRect rect, const KdtSum * a)
 +{
 +  double op[2], oa[2], hp, ha;
 +
 +  relative (parent, op, &hp);
 +  relative (rect, oa, &ha);
 +  
 +  double oap0 = oa[0] - op[0], oap1 = oa[1] - op[1];
 +  double an = a->n;
 +  double ha2 = ha*ha, hp2 = hp*hp;
 +  sum->m01 += (an*oap0 + a->m01*ha)/hp;
 +  sum->m02 += (an*oap1 + a->m02*ha)/hp;
 +  sum->m03 += (oap0*(an*oap1 + a->m02*ha) + ha*(a->m01*oap1 + a->m03*ha))/hp2;
 +  double m11 = (oap0*(an*oap0 + 2.*a->m01*ha) + a->m11*ha2)/hp2;
 +  sum->m11 += m11;
 +  double m13 = ha*(oap0*(a->m02*oap0 + 2.*a->m03*ha) + a->m13*ha2)/hp2;
 +  sum->m13 += (oap1*m11 + m13)/hp;
 +  double m22 = (oap1*(an*oap1 + 2.*a->m02*ha) + a->m22*ha2)/hp2;
 +  sum->m22 += m22;
 +  sum->m23 += (oap0*m22 + ha*(oap1*(oap1*a->m01 + 2.*a->m03*ha) + a->m23*ha2)/hp2)/hp;
 +  sum->m33 += (oap1*(oap1*m11 + 2.*m13) + 
 +		ha2*(oap0*(oap0*a->m22 + 2.*a->m23*ha) + ha2*a->m33)/hp2)/hp2;
 +  double ha3 = ha2*ha, hp3 = hp2*hp;
 +  sum->m44 += (oap0*(oap0*(oap0*an + 3.*ha*a->m01) + 3.*ha2*a->m11) + ha3*a->m44)/hp3;
 +  sum->m55 += (oap1*(oap1*(oap1*an + 3.*ha*a->m02) + 3.*ha2*a->m22) + ha3*a->m55)/hp3;
 +  double ha4 = ha3*ha, hp4 = hp3*hp;
 +  sum->m66 += (oap0*(oap0*(oap0*(oap0*an + 4.*ha*a->m01) + 6.*ha2*a->m11) 
 +		      + 4.*ha3*a->m44) + ha4*a->m66)/hp4;
 +  sum->m77 += (oap1*(oap1*(oap1*(oap1*an + 4.*ha*a->m02) + 6.*ha2*a->m22)
 +		      + 4.*ha3*a->m55) + ha4*a->m77)/hp4;
 +  sum->m67 += (oap1*(oap0*(oap0*(oap0*an + 3.*ha*a->m01) + 3.*ha2*a->m11) + ha3*a->m44)
 +		+ oap0*(oap0*(ha*a->m02*oap0 + 3.*ha2*a->m03) + 3.*ha3*a->m13) 
 +		+ ha4*a->m67)/hp4;
 +  sum->m76 += (oap0*(oap1*(oap1*(oap1*an + 3.*ha*a->m02) + 3.*ha2*a->m22) + ha3*a->m55)
 +		+ oap1*(oap1*(ha*a->m01*oap1 + 3.*ha2*a->m03) + 3.*ha3*a->m23)
 +		+ ha4*a->m76)/hp4;
 +  sum->H0 += a->H0;
 +  sum->H1 += (a->H0*oap0 + a->H1*ha)/hp;
 +  sum->H2 += (a->H0*oap1 + a->H2*ha)/hp;
 +  sum->H3 += (ha*(ha*a->H3 + oap0*a->H2 + oap1*a->H1) + oap0*oap1*a->H0)/hp2;
 +  sum->H4 += a->H4;
 +  sum->H5 += (oap0*(2.*ha*a->H1 + oap0*a->H0) + ha2*a->H5)/hp2;
 +  sum->H6 += (oap1*(2.*ha*a->H2 + oap1*a->H0) + ha2*a->H6)/hp2;
 +  sum->n += a->n;
 +  if (a->Hmin < sum->Hmin) sum->Hmin = a->Hmin;
 +  if (a->Hmax > sum->Hmax) sum->Hmax = a->Hmax;
++=======
+ static float area (const KdtRect rect)
+ {
+   return (rect[0].h - rect[0].l)*(rect[1].h - rect[1].l);
+ }
+ 
+ static float length (const KdtRect rect)
+ {
+   float w = rect[0].h - rect[0].l, h = rect[1].h - rect[1].l;
+   return w > h ? w : h;
+ }
+ 
+ static void kdt_rect_write (const KdtRect rect, FILE * fp)
+ {
+   fprintf (fp, "%f %f\n%f %f\n%f %f\n%f %f\n%f %f\n\n",
+ 	   rect[0].l, rect[1].l, rect[0].h, rect[1].l,
+ 	   rect[0].h, rect[1].h, rect[0].l, rect[1].h,
+ 	   rect[0].l, rect[1].l);	   
++>>>>>>> upstream/20131206+dfsg
  }
  
  static int sort_x (const void * p1, const void * p2)
  {
++<<<<<<< HEAD
 +  return ((KdtPoint *) p1)->x > ((KdtPoint *) p2)->x;
++=======
+   return ((KdtPoint *) p1)->x > ((KdtPoint *) p2)->x ? 1 : -1;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static int sort_y (const void * p1, const void * p2)
  {
++<<<<<<< HEAD
 +  return ((KdtPoint *) p1)->y > ((KdtPoint *) p2)->y;
 +}
 +
 +static void update_sum (const KdtRect rect, KdtSum * n, KdtPoint * a, long len)
 +{
 +  kdt_sum_init (n);
 +  long i;
 +  for (i = 0; i < len; i++, a++)
 +    sum_add_point (rect, n, a);
 +}
 +
 +#define PADDING 1e100
 +
 +static void split (KdtPoint * a, KdtRect bound, long len, int index, Kdt * kdt)
 +{
 +  if (len > kdt->h.np) {
 +    //    fprintf (stderr, " splitting: %ld       \r", len);
 +    qsort (a, len, sizeof (KdtPoint), index == 0 ? sort_x : sort_y);
 +    long len1 = len/2;
 +    long len2 = len - len1;
 +    Node n;
 +    n.split = (&a[len1].x)[index];
 +    KdtSum s;
 +    update_sum (bound, &s, a, len);
 +    fwrite (&s, sizeof (KdtSum), 1, kdt->sums);
 +    fwrite (&n, sizeof (Node), 1, kdt->nodes);
 +    KdtRect bound1;
 +    bound1[0].l = bound[0].l; bound1[0].h = bound[0].h;
 +    bound1[1].l = bound[1].l; bound1[1].h = bound[1].h;
 +    bound1[index].h = n.split;
 +    split (a, bound1, len1, (index + 1) % 2, kdt);
 +
 +    bound1[0].l = bound[0].l; bound1[0].h = bound[0].h;
 +    bound1[1].l = bound[1].l; bound1[1].h = bound[1].h;
 +    bound1[index].l = n.split;
 +    split (&(a[len1]), bound1, len2, (index + 1) % 2, kdt);
 +  }
 +  else if (len > 0) {
 +    fwrite (a, sizeof (KdtPoint), len, kdt->leaves);
 +    /* padding */
 +    KdtPoint dummy = { PADDING, PADDING, PADDING };
 +    int np = kdt->h.np;
 +    while (np-- > len)
 +      fwrite (&dummy, sizeof (KdtPoint), 1, kdt->leaves);
 +  }
 +}
 +
 +static void file_update_sum (const KdtRect rect, KdtSum * n, int fd, long len)
 +{
 +  KdtHeap h;
 +  kdt_heap_create (&h, fd, LENMIN);
 +  kdt_sum_init (n);
 +  long i;
 +  for (i = 0; i < len; i++) {
 +    KdtPoint p;
 +    assert (kdt_heap_get (&h, &p));
 +    sum_add_point (rect, n, &p);
 +  }
 +  kdt_heap_free (&h);
++=======
+   return ((KdtPoint *) p1)->y > ((KdtPoint *) p2)->y ? 1 : -1;
+ }
+ 
+ static void kdt_sum_core_init (KdtSumCore * s)
+ {
+   memset (s, 0, sizeof (KdtSumCore));
+   s->Hmax = - 1e30;
+   s->Hmin =   1e30;
+ }
+ 
+ #define GAP 0.2
+ #define MINLEN 6
+ 
+ static int update_sum (const KdtRect rect, KdtSumCore * n, KdtHeap * h, 
+ 		       int index)
+ {
+   kdt_sum_core_init (n);
+   long i, imax = 0;
+   double min, x, smax = 0;
+   KdtPoint p;
+   kdt_heap_rewind (h);
+   assert (kdt_heap_get (h, &p));
+   sum_add_point (rect, n, &p, 1.);
+   min = x = (&p.x)[index];
+   for (i = 1; i < h->len; i++) {
+     assert (kdt_heap_get (h, &p));
+     sum_add_point (rect, n, &p, 1.);
+     double s = (&p.x)[index] - x;
+     if (s > smax && i > MINLEN && i < h->len - MINLEN) {
+       smax = s;
+       imax = i;
+     }
+     x = (&p.x)[index];
+   }
+   return smax/(x - min) > GAP ? imax : -1;
+ }
+ 
+ static long update_bounds (KdtRect rect, KdtHeap * h)
+ {
+   long len = 0;
+   rect[0].h = rect[1].h = -1e30;
+   rect[0].l = rect[1].l =  1e30;
+   kdt_heap_rewind (h);
+   KdtPoint p;
+   while (kdt_heap_get (h, &p)) {
+     if (p.x > rect[0].h) rect[0].h = p.x;
+     if (p.x < rect[0].l) rect[0].l = p.x;
+     if (p.y > rect[1].h) rect[1].h = p.y;
+     if (p.y < rect[1].l) rect[1].l = p.y;
+     len++;
+   }
+   return len;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void progress (void * data)
  {
    Kdt * kdt = data;
++<<<<<<< HEAD
 +  if (kdt->progress)
 +    (* kdt->progress) (++kdt->i/(float) kdt->m, kdt->data);
 +}
 +
 +static void splitfile (int fd, KdtRect bound, long len, int index, Kdt * kdt)
++=======
+   if (kdt->progress && kdt->m > 0)
+     (* kdt->progress) (++kdt->i/(float) kdt->m, kdt->data);
+ }
+ 
+ static void fwrite_check (const void * ptr, size_t size, size_t nmemb, 
+ 			  FILE * stream)
+ {
+   if (fwrite (ptr, size, nmemb, stream) != nmemb) {
+     perror ("kdt_write");
+     exit (1);
+   }
+ }
+ 
+ static void union_bound (KdtRect b, const KdtRect b1, const KdtRect b2)
+ {
+   b[0].l = MIN (b1[0].l, b2[0].l);
+   b[1].l = MIN (b1[1].l, b2[1].l);
+   b[0].h = MAX (b1[0].h, b2[0].h);
+   b[1].h = MAX (b1[1].h, b2[1].h);
+ }
+ 
+ static int split (KdtHeap * h1, KdtRect bound, int index, Kdt * kdt, 
+ 		  float * coverage)
++>>>>>>> upstream/20131206+dfsg
  {
  #if TIMING
    struct timeval start;
    gettimeofday (&start, NULL);
  #endif
++<<<<<<< HEAD
 +  assert (lseek (fd, 0, SEEK_SET) == 0);
 +  if (len > LENMIN) {
 +    //    fprintf (stderr, " splitting: %ld      \r", len);
 +    KdtSum s;
 +    file_update_sum (bound, &s, fd, len);
 +    fwrite (&s, sizeof (KdtSum), 1, kdt->sums);
 +
 +    long len1 = len/2;
 +    long len2 = len - len1;
 +    fd = sort (fd, len,  index == 0 ? sort_x : sort_y, progress, kdt);
++=======
+   int ns = 0;
+   if (h1->len > kdt->h.np) {
+     //    fprintf (stderr, " splitting: %ld      \r", len);
+     int nindex = (bound[0].h - bound[0].l < bound[1].h - bound[1].l);
+     if (index != nindex) {
+       kdt_heap_sort (h1, nindex ? sort_y : sort_x, progress, kdt);
+       index = nindex;
+     }
+     else
+       /* update cost estimate */
+       kdt->m -= kdt_heap_sort_cost (h1->len, h1->buflen);
+     KdtSumCore s;
+     int imax = update_sum (bound, &s, h1, index);
+     long spos = ftell (kdt->sums);
+     fwrite_check (&s, sizeof (KdtSumCore), 1, kdt->sums);
+     Node n;
+     n.len1 = imax > 0 ? imax : h1->len/2;
++>>>>>>> upstream/20131206+dfsg
  #if TIMING
      struct timeval s1;
      gettimeofday (&s1, NULL);
  #endif
++<<<<<<< HEAD
 +    int fd2 = half (fd, len);
 +#if TIMING
 +    struct timeval end;
 +    gettimeofday (&end, NULL);
 +    fprintf (stderr, "half %ld %g\n", len, elapsed (&s1, &end));
 +#endif
 +    KdtPoint p;
 +    assert (lseek (fd2, 0, SEEK_SET) == 0);
 +    assert (read (fd2, &p, sizeof (KdtPoint)) == sizeof (KdtPoint));
 +
 +    Node n;
 +    n.split = (&p.x)[index];
 +    fwrite (&n, sizeof (Node), 1, kdt->nodes);
 +
 +    KdtRect bound1;
 +    bound1[0].l = bound[0].l; bound1[0].h = bound[0].h;
 +    bound1[1].l = bound[1].l; bound1[1].h = bound[1].h;
 +    bound1[index].h = n.split;
 +    splitfile (fd, bound1, len1, (index + 1) % 2, kdt);
 +    close (fd);
 +
 +    bound1[0].l = bound[0].l; bound1[0].h = bound[0].h;
 +    bound1[1].l = bound[1].l; bound1[1].h = bound[1].h;
 +    bound1[index].l = n.split;
 +    splitfile (fd2, bound1, len2, (index + 1) % 2, kdt);
 +    close (fd2);
 +  }
 +  else if (len > 0) {
 +    KdtPoint * a = malloc (len*sizeof (KdtPoint));
 +    assert (read (fd, a, len*sizeof (KdtPoint)) == len*sizeof (KdtPoint));
 +    split (a, bound, len, index, kdt);
 +    free (a);
++=======
+     KdtHeap h2;
+     kdt_heap_split (h1, n.len1, &h2);
+ #if TIMING
+     struct timeval end;
+     gettimeofday (&end, NULL);
+     fprintf (stderr, "half %ld %f\n", len, elapsed (&s1, &end));
+ #endif
+     update_bounds (n.bound1, h1);
+     update_bounds (n.bound2, &h2);
+     long pos = ftell (kdt->nodes);
+     fwrite_check (&n, sizeof (Node), 1, kdt->nodes);
+     float coverage1;
+     n.n1 = split (h1, n.bound1, index, kdt, &coverage1);
+     float coverage2;
+     int n2 = split (&h2, n.bound2, index, kdt, &coverage2);
+     ns = n.n1 + n2 + 1;
+ 
+     /* update bound */
+     union_bound (bound, n.bound1, n.bound2);
+ 
+     /* update sums */
+     double a = area (bound);
+     if (a > 0.)
+       s.coverage = (coverage1*area (n.bound1) + coverage2*area (n.bound2))/a;
+     else
+       s.coverage = 1.;
+     assert (fseek (kdt->sums, spos + ((long) &s.coverage - (long) &s), 
+ 		   SEEK_SET) == 0);
+     fwrite_check (&s.coverage, sizeof (float), 1, kdt->sums);
+     assert (fseek (kdt->sums, 0, SEEK_END) == 0);
+     *coverage = s.coverage;
+ 
+     /* update node */
+     assert (fseek (kdt->nodes, pos, SEEK_SET) == 0);
+     fwrite_check (&n, sizeof (Node), 1, kdt->nodes);
+     assert (fseek (kdt->nodes, 0, SEEK_END) == 0);
+   }
+   else {
+     assert (h1->len > 0);
+     /* half the average distance between samples */
+     double delta = length (bound)/sqrt (h1->len)/2.;
+     bound[0].l -= delta;
+     bound[1].l -= delta;
+     bound[0].h += delta;
+     bound[1].h += delta;
+ #if DEBUG
+     kdt_rect_write (bound, stderr);
+ #endif
+     assert (h1->len <= h1->buflen);
+     fwrite_check (h1->p, sizeof (KdtPoint), h1->len, kdt->leaves);
+     kdt_heap_free (h1);
+     *coverage = 1.;
++>>>>>>> upstream/20131206+dfsg
    }
  #if TIMING
    struct timeval end;
    gettimeofday (&end, NULL);
++<<<<<<< HEAD
 +  fprintf (stderr, "splitfile %ld %g\n", len, elapsed (&start, &end));
 +#endif
++=======
+   fprintf (stderr, "splitfile %ld %f\n", len, elapsed (&start, &end));
+ #endif
+   return ns;
++>>>>>>> upstream/20131206+dfsg
  }
  
  Kdt * kdt_new (void)
@@@ -514,11 -660,9 +1055,17 @@@ static int kdt_init (Kdt * kdt, const c
    if (!kdt->leaves)
      return -1;
  
++<<<<<<< HEAD
 +  kdt->h.len = len;
 +  kdt->h.np = len;
 +  while (kdt->h.np > npmax)
 +    kdt->h.np /= 2;
 +  kdt->h.np++;
++=======
+   kdt->h.version = VERSION;
+   kdt->h.len = len;
+   kdt->h.np = npmax;
++>>>>>>> upstream/20131206+dfsg
    kdt->h.bound[0].l = kdt->h.bound[1].l =  1e30;
    kdt->h.bound[0].h = kdt->h.bound[1].h = -1e30;
  
@@@ -529,63 -673,38 +1076,98 @@@
  }
  
  int kdt_create (Kdt * kdt, const char * name, int blksize,
++<<<<<<< HEAD
 +		KdtPoint * a, long len)
 +{
 +  int npmax = blksize/sizeof (KdtPoint);
 +  if (kdt_init (kdt, name, npmax, len))
 +    return -1;
 +  
 +  long i;
 +  for (i = 0; i < len; i++) {
 +    if (a[i].x > kdt->h.bound[0].h) kdt->h.bound[0].h = a[i].x;
 +    if (a[i].x < kdt->h.bound[0].l) kdt->h.bound[0].l = a[i].x;
 +    if (a[i].y > kdt->h.bound[1].h) kdt->h.bound[1].h = a[i].y;
 +    if (a[i].y < kdt->h.bound[1].l) kdt->h.bound[1].l = a[i].y;
 +  }
 +
 +  fwrite (&kdt->h, sizeof (Header), 1, kdt->nodes);
 +  split (a, kdt->h.bound, kdt->h.len, 0, kdt);
 +
 +  return 0;
 +}
 +
 +int kdt_create_from_file (Kdt * kdt, const char * name, int blksize,
 +			  int fd,
 +			  void (* progress) (float complete, void * data),
 +			  void * data)
 +{
 +  KdtHeap h;
 +  kdt_heap_create (&h, fd, LENMIN);
 +  long len = 0;
 +  KdtPoint p;
 +  KdtRect bound = {{ 1e30, -1e30}, {1e30, -1e30}};
 +  while (kdt_heap_get (&h, &p)) {
 +    if (p.x > bound[0].h) bound[0].h = p.x;
 +    if (p.x < bound[0].l) bound[0].l = p.x;
 +    if (p.y > bound[1].h) bound[1].h = p.y;
 +    if (p.y < bound[1].l) bound[1].l = p.y;
 +    len++;
 +  }
 +  kdt_heap_free (&h);
 +
 +  int npmax = blksize/sizeof (KdtPoint);
 +  if (kdt_init (kdt, name, npmax, len))
 +    return -1;
 +  kdt->h.bound[0].l = bound[0].l; kdt->h.bound[0].h = bound[0].h;
 +  kdt->h.bound[1].l = bound[1].l; kdt->h.bound[1].h = bound[1].h;
 +  
 +  fwrite (&kdt->h, sizeof (Header), 1, kdt->nodes);
 +  kdt->m = kdt->i = 0;
 +  int m2 = 1;
 +  while (len > LENMIN) {
 +    kdt->m++;
 +    len /= 2;
 +    m2 *= 2;
 +  }
 +  kdt->m = kdt->m*m2;
 +  kdt->progress = progress;
 +  kdt->data = data;
 +  splitfile (fd, kdt->h.bound, kdt->h.len, 0, kdt);
++=======
+ 		KdtHeap * h,
+ 		void (* progress) (float complete, void * data),
+ 		void * data)
+ {
+   KdtRect bound;
+   long len = update_bounds (bound, h);
+   kdt_heap_resize (h, len);
+ 
+   int npmax = blksize/sizeof (KdtPoint);
+   if (kdt_init (kdt, name, npmax, len))
+     return -1;
+   kdt->h.bound[0] = bound[0];
+   kdt->h.bound[1] = bound[1];
+ 
+   fwrite_check (&kdt->h, sizeof (Header), 1, kdt->nodes);
+ 
+   /* cost estimate kdt->m (number of qsort() calls) based on balanced
+      binary tree */
+   kdt->m = kdt->i = 0;
+   int m2 = 1;
+   while (len > kdt->h.np) {
+     kdt->m += kdt_heap_sort_cost (len, h->buflen)*m2;
+     len /= 2;
+     m2 *= 2;
+   }
+   kdt->progress = progress;
+   kdt->data = data;
+   float coverage;
+   split (h, kdt->h.bound, -1, kdt, &coverage);
+   /* write updated header (bounds have been updated) */
+   rewind (kdt->nodes);
+   fwrite_check (&kdt->h, sizeof (Header), 1, kdt->nodes);
++>>>>>>> upstream/20131206+dfsg
  
    return 0;
  }
@@@ -607,6 -726,15 +1189,18 @@@ int kdt_open (Kdt * kdt, const char * n
    if (fread (&kdt->h, sizeof (Header), 1, kdt->nodes) != 1)
      return -1;
  
++<<<<<<< HEAD
++=======
+   if (kdt->h.version != VERSION) {
+     fprintf (stderr, 
+ 	     "kdt: incompatible version number. Use:\n"
+ 	     "%% kdt2kdt -v %s\n"
+ 	     "to convert to the new format.\n", 
+ 	     name);
+     return -1;
+   }
+ 
++>>>>>>> upstream/20131206+dfsg
    kdt->buffer = malloc (sizeof (KdtPoint)*kdt->h.np);
  
    if (check_32_bits (kdt))
@@@ -628,31 -756,48 +1222,71 @@@ void kdt_destroy (Kdt * kdt
    free (kdt);
  }
  
++<<<<<<< HEAD
 +static long query (const Kdt * kdt, const KdtRect rect, int index, long len)
 +{
 +  if (len > kdt->h.np) {
 +    Node node;
 +    long len1 = len/2;
++=======
+ int kdt_intersects (const KdtRect rect, const KdtRect query)
+ {
+   return (rect[0].l <= query[0].h && rect[1].l <= query[1].h &&
+ 	  rect[0].h >= query[0].l && rect[1].h >= query[1].l);
+ }
+ 
+ int kdt_includes (const KdtRect rect, const KdtRect query)
+ {
+   return (rect[0].h <= query[0].h && rect[1].h <= query[1].h &&
+ 	  rect[0].l >= query[0].l && rect[1].l >= query[1].l);
+ }
+ 
+ static long query (const Kdt * kdt, const KdtRect rect, long len)
+ {
+   if (len > kdt->h.np) {
+     Node node;
++>>>>>>> upstream/20131206+dfsg
      if (fread (&node, sizeof (Node), 1, kdt->nodes) != 1)
        return -1;
      long pos = ftell (kdt->nodes), lpos = ftell (kdt->leaves);
      if (pos < 0 || lpos < 0)
        return -1;
      long n = 0;
++<<<<<<< HEAD
 +    if (rect[index].l < node.split) {
 +      long n1 = query (kdt, rect, (index + 1) % 2, len1);
++=======
+     if (kdt_intersects (node.bound1, rect)) {
+ #if DEBUG
+       kdt_rect_write (node.bound1, stderr);
+ #endif
+       long n1 = query (kdt, rect, node.len1);
++>>>>>>> upstream/20131206+dfsg
        if (n1 < 0)
  	return -1;
        n += n1;
      }
++<<<<<<< HEAD
 +    if (rect[index].h >= node.split) {
 +      long snodes, ssums, sleaves;
 +      kdt_sizes (kdt, len1, &snodes, &ssums, &sleaves);
++=======
+     if (kdt_intersects (node.bound2, rect)) {
+ #if DEBUG
+       kdt_rect_write (node.bound2, stderr);
+ #endif
+       long snodes, ssums, sleaves;
+       sizes (&node, &snodes, &ssums, &sleaves);
++>>>>>>> upstream/20131206+dfsg
        if (fseek (kdt->nodes, pos + snodes, SEEK_SET))
  	return -1;
        if (fseek (kdt->leaves, lpos + sleaves, SEEK_SET))
  	return -1;
++<<<<<<< HEAD
 +      long n1 = query (kdt, rect, (index + 1) % 2, len - len1);
++=======
+       long n1 = query (kdt, rect, len - node.len1);
++>>>>>>> upstream/20131206+dfsg
        if (n1 < 0)
  	return -1;
        n += n1;
@@@ -666,7 -811,8 +1300,12 @@@
      for (i = 0; i < len; i++)
        if (kdt->buffer[i].x >= rect[0].l && kdt->buffer[i].x <= rect[0].h && 
  	  kdt->buffer[i].y >= rect[1].l && kdt->buffer[i].y <= rect[1].h) {
++<<<<<<< HEAD
 +       	printf ("%.8f %.8f %g\n", kdt->buffer[i].x, kdt->buffer[i].y, kdt->buffer[i].z);
++=======
+        	printf ("%.8f %.8f %f\n", 
+ 		kdt->buffer[i].x, kdt->buffer[i].y, kdt->buffer[i].z);
++>>>>>>> upstream/20131206+dfsg
  	n++;
        }
      return n;
@@@ -681,10 -827,91 +1320,98 @@@ long kdt_query (const Kdt * kdt, const 
    Header h;
    if (fread (&h, sizeof (Header), 1, kdt->nodes) != 1)
      return -1;
++<<<<<<< HEAD
 +  if (rect[0].l > h.bound[0].h || rect[1].l > h.bound[1].h || 
 +      rect[0].h < h.bound[0].l || rect[1].h < h.bound[1].l)
 +    return 0;
 +  return query (kdt, rect, 0, h.len);
++=======
+   if (!kdt_intersects (rect, h.bound))
+     return 0;
+   return query (kdt, rect, h.len);
+ }
+ 
+ static void intersection (const KdtRect rect1, const KdtRect rect2, 
+ 			  KdtRect inter)
+ {
+   inter[0].l = MAX (rect1[0].l, rect2[0].l);
+   inter[0].h = MIN (rect1[0].h, rect2[0].h);
+   inter[1].l = MAX (rect1[1].l, rect2[1].l);
+   inter[1].h = MIN (rect1[1].h, rect2[1].h);
+   assert (inter[0].h >= inter[0].l && inter[1].h >= inter[1].l);  
+ }
+ 
+ static float intersection_area (const KdtRect rect1, const KdtRect rect2)
+ {
+   KdtRect inter;
+   intersection (rect1, rect2, inter);
+   return area (inter);
+ }
+ 
+ static void sum_add_sum (const KdtRect parent, KdtSum * sum, 
+ 			 const KdtRect rect, const KdtSumCore * a)
+ {
+   /* weigh by effective area per sample */
+   double w = intersection_area (rect, parent)*a->coverage/a->n;
+   if (w == 0.)
+     return;
+ 
+   double op[2], oa[2], hp, ha;
+ 
+   relative (parent, op, &hp);
+   relative (rect, oa, &ha);
+ 
+   double oap0 = oa[0] - op[0], oap1 = oa[1] - op[1];
+   double an = a->n;
+   double ha2 = ha*ha, hp2 = hp*hp;
+   sum->m01 += w*(an*oap0 + a->m01*ha)/hp;
+   sum->m02 += w*(an*oap1 + a->m02*ha)/hp;
+   sum->m03 += w*(oap0*(an*oap1 + a->m02*ha) + ha*(a->m01*oap1 + a->m03*ha))/hp2;
+   double m11 = (oap0*(an*oap0 + 2.*a->m01*ha) + a->m11*ha2)/hp2;
+   sum->m11 += w*m11;
+   double m13 = ha*(oap0*(a->m02*oap0 + 2.*a->m03*ha) + a->m13*ha2)/hp2;
+   sum->m13 += w*(oap1*m11 + m13)/hp;
+   double m22 = (oap1*(an*oap1 + 2.*a->m02*ha) + a->m22*ha2)/hp2;
+   sum->m22 += w*m22;
+   sum->m23 += w*(oap0*m22 + ha*(oap1*(oap1*a->m01 + 2.*a->m03*ha) + 
+ 				a->m23*ha2)/hp2)/hp;
+   sum->m33 += w*(oap1*(oap1*m11 + 2.*m13) + 
+ 		 ha2*(oap0*(oap0*a->m22 + 2.*a->m23*ha) + ha2*a->m33)/hp2)/hp2;
+   double ha3 = ha2*ha, hp3 = hp2*hp;
+   sum->m44 += w*(oap0*(oap0*(oap0*an + 3.*ha*a->m01) + 3.*ha2*a->m11) + 
+ 		 ha3*a->m44)/hp3;
+   sum->m55 += w*(oap1*(oap1*(oap1*an + 3.*ha*a->m02) + 3.*ha2*a->m22) + 
+ 		 ha3*a->m55)/hp3;
+   double ha4 = ha3*ha, hp4 = hp3*hp;
+   sum->m66 += w*(oap0*(oap0*(oap0*(oap0*an + 4.*ha*a->m01) + 6.*ha2*a->m11) 
+ 		       + 4.*ha3*a->m44) + ha4*a->m66)/hp4;
+   sum->m77 += w*(oap1*(oap1*(oap1*(oap1*an + 4.*ha*a->m02) + 6.*ha2*a->m22)
+ 		       + 4.*ha3*a->m55) + ha4*a->m77)/hp4;
+   sum->m67 += w*(oap1*(oap0*(oap0*(oap0*an + 3.*ha*a->m01) + 3.*ha2*a->m11) + 
+ 		       ha3*a->m44)
+ 		 + oap0*(oap0*(ha*a->m02*oap0 + 3.*ha2*a->m03) + 3.*ha3*a->m13) 
+ 		 + ha4*a->m67)/hp4;
+   sum->m76 += w*(oap0*(oap1*(oap1*(oap1*an + 3.*ha*a->m02) + 3.*ha2*a->m22) + 
+ 		       ha3*a->m55)
+ 		 + oap1*(oap1*(ha*a->m01*oap1 + 3.*ha2*a->m03) + 3.*ha3*a->m23)
+ 		 + ha4*a->m76)/hp4;
+   sum->H0 += w*a->H0;
+   sum->H1 += w*(a->H0*oap0 + a->H1*ha)/hp;
+   sum->H2 += w*(a->H0*oap1 + a->H2*ha)/hp;
+   sum->H3 += w*(ha*(ha*a->H3 + oap0*a->H2 + oap1*a->H1) + oap0*oap1*a->H0)/hp2;
+   sum->H4 += w*a->H4;
+   sum->H5 += w*(oap0*(2.*ha*a->H1 + oap0*a->H0) + ha2*a->H5)/hp2;
+   sum->H6 += w*(oap1*(2.*ha*a->H2 + oap1*a->H0) + ha2*a->H6)/hp2;
+   sum->n += w*a->n*a->n/area (rect);
+   float aparent = area (parent);
+   if (aparent > 0.)
+     sum->coverage += w*a->n/aparent;
+   else
+     sum->coverage = 1.;
+   sum->w += w*a->n;
+   if (a->Hmin < sum->Hmin) sum->Hmin = a->Hmin;
+   if (a->Hmax > sum->Hmax) sum->Hmax = a->Hmax;
++>>>>>>> upstream/20131206+dfsg
  }
  
  typedef struct {
@@@ -693,13 -920,27 +1420,37 @@@
  
  static long query_sum (const Kdt * kdt,
  		       KdtCheck includes, KdtCheck intersects, void * data, 
++<<<<<<< HEAD
 +		       KdtRect bound, int index, long len,
 +		       FilePointers * f,
 +		       const KdtRect rect, KdtSum * sum)
 +{
 +  if (len > kdt->h.np) {
 +    Node node;
 +    long len1 = len/2;
++=======
+ 		       KdtRect bound, long len,
+ 		       FilePointers * f,
+ 		       const KdtRect query, KdtSum * sum)
+ {
+   if (len > kdt->h.np) {
+     if (length (bound) <= length (query) || (* includes) (bound, data)) {
+       KdtSumCore s;
+       if (fseek (kdt->sums, f->sp, SEEK_SET))
+ 	return -1;
+       if (fread (&s, sizeof (KdtSumCore), 1, kdt->sums) != 1)
+ 	return -1;
+ #if DEBUG
+       fprintf (stderr, "read 1 sum %ld\n", sizeof (KdtSumCore));
+ #endif
+       f->sp += sizeof (KdtSumCore);
+       sum_add_sum (query, sum, bound, &s);
+       return len;
+     }
+     f->sp += sizeof (KdtSumCore);
+ 
+     Node node;
++>>>>>>> upstream/20131206+dfsg
      if (fseek (kdt->nodes, f->np, SEEK_SET))
        return -1;
      if (fread (&node, sizeof (Node), 1, kdt->nodes) != 1)
@@@ -709,80 -950,70 +1460,138 @@@
      fprintf (stderr, "read 1 node %ld\n", sizeof (Node));
  #endif
  
++<<<<<<< HEAD
 +    if ((* includes) (bound, data)) {
 +      KdtSum s;
 +      if (fseek (kdt->sums, f->sp, SEEK_SET))
 +	return -1;
 +      if (fread (&s, sizeof (KdtSum), 1, kdt->sums) != 1)
 +	return -1;
 +#if DEBUG
 +      fprintf (stderr, "read 1 sum %ld index %d\n", sizeof (KdtSum), index);
 +#endif
 +      f->sp += sizeof (KdtSum);
 +      sum_add_sum (rect, sum, bound, &s);
 +      return len;
 +    }
 +    f->sp += sizeof (KdtSum);
 +
 +    long pos = f->np, lpos = f->lp, spos = f->sp;
 +    long n = 0;
 +
 +    KdtRect bound1;
 +    bound1[0].l = bound[0].l; bound1[0].h = bound[0].h;
 +    bound1[1].l = bound[1].l; bound1[1].h = bound[1].h;
 +    bound1[index].h = node.split;
 +    if ((* intersects) (bound1, data)) {
 +      long n1 = query_sum (kdt, includes, intersects, data, 
 +			   bound1, (index + 1) % 2, len1, f, rect, sum);
++=======
+     long pos = f->np, lpos = f->lp, spos = f->sp;
+     long n = 0;
+ 
+     if ((* intersects) (node.bound1, data)) {
+       long n1 = query_sum (kdt, includes, intersects, data, 
+ 			   node.bound1, node.len1, f, query, sum);
++>>>>>>> upstream/20131206+dfsg
        if (n1 < 0)
  	return -1;
        n += n1;
      }
  
++<<<<<<< HEAD
 +    bound1[0].l = bound[0].l; bound1[0].h = bound[0].h;
 +    bound1[1].l = bound[1].l; bound1[1].h = bound[1].h;
 +    bound1[index].l = node.split;
 +    if ((* intersects) (bound1, data)) {
 +      long snodes, ssums, sleaves;
 +      kdt_sizes (kdt, len1, &snodes, &ssums, &sleaves);
++=======
+     if ((* intersects) (node.bound2, data)) {
+       long snodes, ssums, sleaves;
+       sizes (&node, &snodes, &ssums, &sleaves);
++>>>>>>> upstream/20131206+dfsg
        f->np = pos + snodes;
        f->sp = spos + ssums;
        f->lp = lpos + sleaves;
        long n1 = query_sum (kdt, includes, intersects, data, 
++<<<<<<< HEAD
 +			   bound1, (index + 1) % 2, len - len1, f, rect, sum);
++=======
+ 			   node.bound2, len - node.len1, f, query, sum);
++>>>>>>> upstream/20131206+dfsg
        if (n1 < 0)
  	return -1;
        n += n1;
      }
      return n;
    }
++<<<<<<< HEAD
 +  else if (len > 0) {
 +    if (fseek (kdt->leaves, f->lp, SEEK_SET))
 +      return -1;
 +    if (fread (kdt->buffer, sizeof (KdtPoint), len, kdt->leaves) != len)
 +      return -1;
 +#if DEBUG
 +    fprintf (stderr, "read %ld leaves %ld\n", len, sizeof (KdtPoint));
 +#endif
 +    KdtRect boundp;
 +    KdtPoint * a = kdt->buffer;
 +    int i, n = 0;
 +    for (i = 0; i < len; i++, a++) {
 +      boundp[0].l = boundp[0].h = a->x;
 +      boundp[1].l = boundp[1].h = a->y;
 +      if ((* includes) (boundp, data)) {
 +	sum_add_point (rect, sum, a);
 +	n++;
 +      }
 +    }
 +    return n;
++=======
+   else {
+     float h = length (bound)/sqrt (len); /* average distance between samples */
+     if (h <= length (query)) {
+ #if DEBUG
+       fprintf (stderr, "# area: %f %f\n", area (query), area (bound)/len);
+       kdt_rect_write (bound, stderr);
+ #endif
+       if (fseek (kdt->leaves, f->lp, SEEK_SET))
+ 	return -1;
+       if (fread (kdt->buffer, sizeof (KdtPoint), len, kdt->leaves) != len)
+ 	return -1;
+ #if DEBUG
+       fprintf (stderr, "read %ld leaves %ld\n", len, sizeof (KdtPoint));
+ #endif
+       KdtPoint * a = kdt->buffer;
+       int i, n = 0;
+       for (i = 0; i < len; i++, a++) {
+ 	KdtRect boundp;
+ 	boundp[0].l = a->x - h/2.;
+ 	boundp[0].h = a->x + h/2.;
+ 	boundp[1].l = a->y - h/2.;
+ 	boundp[1].h = a->y + h/2.;
+ 	if ((* intersects) (boundp, data)) {
+ 	  double w = intersection_area (boundp, query);
+ 	  sum_add_point (query, (KdtSumCore *) sum, a, w);
+ 	  sum->w += w;
+ 	  sum->coverage += w/area (query);
+ 	  n++;
+ 	}
+       }
+       return n;
+     }
++>>>>>>> upstream/20131206+dfsg
    }
    return 0;
  }
  
  long kdt_query_sum (const Kdt * kdt, 
  		    KdtCheck includes, KdtCheck intersects, void * data, 
++<<<<<<< HEAD
 +		    const KdtRect rect, KdtSum * sum)
++=======
+ 		    const KdtRect query, KdtSum * sum)
++>>>>>>> upstream/20131206+dfsg
  {
    rewind (kdt->nodes);
    rewind (kdt->leaves);
@@@ -792,12 -1023,14 +1601,24 @@@
    FilePointers f;
    f.np = sizeof (Header);
    f.sp = f.lp = 0;
++<<<<<<< HEAD
 +  return query_sum (kdt, includes, intersects, data, h.bound, 0, h.len, &f, rect, sum);
++=======
+   if (!(* intersects) (h.bound, data))
+     return 0;
+   return query_sum (kdt, includes, intersects, data, h.bound, h.len, &f, 
+ 		    query, sum);
++>>>>>>> upstream/20131206+dfsg
  }
  
  void kdt_sum_init (KdtSum * s)
  {
++<<<<<<< HEAD
 +  memset (s, 0, sizeof (KdtSum));
 +  s->Hmax = - 1e30;
 +  s->Hmin =   1e30;
++=======
+   kdt_sum_core_init ((KdtSumCore *) s);
+   s->w = 0.;
++>>>>>>> upstream/20131206+dfsg
  }
diff --cc modules/kdt/kdt.h
index 4152a49,cf8917d..7ddd8ad
--- a/modules/kdt/kdt.h
+++ b/modules/kdt/kdt.h
@@@ -22,9 -22,11 +22,17 @@@
  #if defined (__LP64__) || defined (__64BIT__) || defined (_LP64) || (__WORDSIZE == 64)
    #define PADDING_32_BITS
  #else
++<<<<<<< HEAD
 +  #define PADDING_32_BITS int padding
 +#endif
 +
++=======
+   #define PADDING_32_BITS int padding;
+ #endif
+ 
+ FILE * kdt_tmpfile (void);
+ 
++>>>>>>> upstream/20131206+dfsg
  typedef struct {
    double x, y, z;
  } KdtPoint;
@@@ -35,6 -37,22 +43,25 @@@ typedef struct 
  
  typedef KdtInterval KdtRect[2];
  
++<<<<<<< HEAD
++=======
+ typedef struct {
+   KdtPoint * p;
+   long start, len, i, end, buflen, current;
+   FILE * fp;
+   void * buf;
+ } KdtHeap;
+ 
+ void kdt_heap_create (KdtHeap * h, FILE * fp, long start, long len, long buflen);
+ void kdt_heap_resize (KdtHeap * h, long len);
+ int  kdt_heap_get    (KdtHeap * h, KdtPoint * p);
+ void kdt_heap_split  (KdtHeap * h1, long len1, KdtHeap * h2);
+ void kdt_heap_put    (KdtHeap * h, KdtPoint * p);
+ void kdt_heap_flush  (KdtHeap * h);
+ void kdt_heap_free   (KdtHeap * h);
+ void kdt_heap_rewind (KdtHeap * h);
+ 
++>>>>>>> upstream/20131206+dfsg
  typedef struct { /* needs to be identical to RSurfaceSum in rsurface.h */
  #if AVG_TERRAIN
    double H0;
@@@ -49,44 -67,48 +76,88 @@@
    double H0, H1, H2, H3, H4;
    double H5, H6;
    float Hmin, Hmax;
++<<<<<<< HEAD
 +  int n;
 +  PADDING_32_BITS;
 +#endif
++=======
+   float coverage;
+   int n;
+ #endif
+ } KdtSumCore;
+ 
+ typedef struct {
+ #if AVG_TERRAIN
+   double H0;
+   float Hmin, Hmax;
+   int n;
+ #else
+   double m01, m02, m03;
+   double m11, m13;
+   double m22, m23, m33;
+   double m44, m55, m66, m77;
+   double m67, m76;
+   double H0, H1, H2, H3, H4;
+   double H5, H6;
+   float Hmin, Hmax;
+   float coverage;
+   int n;
+ #endif
+   double w;
++>>>>>>> upstream/20131206+dfsg
  } KdtSum;
  
  typedef struct _Kdt Kdt;
  typedef int (* KdtCheck) (const KdtRect rect, void * data);
  
++<<<<<<< HEAD
 +Kdt * kdt_new       (void);
 +int  kdt_create     (Kdt * kdt,
 +		     const char * name, 
 +		     int blksize,
 +		     KdtPoint * a, long len);
 +int  kdt_create_from_file (Kdt * kdt, 
 +			   const char * name, 
 +			   int blksize,
 +			   int fd,
 +			   void (* progress) (float complete, void * data),
 +			   void * data);
++=======
+ int kdt_intersects  (const KdtRect rect, const KdtRect query);
+ int kdt_includes    (const KdtRect rect, const KdtRect query);
+ 
+ Kdt * kdt_new       (void);
+ int  kdt_create     (Kdt * kdt, 
+ 		     const char * name, 
+ 		     int blksize,
+ 		     KdtHeap * h,
+ 		     void (* progress) (float complete, void * data),
+ 		     void * data);
++>>>>>>> upstream/20131206+dfsg
  int  kdt_open       (Kdt * kdt, const char * name);
  void kdt_destroy    (Kdt * kdt);
  long kdt_query      (const Kdt * kdt, const KdtRect rect);
  long kdt_query_sum  (const Kdt * kdt,
  		     KdtCheck includes, KdtCheck intersects, void * data,
++<<<<<<< HEAD
 +		     const KdtRect rect, KdtSum * sum);
 +int  kdt_size       (const Kdt * kdt, long len);
 +void kdt_sizes      (const Kdt * kdt, long len, 
 +		     long * nodes, long * sums, long * leaves);
 +void kdt_sum_init   (KdtSum * s);
 +
 +typedef struct {
 +  KdtPoint * p;
 +  long len, i, end;
 +  int fd;
 +} KdtHeap;
 +
 +void kdt_heap_create (KdtHeap * h, int fd, long len);
 +int  kdt_heap_get    (KdtHeap * h, KdtPoint * p);
 +void kdt_heap_put    (KdtHeap * h, KdtPoint * p);
 +void kdt_heap_flush  (KdtHeap * h);
 +void kdt_heap_free   (KdtHeap * h);
++=======
+ 		     const KdtRect query, KdtSum * sum);
+ void kdt_sum_init   (KdtSum * s);
++>>>>>>> upstream/20131206+dfsg
diff --cc modules/kdt/kdtquery.c
index c08aef7,a1ce998..ad709b9
--- a/modules/kdt/kdtquery.c
+++ b/modules/kdt/kdtquery.c
@@@ -23,18 -23,6 +23,21 @@@
  
  #include "kdt.h"
  
++<<<<<<< HEAD
 +static int intersects (const KdtRect rect, const KdtRect query)
 +{
 +  return (rect[0].l <= query[0].h && rect[1].l <= query[1].h &&
 +	  rect[0].h >= query[0].l && rect[1].h >= query[1].l);
 +}
 +
 +static int includes (const KdtRect rect, const KdtRect query)
 +{
 +  return (rect[0].h <= query[0].h && rect[1].h <= query[1].h &&
 +	  rect[0].l >= query[0].l && rect[1].l >= query[1].l);
 +}
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  int main (int argc, char * argv[])
  {
    if (argc != 2) {
@@@ -60,7 -48,8 +63,12 @@@
      KdtSum s;
      kdt_sum_init (&s);
      //    g_timer_start (t);
++<<<<<<< HEAD
 +    long n = kdt_query_sum (kdt, (KdtCheck) includes, (KdtCheck) intersects, query, query, &s);
++=======
+     long n = kdt_query_sum (kdt, (KdtCheck) kdt_includes, (KdtCheck) kdt_intersects, 
+ 			    query, query, &s);
++>>>>>>> upstream/20131206+dfsg
      //    g_timer_stop (t);
      //    fprintf (stderr, "%d %g %g %g %g\n", n, s.H0, s.Hmax, s.Hmin, g_timer_elapsed (t, NULL));
      printf ("%ld %g %g %g\n", n, s.H0, s.H1, s.H2);
diff --cc modules/kdt/xyz2kdt.c
index 69e2ea0,48b1210..b4eb460
--- a/modules/kdt/xyz2kdt.c
+++ b/modules/kdt/xyz2kdt.c
@@@ -49,11 -49,11 +49,19 @@@ static void progress (float complete, v
    int mins = remaining/1e6/60. - 60.*hours;
    int secs = remaining/1e6 - 3600.*hours - 60.*mins;
    fprintf (stderr, "\rxyz2kdt: %3.0f%% complete %02d:%02d:%02d remaining", 
++<<<<<<< HEAD
 +	   complete*100.,
 +	   hours, mins, secs);
 +#else
 +  fprintf (stderr, "\rxyz2kdt: %3.0f%% complete    ", 
 +	   complete*100.);
++=======
+ 	   (complete > 1. ? 1. : complete)*100.,
+ 	   hours, mins, secs);
+ #else
+   fprintf (stderr, "\rxyz2kdt: %3.0f%% complete    ", 
+ 	   (complete > 1. ? 1. : complete)*100.);
++>>>>>>> upstream/20131206+dfsg
  #endif
  }
  
@@@ -112,33 -112,31 +120,60 @@@ int main (int argc, char * argv[]
      return 1; /* failure */
    }
  
++<<<<<<< HEAD
 +  char name[] = "XXXXXX";
 +  int fd = mkstemp (name);
 +  assert (fd >= 0);
 +  assert (unlink (name) == 0);
 +
 +  if (verbose)
 +    fprintf (stderr, "xyz2kdt: reading points...");
 +  KdtHeap h;
 +  kdt_heap_create (&h, fd, pagesize/sizeof (KdtPoint));
 +  KdtPoint p;
 +  while (scanf ("%lf %lf %lf", &p.x, &p.y, &p.z) == 3)
 +    kdt_heap_put (&h, &p);
 +  kdt_heap_flush (&h);
 +  kdt_heap_free (&h);
 +  lseek (fd, 0, SEEK_SET);
++=======
+   if (verbose)
+     fprintf (stderr, "xyz2kdt: reading points...\r");
+   KdtHeap h;
+   kdt_heap_create (&h, kdt_tmpfile (), 0, -1, 1000000);
+   long n = 0;
+   KdtPoint p;
+   while (scanf ("%lf %lf %lf", &p.x, &p.y, &p.z) == 3) {
+     kdt_heap_put (&h, &p);
+     if (verbose && n % 3571 == 0)
+       fprintf (stderr, "xyz2kdt: reading points... %ld\r", n);
+     n++;
+   }
+   kdt_heap_flush (&h);
+   if (verbose)
+     fprintf (stderr, "xyz2kdt:   0%% complete              ");
++>>>>>>> upstream/20131206+dfsg
  
    struct timeval start;
    gettimeofday (&start, NULL);
    Kdt * kdt = kdt_new ();
++<<<<<<< HEAD
 +  kdt_create_from_file (kdt, argv[optind], pagesize, fd,
 +			verbose ? progress : NULL, &start);
 +  kdt_destroy (kdt);
 +  close (fd);
 +
 +  if (verbose) {
 +    Kdt * kdt = kdt_new ();
 +    KdtRect rect = {{-0.5,-0.5},{0.5,0.5}};
++=======
+   kdt_create (kdt, argv[optind], pagesize, &h, verbose ? progress : NULL, &start);
+   kdt_destroy (kdt);
+ 
+   if (verbose) {
+     Kdt * kdt = kdt_new ();
+     KdtRect rect = {{-1e30,1e30},{-1e30,1e30}};
++>>>>>>> upstream/20131206+dfsg
      KdtSum sum;
  
      kdt_sum_init (&sum);
@@@ -147,8 -145,8 +182,13 @@@
  			    (KdtCheck) includes_true, (KdtCheck) includes_true, NULL,
  			    rect, &sum);
      fprintf (stderr,
++<<<<<<< HEAD
 +	     "\n%ld points Height min: %g average: %g max: %g\n", 
 +	     n, sum.Hmin, sum.H0/sum.n, sum.Hmax);
++=======
+ 	     "\r%ld points Height min: %g average: %g max: %g\n",
+ 	     n, sum.Hmin, sum.H0/sum.w, sum.Hmax);
++>>>>>>> upstream/20131206+dfsg
      kdt_destroy (kdt);
    }
  
diff --cc modules/map.c
index 05783bc,8837585..15be886
--- a/modules/map.c
+++ b/modules/map.c
@@@ -140,11 -142,12 +142,20 @@@ static void projection_inverse_cell (Gf
    o.x /= 4.; o.y /= 4.; o.z /= 4.;
    projection_inverse (map, &o, &o);
    /* make sure we do not cross periodic longitude boundary */
++<<<<<<< HEAD:modules/map.mod
 +  for (i = 0; i < 4; i++)
 +    if (dest[i].x > o.x + 180.)
 +      dest[i].x -= 360.;
 +    else if (dest[i].x < o.x - 180.)
 +      dest[i].x += 360.;
++=======
+   gdouble L = gfs_object_simulation (map)->physical_params.L;
+   for (i = 0; i < 4; i++)
+     if (dest[i].x > o.x + 180./L)
+       dest[i].x -= 360./L;
+     else if (dest[i].x < o.x - 180./L)
+       dest[i].x += 360./L;
++>>>>>>> upstream/20131206+dfsg:modules/map.c
  }
  
  static void gfs_map_projection_class_init (GfsMapClass * klass)
diff --cc modules/rsurface.c
index e85d77c,75a1982..7f104fc
--- a/modules/rsurface.c
+++ b/modules/rsurface.c
@@@ -10,38 -9,15 +10,39 @@@
  struct _RSurface {
    RSTREE t;
    char * name;
 +  Kdt * kdt;
  };
  
- RSurface * r_surface_new (const char * fname, int size, FILE * fp)
- {
-   return NULL;
- }
- 
  RSurface * r_surface_open (const char * fname, const char * mode, int size)
  {
    RSurface * rt = malloc (sizeof (RSurface));
    rt->t = NULL;
++<<<<<<< HEAD
 +  rt->kdt = NULL;
 +  if (!strcmp (mode, "w")) {
 +    RemoveRST (fname);
 +    if (!CreateRST (fname, size, FALSE)) {
 +      free (rt);
 +      return NULL;
 +    }
 +  }
 +  rt->kdt = kdt_new ();
 +  if (kdt_open (rt->kdt, fname)) {
 +    kdt_destroy (rt->kdt);
 +    rt->kdt = NULL;
 +    if (!OpenRST (&rt->t, fname, !strcmp (mode, "w") ? "rw" : "r")) {
 +      free (rt);
 +      return NULL;
 +    }
 +    else
 +      fprintf (stderr, 
 +	       "\nWARNING: you are using a terrain database with an obsolete format\n"
 +	       "please convert to the new KDT format\n");
++=======
+   if (!OpenRST (&rt->t, fname, "r")) {
+     free (rt);
+     return NULL;
++>>>>>>> upstream/20131206+dfsg
    }
    rt->name = malloc (sizeof (char)*(strlen (fname) + 1));
    strcpy (rt->name, fname);
@@@ -51,31 -27,10 +52,38 @@@
  int r_surface_close (RSurface * rt)
  {
    int status = 1;
++<<<<<<< HEAD
 +  if (rt->kdt)
 +    kdt_destroy (rt->kdt);
 +  else
 +    status = CloseRST (&rt->t);
 +  free (rt->name);
 +  free (rt);
 +  return status;
 +}
 +
 +int r_surface_insert  (RSurface * rt, double p[3], int id)
 +{
 +  assert (!rt->kdt); /* not implemented */
 +  typrect rect;
 +  typinfo info;
 +  boolean inserted;
 +  rect[0].l = p[0]; rect[0].h = p[0];
 +  rect[1].l = p[1]; rect[1].h = p[1];
 +  info.height = p[2];
 +  return (InsertRecord (rt->t, rect, &info, &inserted) && inserted);
 +}
 +
 +void r_surface_query (RSurface * rt, 
 +		      double a[2], double b[2], double c[2], double d[2],
 +		      RSurfaceQuery q, void * user_data)
 +{
++=======
+   status = CloseRST (&rt->t);
+   free (rt->name);
+   free (rt);
+   return status;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static boolean Intersects (RSTREE R,
@@@ -124,179 -78,4 +132,182 @@@ void r_surface_query_region (RSurface 
    data[0] = q;
    data[1] = user_data;
    RegionQuery (rt->t, rect, unused, Intersects, Intersects, (QueryManageProc) ManageQuery, data);
++<<<<<<< HEAD
 +}
 +
 +void r_surface_sum_init (RSurfaceSum * sum)
 +{
 +  memset (sum, 0, sizeof (RSurfaceSum));
 +  sum->Hmin = 1e30;
 +  sum->Hmax = - 1e30;
 +}
 +
 +/**
 + * Fills @sum using @rect to normalise the results i.e. the sums are
 + * expressed in a coordinate system centered on 
 + * (rect[0].l + rect[0].h, rect[1].l + rect[1].h)/2 
 + * and scaled by 
 + * MAX(rect[0].h - rect[0].l, rect[1].h - rect[1].l).
 + */
 +void r_surface_query_region_sum (RSurface * rt,
 +				 RSurfaceCheck includes,
 +				 RSurfaceCheck intersects,
 +				 void * data,
 +				 RSurfaceRect rect,
 +				 RSurfaceSum * sum)
 +{
 +  if (rt->kdt)
 +    kdt_query_sum (rt->kdt, (KdtCheck) includes, (KdtCheck) intersects, data, 
 +		   (KdtInterval *) rect, (KdtSum *) sum);
 +  else
 +    RegionQueryInfo (rt->t, (Check) includes, (Check) intersects, data, 
 +		     (typinterval *) rect, (typdirinfo *) sum);
 +}
 +
 +const char * r_surface_name (RSurface * rt)
 +{
 +  return rt->name;
 +}
 +
 +void r_surface_update (RSurface * rt)
 +{
 +  assert (!rt->kdt); /* not implemented */
 +  Update (rt->t);
++=======
++>>>>>>> upstream/20131206+dfsg
 +}
 +
 +int r_surface_depth (RSurface * rt)
 +{
 +  assert (!rt->kdt); /* not implemented */
 +  int height = -1;
 +  GetHeight (rt->t, &height);
 +  return height;
 +}
 +
 +void r_surface_info (RSurface * rt)
 +{
 +  assert (!rt->kdt); /* not implemented */
 +  char name[100];
 +  int numbofdim, sizedirentry, sizedataentry, sizeinfo;
 +  int maxdirfanout, maxdatafanout, pagesize, numbofdirpages;
 +  int numbofdatapages, pagesperlevel[100], numbofrecords, height;
 +  boolean unique;
 +  
 +  InquireRSTDesc(rt->t,
 +		 name,
 +		 &numbofdim,
 +		 &sizedirentry,
 +		 &sizedataentry,
 +		 &sizeinfo,
 +		 &maxdirfanout,
 +		 &maxdatafanout,
 +		 &pagesize,
 +		 &numbofdirpages,
 +		 &numbofdatapages,
 +		 pagesperlevel,
 +		 &numbofrecords,
 +		 &height,
 +		 &unique);
 +  fprintf (stderr, 
 +	   "Number of dimensions:\t\t\t\t%d\n"
 +	   "Size (bytes) of a directory entry:\t\t%d\n"
 +	   "Size (bytes) of a data entry:\t\t\t%d\n"
 +	   "Size (bytes) of an information part:\t\t%d\n"
 +	   "Maximum # of entries for a directory node:\t%d\n"
 +	   "Maximum # of entries for a data node:\t\t%d\n"
 +	   "Total # of directory pages:\t\t\t%d\n"
 +	   "Total # of data pages:\t\t\t\t%d\n"
 +	   "Total # of data records:\t\t\t%d\n"
 +	   "Are records unique?:\t\t\t\t%s\n"
 +	   "Height of the tree:\t\t\t\t%d\n",
 +	   numbofdim,
 +	   sizedirentry,
 +	   sizedataentry,
 +	   sizeinfo,
 +	   maxdirfanout,
 +	   maxdatafanout,
 +	   numbofdirpages,
 +	   numbofdatapages,
 +	   numbofrecords,
 +	   unique ? "yes" : "no",
 +	   height);
 +  int i;
 +  fprintf (stderr, "Number of pages per level:\n");
 +  for (i = 0; i < height; i++)
 +    fprintf (stderr, "\tlevel %d:\t%d\n", i + 1, pagesperlevel[i]);
 +}
 +
 +static int includes (RSurfaceRect RSTrect, RSurfaceStats * s, int depth)
 +{
 +  return 0;
 +}
 +
 +static int intersects (RSurfaceRect RSTrect, RSurfaceStats * s, int depth)
 +{
 +  double w = RSTrect[0].h - RSTrect[0].l, h = RSTrect[1].h - RSTrect[1].l;
 +  double ratio = 0.;
 +  if (w > 0. && h > 0.)
 +    ratio = w < h ? w/h : h/w;
 +  s->aspect[depth][s->nentries[depth]++] = ratio;
 +  return (depth < s->nlevel - 1);
 +}
 +
 +static int compare_double (const void * p1, const void * p2)
 +{
 +  return (*(double * ) p1 < *(double * ) p2);
 +}
 +
 +RSurfaceStats * r_surface_stats_new (RSurface * rt, int level)
 +{
 +  assert (!rt->kdt); /* not implemented */
 +  char name[100];
 +  int numbofdim, sizedirentry, sizedataentry, sizeinfo;
 +  int maxdirfanout, maxdatafanout, pagesize, numbofdirpages;
 +  int numbofdatapages, pagesperlevel[100], numbofrecords, height;
 +  boolean unique;
 +  
 +  InquireRSTDesc(rt->t,
 +		 name,
 +		 &numbofdim,
 +		 &sizedirentry,
 +		 &sizedataentry,
 +		 &sizeinfo,
 +		 &maxdirfanout,
 +		 &maxdatafanout,
 +		 &pagesize,
 +		 &numbofdirpages,
 +		 &numbofdatapages,
 +		 pagesperlevel,
 +		 &numbofrecords,
 +		 &height,
 +		 &unique);
 +
 +  RSurfaceStats * s = malloc (sizeof (RSurfaceStats));
 +  s->nlevel = level <= 0 ? height - 1 : (level < height - 1 ? level : height - 1);
 +  s->nentries = calloc (sizeof (int), s->nlevel);
 +  s->aspect = malloc (sizeof (double *)*s->nlevel);
 +  int i;
 +  for (i = 0; i < s->nlevel; i++)
 +    s->aspect[i] = malloc (sizeof (double)*pagesperlevel[i]);
 +
 +  RSurfaceRect rect = {{-0.5,-0.5},{0.5,0.5}};
 +  RSurfaceSum sum;
 +  r_surface_sum_init (&sum);
 +  r_surface_query_region_sum (rt, (RSurfaceCheck) includes, (RSurfaceCheck) intersects, s,
 +			      rect, &sum);
 +  for (i = 1; i < s->nlevel; i++)
 +    qsort (s->aspect[i], s->nentries[i], sizeof (double), compare_double);
 +
 +  return s;
 +}
 +
 +void r_surface_stats_free (RSurfaceStats * s)
 +{
 +  int i;
 +  for (i = 0; i < s->nlevel; i++)
 +    free (s->aspect[i]);
 +  free (s->aspect);
 +  free (s->nentries);
 +  free (s);
  }
diff --cc modules/rsurface.h
index db3473d,06abcb6..2aff20e
--- a/modules/rsurface.h
+++ b/modules/rsurface.h
@@@ -29,36 -23,9 +23,39 @@@ typedef RSurfaceInterval  RSurfaceRect[
  
  typedef int (* RSurfaceCheck) (RSurfaceRect rect, void * data, int depth);
  
- RSurface * r_surface_new      (const char * fname, int size, FILE * fp);
  RSurface * r_surface_open     (const char * fname, const char * mode, int size);
++<<<<<<< HEAD
 +void       r_surface_update   (RSurface * rt);
  int        r_surface_close    (RSurface * rt);
 +int        r_surface_insert   (RSurface * rt, double p[3], int id);
 +
++=======
++int        r_surface_close    (RSurface * rt);
++>>>>>>> upstream/20131206+dfsg
  typedef int (* RSurfaceQuery) (double p[3], void * user_data);
- void       r_surface_query    (RSurface * rt, 
- 			       double a[2], double b[2], double c[2], double d[2],
- 			       RSurfaceQuery q, void * user_data);
  void       r_surface_query_region (RSurface * rt, 
  				   double min[2], double max[2],
  				   RSurfaceQuery q, void * user_data);
++<<<<<<< HEAD
 +void       r_surface_sum_init (RSurfaceSum * sum);
 +void       r_surface_query_region_sum (RSurface * rt,
 +				       RSurfaceCheck includes,
 +				       RSurfaceCheck intersects,
 +				       void * data,
 +				       RSurfaceRect rect,
 +				       RSurfaceSum * sum);
 +const char * r_surface_name  (RSurface * rt);
 +int          r_surface_depth (RSurface * rt);
 +void         r_surface_info  (RSurface * rt);
 +
 +typedef struct {
 +  int nlevel;       /* number of levels */
 +  int * nentries;   /* number of entries for each level */
 +  double ** aspect; /* aspect ratio for each entry */
 +} RSurfaceStats;
 +
 +RSurfaceStats * r_surface_stats_new  (RSurface * rt, 
 +				      int level);
 +void            r_surface_stats_free (RSurfaceStats * s);
++=======
++>>>>>>> upstream/20131206+dfsg
diff --cc modules/terrain.c
index ce0f937,1180bd1..599263a
--- a/modules/terrain.c
+++ b/modules/terrain.c
@@@ -24,28 -24,28 +24,44 @@@
  #endif
  #include "refine.h"
  #include "solid.h"
++<<<<<<< HEAD:modules/terrain.mod
 +#include "rsurface.h"
++=======
+ #include "kdt/kdt.h"
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  #include "river.h"
  
  static gchar * default_path = ".";
  
- /* RSurfaces */
+ /* Kdtrees */
  
  typedef struct {
++<<<<<<< HEAD:modules/terrain.mod
 +  RSurface ** rs;
 +  gdouble * weight;
 +  guint nrs;
 +  gchar * path, * basename;
 +} RSurfaces;
++=======
+   Kdt ** rs;
+   gdouble * weight;
+   guint nrs;
+   gchar * path, * basename;
+ } Kdtrees;
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  
- static void rsurfaces_destroy (RSurfaces * rs)
+ static void kdtrees_destroy (Kdtrees * rs)
  {
    g_free (rs->path);
    g_free (rs->basename);
    if (rs->rs) {
      guint i;
      for (i = 0; i < rs->nrs; i++)
++<<<<<<< HEAD:modules/terrain.mod
 +      g_assert (r_surface_close (rs->rs[i]));
++=======
+       kdt_destroy (rs->rs[i]);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
      g_free (rs->rs);
    }
    g_free (rs->weight);
@@@ -81,9 -100,9 +116,15 @@@ static void kdtrees_read (Kdtrees * rs
      guint i;
      for (i = 0; i < pglob.gl_pathc; i++) {
        pglob.gl_pathv[i][strlen (pglob.gl_pathv[i]) - 5] = '\0';
++<<<<<<< HEAD:modules/terrain.mod
 +      rs->rs = g_realloc (rs->rs, (rs->nrs + 1)*sizeof (RSurface *));
 +      rs->weight = g_realloc (rs->weight, (rs->nrs + 1)*sizeof (double));
 +      rs->rs[rs->nrs] = r_surface_open (pglob.gl_pathv[i], "r", -1);
++=======
+       rs->rs = g_realloc (rs->rs, (rs->nrs + 1)*sizeof (Kdt *));
+       rs->weight = g_realloc (rs->weight, (rs->nrs + 1)*sizeof (double));
+       rs->rs[rs->nrs] = open_kdt (pglob.gl_pathv[i]);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
        if (!rs->rs[rs->nrs]) {
  	gts_file_error (fp, "cannot open terrain database `%s'", pglob.gl_pathv[i]);
  	globfree (&pglob);
@@@ -101,7 -120,7 +142,11 @@@
      while (*s) {
        /* look for weight */
        gchar ** wname = g_strsplit (*s, ":", 2);
++<<<<<<< HEAD:modules/terrain.mod
 +      rs->rs = g_realloc (rs->rs, (rs->nrs + 1)*sizeof (RSurface *));
++=======
+       rs->rs = g_realloc (rs->rs, (rs->nrs + 1)*sizeof (Kdt *));
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
        rs->weight = g_realloc (rs->weight, (rs->nrs + 1)*sizeof (double));
        if (path) {
  	/* search path */
@@@ -110,12 -129,12 +155,20 @@@
  	g_assert (*spath);
  	do {
  	  fname = (*wname)[0] == '/' ? g_strdup (*wname) : g_strconcat (*spath, "/", *wname, NULL);
++<<<<<<< HEAD:modules/terrain.mod
 +	  rs->rs[rs->nrs] = r_surface_open (fname, "r", -1);
++=======
+ 	  rs->rs[rs->nrs] = open_kdt (fname);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  	} while (rs->rs[rs->nrs] == NULL && *(++spath));
  	g_strfreev (pathes);
        }
        else
++<<<<<<< HEAD:modules/terrain.mod
 +	rs->rs[rs->nrs] = r_surface_open (*wname, "r", -1);
++=======
+ 	rs->rs[rs->nrs] = open_kdt (*wname);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
        if (!rs->rs[rs->nrs]) {
  	if (path)
  	  gts_file_error (fp, "cannot find/open terrain database `%s' in path:\n%s", *wname, path);
@@@ -195,7 -214,7 +248,11 @@@ typedef struct 
    FttCell * cell;
  } Polygon;
  
++<<<<<<< HEAD:modules/terrain.mod
 +static void polygon_init (GfsSimulation * sim, Polygon * poly, FttCell * cell, RSurfaces * rs)
++=======
+ static void polygon_init (GfsSimulation * sim, Polygon * poly, FttCell * cell, Kdtrees * rs)
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  {
    FttVector q;
    ftt_cell_pos (cell, &q);
@@@ -377,7 -396,8 +434,12 @@@ static int rms_update (RMS * rms
      rms->h[0] = GFS_NODATA;
      rms->he = 0.;
      rms->cond = GFS_NODATA;
++<<<<<<< HEAD:modules/terrain.mod
 +    return;
++=======
+     rms->n = 0;
+     return 0;
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
    }
    else if (rms->n >= NM) {
      guint j;
@@@ -496,8 -517,7 +559,12 @@@ static void projection_matrix (Polygon 
    m[1][1] = (y[0] + y[1] - y[3] - y[2])/4.;
  }
  
++<<<<<<< HEAD:modules/terrain.mod
 +static void add_weighted_rsurface_sum  (RSurfaceSum * s, double * tw,
 +					const RSurfaceSum * stmp, double w)
++=======
+ static void add_weighted_kdt_sum  (KdtSum * s, const KdtSum * stmp, double w)
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  {
    s->m01 += w*stmp->m01;
    s->m02 += w*stmp->m02;
@@@ -532,33 -552,33 +599,61 @@@
    if (stmp->Hmin < s->Hmin)
      s->Hmin = stmp->Hmin;
    s->n += stmp->n;
++<<<<<<< HEAD:modules/terrain.mod
 +  *tw += w*stmp->n;
++=======
+   s->w += w*stmp->w;
+   s->coverage += stmp->coverage;
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  }
  
  static void update_terrain_rms (GfsRefineTerrain * t, Polygon * poly, gboolean relative, RMS * rms)
  {
    rms_init (t, rms, poly, relative);
++<<<<<<< HEAD:modules/terrain.mod
 +  RSurfaceSum s;
 +  r_surface_sum_init (&s);
 +  double tn = 0.;
 +  guint i;
 +  RSurfaceRect rect;
 +  rect[0].l = poly->c.x - poly->h/2.; rect[0].h = poly->c.x + poly->h/2.; 
 +  rect[1].l = poly->c.y - poly->h/2.; rect[1].h = poly->c.y + poly->h/2.; 
 +  for (i = 0; i < poly->rs->nrs; i++) {
 +    RSurfaceSum stmp;
 +    r_surface_sum_init (&stmp);
 +    r_surface_query_region_sum (poly->rs->rs[i],
 +				(RSurfaceCheck) polygon_includes,
 +				(RSurfaceCheck) polygon_intersects, poly, 
 +				rect, &stmp);
 +    add_weighted_rsurface_sum (&s, &tn, &stmp, poly->rs->weight[i]);
 +  }
 +  
 +  rms->m[0][0] = tn;
 +  rms->n = s.n;
 +  if (tn > 0.) {
 +    RSurfaceSum sp;
++=======
+   KdtSum s;
+   kdt_sum_init (&s);
+   guint i;
+   KdtRect rect;
+   rect[0].l = poly->min[0]; rect[0].h = poly->max[0];
+   rect[1].l = poly->min[1]; rect[1].h = poly->max[1];
+   for (i = 0; i < poly->rs->nrs; i++) {
+     KdtSum stmp;
+     kdt_sum_init (&stmp);
+     kdt_query_sum (poly->rs->rs[i],
+ 		   (KdtCheck) polygon_includes,
+ 		   (KdtCheck) polygon_intersects, poly, 
+ 		   rect, &stmp);
+     add_weighted_kdt_sum (&s, &stmp, poly->rs->weight[i]);
+   }
+   
+   rms->m[0][0] = s.w;
+   rms->n = s.n;
+   if (s.w > 0.) {
+     KdtSum sp;
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  
      sp.H0 = s.H0;
      sp.H4 = s.H4;
@@@ -622,7 -642,7 +717,11 @@@
        double hp[NM];
  
        parent_cell_coefficients (rms->cell, rms->t->h, hp);
++<<<<<<< HEAD:modules/terrain.mod
 +      rms->H[0] = sp.H0 - tn*hp[0] - sp.m01*hp[1] - sp.m02*hp[2] - sp.m03*hp[3];
++=======
+       rms->H[0] = sp.H0 - s.w*hp[0] - sp.m01*hp[1] - sp.m02*hp[2] - sp.m03*hp[3];
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  
        /* See terrain.mac for a "maxima" derivation of the terms below */
        rms->H[1] = sp.H1 - hp[0]*sp.m01 - hp[1]*sp.m11 - hp[2]*sp.m03 - hp[3]*sp.m13;
@@@ -637,7 -657,7 +736,11 @@@
  		   + 2.*(hp[0]*hp[3] + hp[1]*hp[2])*sp.m03
  		   + 2.*hp[0]*hp[2]*sp.m02
  		   + 2.*hp[0]*hp[1]*sp.m01
++<<<<<<< HEAD:modules/terrain.mod
 +		   + hp[0]*hp[0]*tn);
++=======
+ 		   + hp[0]*hp[0]*s.w);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
      }
      else {
        rms->H[0] = sp.H0;
@@@ -1485,7 -1505,7 +1588,11 @@@ struct _GfsVariableTerrain 
  
    /*< public >*/
    GfsVariable * p, * H, * n, * dmin, * dmax;
++<<<<<<< HEAD:modules/terrain.mod
 +  RSurfaces rs;
++=======
+   Kdtrees rs;
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  };
  
  #define GFS_VARIABLE_TERRAIN(obj)            GTS_OBJECT_CAST (obj,\
@@@ -1505,53 -1525,60 +1612,106 @@@ static void variable_terrain_destroy (G
    (* GTS_OBJECT_CLASS (gfs_variable_terrain_class ())->parent_class->destroy) (o);
  }
  
++<<<<<<< HEAD:modules/terrain.mod
++=======
+ static double reconstruct_terrain (FttCell * cell, GfsVariableTerrain * t)
+ {
+   GfsVariable * v = GFS_VARIABLE (t);
+   GfsSimulation * sim = GFS_SIMULATION (v->domain);
+   Polygon poly;
+   KdtRect rect;
+   KdtSum s;
+   guint i;
+   polygon_init (sim, &poly, cell, &t->rs);
+   kdt_sum_init (&s);
+   rect[0].l = poly.min[0]; rect[0].h = poly.max[0];
+   rect[1].l = poly.min[1]; rect[1].h = poly.max[1]; 
+   for (i = 0; i < poly.rs->nrs; i++) {
+     KdtSum stmp;
+     kdt_sum_init (&stmp);
+     kdt_query_sum (poly.rs->rs[i],
+ 		   (KdtCheck) polygon_includes,
+ 		   (KdtCheck) polygon_intersects, &poly, 
+ 		   rect, &stmp);
+     add_weighted_kdt_sum (&s, &stmp, poly.rs->weight[i]);
+   }
+   GFS_VALUE (cell, t->n) = s.n;
+   if (s.w > 0.) {
+     GfsVariable * v = GFS_VARIABLE (t);
+     GFS_VALUE (cell, v) = s.H0/s.w/sim->physical_params.L;
+     GFS_VALUE (cell, t->dmin) = s.Hmin;
+     GFS_VALUE (cell, t->dmax) = s.Hmax;
+     return s.w;
+   }
+   return 0.;
+ }
+ 
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
  static void variable_terrain_coarse_fine (FttCell * parent, GfsVariable * v)
  {
    GfsVariableTerrain * t = GFS_VARIABLE_TERRAIN (v);
    GfsSimulation * sim = GFS_SIMULATION (v->domain);
    FttCellChildren child;
++<<<<<<< HEAD:modules/terrain.mod
++=======
+   gdouble f[4*(FTT_DIMENSION - 1) + 1] = { GFS_NODATA };
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
    guint n;
  
    /* Reconstruct terrain */
    ftt_cell_children (parent, &child);
    for (n = 0; n < FTT_CELLS; n++)
++<<<<<<< HEAD:modules/terrain.mod
 +    if (child.c[n]) {
 +      Polygon poly;
 +      RSurfaceRect rect;
 +      RSurfaceSum s;
 +      double tn = 0.;
 +      guint i;
 +      polygon_init (sim, &poly, child.c[n], &t->rs);
 +      r_surface_sum_init (&s);
 +      rect[0].l = poly.c.x - poly.h/2.; rect[0].h = poly.c.x + poly.h/2.; 
 +      rect[1].l = poly.c.y - poly.h/2.; rect[1].h = poly.c.y + poly.h/2.; 
 +      for (i = 0; i < poly.rs->nrs; i++) {
 +	RSurfaceSum stmp;
 +	r_surface_sum_init (&stmp);
 +	r_surface_query_region_sum (poly.rs->rs[i],
 +				    (RSurfaceCheck) polygon_includes,
 +				    (RSurfaceCheck) polygon_intersects, &poly, 
 +				    rect, &stmp);
 +	add_weighted_rsurface_sum (&s, &tn, &stmp, poly.rs->weight[i]);
 +      }
 +      GFS_VALUE (child.c[n], t->n) = tn;
 +      if (tn > 0.) {
 +	GFS_VALUE (child.c[n], v) = s.H0/tn/sim->physical_params.L;
 +	GFS_VALUE (child.c[n], t->dmin) = s.Hmin;
 +	GFS_VALUE (child.c[n], t->dmax) = s.Hmax;
 +      }
 +      else {
 +	GFS_VALUE (child.c[n], v) = GFS_VALUE (parent, v);
 +	GFS_VALUE (child.c[n], t->dmin) = GFS_NODATA;
 +	GFS_VALUE (child.c[n], t->dmax) = GFS_NODATA;
 +	if (!GFS_CELL_IS_BOUNDARY (parent)) {
 +	  FttVector p;
 +	  FttComponent c;
 +	  
 +	  ftt_cell_relative_pos (child.c[n], &p);
 +	  for (c = 0; c < FTT_DIMENSION; c++)
 +	    GFS_VALUE (child.c[n], v) += (&p.x)[c]*gfs_center_minmod_gradient (parent, c, v->i);
 +	}
++=======
+     if (child.c[n] && !reconstruct_terrain (child.c[n], t)) {
+       GFS_VALUE (child.c[n], t->dmin) = GFS_NODATA;
+       GFS_VALUE (child.c[n], t->dmax) = GFS_NODATA;
+       if (GFS_CELL_IS_BOUNDARY (parent))
+ 	GFS_VALUE (child.c[n], v) = GFS_VALUE (parent, v);
+       else {
+ 	FttVector p;
+ 	ftt_cell_pos (child.c[n], &p);
+ 	if (f[0] == GFS_NODATA)
+ 	  gfs_cell_corner_values (parent, v, ftt_cell_level (parent), f);
+ 	GFS_VALUE (child.c[n], v) = gfs_interpolate_from_corners (parent, p, f);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
        }
      }
  
@@@ -1693,11 -1720,11 +1853,19 @@@ static void variable_terrain_read (GtsO
      return;
  
    GfsVariableTerrain * v = GFS_VARIABLE_TERRAIN (*o);
++<<<<<<< HEAD:modules/terrain.mod
 +  rsurfaces_read (&v->rs, fp);
 +  if (fp->type == GTS_ERROR)
 +    return;
 +
 +  GfsVariable * v1 = GFS_VARIABLE1 (*o);
++=======
+   kdtrees_read (&v->rs, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsVariable * v1 = GFS_VARIABLE (*o);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
    v1->units = 1.;
    g_free (v1->description);
    v1->description = g_strdup ("Terrain");
@@@ -1706,7 -1733,7 +1874,11 @@@
  
    GfsSimulation * sim = gfs_object_simulation (*o);
    gchar * name = g_strjoin (NULL, v1->name, "n", NULL);
++<<<<<<< HEAD:modules/terrain.mod
 +  v->n = gfs_domain_get_or_add_variable (GFS_DOMAIN (sim), name, "Terrain samples #");
++=======
+   v->n = gfs_domain_get_or_add_variable (GFS_DOMAIN (sim), name, "Terrain samples # (weighted)");
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
    v->n->coarse_fine = none;
    v->n->fine_coarse = none;
    g_free (name);
@@@ -1732,7 -1759,7 +1904,11 @@@
        return;
      if (reconstruct) {
        v->p = GFS_RIVER (sim)->v[0];
++<<<<<<< HEAD:modules/terrain.mod
 +      v->H = GFS_RIVER (sim)->H;
++=======
+       v->H = GFS_RIVER (sim)->h;
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
        /* the coarse -> fine and fine -> coarse interpolations of p and H
  	 are taken over by variable_terrain_coarse_fine (below )*/
        v->p->coarse_fine = none;
@@@ -1747,7 -1774,7 +1923,11 @@@ static void variable_terrain_write (Gts
  {
    (* GTS_OBJECT_CLASS (gfs_variable_terrain_class ())->parent_class->write) (o, fp);
  
++<<<<<<< HEAD:modules/terrain.mod
 +  rsurfaces_write (&GFS_VARIABLE_TERRAIN (o)->rs, fp);
++=======
+   kdtrees_write (&GFS_VARIABLE_TERRAIN (o)->rs, fp);
++>>>>>>> upstream/20131206+dfsg:modules/terrain.c
    if (GFS_VARIABLE_TERRAIN (o)->H)
      fputs (" { reconstruct = 1 }", fp);
  }
diff --cc modules/wavewatch.c
index fb60f21,392eeb8..1e6c424
--- a/modules/wavewatch.c
+++ b/modules/wavewatch.c
@@@ -179,19 -179,11 +179,24 @@@ static void initialize (GfsWave * wave
    if (!initialized) {
  
      /* Creates temporary directory */
++<<<<<<< HEAD:modules/wavewatch.mod
 +#if 0 /* mkdtemp() is not defined on all systems (only POSIX 2008-compliant systems) */
 +    char template[] = "/tmp/gfswavewatch.XXXXXX", * tmp;
 +    tmp = mkdtemp (template);
 +#else /* use C89 functions */
 +    char template[L_tmpnam], * tmp;
 +    tmp = tmpnam (template);
 +    if (mkdir (tmp, S_IRUSR | S_IWUSR | S_IXUSR))
 +      tmp = NULL;
 +#endif
 +    if (tmp == NULL) {
++=======
+     gchar * template = gfs_template ();
+     if (!g_mkdtemp (template)) {
++>>>>>>> upstream/20131206+dfsg:modules/wavewatch.c
        g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, 
- 	     "wavewatch module: could not create temporary directory\n"
- 	     "%s\n", strerror (errno));
+ 	     "wavewatch module: could not create temporary directory\n%s",
+ 	     strerror (errno));
        return;
      }
  
diff --cc modules/wavewatch/Makefile.in
index 063f021,ae47403..998f71e
--- a/modules/wavewatch/Makefile.in
+++ b/modules/wavewatch/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -17,6 -17,23 +26,26 @@@
  
  
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -39,10 -56,8 +68,15 @@@ noinst_PROGRAMS = $(am__EXEEXT_1
  subdir = modules/wavewatch
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -75,6 -90,11 +109,14 @@@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOL
  	$(LDFLAGS) -o $@
  SOURCES = $(libwavewatch_a_SOURCES) $(checktypes_SOURCES)
  DIST_SOURCES = $(libwavewatch_a_SOURCES) $(checktypes_SOURCES)
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@@ -106,7 -126,10 +148,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
 +FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
+ FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -119,8 -142,6 +168,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -143,7 -164,6 +195,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -161,6 -181,9 +216,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -168,6 -191,7 +229,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -194,10 -218,6 +259,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -289,7 -309,7 +357,11 @@@ clean-noinstPROGRAMS
  	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
  	echo " rm -f" $$list; \
  	rm -f $$list
++<<<<<<< HEAD
 +checktypes$(EXEEXT): $(checktypes_OBJECTS) $(checktypes_DEPENDENCIES) 
++=======
+ checktypes$(EXEEXT): $(checktypes_OBJECTS) $(checktypes_DEPENDENCIES) $(EXTRA_checktypes_DEPENDENCIES) 
++>>>>>>> upstream/20131206+dfsg
  	@rm -f checktypes$(EXEEXT)
  	$(LINK) $(checktypes_OBJECTS) $(checktypes_LDADD) $(LIBS)
  
@@@ -424,10 -444,15 +496,22 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
diff --cc src/Makefile.am
index 8b07f68,54b4f69..d6d6ba4
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@@ -7,15 -7,12 +7,22 @@@ AM_CPPFLAGS = -DGFS_MODULES_DIR=\"$(lib
  INCLUDES = -I$(top_srcdir) -I$(includedir) \
             -DG_LOG_DOMAIN=\"Gfs\" $(GTS_CFLAGS)
  
++<<<<<<< HEAD
 +bin_SCRIPTS = gfs-config
 +
 +gfs-config: gfs-config.in
++=======
++>>>>>>> upstream/20131206+dfsg
  gerris2D.pc: gerris2D.pc.in
  gerris3D.pc: gerris3D.pc.in
  
  pkgconfigdir = $(libdir)/pkgconfig
  pkgconfig_DATA = gerris2D.pc gerris3D.pc
++<<<<<<< HEAD
 +pkglib_DATA = m4.awk
++=======
+ pkgdata_DATA = m4.awk
++>>>>>>> upstream/20131206+dfsg
  
  lib_LTLIBRARIES = libgfs2D.la libgfs3D.la
  
@@@ -106,7 -105,8 +115,12 @@@ SRC = 
  	balance.c \
  	metric.c \
          particle.c \
++<<<<<<< HEAD
 +	$(GFS_HDS)
++=======
+ 	$(GFS_HDS) \
+ 	$(MEMSTREAM)
++>>>>>>> upstream/20131206+dfsg
  
  domain.c: version.h
  
@@@ -120,6 -121,7 +135,10 @@@ libgfs2D_la_LDFLAGS = $(NO_UNDEFINED)
  	-release $(LT_RELEASE) -export-dynamic
  libgfs2D_la_SOURCES = $(SRC)
  libgfs2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
++<<<<<<< HEAD
++=======
+ libgfs2D_la_LIBADD = $(GTS_LIBS)
++>>>>>>> upstream/20131206+dfsg
  
  CLEANFILES = $(BUILT_SOURCES)
  
diff --cc src/Makefile.in
index 791421b,b2fed8d..0f9504c
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -18,8 -18,24 +27,29 @@@
  
  
  
++<<<<<<< HEAD
 +
 +VPATH = @srcdir@
++=======
+ VPATH = @srcdir@
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -42,18 -58,15 +72,29 @@@ bin_PROGRAMS = gerris2D$(EXEEXT) gerris
  subdir = src
  DIST_COMMON = $(include_HEADERS) $(pkginclude_HEADERS) \
  	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
++<<<<<<< HEAD
 +	$(srcdir)/gerris2D.pc.in $(srcdir)/gerris3D.pc.in \
 +	$(srcdir)/gfs-config.in
 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ 	$(srcdir)/gerris2D.pc.in $(srcdir)/gerris3D.pc.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
  CONFIG_HEADER = $(top_builddir)/config.h
++<<<<<<< HEAD
 +CONFIG_CLEAN_FILES = gfs-config gerris2D.pc gerris3D.pc
++=======
+ CONFIG_CLEAN_FILES = gerris2D.pc gerris3D.pc
++>>>>>>> upstream/20131206+dfsg
  CONFIG_CLEAN_VPATH_FILES =
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
@@@ -76,14 -89,34 +117,45 @@@ am__nobase_list = $(am__nobase_strip_se
  am__base_list = \
    sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++<<<<<<< HEAD
 +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
 +	"$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" \
 +	"$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(includedir)" \
 +	"$(DESTDIR)$(pkgincludedir)"
 +LTLIBRARIES = $(lib_LTLIBRARIES)
 +libgfs2D_la_LIBADD =
 +am__objects_1 =
 +am__objects_2 = libgfs2D_la-ftt.lo libgfs2D_la-fluid.lo \
++=======
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
+ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+ 	"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)" \
+ 	"$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+ am__DEPENDENCIES_1 =
+ libgfs2D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am__libgfs2D_la_SOURCES_DIST = ftt.c fluid.c variable.c output.c \
+ 	solid.c poisson.c advection.c boundary.c mpi_boundary.c \
+ 	timestep.c domain.c init.c refine.c event.c simulation.c \
+ 	graphic.c adaptive.c source.c tension.c vof.c utils.c ocean.c \
+ 	wave.c levelset.c myc.h myc2d.h cartesian.c surface.c \
+ 	unstructured.c map.c river.c moving.c balance.c metric.c \
+ 	particle.c ftt.h fluid.h variable.h output.h solid.h poisson.h \
+ 	advection.h boundary.h mpi_boundary.h timestep.h domain.h \
+ 	init.h refine.h event.h simulation.h graphic.h adaptive.h \
+ 	source.h tension.h vof.h utils.h ocean.h wave.h levelset.h \
+ 	isocube.h cartesian.h surface.h unstructured.h map.h river.h \
+ 	moving.h balance.h metric.h particle.h version.h \
+ 	open_memstream.c
+ am__objects_1 =
+ @OPEN_MEMSTREAM_TRUE at am__objects_2 = libgfs2D_la-open_memstream.lo
+ am__objects_3 = libgfs2D_la-ftt.lo libgfs2D_la-fluid.lo \
++>>>>>>> upstream/20131206+dfsg
  	libgfs2D_la-variable.lo libgfs2D_la-output.lo \
  	libgfs2D_la-solid.lo libgfs2D_la-poisson.lo \
  	libgfs2D_la-advection.lo libgfs2D_la-boundary.lo \
@@@ -98,21 -131,35 +170,50 @@@
  	libgfs2D_la-surface.lo libgfs2D_la-unstructured.lo \
  	libgfs2D_la-map.lo libgfs2D_la-river.lo libgfs2D_la-moving.lo \
  	libgfs2D_la-balance.lo libgfs2D_la-metric.lo \
++<<<<<<< HEAD
 +	libgfs2D_la-particle.lo $(am__objects_1)
 +am_libgfs2D_la_OBJECTS = $(am__objects_2)
++=======
+ 	libgfs2D_la-particle.lo $(am__objects_1) $(am__objects_2)
+ am_libgfs2D_la_OBJECTS = $(am__objects_3)
++>>>>>>> upstream/20131206+dfsg
  libgfs2D_la_OBJECTS = $(am_libgfs2D_la_OBJECTS)
  libgfs2D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgfs2D_la_CFLAGS) \
  	$(CFLAGS) $(libgfs2D_la_LDFLAGS) $(LDFLAGS) -o $@
++<<<<<<< HEAD
 +libgfs3D_la_LIBADD =
 +am__objects_3 = ftt.lo fluid.lo variable.lo output.lo solid.lo \
++=======
+ libgfs3D_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am__libgfs3D_la_SOURCES_DIST = ftt.c fluid.c variable.c output.c \
+ 	solid.c poisson.c advection.c boundary.c mpi_boundary.c \
+ 	timestep.c domain.c init.c refine.c event.c simulation.c \
+ 	graphic.c adaptive.c source.c tension.c vof.c utils.c ocean.c \
+ 	wave.c levelset.c myc.h myc2d.h cartesian.c surface.c \
+ 	unstructured.c map.c river.c moving.c balance.c metric.c \
+ 	particle.c ftt.h fluid.h variable.h output.h solid.h poisson.h \
+ 	advection.h boundary.h mpi_boundary.h timestep.h domain.h \
+ 	init.h refine.h event.h simulation.h graphic.h adaptive.h \
+ 	source.h tension.h vof.h utils.h ocean.h wave.h levelset.h \
+ 	isocube.h cartesian.h surface.h unstructured.h map.h river.h \
+ 	moving.h balance.h metric.h particle.h version.h \
+ 	open_memstream.c
+ @OPEN_MEMSTREAM_TRUE at am__objects_4 = open_memstream.lo
+ am__objects_5 = ftt.lo fluid.lo variable.lo output.lo solid.lo \
++>>>>>>> upstream/20131206+dfsg
  	poisson.lo advection.lo boundary.lo mpi_boundary.lo \
  	timestep.lo domain.lo init.lo refine.lo event.lo simulation.lo \
  	graphic.lo adaptive.lo source.lo tension.lo vof.lo utils.lo \
  	ocean.lo wave.lo levelset.lo cartesian.lo surface.lo \
  	unstructured.lo map.lo river.lo moving.lo balance.lo metric.lo \
++<<<<<<< HEAD
 +	particle.lo $(am__objects_1)
 +am_libgfs3D_la_OBJECTS = $(am__objects_3)
++=======
+ 	particle.lo $(am__objects_1) $(am__objects_4)
+ am_libgfs3D_la_OBJECTS = $(am__objects_5)
++>>>>>>> upstream/20131206+dfsg
  libgfs3D_la_OBJECTS = $(am_libgfs3D_la_OBJECTS)
  libgfs3D_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
  	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@@ -120,13 -167,11 +221,19 @@@
  PROGRAMS = $(bin_PROGRAMS)
  am_gerris2D_OBJECTS = gerris2D-gerris.$(OBJEXT)
  gerris2D_OBJECTS = $(am_gerris2D_OBJECTS)
++<<<<<<< HEAD
 +am__DEPENDENCIES_1 =
++=======
++>>>>>>> upstream/20131206+dfsg
  gerris2D_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
  	--mode=link $(CCLD) $(gerris2D_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
  am_gerris3D_OBJECTS = gerris.$(OBJEXT)
  gerris3D_OBJECTS = $(am_gerris3D_OBJECTS)
++<<<<<<< HEAD
 +SCRIPTS = $(bin_SCRIPTS)
++=======
++>>>>>>> upstream/20131206+dfsg
  DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
  depcomp = $(SHELL) $(top_srcdir)/depcomp
  am__depfiles_maybe = depfiles
@@@ -142,9 -187,15 +249,21 @@@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOL
  	$(LDFLAGS) -o $@
  SOURCES = $(libgfs2D_la_SOURCES) $(libgfs3D_la_SOURCES) \
  	$(gerris2D_SOURCES) $(gerris3D_SOURCES)
++<<<<<<< HEAD
 +DIST_SOURCES = $(libgfs2D_la_SOURCES) $(libgfs3D_la_SOURCES) \
 +	$(gerris2D_SOURCES) $(gerris3D_SOURCES)
 +DATA = $(pkgconfig_DATA) $(pkglib_DATA)
++=======
+ DIST_SOURCES = $(am__libgfs2D_la_SOURCES_DIST) \
+ 	$(am__libgfs3D_la_SOURCES_DIST) $(gerris2D_SOURCES) \
+ 	$(gerris3D_SOURCES)
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
+ DATA = $(pkgconfig_DATA) $(pkgdata_DATA)
++>>>>>>> upstream/20131206+dfsg
  HEADERS = $(include_HEADERS) $(pkginclude_HEADERS)
  ETAGS = etags
  CTAGS = ctags
@@@ -177,7 -228,10 +296,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -190,8 -244,6 +316,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -214,7 -266,6 +343,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -232,6 -283,9 +364,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -239,6 -293,7 +377,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -265,10 -320,6 +407,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -302,17 -353,15 +447,29 @@@ top_builddir = @top_builddir
  top_srcdir = @top_srcdir@
  use_mpicc = @use_mpicc@
  AUTOMAKE_OPTIONS = 1.6
++<<<<<<< HEAD
 +AM_CPPFLAGS = -DGFS_MODULES_DIR=\"$(libdir)/gerris\"
 +INCLUDES = -I$(top_srcdir) -I$(includedir) \
 +           -DG_LOG_DOMAIN=\"Gfs\" $(GTS_CFLAGS)
 +
 +bin_SCRIPTS = gfs-config
 +pkgconfigdir = $(libdir)/pkgconfig
 +pkgconfig_DATA = gerris2D.pc gerris3D.pc
 +pkglib_DATA = m4.awk
 +lib_LTLIBRARIES = libgfs2D.la libgfs3D.la
 +BUILT_SOURCES = \
 +	gfs-config  \
++=======
+ AM_CPPFLAGS = -DGFS_MODULES_DIR=\"$(libdir)/gerris\" -DGFS_DATA_DIR=\"$(pkgdatadir)\"
+ INCLUDES = -I$(top_srcdir) -I$(includedir) \
+            -DG_LOG_DOMAIN=\"Gfs\" $(GTS_CFLAGS)
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = gerris2D.pc gerris3D.pc
+ pkgdata_DATA = m4.awk
+ lib_LTLIBRARIES = libgfs2D.la libgfs3D.la
+ BUILT_SOURCES = \
++>>>>>>> upstream/20131206+dfsg
  	gerris2D.pc \
  	gerris3D.pc
  
@@@ -359,9 -408,9 +516,15 @@@ pkginclude_HEADERS = 
  	function.h
  
  include_HEADERS = \
++<<<<<<< HEAD
 +	gfs.h \
 +	gfsconfig.h
 +
++=======
+ 	gfs.h
+ 
+ @OPEN_MEMSTREAM_TRUE at MEMSTREAM = open_memstream.c
++>>>>>>> upstream/20131206+dfsg
  SRC = \
  	ftt.c \
  	fluid.c \
@@@ -398,23 -447,28 +561,41 @@@
  	balance.c \
  	metric.c \
          particle.c \
++<<<<<<< HEAD
 +	$(GFS_HDS)
++=======
+ 	$(GFS_HDS) \
+ 	$(MEMSTREAM)
++>>>>>>> upstream/20131206+dfsg
  
  libgfs3D_la_LDFLAGS = $(NO_UNDEFINED)\
          -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\
  	-release $(LT_RELEASE) -export-dynamic
  
  libgfs3D_la_SOURCES = $(SRC)
++<<<<<<< HEAD
++=======
+ libgfs3D_la_LIBADD = $(GTS_LIBS)
++>>>>>>> upstream/20131206+dfsg
  libgfs2D_la_LDFLAGS = $(NO_UNDEFINED)\
          -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\
  	-release $(LT_RELEASE) -export-dynamic
  
  libgfs2D_la_SOURCES = $(SRC)
  libgfs2D_la_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
++<<<<<<< HEAD
++=======
+ libgfs2D_la_LIBADD = $(GTS_LIBS)
++>>>>>>> upstream/20131206+dfsg
  CLEANFILES = $(BUILT_SOURCES)
  EXTRA_DIST = \
  	ftt_internal.c \
  	moving2.c \
++<<<<<<< HEAD
++=======
+ 	open_memstream.c \
+ 	verify.h \
++>>>>>>> upstream/20131206+dfsg
  	m4.awk
  
  gerris2D_SOURCES = gerris.c
@@@ -461,15 -515,12 +642,21 @@@ $(top_srcdir)/configure: @MAINTAINER_MO
  $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(am__aclocal_m4_deps):
++<<<<<<< HEAD
 +gfs-config: $(top_builddir)/config.status $(srcdir)/gfs-config.in
 +	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
++=======
++>>>>>>> upstream/20131206+dfsg
  gerris2D.pc: $(top_builddir)/config.status $(srcdir)/gerris2D.pc.in
  	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  gerris3D.pc: $(top_builddir)/config.status $(srcdir)/gerris3D.pc.in
  	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  install-libLTLIBRARIES: $(lib_LTLIBRARIES)
  	@$(NORMAL_INSTALL)
++<<<<<<< HEAD
 +	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
++=======
++>>>>>>> upstream/20131206+dfsg
  	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
  	list2=; for p in $$list; do \
  	  if test -f $$p; then \
@@@ -477,6 -528,8 +664,11 @@@
  	  else :; fi; \
  	done; \
  	test -z "$$list2" || { \
++<<<<<<< HEAD
++=======
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
++>>>>>>> upstream/20131206+dfsg
  	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
  	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
  	}
@@@ -498,14 -551,17 +690,28 @@@ clean-libLTLIBRARIES
  	  echo "rm -f \"$${dir}/so_locations\""; \
  	  rm -f "$${dir}/so_locations"; \
  	done
++<<<<<<< HEAD
 +libgfs2D.la: $(libgfs2D_la_OBJECTS) $(libgfs2D_la_DEPENDENCIES) 
 +	$(libgfs2D_la_LINK) -rpath $(libdir) $(libgfs2D_la_OBJECTS) $(libgfs2D_la_LIBADD) $(LIBS)
 +libgfs3D.la: $(libgfs3D_la_OBJECTS) $(libgfs3D_la_DEPENDENCIES) 
 +	$(libgfs3D_la_LINK) -rpath $(libdir) $(libgfs3D_la_OBJECTS) $(libgfs3D_la_LIBADD) $(LIBS)
 +install-binPROGRAMS: $(bin_PROGRAMS)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 +	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
++=======
+ libgfs2D.la: $(libgfs2D_la_OBJECTS) $(libgfs2D_la_DEPENDENCIES) $(EXTRA_libgfs2D_la_DEPENDENCIES) 
+ 	$(libgfs2D_la_LINK) -rpath $(libdir) $(libgfs2D_la_OBJECTS) $(libgfs2D_la_LIBADD) $(LIBS)
+ libgfs3D.la: $(libgfs3D_la_OBJECTS) $(libgfs3D_la_DEPENDENCIES) $(EXTRA_libgfs3D_la_DEPENDENCIES) 
+ 	$(libgfs3D_la_LINK) -rpath $(libdir) $(libgfs3D_la_OBJECTS) $(libgfs3D_la_LIBADD) $(LIBS)
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do echo "$$p $$p"; done | \
  	sed 's/$(EXEEXT)$$//' | \
  	while read p p1; do if test -f $$p || test -f $$p1; \
@@@ -545,46 -601,12 +751,55 @@@ clean-binPROGRAMS
  	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
  	echo " rm -f" $$list; \
  	rm -f $$list
++<<<<<<< HEAD
 +gerris2D$(EXEEXT): $(gerris2D_OBJECTS) $(gerris2D_DEPENDENCIES) 
 +	@rm -f gerris2D$(EXEEXT)
 +	$(gerris2D_LINK) $(gerris2D_OBJECTS) $(gerris2D_LDADD) $(LIBS)
 +gerris3D$(EXEEXT): $(gerris3D_OBJECTS) $(gerris3D_DEPENDENCIES) 
 +	@rm -f gerris3D$(EXEEXT)
 +	$(LINK) $(gerris3D_OBJECTS) $(gerris3D_LDADD) $(LIBS)
 +install-binSCRIPTS: $(bin_SCRIPTS)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 +	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
 +	for p in $$list; do \
 +	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 +	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
 +	done | \
 +	sed -e 'p;s,.*/,,;n' \
 +	    -e 'h;s|.*|.|' \
 +	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
 +	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
 +	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
 +	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
 +	      if (++n[d] == $(am__install_max)) { \
 +		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
 +	    else { print "f", d "/" $$4, $$1 } } \
 +	  END { for (d in files) print "f", d, files[d] }' | \
 +	while read type dir files; do \
 +	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
 +	     test -z "$$files" || { \
 +	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
 +	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
 +	     } \
 +	; done
 +
 +uninstall-binSCRIPTS:
 +	@$(NORMAL_UNINSTALL)
 +	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
 +	files=`for p in $$list; do echo "$$p"; done | \
 +	       sed -e 's,.*/,,;$(transform)'`; \
 +	test -n "$$list" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(bindir)" && rm -f $$files
++=======
+ gerris2D$(EXEEXT): $(gerris2D_OBJECTS) $(gerris2D_DEPENDENCIES) $(EXTRA_gerris2D_DEPENDENCIES) 
+ 	@rm -f gerris2D$(EXEEXT)
+ 	$(gerris2D_LINK) $(gerris2D_OBJECTS) $(gerris2D_LDADD) $(LIBS)
+ gerris3D$(EXEEXT): $(gerris3D_OBJECTS) $(gerris3D_DEPENDENCIES) $(EXTRA_gerris3D_DEPENDENCIES) 
+ 	@rm -f gerris3D$(EXEEXT)
+ 	$(LINK) $(gerris3D_OBJECTS) $(gerris3D_LDADD) $(LIBS)
++>>>>>>> upstream/20131206+dfsg
  
  mostlyclean-compile:
  	-rm -f *.$(OBJEXT)
@@@ -623,6 -645,7 +838,10 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgfs2D_la-moving.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgfs2D_la-mpi_boundary.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgfs2D_la-ocean.Plo at am__quote@
++<<<<<<< HEAD
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgfs2D_la-open_memstream.Plo at am__quote@
++>>>>>>> upstream/20131206+dfsg
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgfs2D_la-output.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgfs2D_la-particle.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgfs2D_la-poisson.Plo at am__quote@
@@@ -644,6 -667,7 +863,10 @@@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/moving.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mpi_boundary.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ocean.Plo at am__quote@
++<<<<<<< HEAD
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/open_memstream.Plo at am__quote@
++>>>>>>> upstream/20131206+dfsg
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/output.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/particle.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/poisson.Plo at am__quote@
@@@ -913,6 -937,13 +1136,16 @@@ libgfs2D_la-particle.lo: particle.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgfs2D_la_CFLAGS) $(CFLAGS) -c -o libgfs2D_la-particle.lo `test -f 'particle.c' || echo '$(srcdir)/'`particle.c
  
++<<<<<<< HEAD
++=======
+ libgfs2D_la-open_memstream.lo: open_memstream.c
+ @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgfs2D_la_CFLAGS) $(CFLAGS) -MT libgfs2D_la-open_memstream.lo -MD -MP -MF $(DEPDIR)/libgfs2D_la-open_memstream.Tpo -c -o libgfs2D_la-open_memstream.lo `test -f 'open_memstream.c' || echo '$(srcdir)/'`open_memstream.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libgfs2D_la-open_memstream.Tpo $(DEPDIR)/libgfs2D_la-open_memstream.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='open_memstream.c' object='libgfs2D_la-open_memstream.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgfs2D_la_CFLAGS) $(CFLAGS) -c -o libgfs2D_la-open_memstream.lo `test -f 'open_memstream.c' || echo '$(srcdir)/'`open_memstream.c
+ 
++>>>>>>> upstream/20131206+dfsg
  gerris2D-gerris.o: gerris.c
  @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gerris2D_CFLAGS) $(CFLAGS) -MT gerris2D-gerris.o -MD -MP -MF $(DEPDIR)/gerris2D-gerris.Tpo -c -o gerris2D-gerris.o `test -f 'gerris.c' || echo '$(srcdir)/'`gerris.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/gerris2D-gerris.Tpo $(DEPDIR)/gerris2D-gerris.Po
@@@ -934,8 -965,11 +1167,16 @@@ clean-libtool
  	-rm -rf .libs _libs
  install-pkgconfigDATA: $(pkgconfig_DATA)
  	@$(NORMAL_INSTALL)
++<<<<<<< HEAD
 +	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
 +	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
++=======
+ 	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; \
@@@ -949,33 -983,35 +1190,63 @@@ uninstall-pkgconfigDATA
  	@$(NORMAL_UNINSTALL)
  	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
  	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
++<<<<<<< HEAD
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
 +install-pkglibDATA: $(pkglib_DATA)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
 +	@list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
++=======
+ 	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+ install-pkgdataDATA: $(pkgdata_DATA)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; \
  	done | $(am__base_list) | \
  	while read files; do \
++<<<<<<< HEAD
 +	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkglibdir)'"; \
 +	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkglibdir)" || exit $$?; \
 +	done
 +
 +uninstall-pkglibDATA:
 +	@$(NORMAL_UNINSTALL)
 +	@list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
 +	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
 +install-includeHEADERS: $(include_HEADERS)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
 +	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
++=======
+ 	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+ 	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
+ 	done
+ 
+ uninstall-pkgdataDATA:
+ 	@$(NORMAL_UNINSTALL)
+ 	@list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ 	dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
+ install-includeHEADERS: $(include_HEADERS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; \
@@@ -989,13 -1025,14 +1260,24 @@@ uninstall-includeHEADERS
  	@$(NORMAL_UNINSTALL)
  	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
  	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
++<<<<<<< HEAD
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(includedir)" && rm -f $$files
 +install-pkgincludeHEADERS: $(pkginclude_HEADERS)
 +	@$(NORMAL_INSTALL)
 +	test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
 +	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
++=======
+ 	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+ install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  echo "$$d$$p"; \
@@@ -1009,9 -1046,7 +1291,13 @@@ uninstall-pkgincludeHEADERS
  	@$(NORMAL_UNINSTALL)
  	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
  	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
++<<<<<<< HEAD
 +	test -n "$$files" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
++=======
+ 	dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
++>>>>>>> upstream/20131206+dfsg
  
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@@ -1098,12 -1133,11 +1384,20 @@@ distdir: $(DISTFILES
  check-am: all-am
  check: $(BUILT_SOURCES)
  	$(MAKE) $(AM_MAKEFLAGS) check-am
++<<<<<<< HEAD
 +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
 +		$(HEADERS)
 +install-binPROGRAMS: install-libLTLIBRARIES
 +
 +installdirs:
 +	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"; do \
++=======
+ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS)
+ install-binPROGRAMS: install-libLTLIBRARIES
+ 
+ installdirs:
+ 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"; do \
++>>>>>>> upstream/20131206+dfsg
  	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
  	done
  install: $(BUILT_SOURCES)
@@@ -1117,10 -1151,15 +1411,22 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
@@@ -1158,14 -1197,13 +1464,22 @@@ info: info-a
  info-am:
  
  install-data-am: install-includeHEADERS install-pkgconfigDATA \
++<<<<<<< HEAD
 +	install-pkgincludeHEADERS
++=======
+ 	install-pkgdataDATA install-pkgincludeHEADERS
++>>>>>>> upstream/20131206+dfsg
  
  install-dvi: install-dvi-am
  
  install-dvi-am:
  
++<<<<<<< HEAD
 +install-exec-am: install-binPROGRAMS install-binSCRIPTS \
 +	install-libLTLIBRARIES install-pkglibDATA
++=======
+ install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
++>>>>>>> upstream/20131206+dfsg
  
  install-html: install-html-am
  
@@@ -1205,10 -1243,9 +1519,16 @@@ ps: ps-a
  
  ps-am:
  
++<<<<<<< HEAD
 +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
 +	uninstall-includeHEADERS uninstall-libLTLIBRARIES \
 +	uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS \
 +	uninstall-pkglibDATA
++=======
+ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
+ 	uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
+ 	uninstall-pkgdataDATA uninstall-pkgincludeHEADERS
++>>>>>>> upstream/20131206+dfsg
  
  .MAKE: all check install install-am install-strip
  
@@@ -1217,22 -1254,21 +1537,40 @@@
  	distclean distclean-compile distclean-generic \
  	distclean-libtool distclean-tags distdir dvi dvi-am html \
  	html-am info info-am install install-am install-binPROGRAMS \
++<<<<<<< HEAD
 +	install-binSCRIPTS install-data install-data-am install-dvi \
 +	install-dvi-am install-exec install-exec-am install-html \
 +	install-html-am install-includeHEADERS install-info \
 +	install-info-am install-libLTLIBRARIES install-man install-pdf \
 +	install-pdf-am install-pkgconfigDATA install-pkgincludeHEADERS \
 +	install-pkglibDATA install-ps install-ps-am install-strip \
 +	installcheck installcheck-am installdirs maintainer-clean \
 +	maintainer-clean-generic mostlyclean mostlyclean-compile \
 +	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 +	tags uninstall uninstall-am uninstall-binPROGRAMS \
 +	uninstall-binSCRIPTS uninstall-includeHEADERS \
 +	uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
 +	uninstall-pkgincludeHEADERS uninstall-pkglibDATA
 +
 +
 +gfs-config: gfs-config.in
++=======
+ 	install-data install-data-am install-dvi install-dvi-am \
+ 	install-exec install-exec-am install-html install-html-am \
+ 	install-includeHEADERS install-info install-info-am \
+ 	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ 	install-pkgconfigDATA install-pkgdataDATA \
+ 	install-pkgincludeHEADERS install-ps install-ps-am \
+ 	install-strip installcheck installcheck-am installdirs \
+ 	maintainer-clean maintainer-clean-generic mostlyclean \
+ 	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ 	uninstall-binPROGRAMS uninstall-includeHEADERS \
+ 	uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
+ 	uninstall-pkgdataDATA uninstall-pkgincludeHEADERS
+ 
+ 
++>>>>>>> upstream/20131206+dfsg
  gerris2D.pc: gerris2D.pc.in
  gerris3D.pc: gerris3D.pc.in
  
diff --cc src/adaptive.c
index 3c16dec,2925898..09ed910
--- a/src/adaptive.c
+++ b/src/adaptive.c
@@@ -26,6 -26,7 +26,10 @@@
  #include "adaptive.h"
  #include "solid.h"
  #include "init.h"
++<<<<<<< HEAD
++=======
+ #include "vof.h"
++>>>>>>> upstream/20131206+dfsg
  
  #include "graphic.h"
  
@@@ -523,12 -525,11 +528,15 @@@ static gboolean gfs_adapt_gradient_even
        gfs_domain_cell_traverse (GFS_DOMAIN (sim), FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  				(FttCellTraverseFunc) update_f, event);
        gfs_restore_fpe_for_function (GFS_ADAPT_FUNCTION (event)->f);
++<<<<<<< HEAD
 +      GfsVariable * v = GFS_ADAPT_GRADIENT (event)->v;
++=======
++>>>>>>> upstream/20131206+dfsg
        gfs_domain_cell_traverse (GFS_DOMAIN (sim),
  				FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
- 				(FttCellTraverseFunc) v->fine_coarse, v);
-       gfs_domain_bc (GFS_DOMAIN (sim), FTT_TRAVERSE_ALL, -1, v);
+ 				(FttCellTraverseFunc) a->v->fine_coarse, a->v);
      }
+     gfs_domain_bc (GFS_DOMAIN (sim), FTT_TRAVERSE_ALL, -1, a->v);
      return TRUE;
    }
    return FALSE;
@@@ -612,8 -613,8 +620,13 @@@ static void gfs_adapt_error_read (GtsOb
  
  static void compute_gradient (FttCell * cell, GfsAdaptError * a)
  {
++<<<<<<< HEAD
 +  GFS_VALUE (cell, a->dv) = gfs_center_regular_gradient (cell, a->dv->component, 
 +							 GFS_ADAPT_GRADIENT (a)->v);
++=======
+   GFS_VALUE (cell, a->dv[a->c]) = gfs_center_regular_gradient (cell, a->c, 
+ 							       GFS_ADAPT_GRADIENT (a)->v);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void add_hessian_norm (FttCell * cell, GfsAdaptError * a)
@@@ -621,12 -622,12 +634,21 @@@
    /* off-diagonal */
    FttComponent j;
    for (j = 0; j < FTT_DIMENSION; j++)
++<<<<<<< HEAD
 +    if (j != a->dv->component) {
 +      gdouble g = gfs_center_regular_gradient (cell, j, a->dv);
 +      GFS_VALUE (cell, a->v) += g*g;
 +    }
 +  /* diagonal */
 +  gdouble g = gfs_center_regular_2nd_derivative (cell, a->dv->component, GFS_ADAPT_GRADIENT (a)->v);
++=======
+     if (j != a->c) {
+       gdouble g = gfs_center_regular_gradient (cell, j, a->dv[a->c]);
+       GFS_VALUE (cell, a->v) += g*g;
+     }
+   /* diagonal */
+   gdouble g = gfs_center_regular_2nd_derivative (cell, a->c, GFS_ADAPT_GRADIENT (a)->v);
++>>>>>>> upstream/20131206+dfsg
    GFS_VALUE (cell, a->v) += g*g;
  }
  
@@@ -646,17 -647,21 +668,33 @@@ static gboolean gfs_adapt_error_event (
      gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1,  GFS_ADAPT_GRADIENT (a)->v);
      gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
  			      (FttCellTraverseFunc) gfs_cell_reset, a->v);
++<<<<<<< HEAD
 +    a->dv = gfs_temporary_variable (domain);
 +    for (a->dv->component = 0; a->dv->component < FTT_DIMENSION; a->dv->component++) {
 +      gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
 +				(FttCellTraverseFunc) compute_gradient, a);
 +      gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, a->dv);
++=======
+     for (a->c = 0; a->c < FTT_DIMENSION; a->c++) {
+       a->dv[a->c] = gfs_temporary_variable (domain);
+       gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 				(FttCellTraverseFunc) compute_gradient, a);
+     }
+     gfs_variable_set_vector (a->dv, FTT_DIMENSION);
+     for (a->c = 0; a->c < FTT_DIMENSION; a->c++) {
+       gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, a->dv[a->c]);
++>>>>>>> upstream/20131206+dfsg
        gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
  				(FttCellTraverseFunc) add_hessian_norm, a);
      }
      gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
  			      (FttCellTraverseFunc) scale, a);
++<<<<<<< HEAD
 +    gts_object_destroy (GTS_OBJECT (a->dv));
++=======
+     for (a->c = 0; a->c < FTT_DIMENSION; a->c++)
+       gts_object_destroy (GTS_OBJECT (a->dv[a->c]));
++>>>>>>> upstream/20131206+dfsg
      return TRUE;
    }
    return FALSE;
@@@ -702,6 -707,131 +740,134 @@@ GfsEventClass * gfs_adapt_error_class (
  }
  
  /** \endobject{GfsAdaptError} */
++<<<<<<< HEAD
++=======
+ 
+ /**
+  * Adapting cells depending on the local "thickness" of a VOF defined interface.
+  * \beginobject{GfsAdaptThickness}
+  */
+ 
+ static void gfs_adapt_thickness_destroy (GtsObject * o)
+ {
+   if (GFS_ADAPT_THICKNESS (o)->c)
+     gts_object_destroy (GTS_OBJECT (GFS_ADAPT_THICKNESS (o)->c));
+ 
+   (* GTS_OBJECT_CLASS (gfs_adapt_thickness_class ())->parent_class->destroy) (o);
+ }
+ 
+ static void gfs_adapt_thickness_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_adapt_thickness_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   if (fp->type != GTS_STRING) {
+     gts_file_error (fp, "expecting a variable name");
+     return;
+   }
+   
+   GfsAdaptThickness * a = GFS_ADAPT_THICKNESS (*o);
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (a));
+   a->v = gfs_variable_from_name (domain->variables, fp->token->str);
+   if (a->v == NULL) {
+     gts_file_error (fp, "unknown variable `%s'", fp->token->str);
+     return;    
+   }
+   if (!GFS_IS_VARIABLE_TRACER_VOF_HEIGHT (a->v)) {
+     gts_file_error (fp, "expecting a VariableTracerVOFHeight");
+     return;    
+   }
+   gts_file_next_token (fp);
+ 
+   a->c = gfs_domain_add_variable (domain, NULL, NULL);
+   a->c->coarse_fine = none;
+   a->c->fine_coarse = none;
+ }
+ 
+ static void gfs_adapt_thickness_write (GtsObject * o, FILE * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_adapt_thickness_class ())->parent_class->write) (o, fp);
+   fprintf (fp, " %s", GFS_ADAPT_THICKNESS  (o)->v->name);
+ }
+ 
+ static void update_thickness (FttCell * cell, GfsAdapt * a)
+ {
+   GfsVariable * v = GFS_ADAPT_THICKNESS (a)->c;
+   GfsVariable * f = GFS_ADAPT_THICKNESS (a)->v;
+   if (GFS_VALUE (cell, f) <= 0. || GFS_VALUE (cell, f) >= 1.)
+     GFS_VALUE (cell, v) = G_MAXDOUBLE;
+   else {
+     GfsVariableTracerVOFHeight * t = GFS_VARIABLE_TRACER_VOF_HEIGHT (f);
+     FttCell * parent = ftt_cell_parent (cell);
+     gdouble thickness = (!parent || GFS_VALUE (parent, v) == G_MAXDOUBLE) ? G_MAXDOUBLE : 
+       2.*GFS_VALUE (parent, v);
+     FttComponent c;
+     for (c = 0; c < FTT_DIMENSION; c++)
+       if (GFS_HAS_DATA (cell, t->hb[c]) && GFS_HAS_DATA (cell, t->ht[c])) {
+ 	gdouble d = fabs (GFS_VALUE (cell, t->hb[c]) + GFS_VALUE (cell, t->ht[c]));
+ 	if (d < thickness)
+ 	  thickness = d;
+       }
+     GFS_VALUE (cell, v) = thickness;
+   }
+ }
+ 
+ static gboolean gfs_adapt_thickness_event (GfsEvent * event, 
+ 					   GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (GTS_OBJECT_CLASS (gfs_adapt_thickness_class ())->parent_class)->event) 
+       (event, sim)) {
+     gfs_domain_cell_traverse (GFS_DOMAIN (sim), FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			      (FttCellTraverseFunc) update_thickness, event);
+     return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ static void gfs_adapt_thickness_class_init (GfsEventClass * klass)
+ {
+   GTS_OBJECT_CLASS (klass)->destroy = gfs_adapt_thickness_destroy;
+   GTS_OBJECT_CLASS (klass)->read = gfs_adapt_thickness_read;
+   GTS_OBJECT_CLASS (klass)->write = gfs_adapt_thickness_write;
+   klass->event = gfs_adapt_thickness_event;
+ }
+ 
+ static gdouble thickness_cost (FttCell * cell, GfsAdaptThickness * a)
+ {
+   return GFS_VALUE (cell, a->c) > 0. ? 1./GFS_VALUE (cell, a->c) : G_MAXDOUBLE;
+ }
+ 
+ static void gfs_adapt_thickness_init (GfsAdaptThickness * object)
+ {
+   GfsAdapt * a = GFS_ADAPT (object);
+   a->cost = (GtsKeyFunc) thickness_cost;
+   a->cmax = 1./3.;
+   a->cfactor = 1.1;
+ }
+ 
+ GfsEventClass * gfs_adapt_thickness_class (void)
+ {
+   static GfsEventClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsAdaptThickness",
+       sizeof (GfsAdaptThickness),
+       sizeof (GfsEventClass),
+       (GtsObjectClassInitFunc) gfs_adapt_thickness_class_init,
+       (GtsObjectInitFunc) gfs_adapt_thickness_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_adapt_class ()), &info);
+   }
+ 
+   return klass;
+ }
++>>>>>>> upstream/20131206+dfsg
+ 
+ /** \endobject{GfsAdaptThickness} */
  
  static void refine_cell_corner (FttCell * cell, GfsDomain * domain)
  {
@@@ -1202,6 -1338,13 +1374,16 @@@ gboolean gfs_simulation_adapt (GfsSimul
        gfs_domain_reshape (domain, depth);
        gfs_all_reduce (domain, depth, MPI_UNSIGNED, MPI_MAX);
        simulation->adapts_stats.depth_increase = depth - depth_before;
++<<<<<<< HEAD
++=======
+       /* hydrostatic pressure */
+       GSList * i = domain->variables;
+       while (i) {
+ 	if (GTS_OBJECT (i->data)->klass == GTS_OBJECT_CLASS (gfs_hydrostatic_pressure_class ()))
+ 	  gfs_hydrostatic_pressure_update (i->data, simulation->physical_params.alpha);
+ 	i = i->next;
+       }
++>>>>>>> upstream/20131206+dfsg
      }
    }
  
diff --cc src/adaptive.h
index 97d467d,203458f..49e41b6
--- a/src/adaptive.h
+++ b/src/adaptive.h
@@@ -136,7 -136,8 +136,12 @@@ typedef struct _GfsAdaptError         G
  struct _GfsAdaptError {
    /*< private >*/
    GfsAdaptGradient parent;
++<<<<<<< HEAD
 +  GfsVariable * dv;
++=======
+   GfsVariable * dv[FTT_DIMENSION];
+   FttComponent c;
++>>>>>>> upstream/20131206+dfsg
  
    /*< public >*/
    GfsVariable * v;
@@@ -150,6 -151,26 +155,29 @@@
  
  GfsEventClass * gfs_adapt_error_class  (void);
  
++<<<<<<< HEAD
++=======
+ /* GfsAdaptThickness: Header */
+ 
+ typedef struct _GfsAdaptThickness         GfsAdaptThickness;
+ 
+ struct _GfsAdaptThickness {
+   /*< private >*/
+   GfsAdapt parent;
+ 
+   /*< public >*/
+   GfsVariable * v, * c;
+ };
+ 
+ #define GFS_ADAPT_THICKNESS(obj)            GTS_OBJECT_CAST (obj,\
+ 					         GfsAdaptThickness,\
+ 					         gfs_adapt_thickness_class ())
+ #define GFS_IS_ADAPT_THICKNESS(obj)         (gts_object_is_from_class (obj,\
+ 						 gfs_adapt_thickness_class ()))
+ 
+ GfsEventClass * gfs_adapt_thickness_class  (void);
+ 
++>>>>>>> upstream/20131206+dfsg
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
diff --cc src/advection.c
index e87a96e,0bd059e..bd4eb66
--- a/src/advection.c
+++ b/src/advection.c
@@@ -75,7 -75,7 +75,11 @@@ void gfs_cell_advected_face_values (Ftt
    for (c = 0; c < FTT_DIMENSION; c++) {
      gdouble unorm = par->use_centered_velocity ?
        par->dt*GFS_VALUE (cell, par->u[c])/msize[c] :
++<<<<<<< HEAD
 +       par->dt*(s->f[2*c].un + s->f[2*c + 1].un)/(2.*msize[c]);
++=======
+       par->dt*(s->f[2*c].un + s->f[2*c + 1].un)/(2.*msize[c]);
++>>>>>>> upstream/20131206+dfsg
      gdouble g = (* par->gradient) (cell, c, par->v->i);
      gdouble vl = GFS_VALUE (cell, par->v) + MIN ((1. - unorm)/2., 0.5)*g;
      gdouble vr = GFS_VALUE (cell, par->v) + MAX ((- 1. - unorm)/2., -0.5)*g;
@@@ -909,8 -909,23 +913,28 @@@ void gfs_advection_params_write (GfsAdv
    }
    if (par->moving_order != 1)
      fputs ("  moving_order = 2\n", fp);
++<<<<<<< HEAD
 +  if (gts_vector_norm (par->sink) > 0.)
 +    fprintf (fp, "  vx = %g vy = %g vz = %g\n", par->sink[0], par->sink[1], par->sink[2]);
++=======
+   if (par->sink[0]) {
+     fputs ("  vx = ", fp);
+     gfs_function_write (par->sink[0], fp);
+     fputs ("\n", fp);
+   }
+   if (par->sink[1]) {
+     fputs ("  vy = ", fp);
+     gfs_function_write (par->sink[1], fp);
+     fputs ("\n", fp);
+   }
+ #if (!FTT_2D)
+   if (par->sink[2]) {
+     fputs ("  vz = ", fp);
+     gfs_function_write (par->sink[2], fp);
+     fputs ("\n", fp);
+   }
+ #endif
++>>>>>>> upstream/20131206+dfsg
    if (par->linear)
      fputs ("  linear = 1\n", fp);
    fputc ('}', fp);
@@@ -930,11 -945,11 +954,16 @@@ void gfs_advection_params_init (GfsAdve
    par->use_centered_velocity = TRUE;
    par->scheme = GFS_GODUNOV;
    par->average = FALSE;
-   par->gc = FALSE;
+   par->gc = TRUE;
    par->update = (GfsMergedTraverseFunc) gfs_advection_update;
    par->moving_order = 1;
++<<<<<<< HEAD
 +  par->sink[0] = par->sink[1] = par->sink[2] = 0.;
 +  par->linear = FALSE;
++=======
+   par->linear = FALSE;
+   par->diffusion_solve = gfs_diffusion;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static gdouble none (FttCell * cell, FttComponent c, guint v)
@@@ -947,6 -962,17 +976,20 @@@ void gfs_advection_params_read (GfsAdve
    g_return_if_fail (par != NULL);
    g_return_if_fail (fp != NULL);
  
++<<<<<<< HEAD
++=======
+   if (par->v) {
+     GfsDomain * domain = par->v->domain;
+     FttComponent c;
+     for( c = 0; c < FTT_DIMENSION; c++)
+       if (!par->sink[c]) {
+ 	par->sink[c] = gfs_function_new (gfs_function_class (), 0.);
+ 	gfs_function_set_units (par->sink[c], 1.);
+ 	gfs_object_simulation_set (par->sink[c], domain);
+       }
+   }
+ 
++>>>>>>> upstream/20131206+dfsg
    gchar * gradient = NULL, * flux = NULL, * scheme = NULL;
    GtsFileVariable var[] = {
      {GTS_DOUBLE, "cfl",          TRUE, &par->cfl},
@@@ -956,15 -982,33 +999,42 @@@
      {GTS_INT,    "average",      TRUE, &par->average},
      {GTS_INT,    "gc",           TRUE, &par->gc},
      {GTS_UINT,   "moving_order", TRUE, &par->moving_order},
++<<<<<<< HEAD
 +    {GTS_DOUBLE, "vx",           TRUE, &par->sink[0]},
 +    {GTS_DOUBLE, "vy",           TRUE, &par->sink[1]},
 +    {GTS_DOUBLE, "vz",           TRUE, &par->sink[2]},
++=======
+     {GTS_OBJ,    "vx",           TRUE, &par->sink[0]},
+     {GTS_OBJ,    "vy",           TRUE, &par->sink[1]},
+ #if (!FTT_2D)
+     {GTS_OBJ,    "vz",           TRUE, &par->sink[2]},
+ #endif /* 3D */
++>>>>>>> upstream/20131206+dfsg
      {GTS_INT,    "linear",       TRUE, &par->linear},
      {GTS_NONE}
    };
  
    gts_file_assign_variables (fp, var);
  
++<<<<<<< HEAD
++=======
+   if (par->v) {
+     FttComponent c;
+     for (c = 0; c < FTT_DIMENSION; c++)
+       if (!var[7+c].set) {
+ 	gts_object_destroy (GTS_OBJECT (par->sink[c]));
+ 	par->sink[c] = NULL;
+       }
+ #if FTT_2D
+     if ((var[7].set + var[8].set) % 2)
+       gts_file_error (fp, "either vx or vy must be set");
+ #else
+     if ((var[7].set + var[8].set + var[9].set) % 3)
+       gts_file_error (fp, "either vx, vy or vz must be set");
+ #endif
+   }
+ 
++>>>>>>> upstream/20131206+dfsg
    if (fp->type != GTS_ERROR && par->cfl <= 0.)
      gts_file_variable_error (fp, var, "cfl", "cfl must be strictly positive");
  
diff --cc src/advection.h
index bd38b09,ad61977..4043eed
--- a/src/advection.h
+++ b/src/advection.h
@@@ -57,8 -58,14 +58,19 @@@ struct _GfsAdvectionParams 
    gboolean average, gc;
    GfsMergedTraverseFunc update;
    guint moving_order;
++<<<<<<< HEAD
 +  GtsVector sink;
 +  gboolean linear;
++=======
+   GfsFunction * sink[FTT_DIMENSION];
+   gboolean linear;
+   void (* diffusion_solve) (GfsDomain * domain,
+ 			    GfsMultilevelParams * par,
+ 			    GfsVariable * v,
+ 			    GfsVariable * rhs, 
+ 			    GfsVariable * rhoc,
+ 			    GfsVariable * axi);
++>>>>>>> upstream/20131206+dfsg
  };
  
  void         gfs_advection_params_init        (GfsAdvectionParams * par);
diff --cc src/boundary.c
index 6e831e3,6c809b2..8bd454d
--- a/src/boundary.c
+++ b/src/boundary.c
@@@ -45,26 -44,26 +45,37 @@@ static FttVector rpos[FTT_NEIGHBORS] = 
  
  static void symmetry (FttCellFace * f, GfsBc * b)
  {
-   if (b->v->component == f->d/2)
-     GFS_VARIABLE (f->cell, b->v->i) = - GFS_VARIABLE (f->neighbor, b->v->i);
+   if (b->v->component == f->d/2 && !b->v->even)
+     GFS_VALUE (f->cell, b->v) = - GFS_VALUE (f->neighbor, b->v);
    else
-     GFS_VARIABLE (f->cell, b->v->i) =   GFS_VARIABLE (f->neighbor, b->v->i);
+     GFS_VALUE (f->cell, b->v) =   GFS_VALUE (f->neighbor, b->v);
+ }
+ 
+ static void set_stencil_neighbor (FttCellFace * f, GfsBc * b, gdouble w)
+ {
+   GFS_DOUBLE_TO_POINTER (GFS_VALUE (f->cell, b->lp->neighbor)) = f->neighbor;
+   GFS_VALUE (f->cell, b->lp->neighborw) = w;
+ }
+ 
+ static void symmetry_stencil (FttCellFace * f, GfsBc * b)
+ {
+   set_stencil_neighbor (f, b, (b->v->component == f->d/2 && !b->v->even) ? -1. : 1.);
  }
  
 +static void set_stencil_neighbor (FttCellFace * f, GfsBc * b, gdouble w)
 +{
 +  GFS_DOUBLE_TO_POINTER (GFS_VALUE (f->cell, b->lp->neighbor)) = f->neighbor;
 +  GFS_VALUE (f->cell, b->lp->neighborw) = w;
 +}
 +
 +static void symmetry_stencil (FttCellFace * f, GfsBc * b)
 +{
 +  set_stencil_neighbor (f, b, (b->v->component == f->d/2) ? -1. : 1.);
 +}
 +
  static void face_symmetry (FttCellFace * f, GfsBc * b)
  {
-   if (b->v->component == f->d/2)
+   if (b->v->component == f->d/2 && !b->v->even)
      GFS_STATE (f->cell)->f[f->d].v = 
        GFS_STATE (f->neighbor)->f[FTT_OPPOSITE_DIRECTION (f->d)].v = 0.;
    else if (GFS_IS_VARIABLE_TRACER_VOF (b->v))
@@@ -413,6 -408,55 +424,58 @@@ GfsBcClass * gfs_bc_neumann_class (void
  /** \endobject{GfsBcNeumann} */
  
  /**
++<<<<<<< HEAD
++=======
+  * Contact angle boundary condition.
+  * \beginobject{GfsBcAngle}
+  */
+ 
+ static void bc_angle_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_bc_angle_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   if (!GFS_IS_VARIABLE_TRACER_VOF_HEIGHT (GFS_BC (*o)->v))
+     gts_file_error (fp, "expecting a GfsVariableTracerVOFHeight");
+   gfs_function_set_units (GFS_BC_VALUE (*o)->val, 0.);
+ }
+ 
+ static void gfs_bc_angle_init (GfsBc * object)
+ {
+   /* use zero for Neumann condition for the VOF tracer */
+   object->bc = (FttFaceTraverseFunc) homogeneous_neumann;
+ }
+ 
+ static void gfs_bc_angle_class_init (GtsObjectClass * klass)
+ {
+   klass->read = bc_angle_read;
+ }
+ 
+ GfsBcClass * gfs_bc_angle_class (void)
+ {
+   static GfsBcClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsBcAngle",
+       sizeof (GfsBcValue),
+       sizeof (GfsBcClass),
+       (GtsObjectClassInitFunc) gfs_bc_angle_class_init,
+       (GtsObjectInitFunc) gfs_bc_angle_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_bc_neumann_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsBcAngle} */
+ 
+ /**
++>>>>>>> upstream/20131206+dfsg
   * Navier boundary condition.
   * \beginobject{GfsBcNavier}
   */
@@@ -732,7 -783,8 +802,12 @@@ static void gfs_boundary_read (GtsObjec
  
    GfsBoundary * b = GFS_BOUNDARY (*o);
    GfsVariable ** v = gfs_domain_velocity (gfs_box_domain (b->box));
++<<<<<<< HEAD
 +  gfs_boundary_add_bc (b, gfs_bc_value_new (gfs_bc_dirichlet_class (), v[b->d/2], NULL, FALSE));
++=======
+   if (v)
+     gfs_boundary_add_bc (b, gfs_bc_value_new (gfs_bc_dirichlet_class (), v[b->d/2], NULL, FALSE));
++>>>>>>> upstream/20131206+dfsg
  
    boundary_read_extra_bc (GFS_BOUNDARY (*o), fp);
  }
@@@ -1257,7 -1309,8 +1332,12 @@@ static void periodic_match (GfsBoundar
    (* gfs_boundary_class ()->match) (boundary);
  
    g_assert (GFS_BOUNDARY_PERIODIC (boundary)->sndcount == 0);
++<<<<<<< HEAD
 +  boundary_tree (boundary->root, GFS_BOUNDARY_PERIODIC (boundary));
++=======
+   if (boundary->root)
+     boundary_tree (boundary->root, GFS_BOUNDARY_PERIODIC (boundary));
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void send (GfsBoundary * bb)
@@@ -1490,13 -1543,56 +1570,63 @@@ static void center_periodic_rotate (Ftt
      FttComponent c = FTT_ORTHOGONAL_COMPONENT (b->v->component);
      g_assert (b->v->vector[c]);
      g_array_index (boundary_periodic->sndbuf, gdouble, boundary_periodic->sndcount++) =
++<<<<<<< HEAD
 +      (2.*c - 1.)*boundary_periodic->rotate*GFS_VALUE (face->neighbor, b->v->vector[c]);
++=======
+       b->v->orientation*(b->v->even ? 1. : boundary_periodic->rotate)*
+       GFS_VALUE (face->neighbor, b->v->vector[c]);
++>>>>>>> upstream/20131206+dfsg
    }
    else
      g_array_index (boundary_periodic->sndbuf, gdouble, boundary_periodic->sndcount++) =
        GFS_VALUE (face->neighbor, b->v);
  }
  
++<<<<<<< HEAD
++=======
+ static void face_periodic_rotate (FttCellFace * face, GfsBc * b)
+ {
+   GfsBoundaryPeriodic * boundary_periodic = GFS_BOUNDARY_PERIODIC (b->b);
+ 
+   g_assert (boundary_periodic->sndcount < boundary_periodic->sndbuf->len);
+   FttDirection d = FTT_OPPOSITE_DIRECTION (face->d);
+   if (b->v->component < 2) { /* 2D-vector-rotation only */
+     FttComponent c = FTT_ORTHOGONAL_COMPONENT (b->v->component);
+     g_assert (d < 4);
+     g_assert (b->v->domain->has_rotated_bc);
+     g_assert (b->v->face[c][d]);
+     g_array_index (boundary_periodic->sndbuf, gdouble, boundary_periodic->sndcount++) =
+       (2.*c - 1.)*boundary_periodic->rotate*GFS_VALUE (face->neighbor, b->v->face[c][d]);
+   }
+   else
+     g_array_index (boundary_periodic->sndbuf, gdouble, boundary_periodic->sndcount++) =
+       GFS_STATE (face->neighbor)->f[d].v;
+ }
+ 
+ /**
+  * gfs_boundary_periodic_rotate:
+  * @boundary: a #GfsBoundaryPeriodic.
+  * @rotate: a #FttDirection.
+  * @orientation: the orientation (+1 or -1).
+  *
+  * Rotates #boundary according to @rotate and @orientation.
+  */
+ void gfs_boundary_periodic_rotate (GfsBoundaryPeriodic * boundary,
+ 				   FttDirection rotate,
+ 				   gdouble orientation)
+ {
+   g_return_if_fail (boundary != NULL);
+ 
+   boundary->d = rotate;
+   boundary->rotate = orientation;
+   gfs_box_domain (GFS_BOUNDARY (boundary)->box)->has_rotated_bc = TRUE;
+ 
+   GfsBc * b = GFS_BOUNDARY (boundary)->default_bc;
+   b->bc = b->homogeneous_bc = (FttFaceTraverseFunc) center_periodic_rotate;
+   b->face_bc = (FttFaceTraverseFunc) face_periodic_rotate;
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  /**
   * gfs_boundary_periodic_rotate_new:
   * @klass: a #GfsBoundaryClass.
@@@ -1520,11 -1616,7 +1650,15 @@@ GfsBoundaryPeriodic * gfs_boundary_peri
    GfsBoundaryPeriodic * boundary;
  
    boundary = gfs_boundary_periodic_new (klass, box, d, matching);
++<<<<<<< HEAD
 +  boundary->d = rotate;
 +  boundary->rotate = orientation;
 +
 +  GfsBc * b = GFS_BOUNDARY (boundary)->default_bc;
 +  b->bc = b->homogeneous_bc = (FttFaceTraverseFunc) center_periodic_rotate;
++=======
+   gfs_boundary_periodic_rotate (boundary, rotate, orientation);
++>>>>>>> upstream/20131206+dfsg
  
    return boundary;
  }
@@@ -1650,8 -1742,10 +1784,15 @@@ void gfs_gedge_link_boxes (GfsGEdge * e
  				 FTT_OPPOSITE_DIRECTION (edge->d), b1);
      }
      else {
++<<<<<<< HEAD
 +      ftt_cell_set_neighbor (b1->root, b2->root, edge->d, 
 +			     (FttCellInitFunc) gfs_cell_init, gfs_box_domain (b1));
++=======
+       GfsDomain * domain = gfs_box_domain (b1);
+       if (domain->pid < 0 || b1->pid == b2->pid)
+ 	ftt_cell_set_neighbor (b1->root, b2->root, edge->d, 
+ 			       (FttCellInitFunc) gfs_cell_init, domain);
++>>>>>>> upstream/20131206+dfsg
        b1->neighbor[edge->d] = GTS_OBJECT (b2);
        b2->neighbor[FTT_OPPOSITE_DIRECTION (edge->d)] = GTS_OBJECT (b1);
      }
diff --cc src/boundary.h
index 0c7edd2,9054065..1c8ffb5
--- a/src/boundary.h
+++ b/src/boundary.h
@@@ -269,6 -276,9 +276,12 @@@ GfsBoundaryPeriodic * gfs_boundary_peri
  						      GfsBox * box,
  						      FttDirection d,
  						      GfsBox * matching);
++<<<<<<< HEAD
++=======
+ void                  gfs_boundary_periodic_rotate   (GfsBoundaryPeriodic * boundary,
+ 						      FttDirection rotate,
+ 						      gdouble orientation);
++>>>>>>> upstream/20131206+dfsg
  GfsBoundaryPeriodic * gfs_boundary_periodic_rotate_new (GfsBoundaryClass * klass,
  							GfsBox * box,
  							FttDirection d,
diff --cc src/cartesian.c
index c135b97,eafc9b5..10702ca
--- a/src/cartesian.c
+++ b/src/cartesian.c
@@@ -257,4 -256,47 +256,50 @@@ gboolean gfs_cartesian_grid_interpolat
    return TRUE;
  }
  
++<<<<<<< HEAD
++=======
+ /**
+  * gfs_cartesian_grid_read:
+  * @name: a .cgd filename.
+  * @fp: a #GtsFile or %NULL.
+  *
+  * Returns: the #GfsCartesianGrid stored in @name, or %NULL if an
+  * error occured, in which case an error message is set in @fp (if not
+  * %NULL).
+  */
+ GfsCartesianGrid * gfs_cartesian_grid_read (const gchar * name, GtsFile * fp)
+ {
+   g_return_val_if_fail (name != NULL, NULL);
+ 
+   FILE * fptr = fopen (name, "r");
+   GtsFile * fp1;
+   GfsCartesianGrid * grid;
+   GtsObjectClass * klass;
+ 
+   if (fptr == NULL) {
+     if (fp)
+       gts_file_error (fp, "cannot open file `%s'", name);
+     return NULL;
+   }
+ 
+   fp1 = gts_file_new (fptr);
+ 
+   klass = gfs_cartesian_grid_class ();
+ 
+   grid = gfs_cartesian_grid_new (klass);
+   GtsObject * o = GTS_OBJECT (grid);
+   (* klass->read) (&o, fp1);
+ 
+   if (fp1->type == GTS_ERROR) {
+     if (fp)
+       gts_file_error (fp, "%s:%d:%d: %s", name, fp1->line, fp1->pos, fp1->error);
+     gts_object_destroy (GTS_OBJECT(grid));
+     grid = NULL;
+   }
+   gts_file_destroy (fp1);
+   fclose (fptr);
+   return grid;
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  /** \endobject{GfsCartesianGrid} */
diff --cc src/domain.c
index 8b2cfb2,dcf5d11..2368219
--- a/src/domain.c
+++ b/src/domain.c
@@@ -24,8 -24,7 +24,12 @@@
  #include <stdlib.h>
  #include <unistd.h>
  #include <string.h>
++<<<<<<< HEAD
 +#include <sys/stat.h>
 +#include <sys/mman.h>
++=======
+ #include <errno.h>
++>>>>>>> upstream/20131206+dfsg
  #include "domain.h"
  
  #include "advection.h"
@@@ -39,22 -38,16 +43,32 @@@
  
  #include "config.h"
  
++<<<<<<< HEAD
 +/* LocateArray */
 +
 +typedef struct {
 +  GSList ** root;
 +  gdouble h, min[FTT_DIMENSION], max[FTT_DIMENSION];
 +  gint n[FTT_DIMENSION], size;
 +} LocateArray;
 +
 +static void locate_index (FttVector * p, LocateArray * a, gint i[FTT_DIMENSION])
++=======
+ /* GfsLocateArray: Object */
+ 
+ static void locate_index (FttVector * p, GfsLocateArray * a, gint i[FTT_DIMENSION])
++>>>>>>> upstream/20131206+dfsg
  {
    gint c;
    for (c = 0; c < FTT_DIMENSION; c++)
      i[c] = floor (((&p->x)[c] - a->min[c])/a->h);
  }
  
++<<<<<<< HEAD
 +static void root_bounds (FttCell * root, LocateArray * a)
++=======
+ static void root_bounds (FttCell * root, GfsLocateArray * a)
++>>>>>>> upstream/20131206+dfsg
  {
    FttVector p;
    ftt_cell_pos (root, &p);
@@@ -65,7 -58,7 +79,11 @@@
    }
  }
  
++<<<<<<< HEAD
 +static void box_bounds (GfsBox * box, LocateArray * a)
++=======
+ static void box_bounds (GfsBox * box, GfsLocateArray * a)
++>>>>>>> upstream/20131206+dfsg
  {
    root_bounds (box->root, a);
    FttDirection d;
@@@ -74,7 -67,7 +92,11 @@@
        root_bounds (GFS_BOUNDARY (box->neighbor[d])->root, a);
  }
  
++<<<<<<< HEAD
 +static gint locate_linear_index (FttVector * p, LocateArray * a)
++=======
+ static gint locate_linear_index (FttVector * p, GfsLocateArray * a)
++>>>>>>> upstream/20131206+dfsg
  {
    gint i[FTT_DIMENSION], index = 0, c;
    locate_index (p, a, i);
@@@ -86,7 -79,7 +108,11 @@@
    return index;
  }
  
++<<<<<<< HEAD
 +static void box_index (GfsBox * b, LocateArray * a)
++=======
+ static void box_index (GfsBox * b, GfsLocateArray * a)
++>>>>>>> upstream/20131206+dfsg
  {
    FttVector p;
    ftt_cell_pos (b->root, &p);
@@@ -105,13 -98,19 +131,29 @@@
      }
  }
  
++<<<<<<< HEAD
 +/*
 + * Creates a rectangular array for fast location of which GfsBox
 + * contains a given point.
 + */
 +static LocateArray * locate_array_new (GfsDomain * domain)
 +{
 +  LocateArray * a = g_malloc (sizeof (LocateArray));
++=======
+ /**
+  * @domain: a #GfsDomain.
+  *
+  * Creates a rectangular array for fast location of which GfsBox
+  * contains a given point.
+  *
+  * Returns: a new #GfsLocateArray.
+  */
+ GfsLocateArray * gfs_locate_array_new (GfsDomain * domain)
+ {
+   g_return_val_if_fail (domain != NULL, NULL);
+   
+   GfsLocateArray * a = g_malloc (sizeof (GfsLocateArray));
++>>>>>>> upstream/20131206+dfsg
    guint i;
    a->h = ftt_level_size (domain->rootlevel);
    for (i = 0; i < FTT_DIMENSION; i++) {
@@@ -131,13 -130,26 +173,35 @@@
    return a;
  }
  
++<<<<<<< HEAD
 +static GSList * locate_array_locate (LocateArray * a, FttVector * p)
 +{
++=======
+ /**
+  * @a: a #GfsLocateArray.
+  * @p: a #FttVector.
+  *
+  * Returns: a list of objects containing @p or %NULL.
+  */
+ GSList * gfs_locate_array_locate (GfsLocateArray * a, FttVector * p)
+ {
+   g_return_val_if_fail (a != NULL, NULL);
+   g_return_val_if_fail (p != NULL, NULL);
++>>>>>>> upstream/20131206+dfsg
    gint i = locate_linear_index (p, a);
    return i < 0 ? NULL : a->root[i];
  }
  
++<<<<<<< HEAD
 +static void locate_array_destroy (LocateArray * a)
++=======
+ /**
+  * @a: a #GfsLocateArray.
+  *
+  * Frees the memory allocated to @a.
+  */
+ void gfs_locate_array_destroy (GfsLocateArray * a)
++>>>>>>> upstream/20131206+dfsg
  {
    if (a) {
      gint i;
@@@ -335,6 -347,6 +399,7 @@@ static void set_ref_pos (GfsBox * box, 
  }
  
  static void pid_max (GfsBox * box, gint * np)
++<<<<<<< HEAD
  {
    if (box->pid > *np)
      *np = box->pid;  
@@@ -347,6 -359,6 +412,20 @@@ typedef struct 
  
  static void removed_list (GfsBox * box, RemovedData * p)
  {
++=======
++{
++  if (box->pid > *np)
++    *np = box->pid;  
++}
++
++typedef struct {
++  GSList * removed;
++  gint pid;
++} RemovedData;
++
++static void removed_list (GfsBox * box, RemovedData * p)
++{
++>>>>>>> upstream/20131206+dfsg
    if (box->pid != p->pid)
      p->removed = g_slist_prepend (p->removed, box);
    else {
@@@ -357,8 -369,14 +436,19 @@@
        if (GFS_IS_BOUNDARY_PERIODIC (box->neighbor[d]) &&
  	  !GFS_IS_BOUNDARY_MPI (box->neighbor[d]) &&
  	  (matching = GFS_BOUNDARY_PERIODIC (box->neighbor[d])->matching)->pid != p->pid) {
++<<<<<<< HEAD
 +	gts_object_destroy (GTS_OBJECT (box->neighbor[d]));
 +	gfs_boundary_mpi_new (gfs_boundary_mpi_class (), box, d, matching->pid, matching->id);
++=======
+ 	GfsBoundaryPeriodic * b = GFS_BOUNDARY_PERIODIC (box->neighbor[d]);
+ 	FttDirection rotate = b->d;
+ 	gdouble orientation = b->rotate;
+ 	gts_object_destroy (GTS_OBJECT (b));
+ 	b = GFS_BOUNDARY_PERIODIC (gfs_boundary_mpi_new (gfs_boundary_mpi_class (), 
+ 							 box, d, matching->pid, matching->id));
+ 	if (orientation != 0.)
+ 	  gfs_boundary_periodic_rotate (b, rotate, orientation);
++>>>>>>> upstream/20131206+dfsg
        }
    }
  }
@@@ -399,7 -417,6 +489,10 @@@ static GPtrArray * box_ids (GfsDomain 
    return ids;
  }
  
++<<<<<<< HEAD
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  static void convert_boundary_mpi_into_edges (GfsBox * box, GPtrArray * ids)
  {
    gint pid = gfs_box_domain (box)->pid;
@@@ -410,17 -427,34 +503,48 @@@
        GfsBoundaryMpi * b = GFS_BOUNDARY_MPI (box->neighbor[d]);
        GfsBox * nbox;
        if (b->id >= 0 && b->id <= ids->len && (nbox = g_ptr_array_index (ids, b->id - 1))) {
++<<<<<<< HEAD
 +	FttDirection od = FTT_OPPOSITE_DIRECTION (d);
 +	if (!GFS_IS_BOUNDARY_MPI (nbox->neighbor[od]))
 +	  g_warning ("!GFS_IS_BOUNDARY_MPI (nbox->neighbor[FTT_OPPOSITE_DIRECTION (d)])");
 +	else {
 +	  GfsBoundaryMpi * nb = GFS_BOUNDARY_MPI (nbox->neighbor[od]);
 +	  if (box->id != nb->id)
 +	    g_warning ("box->id != nb->id");
 +	  else {
 +	    gts_object_destroy (GTS_OBJECT (b));
 +	    gts_object_destroy (GTS_OBJECT (nb));
 +	    gfs_gedge_new (gfs_gedge_class (), nbox, box, od);
++=======
+ 	FttDirection nd = GFS_BOUNDARY_PERIODIC (b)->d;
+ 	if (!GFS_IS_BOUNDARY_MPI (nbox->neighbor[nd]))
+ 	  g_warning ("!GFS_IS_BOUNDARY_MPI (nbox->neighbor[nd])");
+ 	else {
+ 	  GfsBoundaryMpi * nb = GFS_BOUNDARY_MPI (nbox->neighbor[nd]);
+ 	  if (box->id != nb->id)
+ 	    g_warning ("box->id != nb->id");
+ 	  else {
+ 	    int rotate = GFS_BOUNDARY_PERIODIC (b)->rotate;
+ 	    gts_object_destroy (GTS_OBJECT (b));
+ 	    gts_object_destroy (GTS_OBJECT (nb));
+ 	    GfsGEdge * edge;
+ 	    if (nd == FTT_OPPOSITE_DIRECTION (d))
+ 	      /* standard edge */
+ 	      edge = gfs_gedge_new (gfs_gedge_class (), box, nbox, d);
+ 	    else {
+ 	      /* rotated edge */
+ 	      g_assert (rotate);
+ 	      if (rotate > 0) {
+ 		edge = gfs_gedge_new (gfs_gedge_class (), box, nbox, d);
+ 		edge->rotate = nd;		
+ 	      }
+ 	      else {
+ 		edge = gfs_gedge_new (gfs_gedge_class (), nbox, box, nd);
+ 		edge->rotate = d;
+ 	      }
+ 	    }
+ 	    gfs_gedge_link_boxes (edge);
++>>>>>>> upstream/20131206+dfsg
  	  }
  	}
        }
@@@ -477,8 -511,8 +601,13 @@@ static void domain_post_read (GfsDomai
  
    gfs_domain_match (domain);
  
++<<<<<<< HEAD
 +  locate_array_destroy (domain->array);
 +  domain->array = locate_array_new (domain);
++=======
+   gfs_locate_array_destroy (domain->array);
+   domain->array = gfs_locate_array_new (domain);
++>>>>>>> upstream/20131206+dfsg
  
    domain->version = atoi (GFS_BUILD_VERSION);
  }
@@@ -533,10 -567,14 +662,21 @@@ static void domain_destroy (GtsObject 
  
    g_slist_free (domain->variables_io);
  
++<<<<<<< HEAD
 +  locate_array_destroy (domain->array);
 +
 +  g_hash_table_destroy (domain->objects);
 +
++=======
+   gfs_locate_array_destroy (domain->array);
+   domain->array = NULL;
+ 
+   g_hash_table_destroy (domain->objects);
+ 
+   g_ptr_array_free (domain->sorted, TRUE);
+   domain->sorted = NULL;
+ 
++>>>>>>> upstream/20131206+dfsg
    (* GTS_OBJECT_CLASS (gfs_domain_class ())->parent_class->destroy) (o);
  }
  
@@@ -624,6 -684,11 +786,14 @@@ static void domain_init (GfsDomain * do
    domain->objects = g_hash_table_new (g_str_hash, g_str_equal);
  
    domain->np = 1;
++<<<<<<< HEAD
++=======
+ 
+   domain->sorted = g_ptr_array_new ();
+   domain->dirty = TRUE;
+   
+   domain->projections = NULL;
++>>>>>>> upstream/20131206+dfsg
  }
  
  GfsDomainClass * gfs_domain_class (void)
@@@ -824,241 -889,241 +994,524 @@@ void gfs_domain_bc (GfsDomain * domain
  static void box_homogeneous_bc (GfsBox * box, BcData * p)
  {
    FttDirection d;
- 
-   for (d = 0; d < FTT_NEIGHBORS; d++) 
-     if (GFS_IS_BOUNDARY (box->neighbor[d])) {
+ 
+   for (d = 0; d < FTT_NEIGHBORS; d++) 
+     if (GFS_IS_BOUNDARY (box->neighbor[d])) {
+       GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
+       GfsBc * bc = gfs_boundary_lookup_bc (b, p->v);
+ 
+       if (bc) {
+ 	b->v = p->v1;
+ 	bc->v = p->v1;
+ 	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
+ 	ftt_face_traverse_boundary (b->root, b->d,
+ 				    FTT_PRE_ORDER, p->flags, p->max_depth,
+ 				    bc->homogeneous_bc, bc);
+ 	bc->v = p->v;
+ 	gfs_boundary_send (b);
+       }
+     }
+ }
+ 
+ static void box_homogeneous_bc_stencil (GfsBox * box, BcData * p)
+ {
+   FttDirection d;
+ 
+   for (d = 0; d < FTT_NEIGHBORS; d++) 
+     if (GFS_IS_BOUNDARY (box->neighbor[d]) && !GFS_IS_BOUNDARY_PERIODIC (box->neighbor[d])) {
+       GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
+       GfsBc * bc = gfs_boundary_lookup_bc (b, p->v);
+       
+       if (bc) {
+ 	b->v = p->v1;
+ 	bc->v = p->v1;
+ 	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
+ 	bc->lp = p->lp;
+ 	ftt_face_traverse_boundary (b->root, b->d,
+ 				    FTT_PRE_ORDER, p->flags, p->max_depth,
+ 				    bc->homogeneous_bc_stencil, bc);
+ 	bc->v = p->v;
+ 	gfs_boundary_send (b);
+       }
+     }
+ }
+ 
+ /**
+  * gfs_domain_homogeneous_bc:
+  * @domain: a #GfsDomain.
+  * @flags: the traversal flags.
+  * @max_depth: the maximum depth of the traversal.
+  * @ov: a #GfsVariable.
+  * @v: a #GfsVariable of which @ov is an homogeneous version.
+  *
+  * Apply the boundary conditions in @domain for variable @ov using the
+  * homogeneous version of the boundary condititons for @v.
+  */
+ void gfs_domain_homogeneous_bc (GfsDomain * domain,
+ 				FttTraverseFlags flags,
+ 				gint max_depth,
+ 				GfsVariable * ov,
+ 				GfsVariable * v)
+ {
+   BcData b = { flags, max_depth, v, ov, FTT_XYZ};
+ 
+   g_return_if_fail (domain != NULL);
+   g_return_if_fail (ov != NULL);
+   g_return_if_fail (v != NULL);
+ 
+   if (domain->profile_bc)
+     gfs_domain_timer_start (domain, "bc");
+ 
+   gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_homogeneous_bc, &b);
+   gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_receive_bc, &b);
+   gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_synchronize, &b.c);
+ 
+   if (domain->profile_bc)
+     gfs_domain_timer_stop (domain, "bc");
+ }
+ 
+ /**
+  * gfs_domain_homogeneous_bc_stencil:
+  * @domain: a #GfsDomain.
+  * @flags: the traversal flags.
+  * @max_depth: the maximum depth of the traversal.
+  * @ov: a #GfsVariable.
+  * @v: a #GfsVariable of which @ov is an homogeneous version.
+  * @lp: a #GfsLinearProblem in which to store the stencil.
+  *
+  * Gets the stencils corresponding to the homogeneous boundary
+  * conditions in @domain for variable @v.
+  */
+ void gfs_domain_homogeneous_bc_stencil (GfsDomain * domain,
+ 					FttTraverseFlags flags,
+ 					gint max_depth,
+ 					GfsVariable * ov,
+ 					GfsVariable * v,
+ 					GfsLinearProblem * lp)
+ {
+   BcData b = { flags, max_depth, v, ov, FTT_XYZ, lp };
+ 
+   g_return_if_fail (domain != NULL);
+   g_return_if_fail (v != NULL);
+ 
+   gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_homogeneous_bc_stencil, &b);
+ }
+ 
+ typedef struct {
+   FttCellTraverseFunc func;
+   gpointer data;
+   FttTraverseType order;
+   FttTraverseFlags flags;
+   gint max_depth;
+ } TraverseData;
+ 
+ typedef struct {
+   TraverseData t;
+   BcData b;
+ } TraverseBcData;
+ 
+ static void update_mpi_cell (FttCell * cell, TraverseData * p)
+ {
+   if ((cell->flags & GFS_FLAG_USED) == 0) {
+     (* p->func) (cell, p->data);
+     cell->flags |= GFS_FLAG_USED;
+   }
+ }
+ 
+ static void update_other_cell (FttCell * cell, TraverseData * p)
+ {
+   if ((cell->flags & GFS_FLAG_USED) != 0)
+     cell->flags &= ~GFS_FLAG_USED;
+   else
+     (* p->func) (cell, p->data);
+ }
+ 
+ static void update_mpi_boundaries (GfsBox * box, TraverseBcData * p)
+ {
+   FttDirection d;
+ 
+   for (d = 0; d < FTT_NEIGHBORS; d++) 
+     if (GFS_IS_BOUNDARY_MPI (box->neighbor[d])) {
+       GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
+       GfsBc * bc = gfs_boundary_lookup_bc (b, p->b.v);
+ 
+       if (bc) {
+ 	ftt_cell_traverse_boundary (box->root, d, p->t.order, p->t.flags, p->t.max_depth,
+ 				    (FttCellTraverseFunc) update_mpi_cell, p);
+ 	b->v = p->b.v1;
+ 	bc->v = p->b.v1;
+ 	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
+ 	ftt_face_traverse_boundary (b->root, b->d,
+ 				    FTT_PRE_ORDER, p->b.flags, p->b.max_depth,
+ 				    bc->bc, bc);
+ 	bc->v = p->b.v;
+ 	gfs_boundary_send (b);
+       }
+     }
+ }
+ 
+ static void update_other_homogeneous_boundaries (GfsBox * box, BcData * p)
+ {
+   FttDirection d;
+   for (d = 0; d < FTT_NEIGHBORS; d++)
+     if (GFS_IS_BOUNDARY (box->neighbor[d]) &&
+ 	!GFS_IS_BOUNDARY_MPI (box->neighbor[d])) {
+       GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
+       GfsBc * bc = gfs_boundary_lookup_bc (b, p->v);
+ 
+       if (bc) {
+ 	b->v = p->v1;
+ 	bc->v = p->v1;
+ 	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
+ 	ftt_face_traverse_boundary (b->root, b->d,
+ 				    FTT_PRE_ORDER, p->flags, p->max_depth,
+ 				    bc->homogeneous_bc, bc);
+ 	bc->v = p->v;
+ 	gfs_boundary_send (b);
+       }
+     }
+ }
+ 
+ /**
+  * gfs_traverse_and_homogeneous_bc:
+  * @domain: a #GfsDomain.
+  * @order: the order in which the cells are visited - %FTT_PRE_ORDER,
+  * %FTT_POST_ORDER. 
+  * @flags: which types of children are to be visited.
+  * @max_depth: the maximum depth of the traversal. Cells below this
+  * depth will not be traversed. If @max_depth is -1 all cells in the
+  * tree are visited.
+  * @func: the function to call for each visited #FttCell.
+  * @data: user data to pass to @func.
+  * @ov: a #GfsVariable.
+  * @v: a #GfsVariable of which @ov is an homogeneous version.
+  *
+  * For serial runs, this is identical to calling:
+  *
+  * gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data);
+  * gfs_domain_homogeneous_bc (domain, flags, max_depth, ov, v);
+  *
+  * For parallel runs, the communications needed to apply the boundary
+  * conditions are overlapped with the calls to @func in the bulk of
+  * the domain.
+  */
+ void gfs_traverse_and_homogeneous_bc (GfsDomain * domain,
+ 				      FttTraverseType order,
+ 				      FttTraverseFlags flags,
+ 				      gint max_depth,
+ 				      FttCellTraverseFunc func,
+ 				      gpointer data,
+ 				      GfsVariable * ov,
+ 				      GfsVariable * v)
+ {
+   g_return_if_fail (domain != NULL);
+ 
+   if (domain->pid < 0 || !domain->overlap) {
+     gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data);
+     gfs_domain_homogeneous_bc (domain, flags, max_depth, ov, v);
+   }
+   else {
+     TraverseBcData d = {
+       { func, data, order, flags, max_depth }, 
+       { flags, max_depth, v, ov, FTT_XYZ }
+     };
+     /* Update and send MPI boundary values */
+     gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) update_mpi_boundaries, &d);
+     /* Update bulk of domain and other boundaries */
+     gfs_domain_cell_traverse (domain, order, flags, max_depth, 
+ 			      (FttCellTraverseFunc) update_other_cell, &d);
+     /* Apply homogeneous BC on other boundaries */
+     gts_container_foreach (GTS_CONTAINER (domain), 
+ 			   (GtsFunc) update_other_homogeneous_boundaries, &d.b);
+     /* Receive and synchronize */
+     gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_receive_bc, &d.b);
+     gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_synchronize, &d.b.c);
+   }
+ }
+ 
++<<<<<<< HEAD
++static void box_homogeneous_bc (GfsBox * box, BcData * p)
++=======
++static void update_other_boundaries (GfsBox * box, BcData * p)
++>>>>>>> upstream/20131206+dfsg
++{
++  FttDirection d;
++  for (d = 0; d < FTT_NEIGHBORS; d++)
++    if (GFS_IS_BOUNDARY (box->neighbor[d]) &&
++	!GFS_IS_BOUNDARY_MPI (box->neighbor[d])) {
 +      GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
 +      GfsBc * bc = gfs_boundary_lookup_bc (b, p->v);
 +
 +      if (bc) {
 +	b->v = p->v1;
 +	bc->v = p->v1;
 +	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
 +	ftt_face_traverse_boundary (b->root, b->d,
 +				    FTT_PRE_ORDER, p->flags, p->max_depth,
++<<<<<<< HEAD
 +				    bc->homogeneous_bc, bc);
 +	bc->v = p->v;
 +	gfs_boundary_send (b);
 +      }
 +    }
 +}
 +
 +static void box_homogeneous_bc_stencil (GfsBox * box, BcData * p)
 +{
 +  FttDirection d;
 +
 +  for (d = 0; d < FTT_NEIGHBORS; d++) 
 +    if (GFS_IS_BOUNDARY (box->neighbor[d]) && !GFS_IS_BOUNDARY_MPI (box->neighbor[d])) {
 +      GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
 +      GfsBc * bc = gfs_boundary_lookup_bc (b, p->v);
 +      
 +      if (bc) {
 +	b->v = p->v1;
 +	bc->v = p->v1;
 +	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
 +	bc->lp = p->lp;
 +	ftt_face_traverse_boundary (b->root, b->d,
 +				    FTT_PRE_ORDER, p->flags, p->max_depth,
 +				    bc->homogeneous_bc_stencil, bc);
++=======
++				    bc->bc, bc);
++>>>>>>> upstream/20131206+dfsg
 +	bc->v = p->v;
 +	gfs_boundary_send (b);
 +      }
 +    }
 +}
 +
 +/**
-  * gfs_domain_homogeneous_bc:
++ * gfs_traverse_and_bc:
 + * @domain: a #GfsDomain.
-  * @flags: the traversal flags.
-  * @max_depth: the maximum depth of the traversal.
-  * @ov: a #GfsVariable.
-  * @v: a #GfsVariable of which @ov is an homogeneous version.
++ * @order: the order in which the cells are visited - %FTT_PRE_ORDER,
++ * %FTT_POST_ORDER. 
++ * @flags: which types of children are to be visited.
++ * @max_depth: the maximum depth of the traversal. Cells below this
++ * depth will not be traversed. If @max_depth is -1 all cells in the
++ * tree are visited.
++ * @func: the function to call for each visited #FttCell.
++ * @data: user data to pass to @func.
++ * @v: a #GfsVariable.
++ * @v1: another #GfsVariable.
 + *
-  * Apply the boundary conditions in @domain for variable @ov using the
-  * homogeneous version of the boundary condititons for @v.
++ * For serial runs, this is identical to calling:
++ *
++ * gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data);
++ * gfs_domain_copy_bc (domain, flags, max_depth, v, v1);
++ *
++ * For parallel runs, the communications needed to apply the boundary
++ * conditions are overlapped with the calls to @func in the bulk of
++ * the domain.
 + */
- void gfs_domain_homogeneous_bc (GfsDomain * domain,
- 				FttTraverseFlags flags,
- 				gint max_depth,
- 				GfsVariable * ov,
- 				GfsVariable * v)
++void gfs_traverse_and_bc (GfsDomain * domain,
++			  FttTraverseType order,
++			  FttTraverseFlags flags,
++			  gint max_depth,
++			  FttCellTraverseFunc func,
++			  gpointer data,
++			  GfsVariable * v,
++			  GfsVariable * v1)
 +{
++<<<<<<< HEAD
 +  BcData b = { flags, max_depth, v, ov, FTT_XYZ};
 +
 +  g_return_if_fail (domain != NULL);
 +  g_return_if_fail (ov != NULL);
 +  g_return_if_fail (v != NULL);
 +
 +  if (domain->profile_bc)
 +    gfs_domain_timer_start (domain, "bc");
 +
 +  gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_homogeneous_bc, &b);
 +  gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_receive_bc, &b);
 +  gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_synchronize, &b.c);
++=======
++  g_return_if_fail (domain != NULL);
++>>>>>>> upstream/20131206+dfsg
 +
-   if (domain->profile_bc)
-     gfs_domain_timer_stop (domain, "bc");
++  if (domain->pid < 0 || !domain->overlap) {
++    gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data);
++    gfs_domain_copy_bc (domain, flags, max_depth, v, v1);
++  }
++  else {
++    TraverseBcData d = {
++      { func, data, order, flags, max_depth },
++      { flags, max_depth, v, v1, FTT_XYZ }
++    };
++    /* Update and send MPI boundary values */
++    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) update_mpi_boundaries, &d);
++    /* Update bulk of domain and other boundaries */
++    gfs_domain_cell_traverse (domain, order, flags, max_depth, 
++    			      (FttCellTraverseFunc) update_other_cell, &d);
++    /* Apply BC on other boundaries */
++    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) update_other_boundaries, &d.b);
++    /* Receive and synchronize */
++    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_receive_bc, &d.b);
++    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_synchronize, &d.b.c);
++  }
 +}
 +
 +/**
 + * gfs_domain_homogeneous_bc_stencil:
 + * @domain: a #GfsDomain.
 + * @flags: the traversal flags.
 + * @max_depth: the maximum depth of the traversal.
 + * @ov: a #GfsVariable.
 + * @v: a #GfsVariable of which @ov is an homogeneous version.
 + * @lp: a #GfsLinearProblem in which to store the stencil.
 + *
 + * Gets the stencils corresponding to the homogeneous boundary
 + * conditions in @domain for variable @v.
 + */
 +void gfs_domain_homogeneous_bc_stencil (GfsDomain * domain,
 +					FttTraverseFlags flags,
 +					gint max_depth,
 +					GfsVariable * ov,
 +					GfsVariable * v,
 +					GfsLinearProblem * lp)
 +{
 +  BcData b = { flags, max_depth, v, ov, FTT_XYZ, lp };
 +
 +  g_return_if_fail (domain != NULL);
 +  g_return_if_fail (v != NULL);
 +
 +  gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_homogeneous_bc_stencil, &b);
 +}
 +
 +typedef struct {
 +  FttCellTraverseFunc func;
 +  gpointer data;
 +  FttTraverseType order;
 +  FttTraverseFlags flags;
 +  gint max_depth;
 +} TraverseData;
 +
 +typedef struct {
 +  TraverseData t;
 +  BcData b;
 +} TraverseBcData;
 +
 +static void update_mpi_cell (FttCell * cell, TraverseData * p)
 +{
 +  if ((cell->flags & GFS_FLAG_USED) == 0) {
 +    (* p->func) (cell, p->data);
 +    cell->flags |= GFS_FLAG_USED;
 +  }
 +}
 +
 +static void update_other_cell (FttCell * cell, TraverseData * p)
 +{
 +  if ((cell->flags & GFS_FLAG_USED) != 0)
 +    cell->flags &= ~GFS_FLAG_USED;
 +  else
 +    (* p->func) (cell, p->data);
 +}
 +
 +static void update_mpi_boundaries (GfsBox * box, TraverseBcData * p)
 +{
 +  FttDirection d;
 +
 +  for (d = 0; d < FTT_NEIGHBORS; d++) 
 +    if (GFS_IS_BOUNDARY_MPI (box->neighbor[d])) {
 +      GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
 +      GfsBc * bc = gfs_boundary_lookup_bc (b, p->b.v);
 +
 +      if (bc) {
 +	ftt_cell_traverse_boundary (box->root, d, p->t.order, p->t.flags, p->t.max_depth,
 +				    (FttCellTraverseFunc) update_mpi_cell, p);
 +	b->v = p->b.v1;
 +	bc->v = p->b.v1;
 +	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
 +	ftt_face_traverse_boundary (b->root, b->d,
 +				    FTT_PRE_ORDER, p->b.flags, p->b.max_depth,
 +				    bc->bc, bc);
 +	bc->v = p->b.v;
 +	gfs_boundary_send (b);
 +      }
 +    }
 +}
 +
 +static void update_other_homogeneous_boundaries (GfsBox * box, BcData * p)
 +{
 +  FttDirection d;
 +  for (d = 0; d < FTT_NEIGHBORS; d++)
 +    if (GFS_IS_BOUNDARY (box->neighbor[d]) &&
 +	!GFS_IS_BOUNDARY_MPI (box->neighbor[d])) {
 +      GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
 +      GfsBc * bc = gfs_boundary_lookup_bc (b, p->v);
 +
 +      if (bc) {
 +	b->v = p->v1;
 +	bc->v = p->v1;
 +	b->type = GFS_BOUNDARY_CENTER_VARIABLE;
 +	ftt_face_traverse_boundary (b->root, b->d,
 +				    FTT_PRE_ORDER, p->flags, p->max_depth,
 +				    bc->homogeneous_bc, bc);
 +	bc->v = p->v;
 +	gfs_boundary_send (b);
 +      }
 +    }
 +}
 +
 +/**
 + * gfs_traverse_and_homogeneous_bc:
 + * @domain: a #GfsDomain.
 + * @order: the order in which the cells are visited - %FTT_PRE_ORDER,
 + * %FTT_POST_ORDER. 
 + * @flags: which types of children are to be visited.
 + * @max_depth: the maximum depth of the traversal. Cells below this
 + * depth will not be traversed. If @max_depth is -1 all cells in the
 + * tree are visited.
 + * @func: the function to call for each visited #FttCell.
 + * @data: user data to pass to @func.
 + * @ov: a #GfsVariable.
 + * @v: a #GfsVariable of which @ov is an homogeneous version.
 + *
 + * For serial runs, this is identical to calling:
 + *
 + * gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data);
 + * gfs_domain_homogeneous_bc (domain, flags, max_depth, ov, v);
 + *
 + * For parallel runs, the communications needed to apply the boundary
 + * conditions are overlapped with the calls to @func in the bulk of
 + * the domain.
 + */
 +void gfs_traverse_and_homogeneous_bc (GfsDomain * domain,
 +				      FttTraverseType order,
 +				      FttTraverseFlags flags,
 +				      gint max_depth,
 +				      FttCellTraverseFunc func,
 +				      gpointer data,
 +				      GfsVariable * ov,
 +				      GfsVariable * v)
 +{
 +  g_return_if_fail (domain != NULL);
 +
 +  if (domain->pid < 0 || !domain->overlap) {
 +    gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data);
 +    gfs_domain_homogeneous_bc (domain, flags, max_depth, ov, v);
 +  }
 +  else {
 +    TraverseBcData d = {
 +      { func, data, order, flags, max_depth }, 
 +      { flags, max_depth, v, ov, FTT_XYZ }
 +    };
 +    /* Update and send MPI boundary values */
 +    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) update_mpi_boundaries, &d);
 +    /* Update bulk of domain and other boundaries */
 +    gfs_domain_cell_traverse (domain, order, flags, max_depth, 
 +			      (FttCellTraverseFunc) update_other_cell, &d);
 +    /* Apply homogeneous BC on other boundaries */
 +    gts_container_foreach (GTS_CONTAINER (domain), 
 +			   (GtsFunc) update_other_homogeneous_boundaries, &d.b);
 +    /* Receive and synchronize */
 +    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_receive_bc, &d.b);
 +    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_synchronize, &d.b.c);
 +  }
 +}
 +
  static void update_other_boundaries (GfsBox * box, BcData * p)
  {
    FttDirection d;
@@@ -1305,11 -1393,70 +1781,77 @@@ void gfs_domain_cell_traverse (GfsDomai
  			       gpointer data)
  {
    TraverseData d = { func, data, order, flags, max_depth };
++<<<<<<< HEAD
++=======
+ 
+   g_return_if_fail (domain != NULL);
+   g_return_if_fail (func != NULL);
+ 
+   gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_traverse, &d);
+ }
++>>>>>>> upstream/20131206+dfsg
+ 
+ static void cell_traverse_add (FttCell * cell, GPtrArray * a)
+ {
+   g_ptr_array_add (a, cell);
+ }
+ 
+ /**
+  * gfs_domain_cell_traverse_new:
+  * @domain: a #GfsDomain.
+  * @order: the order in which the cells are visited - %FTT_PRE_ORDER,
+  * %FTT_POST_ORDER. 
+  * @flags: which types of children are to be visited.
+  * @max_depth: the maximum depth of the traversal. Cells below this
+  * depth will not be traversed. If @max_depth is -1 all cells in the
+  * tree are visited.
+  *
+  * Returns: a new #FttCellTraverse.
+  */
+ FttCellTraverse * gfs_domain_cell_traverse_new (GfsDomain * domain,
+ 						FttTraverseType order,
+ 						FttTraverseFlags flags,
+ 						gint max_depth)
+ {
+   g_return_val_if_fail (domain != NULL, NULL);
  
+   GPtrArray * a = g_ptr_array_new ();
+   gfs_domain_cell_traverse (domain, order, flags, max_depth,
+ 			    (FttCellTraverseFunc) cell_traverse_add, a);
+   g_ptr_array_add (a, NULL);
+   FttCellTraverse * t = g_malloc (sizeof (FttCellTraverse));
+   t->current = t->cells = (FttCell **) a->pdata;
+   g_ptr_array_free (a, FALSE);
+   return t;
+ }
+ 
+ /**
+  * gfs_domain_traverse_layers:
+  * @domain: a #GfsDomain.
+  * @func: the function to call for each visited #FttCell.
+  * @data: user data to pass to @func.
+  *
+  * Traverses the leaf cells of @domain for each layer. Calls the given
+  * function for each cell visited.
+  *
+  * By default it is identical to gfs_domain_traverse_leaves() but can
+  * be overloaded for specific (layered) domains.
+  */
+ void gfs_domain_traverse_layers (GfsDomain * domain,
+ 				 FttCellTraverseFunc func,
+ 				 gpointer data)
+ {
    g_return_if_fail (domain != NULL);
    g_return_if_fail (func != NULL);
  
++<<<<<<< HEAD
 +  gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_traverse, &d);
++=======
+   if (domain->traverse_layers)
+     (* domain->traverse_layers) (domain, func, data);
+   else
+     gfs_domain_traverse_leaves (domain, func, data);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void box_traverse_box (GfsBox * box, gpointer * datum)
@@@ -1704,7 -1851,7 +2246,11 @@@ void gfs_domain_cell_traverse_boundary 
  static void add_stats (const FttCell * cell, gpointer * data)
  {
    GtsRange * s = data[0];
++<<<<<<< HEAD
 +  gdouble v = GFS_VALUE (cell, GFS_VARIABLE1 (data[1]));
++=======
+   gdouble v = GFS_VALUE (cell, GFS_VARIABLE (data[1]));
++>>>>>>> upstream/20131206+dfsg
  
    if (v != GFS_NODATA)
      gts_range_add_value (s, v);
@@@ -2083,13 -2230,19 +2629,26 @@@ GfsNorm gfs_domain_norm_variable (GfsDo
    return n;
  }
  
- static void add_norm_residual (const FttCell * cell, gpointer * data)
+ typedef struct {
+   GfsVariable * res;
+   gdouble bias;
+   GfsNorm n;
+ } ResData;
+ 
+ static void add_norm_residual (const FttCell * cell, ResData * p)
  {
+   GfsDomain * domain = p->res->domain;
+   gdouble a = domain->cell_metric ? (* domain->cell_metric) (domain, cell) : 1.;
    gdouble size = ftt_cell_size (cell);
++<<<<<<< HEAD
 +  GfsVariable * res = data[0];
 +  GfsNorm * n = data[1];
 +  
 +  gfs_norm_add (n, GFS_VALUE (cell, res)/(size*size), 1.);
++=======
+   gfs_norm_add (&p->n, GFS_VALUE (cell, p->res)/(a*size*size), 1.);
+   p->bias += GFS_VALUE (cell, p->res);
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
@@@ -2114,26 -2267,24 +2673,30 @@@ GfsNorm gfs_domain_norm_residual (GfsDo
  				  gdouble dt,
  				  GfsVariable * res)
  {
-   GfsNorm n;
-   gpointer data[2];
+   ResData p = { res, 0. };
  
-   g_return_val_if_fail (domain != NULL, n);
-   g_return_val_if_fail (res != NULL, n);
+   g_return_val_if_fail (domain != NULL, p.n);
+   g_return_val_if_fail (res != NULL, p.n);
    
-   gfs_norm_init (&n);
-   data[0] = res;
-   data[1] = &n;
+   gfs_norm_init (&p.n);
    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, flags, max_depth, 
++<<<<<<< HEAD
 +			   (FttCellTraverseFunc) add_norm_residual, data);
 +  domain_norm_reduce (domain, &n);
 +  gfs_norm_update (&n);
++=======
+ 			   (FttCellTraverseFunc) add_norm_residual, &p);
+   domain_norm_reduce (domain, &p.n);
+   gfs_all_reduce (domain, p.bias, MPI_DOUBLE, MPI_SUM);
+   gfs_norm_update (&p.n);
++>>>>>>> upstream/20131206+dfsg
  
    dt *= dt;
-   n.bias *= dt;
-   n.first *= dt;
-   n.second *= dt;
-   n.infty *= dt;
-   return n;
+   p.n.bias = p.bias*dt;
+   p.n.first *= dt;
+   p.n.second *= dt;
+   p.n.infty *= dt;
+   return p.n;
  }
  
  /**
@@@ -2286,24 -2438,9 +2850,30 @@@ static void box_split (GfsBox * box, Sp
  	    GFS_BOUNDARY_PERIODIC (newboundary)->matching = 
  	      GFS_BOUNDARY_PERIODIC (boundary)->matching;
  	    GFS_BOUNDARY_PERIODIC (newboundary)->d = GFS_BOUNDARY_PERIODIC (boundary)->d;
++<<<<<<< HEAD
 +	  }
 +	  else {
 +	    gchar fname[] = "/tmp/XXXXXX";
 +	    gint fd = mkstemp (fname);
 +	    FILE * fp = fdopen (fd, "w");
 +	    GtsFile * gfp;
 +	    
 +	    (* GTS_OBJECT_CLASS (klass)->write) (GTS_OBJECT (boundary), fp);
 +	    fclose (fp);
 +	    close (fd);
 +	    fp = fopen (fname, "r");
 +	    unlink (fname);
 +	    gfp = gts_file_new (fp);
 +	    (* GTS_OBJECT_CLASS (klass)->read) (&newboundary, gfp);
 +	    g_assert (gfp->type != GTS_ERROR);
 +	    gts_file_destroy (gfp);
 +	    fclose (fp);
 +	  }
++=======
+ 	  }
+ 	  else
+ 	    gfs_object_clone (GTS_OBJECT (boundary), GTS_OBJECT (newboundary));
++>>>>>>> upstream/20131206+dfsg
  	}
        gts_object_destroy (GTS_OBJECT (boundary));
        box->neighbor[d] = NULL;
@@@ -2488,7 -2625,10 +3058,14 @@@ FttCell * gfs_domain_locate (GfsDomain 
  			     gint max_depth,
  			     GfsBox ** where)
  {
++<<<<<<< HEAD
 +  GSList * b = locate_array_locate (domain->array, &target);
++=======
+   g_return_val_if_fail (domain != NULL, NULL);
+   g_return_val_if_fail (domain->array != NULL, NULL);
+ 
+   GSList * b = gfs_locate_array_locate (domain->array, &target);
++>>>>>>> upstream/20131206+dfsg
    if (b && GFS_IS_BOX (b->data)) {
      if (where)
        *where = b->data;
@@@ -2503,12 -2643,12 +3080,21 @@@
   * @target: position of the point to look for.
   * @max_depth: maximum depth to consider (-1 means no restriction).
   * @where: a pointer to a #GtsObject.
++<<<<<<< HEAD
+  *
+  * Locates the cell of @domain or of its boundary containing @target.
+  *
+  * If @where is not %NULL it is filled with the #GtsObject (either a
+  * #GfsBox or a #GfsBoundary) containing the cell.
+  *
++=======
 + *
 + * Locates the cell of @domain or of its boundary containing @target.
 + *
 + * If @where is not %NULL it is filled with the #GtsObject (either a
 + * #GfsBox or a #GfsBoundary) containing the cell.
 + *
++>>>>>>> upstream/20131206+dfsg
   * Returns: a #FttCell of @domain or of its boundary containing the
   * point defined by @target or %NULL if @target is not contained in
   * any cell of @domain or of its boundary.
@@@ -2518,7 -2658,10 +3104,14 @@@ FttCell * gfs_domain_boundary_locate (G
  				      gint max_depth,
  				      GtsObject ** where)
  {
++<<<<<<< HEAD
 +  GSList * b = locate_array_locate (domain->array, &target);
++=======
+   g_return_val_if_fail (domain != NULL, NULL);
+   g_return_val_if_fail (domain->array != NULL, NULL);
+ 
+   GSList * b = gfs_locate_array_locate (domain->array, &target);
++>>>>>>> upstream/20131206+dfsg
    if (!b)
      return NULL;
    if (GFS_IS_BOX (b->data)) {
@@@ -2938,7 -3081,7 +3531,11 @@@ void gfs_cell_write (const FttCell * ce
      fputs (" -1", fp);
    
    while (variables) {
++<<<<<<< HEAD
 +    fprintf (fp, " %g", GFS_VALUE (cell, GFS_VARIABLE1 (variables->data)));
++=======
+     fprintf (fp, " %g", GFS_VALUE (cell, GFS_VARIABLE (variables->data)));
++>>>>>>> upstream/20131206+dfsg
      variables = variables->next;
    }
  }
@@@ -3050,7 -3193,7 +3647,11 @@@ void gfs_cell_write_binary (const FttCe
    }
    
    while (variables) {
++<<<<<<< HEAD
 +    gdouble a = GFS_VALUE (cell, GFS_VARIABLE1 (variables->data));
++=======
+     gdouble a = GFS_VALUE (cell, GFS_VARIABLE (variables->data));
++>>>>>>> upstream/20131206+dfsg
      fwrite (&a, sizeof (gdouble), 1, fp);
      variables = variables->next;
    }
@@@ -3607,7 -3750,7 +4208,11 @@@ guint gfs_domain_tag_droplets (GfsDomai
    if (domain->pid >= 0) {
      guint * gtouch = g_malloc0 ((p.tag + 1)*sizeof (guint));
      MPI_Op op;    
++<<<<<<< HEAD
 +    MPI_Op_create (reduce_touching_regions, TRUE, &op);
++=======
+     MPI_Op_create (reduce_touching_regions, FALSE, &op);
++>>>>>>> upstream/20131206+dfsg
      MPI_Allreduce (p.touch, gtouch, p.tag + 1, MPI_UNSIGNED, op, MPI_COMM_WORLD);
      MPI_Op_free (&op);
      g_free (p.touch);
@@@ -4288,12 -4437,10 +4899,19 @@@ void gfs_domain_filter (GfsDomain * dom
      gfs_domain_copy_bc (domain, FTT_TRAVERSE_LEAFS, -1, v, fv);
  }
  
++<<<<<<< HEAD
 +struct _GfsRequest {  
 +  FILE * fp;
 +  long length;
 +#ifdef HAVE_MPI
 +  MPI_Request request[2];
 +  void * buf;
++=======
+ struct _GfsRequest {
+   void * buf;
+ #ifdef HAVE_MPI
+   MPI_Request request[2];
++>>>>>>> upstream/20131206+dfsg
  #endif
  };
  
@@@ -4314,26 -4461,26 +4932,49 @@@
  GfsRequest * gfs_send_objects (GSList * list, int dest)
  {
  #ifdef HAVE_MPI
++<<<<<<< HEAD
 +  GfsRequest * r = g_malloc (sizeof (GfsRequest));
 +  r->fp = tmpfile ();
 +  int fd = fileno (r->fp);
 +  struct stat sb;
 +  while (list) {
 +    GtsObject * object = list->data;
 +    g_assert (object->klass->write != NULL);
 +    (* object->klass->write) (object, r->fp);
 +    fputc ('\n', r->fp);
 +    list = list->next;
 +  }
 +  fflush (r->fp);
 +  g_assert (fstat (fd, &sb) != -1);
 +  r->length = sb.st_size;
 +  MPI_Isend (&r->length, 1, MPI_LONG, dest, 0, MPI_COMM_WORLD, &r->request[0]);
 +  /*  g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "sending %ld bytes to PE %d", length, dest); */
 +  if (r->length > 0) {
 +    r->buf = mmap (NULL, r->length, PROT_READ, MAP_PRIVATE, fd, 0);
 +    g_assert (r->buf != MAP_FAILED);
 +    MPI_Isend (r->buf, r->length, MPI_BYTE, dest, 1, MPI_COMM_WORLD, &r->request[1]);
++=======
+   char * buf;
+   size_t len;
+   FILE * fp = open_memstream (&buf, &len);
+   if (fp == NULL)
+     g_error ("gfs_send_objects(): could not open_memstream:\n%s", strerror (errno));
+   while (list) {
+     GtsObject * object = list->data;
+     g_assert (object->klass->write != NULL);
+     (* object->klass->write) (object, fp);
+     fputc ('\n', fp);
+     list = list->next;
+   }
+   fclose (fp);
+   GfsRequest * r = g_malloc0 (sizeof (GfsRequest));
+   long length = len;
+   MPI_Isend (&length, 1, MPI_LONG, dest, 0, MPI_COMM_WORLD, &r->request[0]);
+   gfs_debug ("sending %ld bytes to PE %d", length, dest);
+   if (length > 0) {
+     r->buf = buf;
+     MPI_Isend (r->buf, length, MPI_BYTE, dest, 1, MPI_COMM_WORLD, &r->request[1]);
++>>>>>>> upstream/20131206+dfsg
    }
    return r;
  #else  /* not HAVE_MPI */
@@@ -4354,11 -4501,10 +4995,18 @@@ void gfs_wait (GfsRequest * r
  
    MPI_Status status;
    MPI_Wait (&r->request[0], &status);
++<<<<<<< HEAD
 +  if (r->length > 0) {
 +    MPI_Wait (&r->request[1], &status);
 +    munmap (r->buf, r->length);
 +  }
 +  fclose (r->fp);
++=======
+   if (r->buf) {
+     MPI_Wait (&r->request[1], &status);
+     free (r->buf);
+   }
++>>>>>>> upstream/20131206+dfsg
    g_free (r);
  #endif /* HAVE_MPI */
  }
@@@ -4380,14 -4526,11 +5028,22 @@@ GSList * gfs_receive_objects (GfsDomai
    MPI_Status status;
    long length;
    MPI_Recv (&length, 1, MPI_LONG, src, 0, MPI_COMM_WORLD, &status);
++<<<<<<< HEAD
 +  /*  g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "receiving %ld bytes from PE %d", length, src); */
 +  if (length > 0) {
 +    char * buf = g_malloc (length);
 +    MPI_Recv (buf, length, MPI_BYTE, src, 1, MPI_COMM_WORLD, &status);
 +    FILE * f = tmpfile ();
 +    fwrite (buf, 1, length, f);
 +    rewind (f);
 +    GtsFile * fp = gts_file_new (f);
++=======
+   gfs_debug ("receiving %ld bytes from PE %d", length, src);
+   if (length > 0) {
+     char * buf = g_malloc (length);
+     MPI_Recv (buf, length, MPI_BYTE, src, 1, MPI_COMM_WORLD, &status);
+     GtsFile * fp = gts_file_new_from_buffer (buf, length);
++>>>>>>> upstream/20131206+dfsg
      GSList * list = NULL;
      while (fp->type == GTS_STRING) {
        GtsObjectClass * klass = gfs_object_class_from_name (fp->token->str);
@@@ -4405,7 -4548,6 +5061,10 @@@
  	gts_file_next_token (fp);
      }
      gts_file_destroy (fp);
++<<<<<<< HEAD
 +    fclose (f);
++=======
++>>>>>>> upstream/20131206+dfsg
      g_free (buf);
      return list;
    }
@@@ -4425,6 -4567,23 +5084,26 @@@ static void unlink_box (GfsBox * box, g
        box->neighbor[d] = NULL;
        gfs_boundary_mpi_new (gfs_boundary_mpi_class (), box, d, nbox->pid, nbox->id);
      }
++<<<<<<< HEAD
++=======
+     else if (GFS_IS_BOUNDARY_PERIODIC (box->neighbor[d]) && 
+ 	     !GFS_IS_BOUNDARY_MPI (box->neighbor[d])) {
+       GfsBoundaryPeriodic * boundary = GFS_BOUNDARY_PERIODIC (box->neighbor[d]);
+       g_assert (boundary->matching);
+       GfsBoundaryPeriodic * matching = 
+ 	GFS_BOUNDARY_PERIODIC (boundary->matching->neighbor[boundary->d]);
+       g_assert (GFS_IS_BOUNDARY_PERIODIC (matching));
+       GfsBox * nbox = GFS_BOUNDARY (matching)->box;
+       FttDirection od = FTT_OPPOSITE_DIRECTION (d);
+       g_assert (nbox->neighbor[od] == GTS_OBJECT (matching));
+       gts_object_destroy (GTS_OBJECT (matching));
+       nbox->neighbor[od] = NULL;
+       gfs_boundary_mpi_new (gfs_boundary_mpi_class (), nbox, od, *dest, box->id);
+       gts_object_destroy (GTS_OBJECT (box->neighbor[d]));
+       box->neighbor[d] = NULL;
+       gfs_boundary_mpi_new (gfs_boundary_mpi_class (), box, d, nbox->pid, nbox->id);
+     }
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void setup_binary_IO (GfsDomain * domain)
@@@ -4434,7 -4593,7 +5113,11 @@@
    domain->variables_io = NULL;
    GSList * i = domain->variables;
    while (i) {
++<<<<<<< HEAD
 +    if (GFS_VARIABLE1 (i->data)->name)
++=======
+     if (GFS_VARIABLE (i->data)->name)
++>>>>>>> upstream/20131206+dfsg
        domain->variables_io = g_slist_append (domain->variables_io, i->data);
      i = i->next;
    }
@@@ -4461,8 -4620,8 +5144,13 @@@ GfsRequest * gfs_send_boxes (GfsDomain 
    setup_binary_IO (domain);
    GfsRequest * r = gfs_send_objects (boxes, dest);
    g_slist_foreach (boxes, (GFunc) gts_object_destroy, NULL);
++<<<<<<< HEAD
 +  locate_array_destroy (domain->array);
 +  domain->array = locate_array_new (domain);
++=======
+   gfs_locate_array_destroy (domain->array);
+   domain->array = gfs_locate_array_new (domain);
++>>>>>>> upstream/20131206+dfsg
    return r;
  }
  
@@@ -4490,9 -4649,9 +5178,15 @@@ GSList * gfs_receive_boxes (GfsDomain 
      g_slist_foreach (boxes, (GFunc) convert_boundary_mpi_into_edges, ids);
      g_ptr_array_free (ids, TRUE);
  
++<<<<<<< HEAD
 +    /* Update LocateArray */
 +    locate_array_destroy (domain->array);
 +    domain->array = locate_array_new (domain);
++=======
+     /* Update GfsLocateArray */
+     gfs_locate_array_destroy (domain->array);
+     domain->array = gfs_locate_array_new (domain);
++>>>>>>> upstream/20131206+dfsg
    }
    return boxes;
  }
@@@ -4513,3 -4672,226 +5207,229 @@@ GtsObject * gfs_object_from_name (GfsDo
  }
  
  /** \endobject{GfsDomain} */
++<<<<<<< HEAD
++=======
+ 
+ /**
+  * Projection of a GfsDomain along a coordinate direction.
+  * \beginobject{GfsDomainProjection}
+  */
+ 
+ static void gfs_domain_projection_destroy (GtsObject * o)
+ {
+   GfsDomainProjection * p = GFS_DOMAIN_PROJECTION (o);
+   p->domain->projections = g_slist_remove (p->domain->projections, p);
+ 
+   (* GTS_OBJECT_CLASS (gfs_domain_projection_class ())->parent_class->destroy) (o);
+ } 
+ 
+ static void gfs_domain_projection_class_init (GfsEventClass * klass)
+ {
+   GTS_OBJECT_CLASS (klass)->destroy = gfs_domain_projection_destroy;
+ }
+ 
+ GfsDomainClass * gfs_domain_projection_class (void)
+ {
+   static GfsDomainClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsDomainProjection",
+       sizeof (GfsDomainProjection),
+       sizeof (GfsDomainClass),
+       (GtsObjectClassInitFunc) gfs_domain_projection_class_init,
+       (GtsObjectInitFunc) NULL,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_domain_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ typedef struct {
+   GfsDomainProjection * proj;
+   FttCell * cell;
+   GfsVariable * maxlevel;
+ } ProjData;
+ 
+ static gboolean overlap (FttCell * cell1, gpointer data)
+ {
+   ProjData * r = data;
+   FttCell * cell2 = r->cell;
+   if (ftt_cell_level (cell1) < ftt_cell_level (cell2)) {
+     FttCell * tmp = cell2;
+     cell2 = cell1;
+     cell1 = tmp;
+   }
+   FttVector p, q;
+   ftt_cell_pos (cell1, &p);
+   ftt_cell_pos (cell2, &q);
+   gdouble h = ftt_cell_size (cell2)/2.;
+   FttComponent c;
+   for (c = 0; c < FTT_DIMENSION; c++)
+     if (c != r->proj->c && ((&p.x)[c] < (&q.x)[c] - h || (&p.x)[c] > (&q.x)[c] + h))
+       return FALSE;
+   return TRUE;
+ }
+ 
+ static void update_maxlevel (FttCell * cell, int * maxlevel)
+ {
+   int level = ftt_cell_level (cell);
+   if (level > *maxlevel)
+     *maxlevel = level;
+ }
+ 
+ static void project_refine (FttCell * cell, ProjData * p)
+ {
+   int level = ftt_cell_level (cell), maxlevel = 0;
+   p->cell = cell;
+   gfs_domain_cell_traverse_condition (p->proj->domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, level + 1,
+ 				      (FttCellTraverseFunc) update_maxlevel, &maxlevel,
+ 				      overlap, p);
+   GFS_VALUE (cell, p->maxlevel) = maxlevel;
+   if (FTT_CELL_IS_LEAF (cell)) {
+     if (maxlevel > level) {
+       ftt_cell_refine_single (cell, 
+ 			      GFS_DOMAIN (p->proj)->cell_init, 
+ 			      GFS_DOMAIN (p->proj)->cell_init_data);
+       ftt_cell_flatten (cell, 2*p->proj->c, (FttCellCleanupFunc) gfs_cell_cleanup, p->proj);
+     }
+   }
+   else
+     ftt_cell_flatten (cell, 2*p->proj->c, (FttCellCleanupFunc) gfs_cell_cleanup, p->proj);
+ }
+ 
+ static gboolean finer (FttCell * cell, ProjData * p)
+ {
+   int level = ftt_cell_level (cell);
+   g_assert (level >= GFS_VALUE (cell, p->maxlevel));
+   return (level > GFS_VALUE (cell, p->maxlevel));
+ }
+ 
+ static void project_coarsen_box (GfsBox * box, ProjData * p)
+ {
+   ftt_cell_coarsen (box->root,
+ 		    (FttCellCoarsenFunc) finer, p,
+ 		    (FttCellCleanupFunc) gfs_cell_cleanup, p->proj);
+ }
+ 
+ /**
+  * gfs_domain_projection_reshape:
+  * @proj: a #GfsDomainProjection.
+  *
+  * Updates the mesh for projection @proj.
+  */
+ void gfs_domain_projection_reshape (GfsDomainProjection * proj)
+ {
+   g_return_if_fail (proj != NULL);
+ 
+   ProjData p = { proj };
+   GfsDomain * domain = GFS_DOMAIN (proj);
+   p.maxlevel = gfs_temporary_variable (domain);
+   gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			    (FttCellTraverseFunc) project_refine, &p);
+   gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) project_coarsen_box, &p);
+   gts_object_destroy (GTS_OBJECT (p.maxlevel));
+   gfs_domain_reshape (domain, gfs_domain_depth (domain));
+ }
+ 
+ /**
+  * gfs_domain_projection_new:
+  * @domain: a #GfsDomain.
+  * @c: the component aligned with the projection direction.
+  *
+  * Returns: a new #GfsDomainProjection, projection of @domain along @c.
+  */
+ GfsDomainProjection * gfs_domain_projection_new (GfsDomain * domain,
+ 						 FttComponent c)
+ {
+   g_return_val_if_fail (domain != NULL, NULL);
+   g_return_val_if_fail (c < FTT_DIMENSION, NULL);
+ 
+   /* clone domain */
+   char * buf;
+   size_t len;
+   FILE * f = open_memstream (&buf, &len);
+   if (f == NULL)
+     g_error ("gfs_domain_projection_new(): could not open_memstream:\n%s", strerror (errno));
+   gint depth = domain->max_depth_write;
+   domain->max_depth_write = -2; /* no variables, no cells */
+   GtsObjectClass * klass = GTS_OBJECT (domain)->klass;
+   GTS_OBJECT (domain)->klass = GTS_OBJECT_CLASS (gfs_domain_projection_class ());
+   gts_graph_write (GTS_GRAPH (domain), f);
+   GTS_OBJECT (domain)->klass = klass;
+   domain->max_depth_write = depth;
+   fclose (f);
+ 
+   GtsFile * fp = gts_file_new_from_buffer (buf, len);
+   GfsDomainProjection * proj = GFS_DOMAIN_PROJECTION (gfs_domain_read (fp));
+   if (fp->type == GTS_ERROR)
+     g_error ("gfs_domain_projection_new:\n%d:%d:%s", fp->line, fp->pos, fp->error);
+   gts_file_destroy (fp);
+   free (buf);
+   gfs_clock_start (GFS_DOMAIN (proj)->timer);
+ 
+   /* project domain */
+   proj->c = c;
+   proj->domain = domain;
+   domain->projections = g_slist_prepend (domain->projections, proj);
+   gfs_domain_projection_reshape (proj);
+ 
+   return proj;
+ }
+ 
+ typedef struct {
+   GfsDomainProjection * proj;
+   FttCell * cell;
+   GfsProjectionTraverseFunc func;
+   gpointer data;
+ } ProjectionTraverse;
+ 
+ static void apply_func (FttCell * cell, ProjectionTraverse * p)
+ {
+   (* p->func) (p->cell, cell, p->data);
+ }
+ 
+ static void traverse_overlapping (FttCell * cell, ProjectionTraverse * p)
+ {
+   p->cell = cell;
+   gfs_domain_cell_traverse_condition (p->proj->domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, 
+ 				      ftt_cell_level (cell),
+ 				      (FttCellTraverseFunc) apply_func, p,
+ 				      overlap, p);
+ }
+ 
+ /**
+  * gfs_domain_projection_traverse:
+  * @domain: a #GfsDomainProjection.
+  * @order: the order in which the cells are visited - %FTT_PRE_ORDER,
+  * %FTT_POST_ORDER. 
+  * @flags: which types of children are to be visited.
+  * @max_depth: the maximum depth of the traversal. Cells below this
+  * depth will not be traversed. If @max_depth is -1 all cells in the
+  * tree are visited.
+  * @func: the function to call for each visited #FttCell.
+  * @data: user data to pass to @func.
+  *
+  * For each cell of @domain defined by the traversal flags, traverses
+  * all the overlapping leaf cells of its parent domain.
+  */
+ void gfs_domain_projection_traverse (GfsDomainProjection * domain,
+ 				     FttTraverseType order,
+ 				     FttTraverseFlags flags,
+ 				     gint max_depth,
+ 				     GfsProjectionTraverseFunc func,
+ 				     gpointer data)
+ {
+   g_return_if_fail (domain != NULL);
+   g_return_if_fail (func != NULL);
+ 
+   ProjectionTraverse p = { domain, NULL, func, data };
+   gfs_domain_cell_traverse (GFS_DOMAIN (domain), order, flags, max_depth,
+ 			    (FttCellTraverseFunc) traverse_overlapping, &p);
+ }
+ 
+ /** \endobject{GfsDomainProjection} */
++>>>>>>> upstream/20131206+dfsg
diff --cc src/domain.h
index 8c28c17,1cd9ee3..99ebbfd
--- a/src/domain.h
+++ b/src/domain.h
@@@ -78,9 -94,20 +94,26 @@@ struct _GfsDomain 
    gpointer metric_data;
    gdouble (* face_metric)       (const GfsDomain *, const FttCellFace *);
    gdouble (* cell_metric)       (const GfsDomain *, const FttCell *);
++<<<<<<< HEAD
 +  gdouble (* solid_metric)      (const GfsDomain *, const FttCell *);
 +  gdouble (* scale_metric)      (const GfsDomain *, const FttCell *, FttComponent);
 +  gdouble (* face_scale_metric) (const GfsDomain *, const FttCellFace *, FttComponent);
++=======
+   void    (* solid_metric)      (const GfsDomain *, const FttCell *, FttVector *);
+   gdouble (* scale_metric)      (const GfsDomain *, const FttCell *, FttComponent);
+   gdouble (* face_scale_metric) (const GfsDomain *, const FttCellFace *, FttComponent);
+   gdouble (* viscous_metric_implicit)    (const GfsDomain * domain, 
+ 					  FttCell * cell,
+ 					  FttComponent component);
+   gdouble (* viscous_metric_explicit)    (const GfsDomain * domain, 
+ 					  FttCell * cell,
+ 					  GfsVariable * v,
+ 					  GfsDiffusion * d);
+   void    (* advection_metric)           (const GfsDomain * domain, 
+ 					  FttCell * cell,
+ 					  FttComponent c1,
+ 					  gdouble m[2]);
++>>>>>>> upstream/20131206+dfsg
  
    /* Object hash table for (optional) object IDs */
    GHashTable * objects;
@@@ -90,6 -117,15 +123,18 @@@
  
    /* real time */
    GTimer * clock;
++<<<<<<< HEAD
++=======
+ 
+   GPtrArray * sorted; /**< array of sorted boxes */
+   gboolean dirty;     /**< whether the sorted array needs updating */
+ 
+   GSList * projections; /**< list of GfsDomainProjection associated with this domain */
+ 
+   gboolean has_rotated_bc; /**< whether the domain uses "rotated" edges */
+ 
+   void (* traverse_layers) (GfsDomain *, FttCellTraverseFunc, gpointer);
++>>>>>>> upstream/20131206+dfsg
  };
  
  struct _GfsDomainClass {
@@@ -416,32 -462,32 +471,60 @@@ gdouble gfs_domain_cell_fraction (cons
   * gfs_domain_solid_metric:
   * @domain; a #GfsDomain.
   * @cell: a mixed #FttCell.
+  * @m: a #FttVector.
   *
++<<<<<<< HEAD
 + * Returns: the coordinate metric at the center of area of the solid
 + * surface contained within @cell.
 + */
 +static inline
 +gdouble gfs_domain_solid_metric (const GfsDomain * domain, const FttCell * cell)
 +{
 +  if (domain->solid_metric)
 +    return (* domain->solid_metric) (domain, cell);
 +  return 1.;
 +}
 +
 +/**
 + * gfs_domain_face_scale_metric:
 + * @domain; a #GfsDomain.
 + * @face: a #FttCellFace.
 + * @c: a #FttComponent.
 + *
 + * Returns: the @c component of the scale factor of the metric at the
 + * center the face.
 + */
 +static inline
 +gdouble gfs_domain_face_scale_metric (const GfsDomain * domain, 
 +				      const FttCellFace * face, 
 +				      FttComponent c)
 +{
++=======
+  * Fills @m with the components of the coordinate metric at the center
+  * of area of the solid surface contained within @cell.
+  */
+ static inline
+ void gfs_domain_solid_metric (const GfsDomain * domain, const FttCell * cell, FttVector * m)
+ {
+   if (domain->solid_metric)
+     (* domain->solid_metric) (domain, cell, m);
+ }
+ 
+ /**
+  * gfs_domain_face_scale_metric:
+  * @domain; a #GfsDomain.
+  * @face: a #FttCellFace.
+  * @c: a #FttComponent.
+  *
+  * Returns: the @c component of the scale factor of the metric at the
+  * center of the face.
+  */
+ static inline
+ gdouble gfs_domain_face_scale_metric (const GfsDomain * domain, 
+ 				      const FttCellFace * face, 
+ 				      FttComponent c)
+ {
++>>>>>>> upstream/20131206+dfsg
    if (domain->face_scale_metric)
      return (* domain->face_scale_metric) (domain, face, c);
    return 1.;
@@@ -464,6 -510,37 +547,40 @@@ gdouble gfs_cell_volume (const FttCell 
  GtsObject * gfs_object_from_name        (GfsDomain * domain, 
  					 const gchar * name);
  
++<<<<<<< HEAD
++=======
+ /* GfsDomainProjection: Header */
+ 
+ typedef struct _GfsDomainProjection GfsDomainProjection;
+ 
+ struct _GfsDomainProjection {
+   /*< private >*/
+   GfsDomain parent;
+   
+   /*< public >*/
+   GfsDomain * domain;
+   FttComponent c;
+ };
+ 
+ #define GFS_DOMAIN_PROJECTION(obj)            GTS_OBJECT_CAST (obj,\
+ 					           GfsDomainProjection,\
+ 					           gfs_domain_projection_class ())
+ 
+ GfsDomainClass *      gfs_domain_projection_class    (void);
+ GfsDomainProjection * gfs_domain_projection_new      (GfsDomain * domain,
+ 						      FttComponent c);
+ void                  gfs_domain_projection_reshape  (GfsDomainProjection * proj);
+ typedef void       (* GfsProjectionTraverseFunc)     (FttCell * cell, 
+ 						      FttCell * proj, 
+ 						      gpointer data);
+ void                  gfs_domain_projection_traverse (GfsDomainProjection * domain,
+ 						      FttTraverseType order,
+ 						      FttTraverseFlags flags,
+ 						      gint max_depth,
+ 						      GfsProjectionTraverseFunc func,
+ 						      gpointer data);
+ 
++>>>>>>> upstream/20131206+dfsg
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
diff --cc src/event.c
index 07f6e73,4d9725f..f825c93
--- a/src/event.c
+++ b/src/event.c
@@@ -668,11 -718,16 +718,24 @@@ static gboolean gfs_init_event (GfsEven
      while (i) {
        VarFunc * vf = i->data;
        gfs_catch_floating_point_exceptions ();
++<<<<<<< HEAD
 +      gfs_domain_cell_traverse (GFS_DOMAIN (sim), FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +				(FttCellTraverseFunc) init_vf, vf);
 +      gfs_restore_fpe_for_function (vf->f);
 +      if (vf->v->component == FTT_DIMENSION)
 +	gfs_domain_bc (GFS_DOMAIN (sim), FTT_TRAVERSE_LEAFS, -1, vf->v);
++=======
+       /* fixme: the check for "layered" variables is messy */
+       if (!gfs_char_in_string (vf->v[0]->name[strlen (vf->v[0]->name) - 1], "0123456789"))
+ 	gfs_domain_traverse_layers (GFS_DOMAIN (sim), (FttCellTraverseFunc) 
+ 				    (vf->n == 1 ? init_scalar : init_vector), vf);
+       else
+ 	gfs_domain_traverse_leaves (GFS_DOMAIN (sim), (FttCellTraverseFunc) 
+ 				    (vf->n == 1 ? init_scalar : init_vector), vf);
+       gfs_restore_fpe_for_function (vf->f[0]);
+       if (vf->v[0]->component == FTT_DIMENSION)
+ 	gfs_domain_bc (GFS_DOMAIN (sim), FTT_TRAVERSE_LEAFS, -1, vf->v[0]);
++>>>>>>> upstream/20131206+dfsg
        i = i->next;
      }
      /* boundary conditions for vector quantities need to be called in
@@@ -681,8 -736,10 +744,15 @@@
      i = GFS_INIT (event)->f;
      while (i) {
        VarFunc * vf = i->data;
++<<<<<<< HEAD
 +      if (vf->v->component < FTT_DIMENSION)
 +	gfs_domain_bc (GFS_DOMAIN (sim), FTT_TRAVERSE_LEAFS, -1, vf->v);
++=======
+       gint j;
+       for (j = 0; j < vf->n; j++)
+ 	if (vf->v[j]->component < FTT_DIMENSION)
+ 	  gfs_domain_bc (GFS_DOMAIN (sim), FTT_TRAVERSE_LEAFS, -1, vf->v[j]);
++>>>>>>> upstream/20131206+dfsg
        i = i->next;
      }
      return TRUE;
@@@ -971,7 -1028,7 +1041,11 @@@ static void stream_from_vorticity (GfsD
    g_return_if_fail (domain != NULL);
  
    dia = gfs_temporary_variable (domain);
++<<<<<<< HEAD
 +  gfs_poisson_coefficients (domain, NULL, TRUE, TRUE);
++=======
+   gfs_poisson_coefficients (domain, NULL, TRUE, TRUE, TRUE);
++>>>>>>> upstream/20131206+dfsg
    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
  			    (FttCellTraverseFunc) gfs_cell_reset, dia);
    correct_div (domain, vorticity); /* enforce solvability condition */
@@@ -1167,9 -1223,7 +1240,13 @@@ static gboolean gfs_event_sum_event (Gf
      else {
        s->dt = sim->time.t - s->last;
        gfs_catch_floating_point_exceptions ();
++<<<<<<< HEAD
 +      gfs_domain_cell_traverse (GFS_DOMAIN (sim),
 +				FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +				s->sum, s);
++=======
+       gfs_domain_traverse_layers (GFS_DOMAIN (sim), s->sum, s);
++>>>>>>> upstream/20131206+dfsg
        gfs_restore_fpe_for_function (s->v);
      }
      s->last = sim->time.t;
@@@ -1878,14 -1932,11 +1955,21 @@@ FILE * gfs_popen (GfsSimulation * sim, 
  {
    g_return_val_if_fail (command != NULL, NULL);
    g_return_val_if_fail (type != NULL, NULL);
++<<<<<<< HEAD
 +  
 +  gchar sname[] = "/tmp/gfsXXXXXX";
 +  if (!mktemp (sname)) {
 +    g_warning ("gfs_popen() cannot create unique temporary filename");
 +    return NULL;
 +  }
 +  if (mkfifo (sname, 0666)) {
++=======
+ 
+   gchar * sname = gfs_template ();
+   if (!gfs_mkftemp (sname)) {
++>>>>>>> upstream/20131206+dfsg
      g_warning ("gfs_popen() cannot create FIFO: %s", strerror (errno));
+     g_free (sname);
      return NULL;
    }
    /* When adding pre-defined shell variables please update this page:
@@@ -2097,7 -2149,7 +2182,11 @@@ static gboolean gfs_remove_droplets_eve
        gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
  				(FttCellTraverseFunc) compute_v, d);
        gfs_restore_fpe_for_function (d->fc);
++<<<<<<< HEAD
 +      gfs_domain_remove_droplets (domain, d->v, d->c, d->min);
++=======
+       gfs_domain_remove_droplets (domain, d->v, d->c, d->min, d->val);
++>>>>>>> upstream/20131206+dfsg
        gts_object_destroy (GTS_OBJECT (d->v));
      }
      return TRUE;
diff --cc src/fluid.c
index 1194b29,903af8f..f26372a
--- a/src/fluid.c
+++ b/src/fluid.c
@@@ -78,10 -78,10 +78,14 @@@ static gdouble average_neighbor_value (
      
      n = ftt_cell_children_direction (face->neighbor, od, &children);
      for (i = 0; i < n; i++)
++<<<<<<< HEAD
 +      if (children.c[i] && GFS_VARIABLE (children.c[i], v) != GFS_NODATA) {
++=======
+       if (children.c[i] && GFS_VALUEI (children.c[i], v) != GFS_NODATA) {
++>>>>>>> upstream/20131206+dfsg
  	gdouble w = GFS_IS_MIXED (children.c[i]) ? GFS_STATE (children.c[i])->solid->s[od] : 1.;
  	a += w;
- 	av += w*GFS_VARIABLE (children.c[i], v);
+ 	av += w*GFS_VALUEI (children.c[i], v);
        }
      if (a > 0.) {
        *x = 3./4.;
@@@ -367,7 -379,7 +383,11 @@@ gdouble gfs_neighbor_value (const FttCe
      /* neighbor at same level */
      return average_neighbor_value (face, v, x);
    else {
++<<<<<<< HEAD
 +    if (GFS_VARIABLE (face->neighbor, v) == GFS_NODATA)
++=======
+     if (GFS_VALUEI (face->neighbor, v) == GFS_NODATA)
++>>>>>>> upstream/20131206+dfsg
        return GFS_NODATA;
      /* neighbor at coarser level */
      dp = perpendicular[face->d][FTT_CELL_ID (face->cell)];
@@@ -525,9 -537,9 +545,15 @@@ gdouble gfs_center_van_leer_gradient (F
        /* two neighbors: second-order differencing (parabola)
  	 + van Leer limiter. See http://en.wikipedia.org/wiki/Flux_limiter */
        gdouble x1 = 1., x2 = 1., v0, v1, v2;      
++<<<<<<< HEAD
 +      v0 = GFS_VARIABLE (cell, v);
 +      v1 = neighbor_value (&f1, v, &x1);
 +      v2 = neighbor_value (&f2, v, &x2);
++=======
+       v0 = GFS_VALUEI (cell, v);
+       v1 = gfs_neighbor_value (&f1, v, &x1);
+       v2 = gfs_neighbor_value (&f2, v, &x2);
++>>>>>>> upstream/20131206+dfsg
        if (v1 == GFS_NODATA || v2 == GFS_NODATA)
  	return 0.;
  
@@@ -580,14 -592,14 +606,23 @@@ static gdouble center_limited_gradient 
    gdouble v0;
  
    f1 = gfs_cell_face (cell, FTT_OPPOSITE_DIRECTION (d));
++<<<<<<< HEAD
 +  v0 = GFS_VARIABLE (cell, v);
++=======
+   v0 = GFS_VALUEI (cell, v);
++>>>>>>> upstream/20131206+dfsg
    if (f1.neighbor) {
      FttCellFace f2 = gfs_cell_face (cell, d);
      if (f2.neighbor) {
        /* two neighbors */
        gdouble x1 = 1., v1, x2 = 1., v2;
++<<<<<<< HEAD
 +      v1 = neighbor_value (&f1, v, &x1);
 +      v2 = neighbor_value (&f2, v, &x2);
++=======
+       v1 = gfs_neighbor_value (&f1, v, &x1);
+       v2 = gfs_neighbor_value (&f2, v, &x2);
++>>>>>>> upstream/20131206+dfsg
  
        gdouble g;
        if (v0 == v1)
@@@ -619,10 -631,10 +654,17 @@@ gdouble gfs_center_minmod_gradient (Ftt
  {
    g_return_val_if_fail (cell != NULL, 0.);
    g_return_val_if_fail (c < FTT_DIMENSION, 0.);
++<<<<<<< HEAD
  
    return center_limited_gradient (cell, c, v, minmod_limiter);
  }
  
++=======
++
++  return center_limited_gradient (cell, c, v, minmod_limiter);
++}
++
++>>>>>>> upstream/20131206+dfsg
  /**
   * gfs_center_superbee_gradient:
   * @cell: a #FttCell.
@@@ -1704,28 -1710,14 +1740,39 @@@ gdouble gfs_cell_dirichlet_gradient_flu
    g_return_val_if_fail (lp != NULL, 0.);
    g_return_val_if_fail (stencil != NULL, 0.);
  
++<<<<<<< HEAD
 +  if (GFS_IS_MIXED (cell)) {
 +    GfsSolidVector * s = GFS_STATE (cell)->solid;
 +    FttVector g;
 +    FttVector w;
 +
 +    w.x = (s->s[1] - s->s[0])*s->v;
 +    w.y = (s->s[3] - s->s[2])*s->v;
 +#if FTT_2D
 +    w.z = 0.;
 +#else
 +    w.z = (s->s[5] - s->s[4])*s->v;
 +#endif
 +      
 +    gfs_cell_dirichlet_gradient_stencil (cell, max_level, v0, &g, lp, stencil, &w);
 +      
 +    return (g.x*(s->s[1] - s->s[0]) + g.y*(s->s[3] - s->s[2])
 +#if (!FTT_2D)
 +	    + g.z*(s->s[5] - s->s[4])
 +#endif
 +	    )*s->v;
 +  }
 +  return 0.;
++=======
+   if (!GFS_IS_MIXED (cell))
+     return 0.;
+   else {
+     GfsSolidVector * s = GFS_STATE (cell)->solid;
+     FttVector g;
+     gfs_cell_dirichlet_gradient_stencil (cell, max_level, v0, &g, lp, stencil, &s->v);
+     return g.x*s->v.x + g.y*s->v.y + g.z*s->v.z;
+   }
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
@@@ -1918,7 -1910,20 +1965,24 @@@ void gfs_cell_coarse_fine (FttCell * pa
        GFS_VALUE (child.c[2], v) += gx2 + gy2;
        GFS_VALUE (child.c[3], v) += gx1 + gy2;
  #else /* 3D */
++<<<<<<< HEAD
 +      g_assert_not_implemented ();
++=======
+       double gx1 = g.x*(a[0] + a[2])/sa, gx2 = - g.x*(a[1] + a[3])/sa;
+       double gx3 = g.x*(a[4] + a[6])/sa, gx4 = - g.x*(a[5] + a[7])/sa;
+       double gy1 = g.y*(a[2] + a[3])/sa, gy2 = - g.y*(a[0] + a[1])/sa;
+       double gy3 = g.y*(a[6] + a[7])/sa, gy4 = - g.y*(a[4] + a[5])/sa;
+       double gz1 = g.z*(a[2] + a[6])/sa, gz2 = - g.z*(a[0] + a[4])/sa;
+       double gz3 = g.z*(a[3] + a[7])/sa, gz4 = - g.z*(a[1] + a[5])/sa;
+       GFS_VALUE (child.c[0], v) += gx2 + gy1 + gz1;
+       GFS_VALUE (child.c[1], v) += gx1 + gy1 + gz1;
+       GFS_VALUE (child.c[2], v) += gx2 + gy2 + gz1;
+       GFS_VALUE (child.c[3], v) += gx1 + gy2 + gz1;
+       GFS_VALUE (child.c[4], v) += gx2 + gy1 + gz2;
+       GFS_VALUE (child.c[5], v) += gx1 + gy1 + gz2;
+       GFS_VALUE (child.c[6], v) += gx2 + gy2 + gz2;
+       GFS_VALUE (child.c[7], v) += gx1 + gy2 + gz2;
++>>>>>>> upstream/20131206+dfsg
  #endif /* 3D */
      }
      else
@@@ -2525,14 -2595,14 +2654,22 @@@ static FttDirection corner[8][FTT_DIMEN
   * @cell: a #FttCell containing location @p.
   * @v: a #GfsVariable.
   * @max_level: the maximum cell level to consider (-1 means no restriction).
++<<<<<<< HEAD
 + * @f: an array with the correct size (4*(FTT_DIMENSION - 1)).
++=======
+  * @f: an array with the correct size (4*(FTT_DIMENSION - 1) + 1).
++>>>>>>> upstream/20131206+dfsg
   *
   * Fills @f with the values of @v interpolated at the corners of @cell.
   */
  void gfs_cell_corner_values (FttCell * cell, 
  			     GfsVariable * v, 
  			     gint max_level,
++<<<<<<< HEAD
 +			     gdouble f[4*(FTT_DIMENSION - 1)])
++=======
+ 			     gdouble f[4*(FTT_DIMENSION - 1) + 1])
++>>>>>>> upstream/20131206+dfsg
  {
    g_return_if_fail (cell != NULL);
    g_return_if_fail (v != NULL);
@@@ -2541,6 -2611,7 +2678,10 @@@
    int i;
    for (i = 0; i < 4*(FTT_DIMENSION - 1); i++)
      f[i] = gfs_cell_corner_value (cell, corner[i], v, max_level);
++<<<<<<< HEAD
++=======
+   f[4*(FTT_DIMENSION - 1)] = GFS_VALUE (cell, v);
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
@@@ -2566,61 -2637,59 +2707,114 @@@ gdouble gfs_interpolate_from_corners (F
    p.x = (p.x - o.x)/size;
    p.y = (p.y - o.y)/size;
  #if FTT_2D
++<<<<<<< HEAD
 +  {
 +    gdouble a, b, c, d;
++=======
+   gdouble x = (p.x + p.y)/2., y = (p.y - p.x)/2., v = f[4];
+   if (x > 0.)
+     v += x*(f[2] - f[4]);
+   else
+     v -= x*(f[0] - f[4]);
+   if (y > 0.)
+     v += y*(f[3] - f[4]);
+   else
+     v -= y*(f[1] - f[4]);
+   return v;
+ #else  /* 3D */
+   gdouble c[8];
+   
+   p.z = (p.z - o.z)/size;
+   c[0] = - f[0] + f[1] + f[2] - f[3] - f[4] + f[5] + f[6] - f[7];
+   c[1] = - f[0] - f[1] + f[2] + f[3] - f[4] - f[5] + f[6] + f[7];
+   c[2] =   f[0] + f[1] + f[2] + f[3] - f[4] - f[5] - f[6] - f[7];
+   c[3] =   f[0] - f[1] + f[2] - f[3] + f[4] - f[5] + f[6] - f[7];
+   c[4] = - f[0] + f[1] + f[2] - f[3] + f[4] - f[5] - f[6] + f[7];
+   c[5] = - f[0] - f[1] + f[2] + f[3] + f[4] + f[5] - f[6] - f[7];
+   c[6] =   f[0] - f[1] + f[2] - f[3] - f[4] + f[5] - f[6] + f[7];
+   c[7] =   f[0] + f[1] + f[2] + f[3] + f[4] + f[5] + f[6] + f[7];
+ 
+   return (c[0]*p.x + c[1]*p.y + c[2]*p.z + 
+ 	  c[3]*p.x*p.y + c[4]*p.x*p.z + c[5]*p.y*p.z + 
+ 	  c[6]*p.x*p.y*p.z + 
+ 	  c[7])/8.;
+ #endif /* 3D */  
+ }
  
-     a = f[1] + f[2] - f[0] - f[3];
-     b = f[2] + f[3] - f[0] - f[1];
-     c = f[0] - f[1] + f[2] - f[3];
-     d = f[0] + f[1] + f[2] + f[3];
+ /**
+  * gfs_interpolate:
+  * @cell: a #FttCell containing location @p.
+  * @p: the location at which to interpolate.
+  * @v: a #GfsVariable.
+  *
+  * Interpolates the @v variable of @cell, at location @p. Linear
+  * interpolation is used and the boundaries of the domain are treated
+  * as planes of symmetry for all variables.
+  *
+  * Returns: the interpolated value of variable @v at location @p.
+  */
+ gdouble gfs_interpolate (FttCell * cell,
+ 			 FttVector p,
+ 			 GfsVariable * v)
+ {
+   g_return_val_if_fail (cell != NULL, 0.);
+   g_return_val_if_fail (v != NULL, 0.);
++>>>>>>> upstream/20131206+dfsg
++
++  if (GFS_VALUE (cell, v) == GFS_NODATA)
++    return GFS_NODATA;
 +
++<<<<<<< HEAD
 +    return (a*p.x + b*p.y + c*p.x*p.y + d)/4.;
 +  }
 +#else  /* 3D */
 +  {
 +    gdouble c[8];
 +    
 +    p.z = (p.z - o.z)/size;
 +    c[0] = - f[0] + f[1] + f[2] - f[3] - f[4] + f[5] + f[6] - f[7];
 +    c[1] = - f[0] - f[1] + f[2] + f[3] - f[4] - f[5] + f[6] + f[7];
 +    c[2] =   f[0] + f[1] + f[2] + f[3] - f[4] - f[5] - f[6] - f[7];
 +    c[3] =   f[0] - f[1] + f[2] - f[3] + f[4] - f[5] + f[6] - f[7];
 +    c[4] = - f[0] + f[1] + f[2] - f[3] + f[4] - f[5] - f[6] + f[7];
 +    c[5] = - f[0] - f[1] + f[2] + f[3] + f[4] + f[5] - f[6] - f[7];
 +    c[6] =   f[0] - f[1] + f[2] - f[3] - f[4] + f[5] - f[6] + f[7];
 +    c[7] =   f[0] + f[1] + f[2] + f[3] + f[4] + f[5] + f[6] + f[7];
 +
 +    return (c[0]*p.x + c[1]*p.y + c[2]*p.z + 
 +	    c[3]*p.x*p.y + c[4]*p.x*p.z + c[5]*p.y*p.z + 
 +	    c[6]*p.x*p.y*p.z + 
 +	    c[7])/8.;
 +  }
 +#endif /* 3D */  
 +}
 +
 +/**
 + * gfs_interpolate:
 + * @cell: a #FttCell containing location @p.
 + * @p: the location at which to interpolate.
 + * @v: a #GfsVariable.
 + *
 + * Interpolates the @v variable of @cell, at location @p. Linear
 + * interpolation is used and the boundaries of the domain are treated
 + * as planes of symmetry for all variables.
 + *
 + * Returns: the interpolated value of variable @v at location @p.
 + */
 +gdouble gfs_interpolate (FttCell * cell,
 +			 FttVector p,
 +			 GfsVariable * v)
 +{
 +  g_return_val_if_fail (cell != NULL, 0.);
 +  g_return_val_if_fail (v != NULL, 0.);
  
    if (GFS_VALUE (cell, v) == GFS_NODATA)
      return GFS_NODATA;
  
 +  gdouble f[4*(FTT_DIMENSION - 1)];
++=======
+   gdouble f[4*(FTT_DIMENSION - 1) + 1];
++>>>>>>> upstream/20131206+dfsg
    gfs_cell_corner_values (cell, v, -1, f);
    return gfs_interpolate_from_corners (cell, p, f);
  }
diff --cc src/ftt.h
index 36bc167,43df7fb..f70fb2a
--- a/src/ftt.h
+++ b/src/ftt.h
@@@ -29,10 -29,8 +29,13 @@@
  extern "C" {
  #endif /* __cplusplus */
  
- #include "gfsconfig.h"
+ #define FTT_MAINTAINER "s.popinet at gmail.com"
  
++<<<<<<< HEAD
 +#define FTT_MAINTAINER "s.popinet at niwa.co.nz"
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  #if FTT_2D
  # define FTT_CELLS     4
  #else  /* FTT_3D */
diff --cc src/function.h
index 052c7a7,9ef8efb..af188e9
--- a/src/function.h
+++ b/src/function.h
@@@ -141,11 -161,48 +161,55 @@@ static double flux (const gchar * name
    if ((_cell->flags & GFS_FLAG_DIRICHLET) == 0)
      flux = GFS_STATE (_cell)->solid->fv;
    else {
++<<<<<<< HEAD
 +    GFS_STATE (_cell)->solid->v = 1.;
++=======
+     GfsSolidVector * s = GFS_STATE (_cell)->solid;
+     FttVector m = {1.,1.,1.};
+     gfs_domain_solid_metric (GFS_DOMAIN (_sim), _cell, &m);
+     FttComponent c;
+     for (c = 0; c < FTT_DIMENSION; c++)
+       (&s->v.x)[c] = (&m.x)[c]*(s->s[2*c + 1] - s->s[2*c]);
++>>>>>>> upstream/20131206+dfsg
      flux = gfs_cell_dirichlet_gradient_flux (_cell, v->i, -1, GFS_STATE (_cell)->solid->fv);
    }
    return gfs_dimensional_value (v, flux*pow (_sim->physical_params.L*ftt_cell_size (_cell), 
  					     FTT_DIMENSION - 2.));
  }
  
++<<<<<<< HEAD
++=======
+ static gboolean overlaps (double x1, double y1, double x2, double y2)
+ {
+   double h = ftt_cell_size (_cell)/2.;
+   FttVector p, min = { G_MAXDOUBLE, G_MAXDOUBLE }, max = { -G_MAXDOUBLE, -G_MAXDOUBLE };
+   ftt_cell_pos (_cell, &p);
+   FttVector q[4];
+   q[0] = p; q[0].x += h; q[0].y += h; 
+   q[1] = p; q[1].x -= h; q[1].y += h; 
+   q[2] = p; q[2].x -= h; q[2].y -= h; 
+   q[3] = p; q[3].x += h; q[3].y -= h; 
+   gfs_simulation_map_inverse_cell (_sim, q);
+   int i;
+   for (i = 0; i < 4; i++) {
+     if (q[i].x < min.x) min.x = q[i].x;
+     if (q[i].y < min.y) min.y = q[i].y;
+     if (q[i].x > max.x) max.x = q[i].x;
+     if (q[i].y > max.y) max.y = q[i].y;
+   }
+   return (min.x <= x2 && min.y <= y2 && max.x >= x1 && max.y >= y1);
+ }
+ 
+ static double mapv (double u, double v, FttComponent c) {
+   FttVector p, q = {u, v, 0.};
+   g_return_val_if_fail (_cell != NULL, 0.);
+   ftt_cell_pos (_cell, &p);
+   gfs_simulation_map_inverse_vector (_sim, &p, &q);
+   return (&q.x)[c];
+ }
+ 
+ static double mapvx (double u, double v) { return mapv (u, v, FTT_X); }
+ static double mapvy (double u, double v) { return mapv (u, v, FTT_Y); }
+ 
++>>>>>>> upstream/20131206+dfsg
  #endif /* __FUNCTION_H__ */
diff --cc src/gerris.c
index 1a13d2a,859b09c..ef2a409
--- a/src/gerris.c
+++ b/src/gerris.c
@@@ -48,7 -49,7 +49,11 @@@ static void setup_binary_IO (GfsDomain 
    domain->variables_io = NULL;
    GSList * i = domain->variables;
    while (i) {
++<<<<<<< HEAD
 +    if (GFS_VARIABLE1 (i->data)->name)
++=======
+     if (GFS_VARIABLE (i->data)->name)
++>>>>>>> upstream/20131206+dfsg
        domain->variables_io = g_slist_append (domain->variables_io, i->data);
      i = i->next;
    }
@@@ -74,7 -75,7 +79,11 @@@ int main (int argc, char * argv[]
    guint split = 0;
    guint npart = 0;
    gboolean profile = FALSE, macros = FALSE, one_box_per_pe = TRUE, bubble = FALSE, verbose = FALSE;
++<<<<<<< HEAD
 +  gchar * m4_options = g_strdup ("-P");
++=======
+   gchar * m4_options = g_strdup (M4_OPTIONS);
++>>>>>>> upstream/20131206+dfsg
    GPtrArray * events = g_ptr_array_new ();
    gint maxlevel = -2;
  
@@@ -94,16 -95,17 +103,27 @@@
        {"data", no_argument, NULL, 'd'},
        {"event", required_argument, NULL, 'e'},
        {"bubble", required_argument, NULL, 'b'},
++<<<<<<< HEAD
++=======
+       {"debug", no_argument, NULL, 'B'},
++>>>>>>> upstream/20131206+dfsg
        {"verbose", no_argument, NULL, 'v'},
        {"help", no_argument, NULL, 'h'},
        {"version", no_argument, NULL, 'V'},
        { NULL }
      };
      int option_index = 0;
++<<<<<<< HEAD
 +    switch ((c = getopt_long (argc, argv, "hVs:ip:PD:I:mde:b:v",
 +			      long_options, &option_index))) {
 +#else /* not HAVE_GETOPT_LONG */
 +    switch ((c = getopt (argc, argv, "hVs:ip:PD:I:mde:b:v"))) {
++=======
+     switch ((c = getopt_long (argc, argv, "hVs:ip:PD:I:mde:b:vB",
+ 			      long_options, &option_index))) {
+ #else /* not HAVE_GETOPT_LONG */
+     switch ((c = getopt (argc, argv, "hVs:ip:PD:I:mde:b:vB"))) {
++>>>>>>> upstream/20131206+dfsg
  #endif /* not HAVE_GETOPT_LONG */
      case 'P': /* profile */
        profile = TRUE;
@@@ -150,72 -152,83 +170,150 @@@
      case 'e': /* event */
        g_ptr_array_add (events, g_strdup (optarg));
        break;
++<<<<<<< HEAD
 +    case 'v': /* verbose */
 +      verbose = TRUE;
 +      break;
 +    case 'h': /* help */
 +      gfs_error (0,
 +             "Usage: gerris [OPTION] FILE\n"
 +	     "The Gerris flow solver simulation engine.\n"
 +	     "\n"
 +	     "  -s N   --split=N     splits the domain N times and returns\n"
 +             "                       the corresponding simulation\n"
 +	     "  -i     --pid         keep box pids when splitting\n"
 +             "  -p N   --partition=N partition the domain in 2^N subdomains and returns\n" 
 +             "                       the corresponding simulation\n"
 +             "  -b N   --bubble=N    partition the domain in N subdomains and returns\n" 
 +             "                       the corresponding simulation\n"
 +	     "  -d     --data        when splitting or partitioning, output all data\n"
 +	     "  -P     --profile     profiles calls to boundary conditions\n"
 +#ifdef HAVE_M4
 +	     "  -m     --macros      Turn macros support on\n"
 +	     "  -DNAME               Defines NAME as a macro expanding to VALUE\n"
 +	     "  -DNAME=VALUE         (macro support is implicitly turned on)\n"
 +	     "         --define=NAME\n"
 +             "         --define=NAME=VALUE\n"
 +	     "  -IDIR --include=DIR  Append DIR to macro include path\n"
 +#endif /* HAVE_M4 */
 +	     "  -eEV   --event=EV    Evaluates GfsEvent EV and returns the simulation\n"
 +	     "  -v     --verbose     Display more messages\n"
 +	     "  -h     --help        display this help and exit\n"
 +	     "  -V     --version     output version information and exit\n"
 +	     "\n"
 +	     "Reports bugs to %s\n",
 +	     FTT_MAINTAINER);
 +      return 0; /* success */
 +      break;
 +    case 'V': /* version */
 +      gfs_error (0,
 +	       "gerris: using %dD libgfs version %s (%s)\n"
 +	       "  compiled with flags: %s\n"
 +	       "  MPI:          %s\n"
 +	       "  pkg-config:   %s\n"
 +	       "  m4 and gawk:  %s\n"
 +	       "Copyright (C) 2001-2010 NIWA.\n"
 +	       "This is free software; see the source for copying conditions.  There is NO\n"
 +	       "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
 +	       FTT_DIMENSION,
 +	       GFS_VERSION,
 +	       GFS_BUILD_VERSION,
 +	       GFS_COMPILATION_FLAGS,
 +#ifdef HAVE_MPI
 +	       "yes",
 +#else
 +	       "no",
 +#endif
 +#ifdef HAVE_PKG_CONFIG
 +	       "yes",
 +#else
 +	       "no",
 +#endif
 +#ifdef HAVE_M4
 +	       "yes"
 +#else
 +	       "no"
 +#endif
 +	       );
++=======
+     case 'B': /* debug */
+       gfs_debug_enabled (TRUE);
+       break;
+     case 'v': /* verbose */
+       verbose = TRUE;
+       break;
+     case 'h': { /* help */
+       gchar * usage = 
+ 	"Usage: gerris [OPTION] FILE\n"
+ 	"The Gerris flow solver simulation engine.\n"
+ 	"\n"
+ 	"  -s N   --split=N     splits the domain N times and returns\n"
+ 	"                       the corresponding simulation\n"
+ 	"  -i     --pid         keep box pids when splitting\n"
+ 	"  -p N   --partition=N partition the domain in 2^N subdomains and returns\n" 
+ 	"                       the corresponding simulation\n"
+ 	"  -b N   --bubble=N    partition the domain in N subdomains and returns\n" 
+ 	"                       the corresponding simulation\n"
+ 	"  -d     --data        when splitting or partitioning, output all data\n"
+ 	"  -P     --profile     profiles calls to boundary conditions\n"
+ #ifdef HAVE_M4
+ 	"  -m     --macros      Turn macros support on\n"
+ 	"  -DNAME               Defines NAME as a macro expanding to VALUE\n"
+ 	"  -DNAME=VALUE         (macro support is implicitly turned on)\n"
+ 	"         --define=NAME\n"
+ 	"         --define=NAME=VALUE\n"
+ 	"  -IDIR --include=DIR  Append DIR to macro include path\n"
+ #endif /* HAVE_M4 */
+ 	"  -eEV   --event=EV    Evaluates GfsEvent EV and returns the simulation\n"
+ 	"  -B     --debug       Enables debugging messages\n"
+ 	"  -v     --verbose     Display more messages\n"
+ 	"  -h     --help        display this help and exit\n"
+ 	"  -V     --version     output version information and exit\n"
+ 	"\n"
+ 	"Reports bugs to %s\n";
+       gfs_error (0, usage, FTT_MAINTAINER);
+       return 0; /* success */
+       break;
+     }
+     case 'V': { /* version */
+       gchar * mpi = 
+ #ifdef HAVE_MPI
+ 	"yes";
+ #else
+         "no";
+ #endif
+       gchar * pkgconfig =
+ #ifdef HAVE_PKG_CONFIG
+ 	"yes";
+ #else
+         "no";
+ #endif
+       gchar * m4 =
+ #ifdef HAVE_M4
+ 	"yes";
+ #else
+         "no";
+ #endif
+       gfs_error (0,
+ 		 "gerris: using %dD libgfs version %s (%s)\n"
+ 		 "  compiled with flags: %s\n"
+ 		 "  MPI:          %s\n"
+ 		 "  pkg-config:   %s\n"
+ 		 "  m4:           %s\n"
+ 		 "Copyright (C) 2001-2011 NIWA.\n"
+ 		 "This is free software; see the source for copying conditions.  There is NO\n"
+ 		 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
+ 		 FTT_DIMENSION,
+ 		 GFS_VERSION,
+ 		 GFS_BUILD_VERSION,
+ 		 GFS_COMPILATION_FLAGS,
+ 		 mpi,
+ 		 pkgconfig,
+ 		 m4);
++>>>>>>> upstream/20131206+dfsg
        return 0; /* succes */
        break;
+     }
      case '?': /* wrong options */
        gfs_error (0, "Try `gerris --help' for more information.\n");
        return 1; /* failure */
@@@ -230,9 -243,12 +328,16 @@@
    }
  
    if (macros) {
++<<<<<<< HEAD
 +    const gchar awk[] = "gawk -f " GFS_MODULES_DIR "/m4.awk ";
++=======
+     gchar * awk = g_strconcat ("awk -v prefix=",
+ 			       strstr (m4_options, "-P") ? "m4_" : "",
+ 			       " -f ", GFS_DATA_DIR, "/m4.awk ", 
+ 			       NULL);
++>>>>>>> upstream/20131206+dfsg
      gchar * command;
-     
+ 
      if (!strcmp (argv[optind], "-"))
        command = g_strjoin (NULL, awk, "| m4 ", m4_options, NULL);
      else
@@@ -331,7 -348,7 +437,11 @@@
      domain->pid = pid;
    }
  
++<<<<<<< HEAD
 +  if (npart > 1) {
++=======
+   if ((bubble && npart > 1) || (!bubble && npart > 0)) {
++>>>>>>> upstream/20131206+dfsg
      guint nmin = 1000;
      guint mmax = 10000;
      guint ntry = 10000;
@@@ -384,9 -401,10 +494,16 @@@
        
      if (domain->pid >= 0) { /* we are running a parallel job */
        /* write partitioned simulation in a temporary file */
++<<<<<<< HEAD
 +      gchar partname[] = "/tmp/gfspartXXXXXX";
 +      gint fd = mkstemp (partname);
 +      remove (partname);
++=======
+       gchar * partname = gfs_template ();
+       gint fd = g_mkstemp (partname);
+       remove (partname);
+       g_free (partname);
++>>>>>>> upstream/20131206+dfsg
        FILE * fptr = fdopen (fd, "w+");
        gfs_simulation_write (simulation, maxlevel, fptr);
        gts_object_destroy (GTS_OBJECT (simulation));
@@@ -448,6 -466,16 +565,19 @@@
        l = g_slist_append (l, object);
        gts_file_destroy (fp);
      }
++<<<<<<< HEAD
++=======
+     GtsFile * fp = gts_file_new_from_string ("");
+     gfs_pending_functions_compilation (fp);
+     if (fp->type == GTS_ERROR) {
+       gfs_error (-1,
+ 		 "gerris: invalid event\n"
+ 		 "%d:%d: %s\n",
+ 		 fp->line, fp->pos, fp->error);
+       return 1;
+     }
+     gts_file_destroy (fp);
++>>>>>>> upstream/20131206+dfsg
      gfs_clock_start (domain->timer);
      GSList * j = domain->variables;
      while (j) {
diff --cc src/graphic.c
index 8a1ff88,074d53f..60f2fbc
--- a/src/graphic.c
+++ b/src/graphic.c
@@@ -703,24 -703,20 +703,39 @@@ void gfs_write_ppm (GfsDomain * domain
  
  typedef struct {
    FttVector min;
++<<<<<<< HEAD
 +  guint width, height, size;
 +  gfloat * buf, ** data;
 +  gdouble xll, yll, cellsize;
 +} Grid;
 +
 +static Grid * grid_new (FttVector min, FttVector max, guint size, 
 +			gdouble xc, gdouble yc, gdouble length)
++=======
+   gdouble cellsize;
+   guint width, height;
+   gfloat * buf, ** data;
+ } Grid;
+ 
+ static Grid * grid_new (FttVector min, FttVector max, FttVector step) 
++>>>>>>> upstream/20131206+dfsg
  {
    Grid * im = g_malloc0 (sizeof (Grid));
    guint i;
  
    im->min = min;
++<<<<<<< HEAD
 +  im->size = size;
 +  im->cellsize = length/size;
 +  im->width = (max.x - min.x)*size;
 +  im->height = (max.y - min.y)*size;
 +  im->xll = xc + min.x*length;
 +  im->yll = yc + min.y*length;
++=======
+   im->cellsize = MIN (step.x, step.y);
+   im->width = (max.x - min.x)/im->cellsize;
+   im->height = (max.y - min.y)/im->cellsize;
++>>>>>>> upstream/20131206+dfsg
    im->buf = g_malloc (sizeof (gfloat)*im->width*im->height);
    for (i = 0; i < im->height*im->width; i++)
      im->buf[i] = NODATA;
@@@ -740,7 -736,7 +755,11 @@@ static void grid_write (Grid * im, FIL
  	   "cellsize\t%.10f\n"
  	   "nodata_value\t%d\n",
  	   im->width, im->height, 
++<<<<<<< HEAD
 +	   im->xll, im->yll, im->cellsize,
++=======
+ 	   im->min.x, im->min.y, im->cellsize,
++>>>>>>> upstream/20131206+dfsg
  	   NODATA);
    guint i, j;
    for (i = 0; i < im->height; i++)
@@@ -755,110 -751,93 +774,194 @@@ static void grid_destroy (Grid * im
    g_free (im);
  }
  
++<<<<<<< HEAD
 +static void grid_draw_square (Grid * im,
 +			      FttVector * p1, FttVector * p2,
 +			      gfloat c)
 +{
 +  gint i1, j1, i2, j2, i, j;
 +
 +  i1 = (p1->x - im->min.x)*im->size;
 +  i2 = (p2->x - im->min.x)*im->size;
 +  j1 = (p1->y - im->min.y)*im->size;
 +  j2 = (p2->y - im->min.y)*im->size;
 +
 +  j1 = im->height - 1 - j1;
 +  j2 = im->height - 1 - j2;
 +  for (i = i1; i <= i2; i++)
 +    for (j = j2; j <= j1; j++) 
 +      if (i >= 0 && i < im->width && j >= 0 && j < im->height)
 +	im->data[j][i] = c;
 +}
 +
 +static void write_grid_square (FttCell * cell, gpointer * data)
 +{
 +  GfsVariable * v = data[3];
 +  Grid * grid = data[4];
 +  FttVector * lambda = data[5];
 +  FttVector p;
 +  gdouble size = ftt_cell_size (cell)/2.;
 +  FttVector p1, p2;
 +
 +  ftt_cell_pos (cell, &p);
 +  p1.x = (p.x - size)/lambda->x + 1e-9;
 +  p1.y = (p.y - size)/lambda->y + 1e-9;
 +  p2.x = (p.x + size)/lambda->x - 1e-9;
 +  p2.y = (p.y + size)/lambda->y - 1e-9;
 +  grid_draw_square (grid, &p1, &p2, GFS_HAS_DATA (cell, v) ? GFS_VALUE (cell, v) : NODATA);
 +}
 +
 +void gfs_write_grd (GfsDomain * domain, 
 +		    GfsFunction * condition,
 +		    GfsVariable * v,
 +		    gdouble xc, gdouble yc, gdouble length,
 +		    FttTraverseFlags flags,
 +		    gint level,
 +		    FILE * fp,
 +		    gboolean parallel)
 +{
 +  guint depth, size = 1;
 +  Grid * grid;
 +  FttVector extent[2] = {{ G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE },
 +			 { - G_MAXDOUBLE, - G_MAXDOUBLE, - G_MAXDOUBLE }};
 +  gpointer data[6];
 +
 +  g_return_if_fail (domain != NULL);
 +  g_return_if_fail (fp != NULL);
 +
 +  if (level < 0)
 +    depth = gfs_domain_depth (domain);
 +  else
 +    depth = level;
 +  while (depth-- > 0)
 +    size *= 2;
 +
 +  if (condition) {
 +    gfs_catch_floating_point_exceptions ();
 +    gfs_domain_cell_traverse_condition (domain, FTT_PRE_ORDER, flags, level,
 +					(FttCellTraverseFunc) max_extent, extent,
++=======
+ static void max_physical_extent (FttCell * cell, gpointer * data)
+ {
+   FttVector * extent = data[0];
+   GfsSimulation * sim = data[1];
+   gdouble h = ftt_cell_size (cell)/2.;
+   FttVector p, 
+     max = { -G_MAXDOUBLE, -G_MAXDOUBLE, -G_MAXDOUBLE },
+     min = { G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE };
+   ftt_cell_pos (cell, &p);
+   double x, y;
+   for (x = -1; x <= 1.; x += 2.)
+     for (y = -1; y <= 1.; y += 2.) {
+       FttVector c = p;
+       c.x += x*h; c.y += y*h;
+       gfs_simulation_map_inverse (sim, &c);
+       int i;
+       for (i = 0; i < FTT_DIMENSION; i++) {
+ 	if ((&c.x)[i] > (&max.x)[i]) (&max.x)[i] = (&c.x)[i];
+ 	if ((&c.x)[i] < (&min.x)[i]) (&min.x)[i] = (&c.x)[i];
+       }
+     }
+ 
+   int i;
+   for (i = 0; i < 2; i++) {
+     if ((&max.x)[i] > (&extent[1].x)[i]) (&extent[1].x)[i] = (&max.x)[i];
+     if ((&min.x)[i] < (&extent[0].x)[i]) (&extent[0].x)[i] = (&min.x)[i];
+     if ((&max.x)[i] - (&min.x)[i] < (&extent[2].x)[i]) 
+       (&extent[2].x)[i] = (&max.x)[i] - (&min.x)[i];
+   }
+ }
+ 
+ void gfs_write_grd (GfsSimulation * sim, 
+ 		    GfsFunction * condition,
+ 		    GfsVariable * v,
+ 		    FttTraverseFlags flags,
+ 		    gint level,
+ 		    FILE * fp,
+ 		    gboolean parallel,
+ 		    gboolean interpolate)
+ {
+   g_return_if_fail (sim != NULL);
+   g_return_if_fail (fp != NULL);
+ 
+   GfsDomain * domain = GFS_DOMAIN (sim);
+   FttVector extent[3] = {{ G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE },
+ 			 { - G_MAXDOUBLE, - G_MAXDOUBLE, - G_MAXDOUBLE },
+ 			 { G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE }};
+   gpointer data[2] = { extent, sim };
+   if (condition) {
+     gfs_catch_floating_point_exceptions ();
+     gfs_domain_cell_traverse_condition (domain, FTT_PRE_ORDER, flags, level,
+ 					(FttCellTraverseFunc) max_physical_extent, data,
++>>>>>>> upstream/20131206+dfsg
  					cell_condition, condition);
      gfs_restore_fpe_for_function (condition);
    }
    else
      gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, flags, level,
++<<<<<<< HEAD
 +			      (FttCellTraverseFunc) max_extent, extent);
++=======
+ 			      (FttCellTraverseFunc) max_physical_extent, data);
++>>>>>>> upstream/20131206+dfsg
      
    gfs_all_reduce (domain, extent[0].x, MPI_DOUBLE, MPI_MIN);
    gfs_all_reduce (domain, extent[0].y, MPI_DOUBLE, MPI_MIN);
    gfs_all_reduce (domain, extent[1].x, MPI_DOUBLE, MPI_MAX);
    gfs_all_reduce (domain, extent[1].y, MPI_DOUBLE, MPI_MAX);
++<<<<<<< HEAD
++=======
+   gfs_all_reduce (domain, extent[2].x, MPI_DOUBLE, MPI_MIN);
+   gfs_all_reduce (domain, extent[2].y, MPI_DOUBLE, MPI_MIN);
++>>>>>>> upstream/20131206+dfsg
      
    if (extent[0].x == G_MAXDOUBLE)
      return;
  
++<<<<<<< HEAD
 +  extent[0].x /= domain->lambda.x; 
 +  extent[0].y /= domain->lambda.y;
 +  extent[1].x /= domain->lambda.x; 
 +  extent[1].y /= domain->lambda.y;
 +
 +  grid = grid_new (extent[0], extent[1], size, xc, yc, length);
 +  data[3] = v;
 +  data[4] = grid;
 +  data[5] = &domain->lambda;
 +  if (condition) {
 +    gfs_catch_floating_point_exceptions ();
 +    gfs_domain_cell_traverse_condition (domain, FTT_PRE_ORDER, flags, level,
 +					(FttCellTraverseFunc) write_grid_square, data,
 +					cell_condition, condition);
 +    gfs_restore_fpe_for_function (condition);
 +  }
 +  else
 +    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, flags, level,
 +			      (FttCellTraverseFunc) write_grid_square, data);
++=======
+   Grid * grid = grid_new (extent[0], extent[1], extent[2]);
+ 
+   int i, j;
+   for (i = 0; i < grid->width; i++)
+     for (j = 0; j < grid->height; j++) {
+       FttVector p = { grid->min.x + (0.5 + i)*grid->cellsize, 
+ 		      grid->min.y + grid->height*grid->cellsize - (0.5 + j)*grid->cellsize, 
+ 		      0. };
+       gfs_simulation_map (sim, &p);
+       FttCell * cell = gfs_domain_locate (domain, p, level, NULL);
+       if (cell && GFS_HAS_DATA (cell, v))
+ 	grid->data[j][i] = interpolate ? gfs_interpolate (cell, p, v) : GFS_VALUE (cell, v);
+     }
++>>>>>>> upstream/20131206+dfsg
  
  #ifdef HAVE_MPI
    if (!parallel && domain->pid >= 0) {
      if (domain->pid == 0) {
++<<<<<<< HEAD
 +      Grid * im = grid_new (extent[0], extent[1], size, xc, yc, length);
++=======
+       Grid * im = grid_new (extent[0], extent[1], extent[2]);
++>>>>>>> upstream/20131206+dfsg
        int n, np;
        MPI_Comm_size (MPI_COMM_WORLD, &np);
        for (n = 1; n < np; n++) {
diff --cc src/graphic.h
index c7d5532,4bda33d..c17d983
--- a/src/graphic.h
+++ b/src/graphic.h
@@@ -51,14 -51,14 +51,25 @@@ void               gfs_write_pp
  						gint level,
  						FILE * fp,
  						gboolean parallel);
++<<<<<<< HEAD
 +void               gfs_write_grd               (GfsDomain * domain, 
 +						GfsFunction * condition,
 +						GfsVariable * v,
 +						gdouble xc, gdouble yc, gdouble length,
 +						FttTraverseFlags flags,
 +						gint level,
 +						FILE * fp,
 +						gboolean parallel);
++=======
+ void               gfs_write_grd               (GfsSimulation * sim, 
+ 						GfsFunction * condition,
+ 						GfsVariable * v,
+ 						FttTraverseFlags flags,
+ 						gint level,
+ 						FILE * fp,
+ 						gboolean parallel,
+ 						gboolean interpolate);
++>>>>>>> upstream/20131206+dfsg
  gint               gfs_combine_ppm             (gchar ** fname, 
  						guint nname, 
  						FILE * fp);
diff --cc src/init.c
index 2381b03,9af90f7..09bc214
--- a/src/init.c
+++ b/src/init.c
@@@ -66,8 -66,6 +66,11 @@@
  #include "metric.h"
  #include "particle.h"
  #include "cartesian.h"
++<<<<<<< HEAD
 +
 +#include "modules.h"
++=======
++>>>>>>> upstream/20131206+dfsg
  
  #ifdef HAVE_MPI
  # include <mpi.h>
@@@ -173,6 -178,10 +183,13 @@@ GtsObjectClass ** gfs_classes (void
  #if FTT_2D
          gfs_variable_stream_function_class (),
  #endif /* FTT_2D */
++<<<<<<< HEAD
++=======
+         gfs_variable_average_class (),
+         gfs_variable_poisson_class (),
+         gfs_variable_laplacian_class (),
+       gfs_hydrostatic_pressure_class (),
++>>>>>>> upstream/20131206+dfsg
        gfs_variable_age_class (),
        gfs_variable_curvature_class (),
          gfs_variable_position_class (),
@@@ -192,9 -201,16 +209,22 @@@
      gfs_init_vorticity_class (),
      gfs_init_wave_class (),
  
++<<<<<<< HEAD
 +    gfs_metric_lon_lat_class (),
 +    gfs_metric_cubed_class (),
 +    gfs_metric_stretch_class (),
++=======
+     gfs_generic_metric_class (),
+       gfs_metric_stretch_class (),
+       gfs_variable_metric_class (),
+         gfs_metric_lon_lat_class (),
+         gfs_stored_metric_class (),
+           gfs_metric_class (),
+           gfs_metric_cubed_class (),
+           gfs_metric_cubed1_class (),
+           gfs_metric_variable_class (),
+             gfs_metric_laplace_class (),
++>>>>>>> upstream/20131206+dfsg
  
      gfs_adapt_class (),
        gfs_adapt_vorticity_class (),
@@@ -215,6 -232,7 +246,10 @@@
            gfs_source_control_class (),
              gfs_source_control_field_class (),
            gfs_source_flux_class (),
++<<<<<<< HEAD
++=======
+           gfs_source_pipe_class (),
++>>>>>>> upstream/20131206+dfsg
          gfs_source_diffusion_class (),
            gfs_source_diffusion_explicit_class (),
        gfs_source_velocity_class (),
diff --cc src/levelset.c
index a259b3e,9132665..44ed5a1
--- a/src/levelset.c
+++ b/src/levelset.c
@@@ -165,14 -165,14 +165,22 @@@ static void variable_distance_event_hal
  			      (FttCellTraverseFunc) v->v->fine_coarse, v->v);
      gfs_traverse_and_bc (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  			 (FttCellTraverseFunc) distance_for_stencil, data,
++<<<<<<< HEAD
 +			 GFS_VARIABLE1 (event),GFS_VARIABLE1 (event));
++=======
+ 			 GFS_VARIABLE (event),GFS_VARIABLE (event));
++>>>>>>> upstream/20131206+dfsg
      gts_object_destroy (data[1]);
      gts_object_destroy (data[2]);
    }
    else
      gfs_traverse_and_bc (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  			 (FttCellTraverseFunc) distance, v,
++<<<<<<< HEAD
 +			 GFS_VARIABLE1 (event),GFS_VARIABLE1 (event));
++=======
+ 			 GFS_VARIABLE (event),GFS_VARIABLE (event));
++>>>>>>> upstream/20131206+dfsg
  
    gfs_domain_timer_stop (domain, "distance");
  }
diff --cc src/m4.awk
index 03b27f6,09204c1..9faf37a
--- a/src/m4.awk
+++ b/src/m4.awk
@@@ -22,7 -34,7 +34,11 @@@ BEGIN 
  	printf ("')\n");
      }
      else if ($1 == "GfsInclude" || $1 == "Include")
++<<<<<<< HEAD
 +	printf ("m4_include(%s)\n", $2);
++=======
+ 	printf (prefix "include(%s)\n", $2);
++>>>>>>> upstream/20131206+dfsg
      else
  	print $0;
  }
diff --cc src/map.c
index 5d3d23d,b400bf5..899cba6
--- a/src/map.c
+++ b/src/map.c
@@@ -58,6 -58,6 +58,7 @@@ static void gfs_map_read (GtsObject ** 
  static void gfs_map_write (GtsObject * o, FILE * fp)
  {
    fprintf (fp, "  %s", o->klass->info.name);
++<<<<<<< HEAD
  }
  
  static void gfs_map_class_init (GfsMapClass * klass)
@@@ -66,13 -66,118 +67,134 @@@
    GTS_OBJECT_CLASS (klass)->write = gfs_map_write;
  }
  
 +static void identity (GfsMap * map, const FttVector * src, FttVector * dest)
 +{
 +  *dest = *src;
++=======
++>>>>>>> upstream/20131206+dfsg
 +}
 +
 +static void inverse_cell (GfsMap * map, const FttVector * src, FttVector * dest)
 +{
++<<<<<<< HEAD
++=======
++  GTS_OBJECT_CLASS (klass)->read = gfs_map_read;
++  GTS_OBJECT_CLASS (klass)->write = gfs_map_write;
++}
++
+ static void not_implemented (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   g_assert_not_implemented ();
+ }
+ 
+ static double evaluate (GfsMap * map, const FttVector * x, const FttVector * rhs, FttVector * f)
+ {
+   gdouble delta = 0.;
+   (* map->inverse) (map, x, f);
+   int i;
+   for (i = 0; i < 3; i++) {
+     (&f->x)[i] -= (&rhs->x)[i];
+     delta += (&f->x)[i]*(&f->x)[i];
+   }
+   return delta;
+ }
+ 
+ #define DELTA 1e-6
+ #define NMAX 100
+ 
+ static void jacobian (GfsMap * map, const FttVector * x, const FttVector * rhs, FttVector * f,
+ 		      GtsMatrix * J)
+ {
+   int i, j;
+   for (i = 0; i < 3; i++)
+     for (j = 0; j < 3; j++) {
+       FttVector df, dx = *x;
+       (&dx.x)[j] += DELTA;
+       (* map->inverse) (map, &dx, &df);
+       J[i][j] = ((&df.x)[i] - (&rhs->x)[i] - (&f->x)[i])/DELTA;
+     }
+ }
+ 
+ static void map_transform (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   FttVector f, rhs = *src;
+   GtsMatrix J[4];
+   int n = 0;
+   /* use multidimensional Newton iterations to invert map(dest) = src */
+   *dest = *src; /* use src as initial guess */
+   gdouble delta = evaluate (map, dest, &rhs, &f);
+   while (delta > 1e-12 && n < NMAX) {
+     jacobian (map, dest, &rhs, &f, J);
+     GtsMatrix * iJ = gts_matrix3_inverse (J);
+     if (!iJ) {
+       gts_matrix_print (J, stderr);
+       g_assert_not_reached ();
+     }
+     int i, j;
+     for (i = 0; i < 3; i++)
+       for (j = 0; j < 3; j++)
+ 	(&dest->x)[i] -= iJ[i][j]*(&f.x)[j];
+     gts_matrix_destroy (iJ);
+     delta = evaluate (map, dest, &rhs, &f);
+     n++;
+   }
+   g_assert (n < NMAX);
+ }
+ 
+ static void normalized_jacobian (GfsMap * map, const FttVector * p, GtsMatrix * J)
+ {
+   FttVector f, rhs = {0., 0., 0.};
+   evaluate (map, p, &rhs, &f);
+   jacobian (map, p, &rhs, &f, J);
+   /* normalize */
+   int i, j;
+   for (i = 0; i < 3; i++) {
+     gdouble h = 0.;
+     for (j = 0; j < 3; j++)
+       h += J[j][i]*J[j][i];
+     h = sqrt (h);
+     for (j = 0; j < 3; j++)
+       J[j][i] /= h;
+   }
+ }
+ 
+ static void map_inverse_vector (GfsMap * map, const FttVector * p,
+ 				const FttVector * src, FttVector * dest)
+ {
+   GtsMatrix J[4];
+   normalized_jacobian (map, p, J);
+   FttVector src1 = *src; /* in case src and dest are identical */
+   int i, j;
+   for (i = 0; i < 3; i++) {
+     (&dest->x)[i] = 0.;
+     for (j = 0; j < 3; j++)
+       (&dest->x)[i] += (&src1.x)[j]*J[i][j];
+   }
+ }
+ 
+ static void map_transform_vector (GfsMap * map, const FttVector * p,
+ 				  const FttVector * src, FttVector * dest)
+ {
+   GtsMatrix J[4];
+   normalized_jacobian (map, p, J);
+   GtsMatrix * iJ = gts_matrix3_inverse (J);
+   if (!iJ) {
+     gts_matrix_print (J, stderr);
+     g_assert_not_reached ();
+   }
+   FttVector src1 = *src; /* in case src and dest are identical */
+   int i, j;
+   for (i = 0; i < 3; i++) {
+     (&dest->x)[i] = 0.;
+     for (j = 0; j < 3; j++)
+       (&dest->x)[i] += (&src1.x)[j]*iJ[i][j];
+   }
+   gts_matrix_destroy (iJ);
+ }
+ 
+ static void inverse_cell (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
++>>>>>>> upstream/20131206+dfsg
    gint i;
    for (i = 0; i < 4; i++)
      (* map->inverse) (map, &(src[i]), &(dest[i]));
@@@ -80,7 -185,10 +202,14 @@@
  
  static void gfs_map_init (GfsMap * map)
  {
++<<<<<<< HEAD
 +  map->transform = map->inverse = identity;
++=======
+   map->inverse = not_implemented;
+   map->transform = map_transform;
+   map->inverse_vector = map_inverse_vector;
+   map->transform_vector = map_transform_vector;
++>>>>>>> upstream/20131206+dfsg
    map->inverse_cell = inverse_cell;
  }
  
@@@ -119,90 -227,57 +248,141 @@@ static void gfs_map_function_read (GtsO
      return;
  
    if (fp->type != '{') {
++<<<<<<< HEAD
 +    gts_file_error (fp, "expecting an opening brace");
 +    return;
 +  }
 +  fp->scope_max++;
 +  gts_file_next_token (fp);
 +  while (fp->type != GTS_ERROR && fp->type != '}') {
 +    if (fp->type == '\n') {
 +      gts_file_next_token (fp);
 +      continue;
 +    }
 +    if (fp->type != GTS_STRING) {
 +      gts_file_error (fp, "expecting a keyword");
 +      return;
 +    }
 +    else {
 +      static gchar name[3][3] = { "x:", "y:", "z:" };
 +      FttComponent c;
 +      for (c = 0; c < FTT_DIMENSION; c++)
 +	if (!strcmp (fp->token->str, name[c]))
 +	  break;
 +      if (c == FTT_DIMENSION) {
 +	gts_file_error (fp, "unknown keyword '%s'", fp->token->str);
 +	return;
 +      }
 +      gts_file_next_token (fp);
 +
 +      GfsMapFunction * map = GFS_MAP_FUNCTION (*o);
 +      if (!map->inverse[c])
 +	map->inverse[c] = gfs_function_new (gfs_function_map_class (), 0.);
 +      gfs_function_read (map->inverse[c], gfs_object_simulation (*o), fp);
 +      if (fp->type == GTS_ERROR)
 +	return;
 +
 +      if (fp->type != '\n') {
 +	gts_file_error (fp, "expecting new line");
 +	return;
 +      }
 +      while (fp->type == '\n')
 +	gts_file_next_token (fp);
 +	
 +      if (!map->transform[c])
 +	map->transform[c] = gfs_function_new (gfs_function_map_class (), 0.);
 +      gfs_function_read (map->transform[c], gfs_object_simulation (*o), fp);
 +      if (fp->type == GTS_ERROR)
 +	return;
 +    }
 +  }
 +  if (fp->type != '}') {
 +    gts_file_error (fp, "expecting a closing brace");
 +    return;
 +  }
 +  fp->scope_max--;
 +  gts_file_next_token (fp);
++=======
+     gts_file_error (fp, "expecting a parameter block");
+     return;
+   }
+ 
+   GfsMapFunction * m = GFS_MAP_FUNCTION (*o);
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (m));
+   GtsFileVariable var[] = {
+     {GTS_OBJ, "x", TRUE, &m->x},
+     {GTS_OBJ, "y", TRUE, &m->y},
+     {GTS_OBJ, "z", TRUE, &m->z},
+     {GTS_NONE}
+   };
+   FttComponent c;
+   for (c = 0; c < 3; c++)
+     gfs_object_simulation_set ((&m->x)[c], domain);
+   
+   gts_file_assign_variables (fp, var);
+   
+   for (c = 0; c < 3; c++)
+     if (!var[c].set) {
+       gts_object_destroy (GTS_OBJECT ((&m->x)[c]));
+       (&m->x)[c] = NULL;
+     }
+   
+   if (fp->type == GTS_ERROR)
+     return;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void gfs_map_function_write (GtsObject * o, FILE * fp)
  {
    (* GTS_OBJECT_CLASS (gfs_map_function_class ())->parent_class->write) (o, fp);
++<<<<<<< HEAD
 +  fputs (" {\n", fp);
 +  GfsMapFunction * map = GFS_MAP_FUNCTION (o);
 +  static gchar name[3][5] = { "  x:", "  y:", "  z:" };
 +  FttComponent c;
 +  for (c = 0; c < FTT_DIMENSION; c++)
 +    if (map->transform[c]) {
 +      fputs (name[c], fp);
 +      gfs_function_write (map->inverse[c], fp);
 +      fputs ("\n    ", fp);
 +      gfs_function_write (map->transform[c], fp);
 +      fputc ('\n', fp);
 +    }
 +  fputc ('}', fp);
++=======
+  
+   GfsMapFunction * m = GFS_MAP_FUNCTION (o);
+   fputs (" {", fp);
+   FttComponent c;
+   static gchar name[3][2] = {"x", "y", "z"};
+   for (c = 0; c < 3; c++)
+     if ((&m->x)[c]) {
+       fprintf (fp, "\n    %s = ", name[c]);
+       gfs_function_write ((&m->x)[c], fp);
+     }
+   fputs ("\n  }", fp);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void gfs_map_function_destroy (GtsObject * o)
  {
++<<<<<<< HEAD
 +  GfsMapFunction * map = GFS_MAP_FUNCTION (o);
 +  FttComponent c;
 +
 +  for (c = 0; c < FTT_DIMENSION; c++) {
 +    if (map->transform[c])
 +      gts_object_destroy (GTS_OBJECT (map->transform[c]));
 +    if (map->inverse[c])
 +      gts_object_destroy (GTS_OBJECT (map->inverse[c]));
 +  }
++=======
+   GfsMapFunction * m = GFS_MAP_FUNCTION (o);
+   FttComponent c;
+   for (c = 0; c < 3; c++)
+     if ((&m->x)[c])
+       gts_object_destroy (GTS_OBJECT ((&m->x)[c]));
++>>>>>>> upstream/20131206+dfsg
  
    (* GTS_OBJECT_CLASS (gfs_map_function_class ())->parent_class->destroy) (o);
  }
@@@ -214,32 -289,27 +394,55 @@@ static void gfs_map_function_class_ini
    GTS_OBJECT_CLASS (klass)->destroy = gfs_map_function_destroy;
  }
  
++<<<<<<< HEAD
 +static void map_function_transform (GfsMap * map, const FttVector * src, FttVector * dest)
 +{
 +  GfsMapFunction * mf = GFS_MAP_FUNCTION (map);
 +  FttComponent c;
 +  for (c = 0; c < FTT_DIMENSION; c++)
 +    if (mf->transform[c])
 +      (&dest->x)[c] = gfs_function_spatial_value (mf->transform[c], src);
 +    else
 +      (&dest->x)[c] = (&src->x)[c];
 +}
 +
 +static void map_function_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
 +{
 +  GfsMapFunction * mf = GFS_MAP_FUNCTION (map);
 +  FttComponent c;
 +  for (c = 0; c < FTT_DIMENSION; c++)
 +    if (mf->inverse[c])
 +      (&dest->x)[c] = gfs_function_spatial_value (mf->inverse[c], src);
++=======
+ static void map_function_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   GfsMapFunction * m = GFS_MAP_FUNCTION (map);
+   gdouble L = gfs_object_simulation (m)->physical_params.L;
+   FttVector src1;
+   FttComponent c;
+   for (c = 0; c < 3; c++)
+     (&src1.x)[c] = (&src->x)[c]*L;
+   for (c = 0; c < 3; c++)
+     if ((&m->x)[c])
+       (&dest->x)[c] = gfs_function_spatial_value ((&m->x)[c], &src1)/L;
++>>>>>>> upstream/20131206+dfsg
      else
        (&dest->x)[c] = (&src->x)[c];
  }
  
++<<<<<<< HEAD
 +static void gfs_map_function_init (GfsMap * map)
 +{
 +  map->transform = map_function_transform;
 +  map->inverse =   map_function_inverse;
++=======
+ static void gfs_map_function_init (GfsMapFunction * m)
+ {
+   GFS_MAP (m)->inverse = map_function_inverse;
+   m->x = gfs_function_new (gfs_function_map_class (), 1.);
+   m->y = gfs_function_new (gfs_function_map_class (), 1.);
+   m->z = gfs_function_new (gfs_function_map_class (), 1.);
++>>>>>>> upstream/20131206+dfsg
  }
  
  GfsMapClass * gfs_map_function_class (void)
@@@ -269,24 -339,73 +472,89 @@@
   * \beginobject{GfsMapTransform}
   */
  
++<<<<<<< HEAD
++=======
+ static void gfs_map_transform_destroy (GtsObject * o)
+ {
+   gts_matrix_destroy (GFS_MAP_TRANSFORM (o)->m);
+   gts_matrix_destroy (GFS_MAP_TRANSFORM (o)->im);
+ 
+   (* GTS_OBJECT_CLASS (gfs_map_transform_class ())->parent_class->destroy) (o);
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  static void gfs_map_transform_read (GtsObject ** o, GtsFile * fp)
  {
    (* GTS_OBJECT_CLASS (gfs_map_transform_class ())->parent_class->read) (o, fp);
    if (fp->type == GTS_ERROR)
      return;
  
++<<<<<<< HEAD
 +  if (fp->type != '{') {
 +    gts_file_error (fp, "expecting an opening brace");
 +    return;
 +  }
++=======
++>>>>>>> upstream/20131206+dfsg
    GfsMapTransform * map = GFS_MAP_TRANSFORM (*o);
    GtsFileVariable var[] = {
      {GTS_DOUBLE, "tx", TRUE, &map->translate[0]},
      {GTS_DOUBLE, "ty", TRUE, &map->translate[1]},
      {GTS_DOUBLE, "tz", TRUE, &map->translate[2]},
++<<<<<<< HEAD
 +    {GTS_NONE}
 +  };
 +  gts_file_assign_variables (fp, var);
++=======
+     {GTS_DOUBLE, "rx", TRUE, &map->rotate[0]},
+     {GTS_DOUBLE, "ry", TRUE, &map->rotate[1]},
+     {GTS_DOUBLE, "rz", TRUE, &map->rotate[2]},
+     {GTS_NONE}
+   };
+   gts_file_assign_variables (fp, var);
+ 
+   if (map->rotate[0] != 0.) { /* rotate around x-axis */
+     gdouble angle = map->rotate[0]*M_PI/180.;
+     gdouble cosa = cos (angle), sina = sin (angle);
+     GtsMatrix * rot = gts_matrix_identity (NULL);
+     rot[1][1] = cosa; rot[1][2] = -sina;
+     rot[2][1] = sina; rot[2][2] = cosa;
+     GtsMatrix * p = gts_matrix_product (map->m, rot);
+     gts_matrix_destroy (rot);
+     gts_matrix_destroy (map->m);
+     map->m = p;
+   }
+   if (map->rotate[1] != 0.) { /* rotate around y-axis */
+     gdouble angle = map->rotate[1]*M_PI/180.;
+     gdouble cosa = cos (angle), sina = sin (angle);
+     GtsMatrix * rot = gts_matrix_identity (NULL);
+     rot[0][0] = cosa; rot[0][2] = sina;
+     rot[2][0] = -sina; rot[2][2] = cosa;
+     GtsMatrix * p = gts_matrix_product (map->m, rot);
+     gts_matrix_destroy (rot);
+     gts_matrix_destroy (map->m);
+     map->m = p;
+   }
+   if (map->rotate[2] != 0.) { /* rotate around z-axis */
+     gdouble angle = map->rotate[2]*M_PI/180.;
+     gdouble cosa = cos (angle), sina = sin (angle);
+     GtsMatrix * rot = gts_matrix_identity (NULL);
+     rot[0][0] = cosa; rot[0][1] = -sina;
+     rot[1][0] = sina; rot[1][1] = cosa;
+     GtsMatrix * p = gts_matrix_product (map->m, rot);
+     gts_matrix_destroy (rot);
+     gts_matrix_destroy (map->m);
+     map->m = p;
+   }
+ 
+   gdouble L = gfs_object_simulation (map)->physical_params.L;
+   map->m[0][3] += map->translate[0]/L;
+   map->m[1][3] += map->translate[1]/L;
+   map->m[2][3] += map->translate[2]/L;
+ 
+   gts_matrix_destroy (map->im);
+   map->im = gts_matrix_inverse (map->m);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void gfs_map_transform_write (GtsObject * o, FILE * fp)
@@@ -297,35 -416,41 +565,68 @@@
    if (gts_vector_norm (map->translate) > 0.)
      fprintf (fp, "  tx = %g ty = %g tz = %g\n",
  	     map->translate[0], map->translate[1], map->translate[2]);
++<<<<<<< HEAD
 +  fputc ('}', fp);
 +}
 +
 +static void gfs_map_transform_class_init (GfsMapClass * klass)
 +{
 +  GTS_OBJECT_CLASS (klass)->read = gfs_map_transform_read;
 +  GTS_OBJECT_CLASS (klass)->write = gfs_map_transform_write;
++=======
+   if (gts_vector_norm (map->rotate) > 0.)
+     fprintf (fp, "  rx = %g ry = %g rz = %g\n",
+ 	     map->rotate[0], map->rotate[1], map->rotate[2]);
+   fputc ('}', fp);
+ }
+ 
+ static void gfs_map_transform_class_init (GtsObjectClass * klass)
+ {
+   klass->destroy = gfs_map_transform_destroy;
+   klass->read = gfs_map_transform_read;
+   klass->write = gfs_map_transform_write;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void map_transform_transform (GfsMap * map, const FttVector * src, FttVector * dest)
  {
++<<<<<<< HEAD
 +  GfsMapTransform * mf = GFS_MAP_TRANSFORM (map);
 +  FttComponent c;
 +  for (c = 0; c < FTT_DIMENSION; c++)
 +    (&dest->x)[c] = (&src->x)[c] - mf->translate[c];
++=======
+   GtsPoint p;
+   p.x = src->x; p.y = src->y; p.z = src->z;
+   gts_point_transform (&p, GFS_MAP_TRANSFORM (map)->im);
+   dest->x = p.x; dest->y = p.y; dest->z = p.z;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void map_transform_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
  {
++<<<<<<< HEAD
 +  GfsMapTransform * mf = GFS_MAP_TRANSFORM (map);
 +  FttComponent c;
 +  for (c = 0; c < FTT_DIMENSION; c++)
 +    (&dest->x)[c] = (&src->x)[c] + mf->translate[c];
++=======
+   GtsPoint p;
+   p.x = src->x; p.y = src->y; p.z = src->z;
+   gts_point_transform (&p, GFS_MAP_TRANSFORM (map)->m);
+   dest->x = p.x; dest->y = p.y; dest->z = p.z;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void gfs_map_transform_init (GfsMap * map)
  {
    map->transform = map_transform_transform;
    map->inverse =   map_transform_inverse;
++<<<<<<< HEAD
++=======
+   GFS_MAP_TRANSFORM (map)->m =  gts_matrix_identity (NULL);
+   GFS_MAP_TRANSFORM (map)->im = gts_matrix_identity (NULL);
++>>>>>>> upstream/20131206+dfsg
  }
  
  GfsMapClass * gfs_map_transform_class (void)
diff --cc src/map.h
index 1ec571a,68891c6..e93efde
--- a/src/map.h
+++ b/src/map.h
@@@ -35,9 -35,13 +35,19 @@@ struct _GfsMap 
    /*< private >*/
    GtsSListContainee parent;
  
++<<<<<<< HEAD
 +  void (* transform)    (GfsMap * map, const FttVector * src, FttVector * dest);
 +  void (* inverse)      (GfsMap * map, const FttVector * src, FttVector * dest);
 +  void (* inverse_cell) (GfsMap * map, const FttVector * src, FttVector * dest);
++=======
+   void (* transform)           (GfsMap * map, const FttVector * src, FttVector * dest);
+   void (* inverse)             (GfsMap * map, const FttVector * src, FttVector * dest);
+   void (* transform_vector)    (GfsMap * map, const FttVector * p,
+ 				const FttVector * src, FttVector * dest);
+   void (* inverse_vector)      (GfsMap * map, const FttVector * p,
+ 				const FttVector * src, FttVector * dest);
+   void (* inverse_cell)        (GfsMap * map, const FttVector * src, FttVector * dest);
++>>>>>>> upstream/20131206+dfsg
    /*< public >*/
  };
  
@@@ -70,7 -74,7 +80,11 @@@ struct _GfsMapFunction 
    GfsMap parent;
  
    /*< public >*/
++<<<<<<< HEAD
 +  GfsFunction * transform[FTT_DIMENSION], * inverse[FTT_DIMENSION];
++=======
+   GfsFunction * x, * y, * z;
++>>>>>>> upstream/20131206+dfsg
  };
  
  #define GFS_MAP_FUNCTION(obj)            GTS_OBJECT_CAST (obj,\
@@@ -88,9 -92,10 +102,16 @@@ typedef struct _GfsMapTransfor
  struct _GfsMapTransform {
    /*< private >*/
    GfsMap parent;
++<<<<<<< HEAD
 +
 +  /*< public >*/
 +  GtsVector translate;
++=======
+   GtsMatrix * m, * im;
+ 
+   /*< public >*/
+   GtsVector translate, rotate;
++>>>>>>> upstream/20131206+dfsg
  };
  
  #define GFS_MAP_TRANSFORM(obj)            GTS_OBJECT_CAST (obj,\
diff --cc src/metric.c
index 42ac255,7798b7b..e81ee3b
--- a/src/metric.c
+++ b/src/metric.c
@@@ -1,5 -1,5 +1,9 @@@
  /* Gerris - The GNU Flow Solver
++<<<<<<< HEAD
 + * Copyright (C) 2009 National Institute of Water and Atmospheric Research
++=======
+  * Copyright (C) 2009-2012 National Institute of Water and Atmospheric Research
++>>>>>>> upstream/20131206+dfsg
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License as
@@@ -25,27 -25,176 +29,195 @@@
  #include <complex.h>
  #include "map.h"
  #include "solid.h"
++<<<<<<< HEAD
++=======
+ #include "source.h"
+ 
+ #if USE_GSL
+ # include <gsl/gsl_integration.h>
+ #endif
+ 
+ /** \beginobject{GfsGenericMetric} */
+ 
+ static gdouble face_metric_direction (const GfsDomain * domain, FttCell * cell, FttDirection d)
+ {
+   FttCellFace f;
+   f.cell = cell;
+   f.d = d;
+   return (* domain->face_metric) (domain, &f);
+ }
+ 
+ /* see: doc/figures/viscous-metric.tm equation (4) */
+ static gdouble viscous_metric_implicit (const GfsDomain * domain,
+ 					FttCell * cell,
+ 					FttComponent component)
+ {
+   g_assert (component < FTT_DIMENSION);
+   /* fixme: 2D only */
+   if (component > 1)
+     return 0.;
+   /* fixme: this does not include the "curvature" of the metric yet */
+   FttComponent c1 = component;
+   FttComponent c2 = (c1 + 1) % 2;
+   double h1h2 = (* domain->cell_metric) (domain, cell);
+   double size = ftt_cell_size (cell);
+   double h1_2 = (face_metric_direction (domain, cell, 2*c2) - 
+ 		 face_metric_direction (domain, cell, 2*c2 + 1));
+   double h2_1 = (face_metric_direction (domain, cell, 2*c1) - 
+ 		 face_metric_direction (domain, cell, 2*c1 + 1));
+   return (h1_2*h1_2 + h2_1*h2_1)/(size*size*h1h2*h1h2);
+ }
+ 
+ /* see: doc/figures/viscous-metric.tm equation (4) */
+ static gdouble viscous_metric_explicit (const GfsDomain * domain, 
+ 					FttCell * cell,
+ 					GfsVariable * v,
+ 					GfsDiffusion * d)
+ {
+   g_assert (v->component < FTT_DIMENSION);
+   /* fixme: 2D only */
+   if (v->component > 1)
+     return 0.;
+   FttComponent c1 = v->component;
+   FttComponent c2 = (c1 + 1) % 2;
+   double h1h2 = (* domain->cell_metric) (domain, cell);
+   double h1 = (* domain->scale_metric) (domain, cell, c1);
+   double h2 = (* domain->scale_metric) (domain, cell, c2);
+   double size = ftt_cell_size (cell);
+   double h1_2 = (face_metric_direction (domain, cell, 2*c2) - 
+ 		 face_metric_direction (domain, cell, 2*c2 + 1));
+   double h2_1 = (face_metric_direction (domain, cell, 2*c1) - 
+ 		 face_metric_direction (domain, cell, 2*c1 + 1));
+   double u2_1 = gfs_center_gradient (cell, c1, v->vector[c2]->i);
+   double u2_2 = gfs_center_gradient (cell, c2, v->vector[c2]->i);
+   double eta = gfs_diffusion_cell (d, cell);
+   /* fixme: this does not include the terms with derivatives of the viscosity yet */
+   /* fixme: this does not include the "curvature" of the metric yet */
+   /* fixme: this does not take into account density */
+   return eta*(
+ 	      + 2.*(u2_1*h1_2/h1 - u2_2*h2_1/h2)/(size*size)
+ 	      )/h1h2;
+ }
+ 
+ static void advection_metric (const GfsDomain * domain, 
+ 			      FttCell * cell,
+ 			      FttComponent c1,
+ 			      gdouble m[2])
+ {
+   g_assert (c1 < FTT_DIMENSION);
+   /* fixme: 2D only */
+   g_assert (c1 <= 1);
+   FttComponent c2 = (c1 + 1) % 2;
+   double h1h2 = (* domain->cell_metric) (domain, cell);
+   double size = ftt_cell_size (cell);
+   double h1_2 = (face_metric_direction (domain, cell, 2*c2) - 
+ 		 face_metric_direction (domain, cell, 2*c2 + 1));
+   double h2_1 = (face_metric_direction (domain, cell, 2*c1) - 
+ 		 face_metric_direction (domain, cell, 2*c1 + 1));
+ 
+   m[0] = h1_2/(size*h1h2);
+   m[1] = h2_1/(size*h1h2);
+ }
+ 
+ static void set_default_metric (GtsObject ** o, GtsFile * fp)
+ {
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
+ 
+   if (domain->metric_data || domain->face_metric || domain->cell_metric) {
+     gts_file_error (fp, "cannot use multiple metrics (yet)");
+     return;
+   }
+ 
+   domain->viscous_metric_implicit = viscous_metric_implicit;
+   domain->viscous_metric_explicit = viscous_metric_explicit;
+   domain->advection_metric = advection_metric;
+ }
+ 
+ static void generic_metric_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_generic_metric_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+   set_default_metric (o, fp);
+ }
+ 
+ static void generic_metric_class_init (GtsObjectClass * klass)
+ {
+   klass->read = generic_metric_read;
+ }
+ 
+ GfsEventClass * gfs_generic_metric_class (void)
+ {
+   static GfsEventClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsGenericMetric",
+       sizeof (GfsEvent),
+       sizeof (GfsEventClass),
+       (GtsObjectClassInitFunc) generic_metric_class_init,
+       (GtsObjectInitFunc) NULL,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_event_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsGenericMetric} */
++>>>>>>> upstream/20131206+dfsg
  
  /**
   * A generic class for metrics which require storage.
   * \beginobject{GfsVariableMetric}
   */
++<<<<<<< HEAD
++=======
+ 
+ static void variable_metric_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_metric_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+   set_default_metric (o, fp);
+ }
+ 
+ static void variable_metric_class_init (GtsObjectClass * klass)
+ {
+   klass->read = variable_metric_read;
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  GfsVariableClass * gfs_variable_metric_class (void)
  {
    static GfsVariableClass * klass = NULL;
  
    if (klass == NULL) {
++<<<<<<< HEAD
 +    GtsObjectClassInfo gfs_variable_metric_info = {
 +      "GfsVariableMetric",
 +      sizeof (GfsVariable),
 +      sizeof (GfsVariableClass),
 +      (GtsObjectClassInitFunc) NULL,
++=======
+     GtsObjectClassInfo info = {
+       "GfsVariableMetric",
+       sizeof (GfsVariable),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) variable_metric_class_init,
++>>>>>>> upstream/20131206+dfsg
        (GtsObjectInitFunc) NULL,
        (GtsArgSetFunc) NULL,
        (GtsArgGetFunc) NULL
      };
++<<<<<<< HEAD
 +    klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_class ()), 
 +				  &gfs_variable_metric_info);
++=======
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_class ()), &info);
++>>>>>>> upstream/20131206+dfsg
    }
  
    return klass;
@@@ -53,15 -202,605 +225,616 @@@
  
  /** \endobject{GfsVariableMetric} */
  
++<<<<<<< HEAD
++=======
+ /** \beginobject{GfsStoredMetric} */
+ 
+ #define USE_GSL 0
+ 
+ /* Coefficients from http://sparse-grids.de/ */
+ /* KPU: Univariate nested quadrature rules as basis - delayed
+    Kronrod-Patterson rules, see Knut Petras (2003): "Smolyak cubature
+    of given polynomial degree with few nodes for increasing
+    dimension." Numerische Mathematik 93, 729-753. */
+ 
+ static double kpu_1d_l3[3][2] = {
+   {.1127017, .2777778},
+   {.5,       .4444444},
+   {.8872983, .2777778}
+ };
+ 
+ static double kpu_2d_l2[5][3] = {
+   {.1127017, .5,       .2777778},
+   {.5,       .1127017, .2777778},
+   {.5,       .5,      -.1111112},
+   {.5,       .8872983, .2777778},
+   {.8872983, .5,       .2777778}
+ };
+ 
+ static double kpu_2d_l3[9][3] = {
+   {.1127017, .1127017, .07716050617284001},
+   {.1127017, .5,       .12345678765432},
+   {.1127017, .8872983, .07716050617284001},
+   {.5,       .1127017, .12345678765432},
+   {.5,       .5,       .19753082469136002},
+   {.5,       .8872983, .12345678765432},
+   {.8872983, .1127017, .07716050617284001},
+   {.8872983, .5,       .12345678765432},
+   {.8872983, .8872983, .07716050617284001}
+ };
+ 
+ static double kpu_2d_l4[17][3] = {
+   { .0197544, .5, .052328105232810528 },
+   { .1127017, .1127017, .077160506172840024 },
+   { .1127017, .5, -.020076998921278625 },
+   { .1127017, .8872983, .077160506172840024 },
+   { .2828781, .5, .20069872006987202 },
+   { .5, .0197544, .052328105232810528 },
+   { .5, .1127017, -.020076998921278667 },
+   { .5, .2828781, .20069872006987202 },
+   { .5, .5, -.24044133021697545 },
+   { .5, .7171219, .20069872006987202 },
+   { .5, .8872983, -.020076998921278667 },
+   { .5, .9802456, .052328105232810528 },
+   { .7171219, .5, .20069872006987202 },
+   { .8872983, .1127017, .077160506172840024 },
+   { .8872983, .5, -.020076998921278625 },
+   { .8872983, .8872983, .077160506172840024 },
+   { .9802456, .5, .052328105232810528 },
+ };
+ 
+ #define EPS 1e-6
+ 
+ static double ru_rv (FttVector r, GfsMap * map)
+ {
+   FttVector ru = { r.x + EPS, r.y, 0. };
+   FttVector rv = { r.x, r.y + EPS, 0. };
+   (* map->inverse) (map, &r, &r);
+   (* map->inverse) (map, &ru, &ru);
+   (* map->inverse) (map, &rv, &rv);
+   ru.x -= r.x; ru.y -= r.y; ru.z -= r.z;
+   rv.x -= r.x; rv.y -= r.y; rv.z -= r.z;
+   return sqrt ((ru.x*ru.x + ru.y*ru.y + ru.z*ru.z)*(rv.x*rv.x + rv.y*rv.y + rv.z*rv.z)
+ 	       /* the cross-term should be zero for an orthogonal
+ 		  metric but we keep them for clarity*/
+ 	       - (ru.x*rv.x + ru.y*rv.y + ru.z*rv.z)*(ru.x*rv.x + ru.y*rv.y + ru.z*rv.z)
+ 	       );
+ }
+ 
+ static double integration2d (GfsMap * map,
+ 			     double u1, double v1,
+ 			     double u2, double v2)
+ {
+   int i;
+   FttVector r;
+   double du = u2 - u1;
+   double dv = v2 - v1;
+   double a = 0.;
+   r.z = 0.;
+   for (i = 0; i < 9; i++) {
+     r.x = u1 + du*kpu_2d_l3[i][0];
+     r.y = v1 + dv*kpu_2d_l3[i][1];
+     a += kpu_2d_l3[i][2]*ru_rv (r, map);
+   }
+   return a*du*dv;
+ }
+ 
+ typedef struct {
+   FttVector * r;
+   GfsMap * map;
+   gdouble v1, v2;
+ } RuRvData;
+ 
+ static double ru (FttVector r, GfsMap * map)
+ {
+   FttVector dr = { r.x + EPS, r.y, 0. };
+   (* map->inverse) (map, &r, &r);
+   (* map->inverse) (map, &dr, &dr);
+   dr.x -= r.x; dr.y -= r.y; dr.z -= r.z;
+   return sqrt ((dr.x*dr.x + dr.y*dr.y + dr.z*dr.z));
+ }
+ 
+ static double rv (FttVector r, GfsMap * map)
+ {
+   FttVector dr = { r.x, r.y + EPS, 0. };
+   (* map->inverse) (map, &r, &r);
+   (* map->inverse) (map, &dr, &dr);
+   dr.x -= r.x; dr.y -= r.y; dr.z -= r.z;
+   return sqrt ((dr.x*dr.x + dr.y*dr.y + dr.z*dr.z));
+ }
+ 
+ /* Returns: \sqrt{(r_u.r_u)} */
+ 
+ #if USE_GSL
+ static double ru_gsl (double u, void * data)
+ {
+   RuRvData * p = data;
+   p->r->x = u;
+   return ru (*(p->r), p->map)/EPS;
+ }
+ 
+ /* Returns: \sqrt{(r_v.r_v)} */
+ static double rv_gsl (double v, void * data)
+ {
+   RuRvData * p = data;
+   p->r->y = v;
+   return rv (*(p->r), p->map)/EPS;
+ }
+ 
+ static gdouble integration (const gsl_function * f, double a, double b)
+ {
+   double result, abserr;
+   size_t neval;
+   /* we set the error to one but the QNG code will use at least
+      21 points which is enough */
+   gsl_integration_qng (f, a, b, 1., 0., &result, &abserr, &neval);
+   //  fprintf (stderr, "neval: %d abserr: %g result: %g\n", neval, abserr, result);
+   return result;
+ }
+ #endif /* USE_GSL */
+ 
+ /* Returns: \int \sqrt{(r_u.r_u)} du */
+ static double length_u (GfsMap * map, double u1, double u2, double v)
+ {
+ #if USE_GSL
+   FttVector r;
+   RuRvData p = { &r, map };
+   r.y = v;
+   r.z = 0.;
+   gsl_function f;
+   f.function = ru_gsl;
+   f.params = &p;
+   return integration (&f, u1, u2);
+ #else
+   int i;
+   FttVector r;
+   double du = u2 - u1;
+   double a = 0.;
+   r.y = v;
+   r.z = 0.;
+   for (i = 0; i < 3; i++) {
+     r.x = u1 + du*kpu_1d_l3[i][0];
+     a += kpu_1d_l3[i][1]*ru (r, map);
+   }
+   return a*du/EPS;
+ #endif
+ }
+ 
+ /* Returns: \int \sqrt{(r_v.r_v)} dv */
+ static double length_v (GfsMap * map, double v1, double v2, double u)
+ {
+ #if USE_GSL
+   FttVector r;
+   gsl_function f;
+   RuRvData p = { &r, map };
+   f.function = rv_gsl;
+   f.params = &p;
+   r.x = u;
+   r.z = 0.;
+   return integration (&f, v1, v2);
+ #else
+   int i;
+   FttVector r;
+   double dv = v2 - v1;
+   double a = 0.;
+   r.x = u;
+   r.z = 0.;
+   for (i = 0; i < 3; i++) {
+     r.y = v1 + dv*kpu_1d_l3[i][0];
+     a += kpu_1d_l3[i][1]*rv (r, map);
+   }
+   return a*dv/EPS;
+ #endif
+ }
+ 
+ /* Returns: \sqrt{(r_u.r_u)(r_v.r_v) - (r_u.r_v)^2} */
+ #if USE_GSL
+ static double ru_rv_gsl (double v, void * data)
+ {
+   RuRvData * p = data;
+   p->r->y = v;
+   return ru_rv (*(p->r), p->map)/(EPS*EPS);
+ }
+ 
+ /* Returns: \int \sqrt{(r_u.r_u)(r_v.r_v) - (r_u.r_v)^2} dv */
+ static double ru_rv_dv (double u, void * data)
+ {
+   RuRvData * p = data;
+   gsl_function f;
+   f.function = ru_rv_gsl;
+   f.params = p;
+   p->r->x = u;
+   return integration (&f, p->v1, p->v2);
+ }
+ #endif /* USE_GSL */
+ 
+ /* Returns: \int\int \sqrt{(r_u.r_u)(r_v.r_v) - (r_u.r_v)^2} du dv */
+ static double area (GfsMap * map,
+ 		    double u1, double v1,
+ 		    double u2, double v2)
+ {
+ #if USE_GSL
+   FttVector r;
+   gsl_function f;
+   RuRvData p = { &r, map, v1, v2 };
+   f.function = ru_rv_dv;
+   f.params = &p;
+   r.z = 0.;
+   return integration (&f, u1, u2);
+ #else
+   return integration2d (map, u1, v1, u2, v2)/(EPS*EPS);
+ #endif
+ }
+ 
+ static void metric_coarse_fine (FttCell * parent, GfsVariable * a)
+ {
+   if (GFS_CELL_IS_BOUNDARY (parent))
+     return;
+ 
+   FttVector p;
+   FttCellChildren child;
+   gdouble h = ftt_cell_size (parent)/2., sa = 0.;
+   ftt_cell_children (parent, &child);
+   int i;
+ 
+   GfsStoredMetric * m = GFS_STORED_METRIC (a);
+   GfsMap * map = m->map;
+   for (i = 0; i < FTT_CELLS; i++) {
+     ftt_cell_pos (child.c[i], &p);
+     GFS_VALUE (child.c[i], a) = area (map, 
+ 				      p.x - h/2., p.y - h/2., 
+ 				      p.x + h/2., p.y + h/2.)/(h*h);
+     sa += GFS_VALUE (child.c[i], a);
+   }
+ 
+   if (m->e) {
+     double e = GFS_VALUE (parent, a) - sa/4.;
+     for (i = 0; i < FTT_CELLS; i++)
+       GFS_VALUE (child.c[i], m->e) = e;
+   }
+ 
+   ftt_cell_pos (parent, &p);
+ 
+   GFS_VALUE (child.c[0], m->h[0]) = GFS_VALUE (child.c[1], m->h[1]) = 
+     length_v (map, p.y, p.y + h, p.x)/h;
+   GFS_VALUE (child.c[0], m->h[3]) = GFS_VALUE (child.c[2], m->h[2]) = 
+     length_u (map, p.x - h, p.x, p.y)/h;
+   GFS_VALUE (child.c[2], m->h[0]) = GFS_VALUE (child.c[3], m->h[1]) = 
+     length_v (map, p.y - h, p.y, p.x)/h;
+   GFS_VALUE (child.c[1], m->h[3]) = GFS_VALUE (child.c[3], m->h[2]) = 
+     length_u (map, p.x, p.x + h, p.y)/h;
+ 
+   GFS_VALUE (child.c[0], m->h[2]) = length_u (map, p.x - h, p.x, p.y + h)/h;
+   GFS_VALUE (child.c[0], m->h[1]) = length_v (map, p.y, p.y + h, p.x - h)/h;
+   GFS_VALUE (child.c[1], m->h[2]) = length_u (map, p.x, p.x + h, p.y + h)/h;
+   GFS_VALUE (child.c[1], m->h[0]) = length_v (map, p.y, p.y + h, p.x + h)/h;
+   GFS_VALUE (child.c[2], m->h[3]) = length_u (map, p.x - h, p.x, p.y - h)/h;
+   GFS_VALUE (child.c[2], m->h[1]) = length_v (map, p.y - h, p.y, p.x - h)/h;
+   GFS_VALUE (child.c[3], m->h[3]) = length_u (map, p.x, p.x + h, p.y - h)/h;
+   GFS_VALUE (child.c[3], m->h[0]) = length_v (map, p.y - h, p.y, p.x + h)/h;
+ }
+ 
+ static void metric_fine_coarse (FttCell * parent, GfsVariable * a)
+ {
+   FttCellChildren child;
+   guint n;
+ 
+   ftt_cell_children (parent, &child);
+   gdouble va = 0.;
+   for (n = 0; n < 4; n++)
+     va += GFS_VALUE (child.c[n], a);
+   GFS_VALUE (parent, a) = va/4.;
+ 
+   GfsStoredMetric * m = GFS_STORED_METRIC (a);
+   GFS_VALUE (parent, m->h[0]) = (GFS_VALUE (child.c[1], m->h[0]) +
+ 				 GFS_VALUE (child.c[3], m->h[0]))/2.;
+   GFS_VALUE (parent, m->h[1]) = (GFS_VALUE (child.c[0], m->h[1]) +
+ 				 GFS_VALUE (child.c[2], m->h[1]))/2.;
+   GFS_VALUE (parent, m->h[2]) = (GFS_VALUE (child.c[0], m->h[2]) +
+ 				 GFS_VALUE (child.c[1], m->h[2]))/2.;
+   GFS_VALUE (parent, m->h[3]) = (GFS_VALUE (child.c[2], m->h[3]) +
+ 				 GFS_VALUE (child.c[3], m->h[3]))/2.;
+ }
+ 
+ static gdouble face_metric (const GfsDomain * domain, const FttCellFace * face)
+ { 
+   if (face->d/2 > FTT_Y)
+     return 1.;
+   return GFS_VALUE (face->cell, GFS_STORED_METRIC (domain->metric_data)->h[face->d]);
+ }
+ 
+ static gdouble cell_metric (const GfsDomain * domain, const FttCell * cell)
+ {
+   return GFS_VALUE (cell, GFS_VARIABLE (domain->metric_data));
+ }
+ 
+ static void solid_metric (const GfsDomain * domain, const FttCell * cell, FttVector * m)
+ {
+   g_assert (GFS_IS_MIXED (cell));
+   g_assert_not_implemented ();
+ }
+ 
+ static gdouble scale_metric (const GfsDomain * domain, const FttCell * cell, FttComponent c)
+ {
+   /* fixme: this does not allow for Z-metric */
+   if (c > FTT_Y)
+     return 1.;
+   FttComponent d = FTT_ORTHOGONAL_COMPONENT (c);
+   return (GFS_VALUE (cell, GFS_STORED_METRIC (domain->metric_data)->h[2*d]) +
+ 	  GFS_VALUE (cell, GFS_STORED_METRIC (domain->metric_data)->h[2*d + 1]))/2.;
+ }
+ 
+ static gdouble face_scale_metric (const GfsDomain * domain, const FttCellFace * face,
+ 				  FttComponent c)
+ {
+   /* fixme: this does not allow for Z-metric */
+   if (c > FTT_Y)
+     return 1.;
+   /* fixme: this is not second-order for fine/coarse faces */
+   return (scale_metric (domain, face->cell, c) + scale_metric (domain, face->neighbor, c))/2.;
+ }
+ 
+ static void none (FttCell * parent, GfsVariable * v)
+ {
+ }
+ 
+ static void stored_metric_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_stored_metric_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
+   GfsStoredMetric * m = GFS_STORED_METRIC (*o);
+   if (fp->type == GTS_STRING) {
+     if (!(m->e = gfs_domain_get_or_add_variable (domain, fp->token->str, "Metric error"))) {
+       gts_file_error (fp, "`%s' is a reserved variable name", fp->token->str);
+       return;
+     }
+     m->e->fine_coarse = m->e->coarse_fine = none;
+     gts_file_next_token (fp);
+   }
+ 
+   GfsVariable * a = GFS_VARIABLE (*o);
+   FttDirection d;
+   for (d = 0; d < 4; d++) {
+     gchar * name = g_strdup_printf ("%sh%d", a->name, d);
+     m->h[d] = gfs_domain_get_or_add_variable (domain, name, "Face metric");
+     m->h[d]->fine_coarse = m->h[d]->coarse_fine = none;
+     g_free (name);
+   }
+ 
+   g_free (a->description);
+   a->description = g_strdup ("Cell metric");
+   a->coarse_fine = metric_coarse_fine;
+   a->fine_coarse = metric_fine_coarse;
+ 
+   m->map = GFS_MAP (gts_object_new (GTS_OBJECT_CLASS (m->map_class)));
+   gfs_object_simulation_set (m->map, domain);
+   gts_container_add (GTS_CONTAINER (GFS_SIMULATION (domain)->maps), GTS_CONTAINEE (m->map));
+ 
+   domain->metric_data = *o;
+   domain->face_metric  = face_metric;
+   domain->cell_metric  = cell_metric;
+   domain->solid_metric = solid_metric;
+   domain->scale_metric = scale_metric;
+   domain->face_scale_metric = face_scale_metric;
+ }
+ 
+ static void stored_metric_class_init (GtsObjectClass * klass)
+ {
+   klass->read = stored_metric_read;
+ }
+ 
+ static void stored_metric_init (GfsStoredMetric * m)
+ {
+   m->map_class = gfs_map_class ();
+ }
+ 
+ GfsVariableClass * gfs_stored_metric_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsStoredMetric",
+       sizeof (GfsStoredMetric),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) stored_metric_class_init,
+       (GtsObjectInitFunc) stored_metric_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_metric_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsStoredMetric} */
+ 
+ /* GfsMapMetric: Header */
+ 
+ #define GFS_IS_MAP_METRIC(obj)         (gts_object_is_from_class (obj,\
+ 						 gfs_map_metric_class ()))
+ 
+ static GfsMapClass * gfs_map_metric_class      (void);
+ 
+ /* GfsMapMetric: Object */
+ 
+ static void gfs_map_metric_read (GtsObject ** o, GtsFile * fp)
+ {
+   /* this mapping cannot be used independently from GfsMetric */
+ }
+ 
+ static void gfs_map_metric_write (GtsObject * o, FILE * fp)
+ {
+   /* this mapping cannot be used independently from GfsMetric */
+ }
+ 
+ static void gfs_map_metric_class_init (GfsMapClass * klass)
+ {
+   GTS_OBJECT_CLASS (klass)->read = gfs_map_metric_read;
+   GTS_OBJECT_CLASS (klass)->write = gfs_map_metric_write;
+ }
+ 
+ static void map_metric_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   GfsMetric * m = GFS_DOMAIN (gfs_object_simulation (map))->metric_data;
+   FttVector src1 = *src; /* just in case src == dest */
+   FttComponent c;
+   for (c = 0; c < 3; c++)
+     if ((&m->x)[c])
+       (&dest->x)[c] = gfs_function_spatial_value ((&m->x)[c], &src1);
+     else
+       (&dest->x)[c] = (&src1.x)[c];
+ }
+ 
+ static void gfs_map_metric_init (GfsMap * map)
+ {
+   map->inverse =   map_metric_inverse;
+ }
+ 
+ static GfsMapClass * gfs_map_metric_class (void)
+ {
+   static GfsMapClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo gfs_map_metric_info = {
+       "GfsMapMetric",
+       sizeof (GfsMap),
+       sizeof (GfsMapClass),
+       (GtsObjectClassInitFunc) gfs_map_metric_class_init,
+       (GtsObjectInitFunc) gfs_map_metric_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_map_class ()), &gfs_map_metric_info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \beginobject{GfsMetric} */
+ 
+ static void metric_write (GtsObject * o, FILE * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_metric_class ())->parent_class->write) (o, fp);
+   
+   GfsMetric * m = GFS_METRIC (o);
+   fputs (" {", fp);
+   FttComponent c;
+   static gchar name[3][2] = {"x", "y", "z"};
+   for (c = 0; c < 3; c++)
+     if ((&m->x)[c]) {
+       fprintf (fp, "\n    %s = ", name[c]);
+       gfs_function_write ((&m->x)[c], fp);
+     }
+   fputs ("\n  }", fp);
+ }
+ 
+ static void metric_destroy (GtsObject * o)
+ {
+   GfsMetric * m = GFS_METRIC (o);
+   FttComponent c;
+   for (c = 0; c < 3; c++)
+     if ((&m->x)[c])
+       gts_object_destroy (GTS_OBJECT ((&m->x)[c]));
+ 
+   (* GTS_OBJECT_CLASS (gfs_metric_class ())->parent_class->destroy) (o);
+ }
+ 
+ static void metric_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_metric_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   if (fp->type != '{') {
+     gts_file_error (fp, "expecting a parameter block");
+     return;
+   }
+ 
+   GfsMetric * m = GFS_METRIC (*o);
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (m));
+   GtsFileVariable var[] = {
+     {GTS_OBJ, "x", TRUE, &m->x},
+     {GTS_OBJ, "y", TRUE, &m->y},
+     {GTS_OBJ, "z", TRUE, &m->z},
+     {GTS_NONE}
+   };
+   FttComponent c;
+   for (c = 0; c < 3; c++)
+     gfs_object_simulation_set ((&m->x)[c], domain);
+   
+   gts_file_assign_variables (fp, var);
+   
+   for (c = 0; c < 3; c++)
+     if (!var[c].set) {
+       gts_object_destroy (GTS_OBJECT ((&m->x)[c]));
+       (&m->x)[c] = NULL;
+     }
+   
+   if (fp->type == GTS_ERROR)
+     return;
+ }
+ 
+ static void metric_class_init (GtsObjectClass * klass)
+ {
+   klass->destroy = metric_destroy;
+   klass->read = metric_read;
+   klass->write = metric_write;
+ }
+ 
+ static void metric_init (GfsMetric * m)
+ {
+   GFS_STORED_METRIC (m)->map_class = gfs_map_metric_class ();
+   m->x = gfs_function_new (gfs_function_map_class (), 1.);
+   m->y = gfs_function_new (gfs_function_map_class (), 1.);
+   m->z = gfs_function_new (gfs_function_map_class (), 1.);
+ }
+ 
+ GfsVariableClass * gfs_metric_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo gfs_metric_info = {
+       "GfsMetric",
+       sizeof (GfsMetric),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) metric_class_init,
+       (GtsObjectInitFunc) metric_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_stored_metric_class ()),
+ 				  &gfs_metric_info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsMetric} */
+ 
++>>>>>>> upstream/20131206+dfsg
  /* "Expanded spherical cube" metric */
  
  #define N 30
  
++<<<<<<< HEAD
 +#if 0
 +/* Conformal mapping Taylor coefficients: from Rancic et al, 1996, Table B.1 */
 +
 +static double A[N] = {
 +   1.47713062600964, -0.38183510510174, -0.05573058001191, -0.01895883606818, -0.00791315785221,
++=======
+ #if 1
+ /* Conformal mapping Taylor coefficients: from Rancic et al, 1996, Table B.1 */
+ 
+ static double A[N] = {
+    1.47713062600964, -0.38183510510174, -0.05573058001191, -0.00895883606818, -0.00791315785221,
++>>>>>>> upstream/20131206+dfsg
    -0.00486625437708, -0.00329251751279, -0.00235481488325, -0.00175870527475, -0.00135681133278,
    -0.00107459847699, -0.00086944475948, -0.00071607115121, -0.00059867100093, -0.00050699063239,
    -0.00043415191279, -0.00037541003286, -0.00032741060100, -0.00028773091482, -0.00025458777519,
@@@ -82,7 -821,7 +855,11 @@@ static double B[N] = 
  /* Conformal mapping Taylor coefficients: from map_xy2xyz.m from mitgcm */
  
  static double A[N] = {
++<<<<<<< HEAD
 +  1.47713057321600, -0.38183513110512, -0.05573055466344, -0.01895884801823, -0.00791314396396,
++=======
+   1.47713057321600, -0.38183513110512, -0.05573055466344, -0.00895884801823, -0.00791314396396,
++>>>>>>> upstream/20131206+dfsg
    -0.00486626515498, -0.00329250387158, -0.00235482619663, -0.00175869000970, -0.00135682443774,
    -0.00107458043205, -0.00086946107050, -0.00071604933286, -0.00059869243613, -0.00050696402446,
    -0.00043418115349, -0.00037537743098, -0.00032745130951, -0.00028769063795, -0.00025464473946,
@@@ -150,8 -889,7 +927,12 @@@ static void fmap_xy2XYZ (double x, doub
    complex double z = (x + I*y)/2.;
    complex double W;
    if (cabs (z) > 0.) {
++<<<<<<< HEAD
 +    z = z*z*z*z;
 +    W = WofZ (z);
++=======
+     W = WofZ (z*z*z*z);
++>>>>>>> upstream/20131206+dfsg
      W = I3*cpow (W*I, 1./3.);
    }
    else
@@@ -191,7 -929,8 +972,12 @@@ static void cmap_xy2XYZ (double x, doub
  {
    x *= 2.; y *= 2.;
  
++<<<<<<< HEAD
 +  g_assert (x >= -1. && x <= 7. && y >= -1. && y <= 5.);
++=======
+   /* fixme: causes crash in gfsview when saving in gnuplot format */
+   //  g_assert (x >= -1. && x <= 7. && y >= -1. && y <= 5.);
++>>>>>>> upstream/20131206+dfsg
  
    /* symmetries: see doc/figures/cubed.fig */
    double tmp;
@@@ -348,111 -1087,233 +1134,324 @@@ static int face_num (gdouble X, gdoubl
  static void map_cubed_transform (GfsMap * map, const FttVector * src, FttVector * dest)
  {
    GfsSimulation * sim = gfs_object_simulation (map);
++<<<<<<< HEAD
 +  double lon = (src->x*M_PI)/180., lat = src->y*M_PI/180.;
 +  double X = cos (lat)*sin (lon), Y = sin (lat), Z = cos(lat)*cos(lon);
++=======
+   double lon = src->x*sim->physical_params.L*M_PI/180.;
+   double lat = src->y*sim->physical_params.L*M_PI/180.;
+   double coslat = cos (lat), sinlat = sin (lat), coslon = cos (lon);
+   double X = coslat*sin (lon), Y = sinlat, Z = coslat*coslon;
++>>>>>>> upstream/20131206+dfsg
    double x, y;
  
    /* Maybe not the most elegant but works */
    switch (face_num(X,Y,Z)) {
    case 1:
      fmap_XYZ2xy (X, Y, fabs(Z), &x, &y);
++<<<<<<< HEAD
 +    dest->x = x/2.*sim->physical_params.L;
 +    dest->y = y/2.*sim->physical_params.L;
 +    dest->z = src->z;
 +    break;
 +  case 2:
 +    lon = (src->x - 90.)*M_PI/180.;
 +    X = cos (lat)*sin (lon);
 +    Z = sqrt (1. - X*X - Y*Y);
 +    fmap_XYZ2xy (X, Y, Z, &x, &y);
 +    dest->x = (1. + x/2.)*sim->physical_params.L;
 +    dest->y = y/2.*sim->physical_params.L;
 +    dest->z = src->z;
 +    break;
 +  case 3:
 +    if (45. < fabs(src->x) && fabs(src->x) < 135.) {
 +      lon = (src->x - 90.)*M_PI/180.;
 +      lat = src->y*M_PI/180.;
 +      Y = sin (lat);
 +      X = cos (lat)*sin (lon);
 +      Z = sqrt (1. - X*X - Y*Y);
 +      fmap_XYZ2xy (X, Y, Z, &x, &y);
 +      dest->x = (1. + x/2.)*sim->physical_params.L;
 +      if (src->x < 0.)
 +	dest->y = (1. + y/2.)*sim->physical_params.L;
 +      else
 +	dest->y = (1. - y/2.)*sim->physical_params.L;
++=======
+     dest->x = x/2.;
+     dest->y = y/2.;
+     dest->z = src->z;
+     break;
+   case 2:
+     X = - coslat*coslon;
+     Z = sqrt (1. - X*X - Y*Y);
+     fmap_XYZ2xy (X, Y, Z, &x, &y);
+     dest->x = (1. + x/2.);
+     dest->y = y/2.;
+     dest->z = src->z;
+     break;
+   case 3:
+     if (M_PI/4. < fabs(lon) && fabs(lon) < 3.*M_PI/4.) {
+       X = - coslat*coslon;
+       Z = sqrt (1. - X*X - Y*Y);
+       fmap_XYZ2xy (X, Y, Z, &x, &y);
+       dest->x = (1. + x/2.);
+       if (lon < 0.)
+ 	dest->y = (1. + y/2.);
+       else
+ 	dest->y = (1. - y/2.);
++>>>>>>> upstream/20131206+dfsg
        dest->z = src->z;
      }
      else {
        fmap_XYZ2xy (X, Y, fabs(Z), &x, &y);
++<<<<<<< HEAD
 +      if (src->x > -135. && src->x < 135.)
 +	dest->x = (1. - y/2.)*sim->physical_params.L;
 +      else
 +	dest->x = (1. + y/2.)*sim->physical_params.L;
 +      dest->y = (1. - x/2.)*sim->physical_params.L;
++=======
+       if (lon > -3.*M_PI/4. && lon < 3.*M_PI/4.)
+ 	dest->x = (1. - y/2.);
+       else
+ 	dest->x = (1. + y/2.);
+       dest->y = (1. - x/2.);
++>>>>>>> upstream/20131206+dfsg
        dest->z = src->z;
      }
      break;
    case 4:
      fmap_XYZ2xy (X, Y, fabs(Z), &x, &y);
++<<<<<<< HEAD
 +    dest->x = (2. - y/2.)*sim->physical_params.L;
 +    dest->y = (1. - x/2.)*sim->physical_params.L;
 +    dest->z = src->z;
 +    break;
 +  case 5:
 +    lon = (src->x + 90.)*M_PI/180.;
 +    X = cos (lat)*sin (lon);
 +    Z = sqrt (1. - X*X - Y*Y);
 +    fmap_XYZ2xy (X, Y, Z, &x, &y);
 +    dest->x = (2. - y/2.)*sim->physical_params.L;
 +    dest->y = (2. + x/2.)*sim->physical_params.L;
 +    dest->z = src->z;
 +    break;
 +  case 6:
 +    if (45. < fabs(src->x) && fabs(src->x) < 135.) {
 +      lon = (src->x - 90.)*M_PI/180.;
 +      lat = src->y*M_PI/180.;
 +      Y = sin (lat);
 +      X = cos (lat)*sin (lon);
 +      Z = sqrt (1. - X*X - Y*Y);
 +      fmap_XYZ2xy (X, Y, Z, &x, &y);
 +      dest->y = (2. - x/2.)*sim->physical_params.L;
 +      if (src->x < 0.)
 +	dest->x = (3. + y/2.)*sim->physical_params.L;
 +      else
 +	dest->x = (3. - y/2.)*sim->physical_params.L;
++=======
+     dest->x = (2. - y/2.);
+     dest->y = (1. - x/2.);
+     dest->z = src->z;
+     break;
+   case 5:
+     X = coslat*coslon;
+     Z = sqrt (1. - X*X - Y*Y);
+     fmap_XYZ2xy (X, Y, Z, &x, &y);
+     dest->x = (2. - y/2.);
+     dest->y = (2. + x/2.);
+     dest->z = src->z;
+     break;
+   case 6:
+     if (M_PI/4. < fabs(lon) && fabs(lon) < 3.*M_PI/4.) {
+       X = - coslat*coslon;
+       Z = sqrt (1. - X*X - Y*Y);
+       fmap_XYZ2xy (X, Y, Z, &x, &y);
+       dest->y = (2. - x/2.);
+       if (lon < 0.)
+ 	dest->x = (3. + y/2.);
+       else
+ 	dest->x = (3. - y/2.);
++>>>>>>> upstream/20131206+dfsg
        dest->z = src->z;
      }
      else {
        fmap_XYZ2xy (X, Y, fabs(Z), &x, &y);
++<<<<<<< HEAD
 +      if (src->x > -135. && src->x < 135.)
 +	dest->y = (2. - y/2.)*sim->physical_params.L;
 +      else
 +	dest->y = (2. + y/2.)*sim->physical_params.L;
 +      dest->x = (3. + x/2.)*sim->physical_params.L;
++=======
+       if (lon > -3.*M_PI/4. && lon < 3.*M_PI/4.)
+ 	dest->y = (2. - y/2.);
+       else
+ 	dest->y = (2. + y/2.);
+       dest->x = (3. + x/2.);
++>>>>>>> upstream/20131206+dfsg
        dest->z = src->z;
      }
-     break;
-   default:
-     g_assert_not_reached ();
+     break;
+   default:
+     g_assert_not_reached ();
+   }
+ }
+ 
+ static void map_cubed_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   GfsSimulation * sim = gfs_object_simulation (map);
+   double X, Y, Z;
++<<<<<<< HEAD
++  cmap_xy2XYZ (src->x/sim->physical_params.L, src->y/sim->physical_params.L, &X, &Y, &Z);
++  dest->x = atan2 (X, Z)*180./M_PI;
++  dest->y = asin (Y)*180./M_PI;
++  dest->z = src->z;
++}
++
++=======
+   cmap_xy2XYZ (src->x, src->y, &X, &Y, &Z);
+   dest->x = atan2 (X, Z)*180./M_PI/sim->physical_params.L;
+   dest->y = asin (Y)*180./M_PI/sim->physical_params.L;
+   dest->z = src->z;
+ }
+ 
+ static void map_cubed_inverse_cell (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   gint i;
+   FttVector o = { 0., 0., 0. };
+   for (i = 0; i < 4; i++) {
+     o.x += src[i].x;
+     o.y += src[i].y;
+     o.z += src[i].z;
+     map_cubed_inverse (map, &(src[i]), &(dest[i]));
+   }
+   o.x /= 4.; o.y /= 4.; o.z /= 4.;
+   map_cubed_inverse (map, &o, &o);
+   /* make sure we do not cross periodic longitude boundary */
+   gdouble L = gfs_object_simulation (map)->physical_params.L;
+   for (i = 0; i < 4; i++)
+     if (dest[i].x > o.x + 180./L)
+       dest[i].x -= 360./L;
+     else if (dest[i].x < o.x - 180./L)
+       dest[i].x += 360./L;
+ }
+ 
+ static double evaluate (const FttVector * x, const FttVector * rhs, FttVector * f)
+ {
+   gdouble delta = 0.;
+   cmap_xy2XYZ (x->x, x->y, &f->x, &f->y, &f->z);
+   int i;
+   for (i = 0; i < 3; i++) {
+     (&f->x)[i] -= (&rhs->x)[i];
+     delta += (&f->x)[i]*(&f->x)[i];
+   }
+   return delta;
+ }
+ 
+ #define DELTA 1e-6
+ 
+ static void jacobian (const FttVector * x, const FttVector * rhs, FttVector * f,
+ 		      GtsMatrix * J)
+ {
+   int i, j;
+   for (i = 0; i < 3; i++)
+     for (j = 0; j < 3; j++) {
+       FttVector df, dx = *x;
+       (&dx.x)[j] += DELTA;
+       cmap_xy2XYZ (dx.x, dx.y, &df.x, &df.y, &df.z);
+       df.x *= 1. + dx.z;
+       df.y *= 1. + dx.z;
+       df.z *= 1. + dx.z;
+       J[i][j] = ((&df.x)[i] - (&rhs->x)[i] - (&f->x)[i])/DELTA;
+     }
+ }
+ 
+ static void normalized_jacobian (const FttVector * p, GtsMatrix * J)
+ {
+   FttVector f, rhs = {0., 0., 0.};
+   g_assert (p->z == 0.);
+   evaluate (p, &rhs, &f);
+   jacobian (p, &rhs, &f, J);
+   /* normalize */
+   int i, j;
+   for (i = 0; i < 3; i++) {
+     gdouble h = 0.;
+     for (j = 0; j < 3; j++)
+       h += J[j][i]*J[j][i];
+     h = sqrt (h);
+     for (j = 0; j < 3; j++)
+       J[j][i] /= h;
    }
  }
  
- static void map_cubed_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
+ static void map_cubed_inverse_vector (GfsMap * map, const FttVector * p,
+ 				      const FttVector * src, FttVector * dest)
+ {
+   GtsMatrix J[4];
+   normalized_jacobian (p, J);
+   FttVector src1;
+ 
+   int i, j;
+   for (i = 0; i < 3; i++) {
+     (&src1.x)[i] = 0.;
+     for (j = 0; j < 3; j++)
+       (&src1.x)[i] += (&src->x)[j]*J[i][j];
+   }
+   
+   FttVector p1;
+   map_cubed_inverse (map, p, &p1);
+   GfsSimulation * sim = gfs_object_simulation (map);
+   gdouble lon = p1.x*sim->physical_params.L*M_PI/180.;
+   gdouble lat = p1.y*sim->physical_params.L*M_PI/180.;
+   dest->x = (src1.x + tan (lat)*sin (lon)*src1.y)/cos (lon);
+   dest->y = src1.y/cos (lat);
+   dest->z = src1.z;
+ }
+ 
+ static void map_cubed_transform_vector (GfsMap * map, const FttVector * p,
+ 					const FttVector * src, FttVector * dest)
  {
+   GtsMatrix J[4];
+   normalized_jacobian (p, J);
+   GtsMatrix * iJ = gts_matrix3_inverse (J);
+   if (!iJ) {
+     gts_matrix_print (J, stderr);
+     g_assert_not_reached ();
+   }
+ 
+   FttVector src1 = *src;
+   FttVector p1;
+   map_cubed_inverse (map, p, &p1);
    GfsSimulation * sim = gfs_object_simulation (map);
-   double X, Y, Z;
-   cmap_xy2XYZ (src->x/sim->physical_params.L, src->y/sim->physical_params.L, &X, &Y, &Z);
-   dest->x = atan2 (X, Z)*180./M_PI;
-   dest->y = asin (Y)*180./M_PI;
-   dest->z = src->z;
+   gdouble lon = p1.x*sim->physical_params.L*M_PI/180.;
+   gdouble lat = p1.y*sim->physical_params.L*M_PI/180.;
+   gdouble coslon = cos (lon), sinlon = sin (lon);
+   gdouble sinlat = sin (lat);
+   src1.x = coslon*src->x - sinlat*sinlon*src->y;
+   src1.y = cos(lat)*src->y;
+   src1.z = - sinlon*src->x - sinlat*coslon*src->y;
+ 
+   int i, j;
+   for (i = 0; i < 3; i++) {
+     (&dest->x)[i] = 0.;
+     for (j = 0; j < 3; j++)
+       (&dest->x)[i] += (&src1.x)[j]*iJ[i][j];
+   }
+   gts_matrix_destroy (iJ);
  }
  
++>>>>>>> upstream/20131206+dfsg
  static void gfs_map_cubed_init (GfsMap * map)
  {
    map->transform = map_cubed_transform;
    map->inverse =   map_cubed_inverse;
++<<<<<<< HEAD
++=======
+   map->inverse_cell = map_cubed_inverse_cell;
+   map->inverse_vector = map_cubed_inverse_vector;
+   map->transform_vector = map_cubed_transform_vector;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static GfsMapClass * gfs_map_cubed_class (void)
@@@ -468,6 -1329,6 +1467,7 @@@
        (GtsObjectInitFunc) gfs_map_cubed_init,
        (GtsArgSetFunc) NULL,
        (GtsArgGetFunc) NULL
++<<<<<<< HEAD
      };
      klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_map_class ()), &gfs_map_cubed_info);
    }
@@@ -480,59 -1341,21 +1480,86 @@@
   * \beginobject{GfsMetricCubed}
   */
  
 +static gdouble cubed_face_metric (const GfsDomain * domain, const FttCellFace * face)
 +{
 +  if (face->d/2 > FTT_Y)
 +    return 1.;
 +  return GFS_VALUE (face->cell, GFS_METRIC_CUBED (domain->metric_data)->h[face->d]);
 +}
 +
 +static gdouble cubed_cell_metric (const GfsDomain * domain, const FttCell * cell)
 +{
 +  return GFS_VALUE (cell, GFS_VARIABLE1 (domain->metric_data));
 +}
 +
 +static gdouble cubed_solid_metric (const GfsDomain * domain, const FttCell * cell)
 +{
 +  g_assert (GFS_IS_MIXED (cell));
 +  g_assert_not_implemented ();
 +  return 1.;
 +}
 +
 +static gdouble cubed_scale_metric (const GfsDomain * domain, const FttCell * cell, FttComponent c)
 +{
 +  if (c > FTT_Y)
 +    return 1.;
 +  FttComponent d = FTT_ORTHOGONAL_COMPONENT (c);
 +  return (GFS_VALUE (cell, GFS_METRIC_CUBED (domain->metric_data)->h[2*d]) +
 +	  GFS_VALUE (cell, GFS_METRIC_CUBED (domain->metric_data)->h[2*d + 1]))/2.;
 +}
 +
++=======
++    };
++    klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_map_class ()), &gfs_map_cubed_info);
++  }
++
++  return klass;
++}
++
++/**
++ * The 'cubed sphere' metric.
++ * \beginobject{GfsMetricCubed}
++ */
++
++>>>>>>> upstream/20131206+dfsg
  static gdouble cubed_face_scale_metric (const GfsDomain * domain, const FttCellFace * face,
  					FttComponent c)
  {
    if (c > FTT_Y)
      return 1.;
++<<<<<<< HEAD
 +  /* fixme: here we assume that the metric is perfectly isotropic:
 +     this is not strictly the case numerically (0.08% difference), but
 +     is it the case theoretically? */
 +  return GFS_VALUE (face->cell, GFS_METRIC_CUBED (domain->metric_data)->h[face->d]);
 +}
 +
 +static void none (FttCell * parent, GfsVariable * v)
 +{
 +}
 +
 +typedef struct {
 +  double x, y, x1, y1, z1;
 +  double a;
 +} Point;
 +
 +typedef struct {
 +  Point * v[4];
 +  double a, h[4];
 +} Square;
 +
++=======
+   /* The transformation is conformal so the metric is isotropic */
+   return GFS_VALUE (face->cell, GFS_STORED_METRIC (domain->metric_data)->h[face->d]);
+ }
+ 
+ typedef struct {
+   double x, y, z;
+   double x1, y1, z1;
+   double a;
+ } Point;
+ 
++>>>>>>> upstream/20131206+dfsg
  static void point_new (Point * p, double x, double y)
  {
    p->x = x; p->y = y;
@@@ -630,49 -1453,28 +1657,73 @@@ static void cubed_coarse_fine (FttCell 
    GFS_VALUE (child.c[2], a) = matrix_a (r, m, 0, 0);
    GFS_VALUE (child.c[3], a) = matrix_a (r, m, m, 0);
  
++<<<<<<< HEAD
 +  GFS_VALUE (child.c[0], cubed->h[0]) = GFS_VALUE (child.c[1], cubed->h[1]) = 
 +    matrix_hy (r, m, m, m);
 +  GFS_VALUE (child.c[0], cubed->h[3]) = GFS_VALUE (child.c[2], cubed->h[2]) = 
 +    matrix_hx (r, m, 0, m);
 +  GFS_VALUE (child.c[2], cubed->h[0]) = GFS_VALUE (child.c[3], cubed->h[1]) = 
 +    matrix_hy (r, m, m, 0);
 +  GFS_VALUE (child.c[1], cubed->h[3]) = GFS_VALUE (child.c[3], cubed->h[2]) = 
 +    matrix_hx (r, m, m, m);
 +
 +  GFS_VALUE (child.c[0], cubed->h[2]) = matrix_hx (r, m, 0, n - 1);
 +  GFS_VALUE (child.c[0], cubed->h[1]) = matrix_hy (r, m, 0, m);
 +  GFS_VALUE (child.c[1], cubed->h[2]) = matrix_hx (r, m, m, n - 1);
 +  GFS_VALUE (child.c[1], cubed->h[0]) = matrix_hy (r, m, n - 1, m);
 +  GFS_VALUE (child.c[2], cubed->h[3]) = matrix_hx (r, m, 0, 0);
 +  GFS_VALUE (child.c[2], cubed->h[1]) = matrix_hy (r, m, 0, 0);
 +  GFS_VALUE (child.c[3], cubed->h[0]) = matrix_hy (r, m, n - 1, 0);
 +  GFS_VALUE (child.c[3], cubed->h[3]) = matrix_hx (r, m, m, 0);
++=======
+   GfsStoredMetric * metric = GFS_STORED_METRIC (a);
+   GFS_VALUE (child.c[0], metric->h[0]) = GFS_VALUE (child.c[1], metric->h[1]) = 
+     matrix_hy (r, m, m, m);
+   GFS_VALUE (child.c[0], metric->h[3]) = GFS_VALUE (child.c[2], metric->h[2]) = 
+     matrix_hx (r, m, 0, m);
+   GFS_VALUE (child.c[2], metric->h[0]) = GFS_VALUE (child.c[3], metric->h[1]) = 
+     matrix_hy (r, m, m, 0);
+   GFS_VALUE (child.c[1], metric->h[3]) = GFS_VALUE (child.c[3], metric->h[2]) = 
+     matrix_hx (r, m, m, m);
+ 
+   GFS_VALUE (child.c[0], metric->h[2]) = matrix_hx (r, m, 0, n - 1);
+   GFS_VALUE (child.c[0], metric->h[1]) = matrix_hy (r, m, 0, m);
+   GFS_VALUE (child.c[1], metric->h[2]) = matrix_hx (r, m, m, n - 1);
+   GFS_VALUE (child.c[1], metric->h[0]) = matrix_hy (r, m, n - 1, m);
+   GFS_VALUE (child.c[2], metric->h[3]) = matrix_hx (r, m, 0, 0);
+   GFS_VALUE (child.c[2], metric->h[1]) = matrix_hy (r, m, 0, 0);
+   GFS_VALUE (child.c[3], metric->h[0]) = matrix_hy (r, m, n - 1, 0);
+   GFS_VALUE (child.c[3], metric->h[3]) = matrix_hx (r, m, m, 0);
++>>>>>>> upstream/20131206+dfsg
  
    gfs_matrix_free (r);
  }
  
++<<<<<<< HEAD
 +static void cubed_fine_coarse (FttCell * parent, GfsVariable * a)
 +{
 +  GfsMetricCubed * cubed = GFS_METRIC_CUBED (a);
 +  FttCellChildren child;
 +  guint n;
 +
 +  ftt_cell_children (parent, &child);
 +  gdouble va = 0.;
 +  for (n = 0; n < 4; n++)
 +    va += GFS_VALUE (child.c[n], a);
 +  GFS_VALUE (parent, a) = va/4;
 +
 +  GFS_VALUE (parent, cubed->h[0]) = (GFS_VALUE (child.c[1], cubed->h[0]) +
 +				     GFS_VALUE (child.c[3], cubed->h[0]))/2.;
 +  GFS_VALUE (parent, cubed->h[1]) = (GFS_VALUE (child.c[0], cubed->h[1]) +
 +				     GFS_VALUE (child.c[2], cubed->h[1]))/2.;
 +  GFS_VALUE (parent, cubed->h[2]) = (GFS_VALUE (child.c[0], cubed->h[2]) +
 +				     GFS_VALUE (child.c[1], cubed->h[2]))/2.;
 +  GFS_VALUE (parent, cubed->h[3]) = (GFS_VALUE (child.c[2], cubed->h[3]) +
 +				     GFS_VALUE (child.c[3], cubed->h[3]))/2.;
 +}
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  static void metric_cubed_write (GtsObject * o, FILE * fp)
  {
    (* GTS_OBJECT_CLASS (gfs_metric_cubed_class ())->parent_class->write) (o, fp);
@@@ -686,41 -1488,18 +1737,56 @@@ static void metric_cubed_read (GtsObjec
    if (fp->type == GTS_ERROR)
      return;
  
++<<<<<<< HEAD
 +  GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
 +  if (domain->metric_data || domain->face_metric || domain->cell_metric || domain->solid_metric) {
 +    gts_file_error (fp, "cannot use multiple metrics (yet)");
 +    return;
 +  }
 +
 +  GfsVariable * a = GFS_VARIABLE1 (*o);
 +  GfsMetricCubed * cubed = GFS_METRIC_CUBED (a);
 +  if (fp->type == GTS_INT) {
 +    cubed->level = atoi (fp->token->str);
 +    gts_file_next_token (fp);
 +  }
 +
 +  FttDirection d;
 +  for (d = 0; d < 4; d++) {
 +    gchar * name = g_strdup_printf ("%sh%d", a->name, d);
 +    cubed->h[d] = gfs_domain_get_or_add_variable (domain, name, "Cubed face metric");
 +    cubed->h[d]->fine_coarse = cubed->h[d]->coarse_fine = none;
 +    g_free (name);
 +  }
 +  g_free (a->description);
 +  a->description = g_strdup ("Cubed cell metric");
 +  a->coarse_fine = cubed_coarse_fine;
 +  a->fine_coarse = cubed_fine_coarse;
 +
 +  GtsObject * map = gts_object_new (GTS_OBJECT_CLASS (gfs_map_cubed_class ()));
 +  gfs_object_simulation_set (map, domain);
 +  gts_container_add (GTS_CONTAINER (GFS_SIMULATION (domain)->maps), GTS_CONTAINEE (map));
 +
 +  domain->metric_data  = cubed;
 +  domain->face_metric  = cubed_face_metric;
 +  domain->cell_metric  = cubed_cell_metric;
 +  domain->solid_metric = cubed_solid_metric;
 +  domain->scale_metric = cubed_scale_metric;
 +  domain->face_scale_metric = cubed_face_scale_metric;
++=======
+   GfsMetricCubed * cubed = GFS_METRIC_CUBED (*o);
+   if (fp->type != GTS_INT) {
+     gts_file_error (fp, "expecting an integer (level)");
+     return;
+   }
+   cubed->level = atoi (fp->token->str);
+   gts_file_next_token (fp);
+ 
+   GfsVariable * a = GFS_VARIABLE (*o);
+   a->coarse_fine = cubed_coarse_fine;
+ 
+   a->domain->face_scale_metric = cubed_face_scale_metric;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void metric_cubed_class_init (GtsObjectClass * klass)
@@@ -729,22 -1508,26 +1795,42 @@@
    klass->write = metric_cubed_write;
  }
  
++<<<<<<< HEAD
++=======
+ static void metric_cubed_init (GfsStoredMetric * m)
+ {
+   m->map_class = gfs_map_cubed_class ();
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  GfsVariableClass * gfs_metric_cubed_class (void)
  {
    static GfsVariableClass * klass = NULL;
  
    if (klass == NULL) {
++<<<<<<< HEAD
 +    GtsObjectClassInfo gfs_metric_cubed_info = {
++=======
+     GtsObjectClassInfo info = {
++>>>>>>> upstream/20131206+dfsg
        "GfsMetricCubed",
        sizeof (GfsMetricCubed),
        sizeof (GfsVariableClass),
        (GtsObjectClassInitFunc) metric_cubed_class_init,
++<<<<<<< HEAD
 +      (GtsObjectInitFunc) NULL,
 +      (GtsArgSetFunc) NULL,
 +      (GtsArgGetFunc) NULL
 +    };
 +    klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_metric_class ()), 
 +				  &gfs_metric_cubed_info);
++=======
+       (GtsObjectInitFunc) metric_cubed_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_stored_metric_class ()), &info);
++>>>>>>> upstream/20131206+dfsg
    }
  
    return klass;
@@@ -880,21 -1663,14 +1966,29 @@@ static gdouble lon_lat_face_metric (con
  
  static gdouble lon_lat_cell_metric (const GfsDomain * domain, const FttCell * cell)
  {
++<<<<<<< HEAD
 +  return GFS_VALUE (cell, GFS_VARIABLE1 (domain->metric_data));
 +}
 +
 +static gdouble lon_lat_solid_metric (const GfsDomain * domain, const FttCell * cell)
 +{
 +  g_assert (GFS_IS_MIXED (cell));
 +  g_assert_not_implemented ();
 +  return 1.;
++=======
+   return GFS_VALUE (cell, GFS_VARIABLE (domain->metric_data));
++>>>>>>> upstream/20131206+dfsg
  }
  
  static gdouble lon_lat_scale_metric (const GfsDomain * domain, const FttCell * cell, FttComponent c)
  {
    if (c != FTT_X)
      return 1.;
++<<<<<<< HEAD
 +  return GFS_VALUE (cell, GFS_VARIABLE1 (domain->metric_data));
++=======
+   return GFS_VALUE (cell, GFS_VARIABLE (domain->metric_data));
++>>>>>>> upstream/20131206+dfsg
  }
  
  static gdouble lon_lat_face_scale_metric (const GfsDomain * domain, const FttCellFace * face, 
@@@ -902,7 -1678,7 +1996,11 @@@
  {
    if (c != FTT_X)
      return 1.;
++<<<<<<< HEAD
 +  return gfs_face_interpolated_value (face, GFS_VARIABLE1 (domain->metric_data)->i);
++=======
+   return gfs_face_interpolated_value (face, GFS_VARIABLE (domain->metric_data)->i);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void lonlat_coarse_fine (FttCell * parent, GfsVariable * a)
@@@ -958,12 -1734,6 +2056,15 @@@ static void metric_lon_lat_read (GtsObj
    if (fp->type == GTS_ERROR)
      return;
  
++<<<<<<< HEAD
 +  GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
 +  if (domain->metric_data || domain->face_metric || domain->cell_metric || domain->solid_metric) {
 +    gts_file_error (fp, "cannot use multiple metrics (yet)");
 +    return;
 +  }
 +
++=======
++>>>>>>> upstream/20131206+dfsg
    GFS_METRIC_LON_LAT (*o)->r = gfs_read_constant (fp, gfs_object_simulation (*o));
    if (fp->type == GTS_ERROR)
      return;
@@@ -972,7 -1742,8 +2073,12 @@@
      return;
    }
  
++<<<<<<< HEAD
 +  GfsVariable * a = GFS_VARIABLE1 (*o);
++=======
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
+   GfsVariable * a = GFS_VARIABLE (*o);
++>>>>>>> upstream/20131206+dfsg
    GfsMetricLonLat * lonlat = GFS_METRIC_LON_LAT (a);
    gchar * name = g_strdup_printf ("%sh2", a->name);
    lonlat->h2 = gfs_domain_get_or_add_variable (domain, name, "LonLat face metric");
@@@ -995,7 -1766,7 +2101,11 @@@
    domain->metric_data = *o;
    domain->face_metric  = lon_lat_face_metric;
    domain->cell_metric  = lon_lat_cell_metric;
++<<<<<<< HEAD
 +  domain->solid_metric = lon_lat_solid_metric;
++=======
+   domain->solid_metric = solid_metric;
++>>>>>>> upstream/20131206+dfsg
    domain->scale_metric = lon_lat_scale_metric;
    domain->face_scale_metric = lon_lat_face_scale_metric;
  }
@@@ -1132,6 -1903,7 +2242,10 @@@ static gdouble stretch_face_metric (con
  #endif
    default: g_assert_not_reached ();
    }
++<<<<<<< HEAD
++=======
+   return 1.;
++>>>>>>> upstream/20131206+dfsg
  }
  
  static gdouble stretch_cell_metric (const GfsDomain * domain, const FttCell * cell)
@@@ -1144,10 -1916,18 +2258,25 @@@
  #endif
  }
  
++<<<<<<< HEAD
 +static gdouble stretch_solid_metric (const GfsDomain * domain, const FttCell * cell)
 +{
 +  g_assert_not_implemented ();
 +  return 1;
++=======
+ static void stretch_solid_metric (const GfsDomain * domain, const FttCell * cell, FttVector * m)
+ {
+   GfsMetricStretch * s = GFS_METRIC_STRETCH (domain->metric_data);
+   g_assert (GFS_IS_MIXED (cell));
+ #if FTT_2D
+   m->x = s->sy/s->sx;
+   m->y = s->sx/s->sy;
+ #else
+   m->x = s->sy*s->sz/s->sx;
+   m->y = s->sx*s->sz/s->sy;
+   m->z = s->sx*s->sy/s->sz;
+ #endif
++>>>>>>> upstream/20131206+dfsg
  }
  
  static gdouble stretch_scale_metric (const GfsDomain * domain, const FttCell * cell, FttComponent c)
@@@ -1167,12 -1947,6 +2296,15 @@@ static void metric_stretch_read (GtsObj
    if (fp->type == GTS_ERROR)
      return;
  
++<<<<<<< HEAD
 +  GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
 +  if (domain->metric_data || domain->face_metric || domain->cell_metric || domain->solid_metric) {
 +    gts_file_error (fp, "cannot use multiple metrics (yet)");
 +    return;
 +  }
 +
++=======
++>>>>>>> upstream/20131206+dfsg
    GfsMetricStretch * s = GFS_METRIC_STRETCH (*o);
    if (fp->type == '{') {
      GtsFileVariable var[] = {
@@@ -1190,6 -1964,7 +2322,10 @@@
      }
    }
  
++<<<<<<< HEAD
++=======
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
++>>>>>>> upstream/20131206+dfsg
    GtsObject * map = gts_object_new (GTS_OBJECT_CLASS (gfs_map_stretch_class ()));
    gfs_object_simulation_set (map, domain);
    gts_container_add (GTS_CONTAINER (GFS_SIMULATION (domain)->maps), GTS_CONTAINEE (map));
@@@ -1219,7 -1994,7 +2355,11 @@@ GfsEventClass * gfs_metric_stretch_clas
    static GfsEventClass * klass = NULL;
  
    if (klass == NULL) {
++<<<<<<< HEAD
 +    GtsObjectClassInfo gfs_metric_stretch_info = {
++=======
+     GtsObjectClassInfo info = {
++>>>>>>> upstream/20131206+dfsg
        "GfsMetricStretch",
        sizeof (GfsMetricStretch),
        sizeof (GfsEventClass),
@@@ -1228,11 -2003,438 +2368,446 @@@
        (GtsArgSetFunc) NULL,
        (GtsArgGetFunc) NULL
      };
++<<<<<<< HEAD
 +    klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_event_class ()),
 +				  &gfs_metric_stretch_info);
++=======
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_generic_metric_class ()), &info);
++>>>>>>> upstream/20131206+dfsg
    }
  
    return klass;
  }
  
  /** \endobject{GfsMetricStretch} */
++<<<<<<< HEAD
++=======
+ 
+ /* GfsMetricCubed1 is a reimplementation of GfsMetricCubed using
+    GfsStoredMetric. This is left here as an example of how to
+    implement a complex metric relatively simply. */
+ 
+ /* GfsMapCubed1: Header */
+ 
+ #define GFS_IS_MAP_CUBED1(obj)         (gts_object_is_from_class (obj,\
+ 						 gfs_map_cubed1_class ()))
+ 
+ static GfsMapClass * gfs_map_cubed1_class      (void);
+ 
+ /* GfsMapCubed1: Object */
+ 
+ static void gfs_map_cubed1_read (GtsObject ** o, GtsFile * fp)
+ {
+   /* this mapping cannot be used independently from GfsMetricCubed1 */
+ }
+ 
+ static void gfs_map_cubed1_write (GtsObject * o, FILE * fp)
+ {
+   /* this mapping cannot be used independently from GfsMetricCubed1 */
+ }
+ 
+ static void gfs_map_cubed1_class_init (GfsMapClass * klass)
+ {
+   GTS_OBJECT_CLASS (klass)->read = gfs_map_cubed1_read;
+   GTS_OBJECT_CLASS (klass)->write = gfs_map_cubed1_write;
+ }
+ 
+ static void map_cubed1_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   cmap_xy2XYZ (src->x, src->y, &dest->x, &dest->y, &dest->z);
+   dest->x *= 2./M_PI;
+   dest->y *= 2./M_PI; 
+   dest->z *= 2./M_PI;
+ }
+ 
+ static void gfs_map_cubed1_init (GfsMap * map)
+ {
+   map->inverse = map_cubed1_inverse;
+ }
+ 
+ static GfsMapClass * gfs_map_cubed1_class (void)
+ {
+   static GfsMapClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsMapCubed1",
+       sizeof (GfsMap),
+       sizeof (GfsMapClass),
+       (GtsObjectClassInitFunc) gfs_map_cubed1_class_init,
+       (GtsObjectInitFunc) gfs_map_cubed1_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_map_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /* GfsMetricCubed1: Object */
+ 
+ static void metric_cubed1_init (GfsStoredMetric * m)
+ {
+   m->map_class = gfs_map_cubed1_class ();
+ }
+ 
+ GfsVariableClass * gfs_metric_cubed1_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsMetricCubed1",
+       sizeof (GfsStoredMetric),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) NULL,
+       (GtsObjectInitFunc) metric_cubed1_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_stored_metric_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /* GfsMapVariable: Header */
+ 
+ #define GFS_IS_MAP_VARIABLE(obj)         (gts_object_is_from_class (obj,\
+ 						 gfs_map_variable_class ()))
+ 
+ static GfsMapClass * gfs_map_variable_class      (void);
+ 
+ /* GfsMapVariable: Object */
+ 
+ static void gfs_map_variable_read (GtsObject ** o, GtsFile * fp)
+ {
+   /* this mapping cannot be used independently from GfsMetricVariable */
+ }
+ 
+ static void gfs_map_variable_write (GtsObject * o, FILE * fp)
+ {
+   /* this mapping cannot be used independently from GfsMetricVariable */
+ }
+ 
+ static void gfs_map_variable_class_init (GfsMapClass * klass)
+ {
+   GTS_OBJECT_CLASS (klass)->read = gfs_map_variable_read;
+   GTS_OBJECT_CLASS (klass)->write = gfs_map_variable_write;
+ }
+ 
+ static void map_variable_inverse (GfsMap * map, const FttVector * src, FttVector * dest)
+ {
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (map));
+   FttVector p = *src;
+   FttCell * cell = gfs_domain_boundary_locate (domain, p, -1, NULL);
+   if (cell == NULL)
+     fprintf (stderr, "%g %g\n", p.x, p.y);
+   g_return_if_fail (cell != NULL);
+   GfsMetricVariable * m = domain->metric_data;
+   FttComponent c;
+   for (c = 0; c < 2; c++)
+     (&dest->x)[c] = gfs_interpolate (cell, p, m->x[c]);
+   dest->z = m->x[2] ? gfs_interpolate (cell, p, m->x[2]) : src->z;
+ }
+ 
+ static void gfs_map_variable_init (GfsMap * map)
+ {
+   map->inverse = map_variable_inverse;
+ }
+ 
+ static GfsMapClass * gfs_map_variable_class (void)
+ {
+   static GfsMapClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsMapVariable",
+       sizeof (GfsMap),
+       sizeof (GfsMapClass),
+       (GtsObjectClassInitFunc) gfs_map_variable_class_init,
+       (GtsObjectInitFunc) gfs_map_variable_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_map_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /* GfsMetricVariable: Object */
+ 
+ static void metric_variable_coarse_fine (FttCell * parent, GfsVariable * a)
+ {
+   if (GFS_CELL_IS_BOUNDARY (parent))
+     return;
+ 
+   GfsStoredMetric * m = GFS_STORED_METRIC (a);
+   FttCellChildren child;
+   ftt_cell_children (parent, &child);
+   int i;
+   for (i = 0; i < FTT_CELLS; i++) {
+     FttComponent d;
+     for (d = 0; d < 4; d++)
+       GFS_VALUE (child.c[i], m->h[d]) = 1.;
+     GFS_VALUE (child.c[i], a) = 1.;
+   }
+ }
+ 
+ static void metric_variable_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_metric_variable_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsMetricVariable * m = GFS_METRIC_VARIABLE (*o);
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (m));
+   GfsVariable * v = GFS_VARIABLE (*o);
+   FttComponent c;
+   for (c = 0; c < 3; c++) {
+     gchar cname[3][2] = {"x", "y", "z"};
+     gchar * name = g_strdup_printf ("%s%s", v->name, cname[c]);
+     m->x[c] = gfs_domain_get_or_add_variable (domain, name, "coordinate for variable metric");
+     g_free (name);
+   }
+ 
+   v->coarse_fine = metric_variable_coarse_fine;
+ }
+ 
+ typedef struct {
+   GfsMetricVariable * m;
+   gdouble max;
+   GfsVariable * div;
+ } UpdateData;
+ 
+ static void update_metric (FttCell * cell, UpdateData * p)
+ {
+   gdouble h = ftt_cell_size (cell);
+   gdouble x[4*(FTT_DIMENSION - 1) + 1], y[4*(FTT_DIMENSION - 1) + 1], dx, dy, dz;
+   gfs_cell_corner_values (cell, p->m->x[0], -1, x);
+   gfs_cell_corner_values (cell, p->m->x[1], -1, y);
+   gdouble z[4*(FTT_DIMENSION - 1) + 1];
+   if (p->m->x[2])
+     gfs_cell_corner_values (cell, p->m->x[2], -1, z);
+   else
+     z[0] = z[1] = z[2] = z[3] = 0.;
+ 
+   GfsStoredMetric * m = GFS_STORED_METRIC (p->m);
+   dx = x[1] - x[2]; dy = y[1] - y[2]; dz = z[1] - z[2]; 
+   GFS_VALUE (cell, m->h[0]) = sqrt(dx*dx + dy*dy + dz*dz)/h;
+   dx = x[3] - x[0]; dy = y[3] - y[0]; dz = z[3] - z[0];
+   GFS_VALUE (cell, m->h[1]) = sqrt(dx*dx + dy*dy + dz*dz)/h;
+   dx = x[2] - x[3]; dy = y[2] - y[3]; dz = z[2] - z[3];
+   GFS_VALUE (cell, m->h[2]) = sqrt(dx*dx + dy*dy + dz*dz)/h;
+   dx = x[0] - x[1]; dy = y[0] - y[1]; dz = z[0] - z[1];
+   GFS_VALUE (cell, m->h[3]) = sqrt(dx*dx + dy*dy + dz*dz)/h;
+ 
+   GtsVector v02, v01, v03;
+   v01[0] = x[1] - x[0]; v01[1] = y[1] - y[0]; v01[2] = z[1] - z[0];
+   v02[0] = x[2] - x[0]; v02[1] = y[2] - y[0]; v02[2] = z[2] - z[0];
+   v03[0] = x[3] - x[0]; v03[1] = y[3] - y[0]; v03[2] = z[3] - z[0];
+   GtsVector c012, c023;
+   gts_vector_cross (c012, v01, v02);
+   gts_vector_cross (c023, v02, v03);
+   gdouble am = (gts_vector_norm (c012) + gts_vector_norm (c023))/(2.*h*h);
+   gdouble change = fabs (GFS_VALUE (cell, GFS_VARIABLE (m)) - am)/am;
+   if (change > p->max)
+     p->max = change;
+   GFS_VALUE (cell, GFS_VARIABLE (m)) = am;
+ }
+ 
+ static gboolean metric_variable_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (gfs_stored_metric_class())->event) (event, sim)) {
+     GfsDomain * domain = GFS_DOMAIN (sim);
+     GfsMetricVariable * m = GFS_METRIC_VARIABLE (event);
+     UpdateData p = { m, 1e6 };
+     gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) update_metric, &p);
+     gfs_domain_cell_traverse (domain, FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ 			      (FttCellTraverseFunc) GFS_VARIABLE (event)->fine_coarse, event);
+     return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ static void metric_variable_class_init (GtsObjectClass * klass)
+ {
+   klass->read = metric_variable_read;
+   GFS_EVENT_CLASS (klass)->event = metric_variable_event;
+ }
+ 
+ static void metric_variable_init (GfsStoredMetric * m)
+ {
+   GFS_EVENT (m)->start = 0.;
+   GFS_EVENT (m)->istep = G_MAXINT/2;
+   m->map_class = gfs_map_variable_class ();
+ }
+ 
+ GfsVariableClass * gfs_metric_variable_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsMetricVariable",
+       sizeof (GfsMetricVariable),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) metric_variable_class_init,
+       (GtsObjectInitFunc) metric_variable_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_stored_metric_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /* GfsMetricLaplace: Object */
+ 
+ static gdouble conformal_face_scale_metric (const GfsDomain * domain, const FttCellFace * face,
+ 					    FttComponent c)
+ {
+   if (c > FTT_Y)
+     return 1.;
+   return GFS_VALUE (face->cell, GFS_STORED_METRIC (domain->metric_data)->h[face->d]);
+ }
+ 
+ static void metric_laplace_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_metric_laplace_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsMetricLaplace * m = GFS_METRIC_LAPLACE (*o);
+   if (fp->type == '{') {
+     GtsFileVariable var[] = {
+       {GTS_INT, "conformal", TRUE, &m->conformal},
+       {GTS_INT, "spherical", TRUE, &m->spherical},
+       {GTS_NONE}
+     };
+     gts_file_assign_variables (fp, var);
+     if (fp->type == GTS_ERROR)
+       return;
+   }
+ 
+   GfsSimulation * sim = gfs_object_simulation (*o);
+   if (!m->spherical) {
+     gts_object_destroy (GTS_OBJECT (GFS_METRIC_VARIABLE (m)->x[2]));
+     GFS_METRIC_VARIABLE (m)->x[2] = NULL;
+   }
+   if (m->conformal)
+     GFS_DOMAIN (sim)->face_scale_metric = conformal_face_scale_metric;
+ }
+ 
+ static void metric_laplace_write (GtsObject * o, FILE * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_metric_laplace_class ())->parent_class->write) (o, fp);
+   GfsMetricLaplace * m = GFS_METRIC_LAPLACE (o);
+   fprintf (fp, " { conformal = %d spherical = %d }", m->conformal, m->spherical);
+ }
+ 
+ static void cartesian_coordinates (FttCell * cell, UpdateData * d)
+ {
+   FttVector p;
+   ftt_cell_pos (cell, &p);
+   GFS_VALUE (cell, d->m->x[0]) = p.x;
+   GFS_VALUE (cell, d->m->x[1]) = p.y;
+   if (d->m->x[2])
+     GFS_VALUE (cell, d->m->x[2]) = p.z;
+   GFS_VALUE (cell, d->div) = 0.;
+ }
+ 
+ static void spherical_laplacian (FttCell * cell, GfsVariable * dia)
+ {
+   gdouble h = ftt_cell_size (cell);
+   GFS_VALUE (cell, dia) = -2.*h*h*gfs_domain_cell_fraction (dia->domain, cell);
+ }
+ 
+ static gboolean metric_laplace_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (gfs_stored_metric_class())->event) (event, sim)) {
+     GfsDomain * domain = GFS_DOMAIN (sim);
+     GfsVariable * dia = gfs_temporary_variable (domain);
+     GfsVariable * div = gfs_temporary_variable (domain);
+     GfsVariable * res = gfs_temporary_variable (domain);
+     GfsMetricLaplace * m = GFS_METRIC_LAPLACE (event);
+     GfsMetricVariable * mv = GFS_METRIC_VARIABLE (event);
+ 
+     GfsMultilevelParams par;
+     gfs_multilevel_params_init (&par);
+     /* convergence is dominated by non-linear terms, 1 iteration of the multigrid is enough */
+     par.tolerance = 1.;
+     par.nitermin = 1;
+ 
+     UpdateData p = { mv, 1e6, div };
+     gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) cartesian_coordinates, &p);
+     if (!m->spherical)
+       gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 				(FttCellTraverseFunc) gfs_cell_reset, dia);
+     gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, mv->x[0]);
+     gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, mv->x[1]);
+     if (mv->x[2])
+       gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, mv->x[2]);
+     gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) update_metric, &p);
+     gfs_domain_cell_traverse (domain, FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ 			      (FttCellTraverseFunc) GFS_VARIABLE (event)->fine_coarse, event);
+ 
+     int niter = 1000;
+     while (niter-- && p.max > 1e-3) {
+       gfs_poisson_coefficients (domain, NULL, FALSE, TRUE, TRUE);
+       if (m->spherical)
+ 	gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 				  (FttCellTraverseFunc) spherical_laplacian, dia);
+       par.poisson_solve (domain, &par, mv->x[0], div, res, dia, 1.);
+       par.poisson_solve (domain, &par, mv->x[1], div, res, dia, 1.);
+       if (m->spherical)
+ 	par.poisson_solve (domain, &par, mv->x[2], div, res, dia, 1.);
+       p.max = 0.;
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) update_metric, &p);
+       gfs_domain_cell_traverse (domain, FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ 				(FttCellTraverseFunc) GFS_VARIABLE (event)->fine_coarse, event);
+       //      gfs_multilevel_params_stats_write (&par, stderr);
+       //      fprintf (stderr, "%d %g %g\n", niter, p.max, asym);
+     }
+ 
+     gfs_domain_cell_traverse (domain, FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ 			      (FttCellTraverseFunc) GFS_VARIABLE (event)->fine_coarse, event);
+ 
+     gts_object_destroy (GTS_OBJECT (dia));
+     gts_object_destroy (GTS_OBJECT (div));
+     gts_object_destroy (GTS_OBJECT (res));
+     return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ static void metric_laplace_class_init (GtsObjectClass * klass)
+ {
+   klass->read = metric_laplace_read;
+   klass->write = metric_laplace_write;
+   GFS_EVENT_CLASS (klass)->event = metric_laplace_event;
+ }
+ 
+ GfsVariableClass * gfs_metric_laplace_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsMetricLaplace",
+       sizeof (GfsMetricLaplace),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) metric_laplace_class_init,
+       (GtsObjectInitFunc) NULL,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_metric_variable_class ()), &info);
+   }
+ 
+   return klass;
+ }
++>>>>>>> upstream/20131206+dfsg
diff --cc src/metric.h
index 5aeec62,2f350eb..216a5c2
--- a/src/metric.h
+++ b/src/metric.h
@@@ -24,7 -24,14 +24,18 @@@
  extern "C" {
  #endif /* __cplusplus */
  
++<<<<<<< HEAD
 +#include "variable.h"
++=======
+ #include "map.h"
+ 
+ /* GfsGenericMetric: Header */
+ 
+ #define GFS_IS_GENERIC_METRIC(obj)         (gts_object_is_from_class (obj,\
+ 						   gfs_generic_metric_class ()))
+ 
+ GfsEventClass * gfs_generic_metric_class  (void);
++>>>>>>> upstream/20131206+dfsg
  
  /* GfsVariableMetric: Header */
  
@@@ -33,16 -40,57 +44,67 @@@
  
  GfsVariableClass * gfs_variable_metric_class  (void);
  
++<<<<<<< HEAD
++=======
+ /* GfsStoredMetric: Header */
+ 
+ typedef struct _GfsStoredMetric GfsStoredMetric;
+ 
+ struct _GfsStoredMetric {
+   /*< private >*/
+   GfsVariable parent;
+   GfsMap * map;
+ 
+   /*< public >*/
+   GfsVariable * h[4], * e;
+   GfsMapClass * map_class;
+ };
+ 
+ #define GFS_STORED_METRIC(obj)            GTS_OBJECT_CAST (obj,\
+ 					           GfsStoredMetric,\
+ 					           gfs_stored_metric_class ())
+ #define GFS_IS_STORED_METRIC(obj)         (gts_object_is_from_class (obj,\
+ 						   gfs_stored_metric_class ()))
+ 
+ GfsVariableClass * gfs_stored_metric_class  (void);
+ 
+ /* GfsMetric: Header */
+ 
+ typedef struct _GfsMetric GfsMetric;
+ 
+ struct _GfsMetric {
+   /*< private >*/
+   GfsStoredMetric parent;
+ 
+   /*< public >*/
+   GfsFunction * x, * y, * z;
+ };
+ 
+ #define GFS_METRIC(obj)            GTS_OBJECT_CAST (obj,\
+ 					           GfsMetric,\
+ 					           gfs_metric_class ())
+ #define GFS_IS_METRIC(obj)         (gts_object_is_from_class (obj,\
+ 						   gfs_metric_class ()))
+ 
+ GfsVariableClass * gfs_metric_class  (void);
+ 
++>>>>>>> upstream/20131206+dfsg
  /* GfsMetricCubed: Header */
  
  typedef struct _GfsMetricCubed GfsMetricCubed;
  
  struct _GfsMetricCubed {
    /*< private >*/
++<<<<<<< HEAD
 +  GfsVariable parent;
 +
 +  /*< public >*/
 +  GfsVariable * h[4];
++=======
+   GfsStoredMetric parent;
+ 
+   /*< public >*/
++>>>>>>> upstream/20131206+dfsg
    gint level;
  };
  
@@@ -95,6 -143,50 +157,53 @@@ struct _GfsMetricStretch 
  
  GfsEventClass * gfs_metric_stretch_class  (void);
  
++<<<<<<< HEAD
++=======
+ /* GfsMetricCubed1: Header */
+ 
+ GfsVariableClass * gfs_metric_cubed1_class  (void);
+ 
+ /* GfsMetricVariable: Header */
+ 
+ typedef struct _GfsMetricVariable GfsMetricVariable;
+ 
+ struct _GfsMetricVariable {
+   /*< private >*/
+   GfsStoredMetric parent;
+ 
+   /*< public >*/
+   GfsVariable * x[3];
+ };
+ 
+ #define GFS_METRIC_VARIABLE(obj)            GTS_OBJECT_CAST (obj,\
+ 					           GfsMetricVariable,\
+ 					           gfs_metric_variable_class ())
+ #define GFS_IS_METRIC_VARIABLE(obj)         (gts_object_is_from_class (obj,\
+ 						   gfs_metric_variable_class ()))
+ 
+ GfsVariableClass * gfs_metric_variable_class  (void);
+ 
+ /* GfsMetricLaplace: Header */
+ 
+ typedef struct _GfsMetricLaplace GfsMetricLaplace;
+ 
+ struct _GfsMetricLaplace {
+   /*< private >*/
+   GfsMetricVariable parent;
+ 
+   /*< public >*/
+   gboolean conformal, spherical;
+ };
+ 
+ #define GFS_METRIC_LAPLACE(obj)            GTS_OBJECT_CAST (obj,\
+ 					           GfsMetricLaplace,\
+ 					           gfs_metric_laplace_class ())
+ #define GFS_IS_METRIC_LAPLACE(obj)         (gts_object_is_from_class (obj,\
+ 						   gfs_metric_laplace_class ()))
+ 
+ GfsVariableClass * gfs_metric_laplace_class  (void);
+ 
++>>>>>>> upstream/20131206+dfsg
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
diff --cc src/moving.c
index b6e44d4,05b7f8a..8742f6c
--- a/src/moving.c
+++ b/src/moving.c
@@@ -1025,7 -1025,7 +1025,11 @@@ static void moving_divergence_distribut
  }
  
  static void divergence_approx_hook (GfsDomain * domain, 
++<<<<<<< HEAD
 +				    GfsAdvectionParams * apar, 
++=======
+ 				    gdouble dt,
++>>>>>>> upstream/20131206+dfsg
  				    GfsVariable * div)
  {
    DivergenceData q;
@@@ -1048,23 -1048,40 +1052,65 @@@ static void moving_divergence_mac (FttC
    gdouble olda = OLD_SOLID (cell) ? OLD_SOLID (cell)->a : 1.;
    
    GFS_VALUE (cell, p->div) += (olda - a)*size*size/p->dt;
++<<<<<<< HEAD
 +}
 +
 +static void divergence_mac_hook (GfsDomain * domain, GfsAdvectionParams * apar, GfsVariable * div)
 +{
 +  DivergenceData q;
 +
 +  q.dt = apar->moving_order == 2 ? 2.*apar->dt : - 2.*apar->dt;
 +  q.div = div;
 +  q.domain = domain;
 +  gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			    (FttCellTraverseFunc) moving_divergence_mac, &q);
 +  gfs_domain_traverse_merged (domain,
 +			      (GfsMergedTraverseFunc) 
 +			      (apar->moving_order == 1 ?
 +			       moving_divergence_distribution :
 +			       moving_divergence_distribution_second_order), 
 +			      &q);
++=======
++>>>>>>> upstream/20131206+dfsg
+ }
+ 
+ static void divergence_mac_hook_order_1 (GfsDomain * domain,
+ 					 gdouble dt,
+ 					 GfsVariable * div)
+ {
++<<<<<<< HEAD
++  if (apar->moving_order == 2)
++    swap_face_fractions (sim);
++  gfs_mac_projection (GFS_DOMAIN (sim), par, apar, p, alpha, g, divergence_mac_hook);
++=======
+   DivergenceData q;
+ 
+   q.dt = - 2.*dt;
+   q.div = div;
+   q.domain = domain;
+   gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			    (FttCellTraverseFunc) moving_divergence_mac, &q);
+   gfs_domain_traverse_merged (domain,
+ 			      (GfsMergedTraverseFunc) 
+ 			      moving_divergence_distribution,
+ 			      &q);
+ }
+ 
+ static void divergence_mac_hook_order_2 (GfsDomain * domain, 
+ 					 gdouble dt,
+ 					 GfsVariable * div)
+ {
+   DivergenceData q;
+ 
+   q.dt = 2.*dt;
+   q.div = div;
+   q.domain = domain;
+   gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			    (FttCellTraverseFunc) moving_divergence_mac, &q);
+   gfs_domain_traverse_merged (domain,
+ 			      (GfsMergedTraverseFunc) 
+ 			       moving_divergence_distribution_second_order,
+ 			      &q);
  }
  
  static void moving_mac_projection (GfsSimulation * sim,
@@@ -1076,7 -1093,9 +1122,10 @@@
  {
    if (apar->moving_order == 2)
      swap_face_fractions (sim);
-   gfs_mac_projection (GFS_DOMAIN (sim), par, apar, p, alpha, g, divergence_mac_hook);
+   gfs_mac_projection (GFS_DOMAIN (sim), par, apar->dt/2., p, alpha, g, 
+ 		      (apar->moving_order == 2 ? 
+ 		       divergence_mac_hook_order_2 : divergence_mac_hook_order_1));
++>>>>>>> upstream/20131206+dfsg
    if (apar->moving_order == 2)
      swap_face_fractions_back (sim);
  }
@@@ -1121,7 -1140,7 +1170,11 @@@ static void simulation_moving_run (GfsS
    if (sim->time.i == 0)
      gfs_approximate_projection (domain,
  				&sim->approx_projection_params,
++<<<<<<< HEAD
 +				&sim->advection_params,
++=======
+ 				sim->advection_params.dt,
++>>>>>>> upstream/20131206+dfsg
  				p, sim->physical_params.alpha, res, g,
  				divergence_approx_hook);
    else if (sim->advection_params.gc)
@@@ -1175,7 -1194,7 +1228,11 @@@
  
      gfs_approximate_projection (domain,
  				&sim->approx_projection_params, 
++<<<<<<< HEAD
 +				&sim->advection_params, p, sim->physical_params.alpha, res, g,
++=======
+ 				sim->advection_params.dt, p, sim->physical_params.alpha, res, g,
++>>>>>>> upstream/20131206+dfsg
  				divergence_approx_hook);
  
      sim->time.t = sim->tnext;
diff --cc src/mpi_boundary.c
index 60956ef,6ea5296..ca32473
--- a/src/mpi_boundary.c
+++ b/src/mpi_boundary.c
@@@ -34,6 -34,10 +34,13 @@@ static void boundary_mpi_write (GtsObje
  {
    (* GTS_OBJECT_CLASS (gfs_boundary_mpi_class ())->parent_class->write) (o, fp);
    fprintf (fp, " %d %d", GFS_BOUNDARY_MPI (o)->process, GFS_BOUNDARY_MPI (o)->id);
++<<<<<<< HEAD
++=======
+   GfsBoundaryPeriodic * b = GFS_BOUNDARY_PERIODIC (o);
+   if (b->d != GFS_BOUNDARY (b)->d)
+     /* rotated boundary */
+     fprintf (fp, " %d %d", b->d, (int) b->rotate);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void boundary_mpi_read (GtsObject ** o, GtsFile * fp)
@@@ -47,6 -51,21 +54,24 @@@
      }
      GFS_BOUNDARY_MPI (*o)->id = atoi (fp->token->str);
      gts_file_next_token (fp);
++<<<<<<< HEAD
++=======
+     if (fp->type != GTS_INT)
+       /* standard boundary */
+       GFS_BOUNDARY_PERIODIC (*o)->d = GFS_BOUNDARY(*o)->d;
+     else {
+       /* rotated boundary */
+       FttDirection rotate = atoi (fp->token->str);
+       gts_file_next_token (fp);
+       if (fp->type != GTS_INT) {
+ 	gts_file_error (fp, "expecting an integer (orientation)");
+ 	return;
+       }
+       gdouble orientation = atoi (fp->token->str);
+       gts_file_next_token (fp);
+       gfs_boundary_periodic_rotate (GFS_BOUNDARY_PERIODIC (*o), rotate, orientation);
+     }
++>>>>>>> upstream/20131206+dfsg
    }
    else
      GFS_BOUNDARY_MPI (*o)->process = GFS_BOUNDARY_MPI (*o)->id = -1;
@@@ -59,13 -78,14 +84,18 @@@
  static guint tag_shift = 32767/FTT_NEIGHBORS;
  
  #define TAG(boundary)           (tag_shift*(boundary)->d + (boundary)->box->id)
- #define MATCHING_TAG(boundary)  (tag_shift*FTT_OPPOSITE_DIRECTION ((boundary)->d) +\
-                                  GFS_BOUNDARY_MPI (boundary)->id)
+ #define MATCHING_TAG(boundary)  (tag_shift*FTT_OPPOSITE_DIRECTION \
+ 				 (GFS_BOUNDARY_PERIODIC (boundary)->d) \
+ 				 + GFS_BOUNDARY_MPI (boundary)->id)
+ 
+ #ifdef DEBUG
+ FILE * mpi_debug = NULL;
+ #endif
  
 +#ifdef DEBUG
 +FILE * mpi_debug = NULL;
 +#endif
 +
  static void send (GfsBoundary * bb)
  {
    GfsBoundaryPeriodic * boundary = GFS_BOUNDARY_PERIODIC (bb);
@@@ -76,12 -96,13 +106,17 @@@
      return;
  
    g_assert (boundary->sndcount <= boundary->sndbuf->len);
-   if (GFS_BOUNDARY (boundary)->type == GFS_BOUNDARY_MATCH_VARIABLE) {
+   if (bb->type == GFS_BOUNDARY_MATCH_VARIABLE) {
  #ifdef DEBUG
- fprintf (DEBUG, "%d send to %d with tag %d match variable size\n",
+ fprintf (DEBUG, "%d send to %d with tag %d match variable size: bid: %d mid: %d d: %d dp: %d\n",
  	 domain->pid, 
  	 mpi->process,
++<<<<<<< HEAD
 +	 TAG (GFS_BOUNDARY (boundary)));
++=======
+ 	 TAG (bb),
+ 	 bb->box->id, GFS_BOUNDARY_MPI (bb)->id, bb->d, boundary->d);
++>>>>>>> upstream/20131206+dfsg
  fflush (DEBUG);
  #endif
      MPI_Isend (&boundary->sndcount, 1, MPI_UNSIGNED,
@@@ -127,12 -148,13 +162,17 @@@ static void receive (GfsBoundary * bb
    start = MPI_Wtime ();
  #endif /* PROFILE_MPI */
  
-   if (GFS_BOUNDARY (boundary)->type == GFS_BOUNDARY_MATCH_VARIABLE) {
+   if (bb->type == GFS_BOUNDARY_MATCH_VARIABLE) {
  #ifdef DEBUG
- fprintf (DEBUG, "%d wait on %d with tag %d for match variable size\n",
+ fprintf (DEBUG, "%d wait on %d with tag %d for match variable size: bid: %d mid: %d d: %d dp: %d\n",
  	 gfs_box_domain (bb->box)->pid,
  	 mpi->process,
++<<<<<<< HEAD
 +	 MATCHING_TAG (GFS_BOUNDARY (boundary)));
++=======
+ 	 MATCHING_TAG (bb),
+ 	 bb->box->id, GFS_BOUNDARY_MPI (bb)->id, bb->d, boundary->d);
++>>>>>>> upstream/20131206+dfsg
  fflush (DEBUG);
  #endif
      MPI_Recv (&boundary->rcvcount, 1, MPI_UNSIGNED,
@@@ -151,10 -173,10 +191,14 @@@
    else
      boundary->rcvcount = boundary->sndcount;
  #ifdef DEBUG
-   fprintf (DEBUG, "%d wait on %d with tag %d\n",
+   fprintf (DEBUG, "    %d wait on %d with tag %d\n",
  	   gfs_box_domain (bb->box)->pid,
  	   mpi->process,
++<<<<<<< HEAD
 +	   MATCHING_TAG (GFS_BOUNDARY (boundary)));
++=======
+ 	   MATCHING_TAG (bb));
++>>>>>>> upstream/20131206+dfsg
  fflush (DEBUG);
  #endif
    g_assert (boundary->rcvcount <= boundary->rcvbuf->len);
diff --cc src/ocean.c
index ace40bd,e224d50..5c1fa89
--- a/src/ocean.c
+++ b/src/ocean.c
@@@ -36,16 -36,6 +36,19 @@@
   * The linearised shallow-water solver.
   * \beginobject{GfsOcean}
   */
++<<<<<<< HEAD
 +
 +static void reset_gradients (FttCell * cell, gpointer * data)
 +{
 +  GfsVariable ** g = data[0];
 +  guint * dimension = data[1];    
 +  FttComponent c;
 +
 +  for (c = 0; c < *dimension; c++)
 +    GFS_VALUE (cell, g[c]) = 0.;
 +}
++=======
++>>>>>>> upstream/20131206+dfsg
  
  static void correct_normal_velocity (FttCellFace * face,
  				     gpointer * data)
@@@ -124,10 -113,7 +126,14 @@@ static void gfs_correct_normal_velociti
    for (c = 0; c < dimension; c++)
      g[c] = gfs_temporary_variable (domain);
    gfs_variable_set_vector (g, dimension);
++<<<<<<< HEAD
 +  data[0] = g;
 +  data[1] = &dimension;
 +  gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			    (FttCellTraverseFunc) reset_gradients, data);
++=======
+   gfs_reset_gradients (domain, dimension, g);
++>>>>>>> upstream/20131206+dfsg
    if (weighted) {
      gfs_correct_normal_velocities (domain, dimension, p, g, dt);
      gfs_scale_gradients (domain, dimension, g);
@@@ -318,7 -309,7 +329,11 @@@ static void ocean_run (GfsSimulation * 
  
      gts_container_foreach (GTS_CONTAINER (sim->events), (GtsFunc) gfs_event_half_do, sim);
  
++<<<<<<< HEAD
 +    gfs_poisson_coefficients (domain, fH, TRUE, TRUE);
++=======
+     gfs_poisson_coefficients (domain, fH, TRUE, TRUE, TRUE);
++>>>>>>> upstream/20131206+dfsg
      gfs_correct_normal_velocities_weighted (domain, 2, p, g, 0., 
  					    sim->approx_projection_params.weighted);
      gfs_centered_velocity_advection_diffusion (domain, 2,
@@@ -667,7 -658,7 +682,11 @@@ static void face_coeff_from_below (FttC
  
  static void depth_integrated_coefficients (GfsDomain * domain)
  {
++<<<<<<< HEAD
 +  gfs_poisson_coefficients (domain, NULL, TRUE, TRUE);
++=======
+   gfs_poisson_coefficients (domain, NULL, TRUE, TRUE, TRUE);
++>>>>>>> upstream/20131206+dfsg
    gfs_domain_cell_traverse_boundary (domain, FTT_FRONT,
  				     FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  				     (FttCellTraverseFunc) compute_coeff, NULL);
@@@ -732,7 -723,7 +751,11 @@@ static void ocean_run (GfsSimulation * 
      gfs_predicted_face_velocities (domain, 2, &sim->advection_params);
  
      gfs_domain_timer_start (domain, "correct_normal_velocities");
++<<<<<<< HEAD
 +    gfs_poisson_coefficients (domain, NULL, TRUE, TRUE);
++=======
+     gfs_poisson_coefficients (domain, NULL, TRUE, TRUE, TRUE);
++>>>>>>> upstream/20131206+dfsg
      gfs_correct_normal_velocities_weighted (domain, 2, p, g, sim->advection_params.dt/2.,
  					    sim->approx_projection_params.weighted);
      gfs_domain_cell_traverse_boundary (domain, FTT_FRONT,
@@@ -788,7 -779,7 +811,11 @@@
  			       sim->physical_params.g/GFS_OCEAN (domain)->layer->len);
      gts_object_destroy (GTS_OBJECT (divn));
  
++<<<<<<< HEAD
 +    gfs_poisson_coefficients (domain, NULL, TRUE, TRUE);
++=======
+     gfs_poisson_coefficients (domain, NULL, TRUE, TRUE, TRUE);
++>>>>>>> upstream/20131206+dfsg
      gfs_correct_normal_velocities_weighted (domain, 2, p, g, sim->advection_params.dt/2.,
  					    sim->approx_projection_params.weighted);
      gfs_correct_centered_velocities (domain, 2, g, sim->advection_params.dt/2.);
diff --cc src/output.c
index 5597194,c0e0987..eb165d6
--- a/src/output.c
+++ b/src/output.c
@@@ -1159,8 -1158,9 +1158,14 @@@ static gboolean gfs_output_location_eve
      GfsDomain * domain = GFS_DOMAIN (sim);
      GfsOutputLocation * location = GFS_OUTPUT_LOCATION (event);
      FILE * fp = GFS_OUTPUT (event)->file->fp;
++<<<<<<< HEAD
 +    FILE * fpp = ((domain->pid < 0 || GFS_OUTPUT (event)->parallel) ? fp:
 +		   gfs_union_open (GFS_OUTPUT (event)->file->fp, domain->pid));
++=======
+     GfsUnionFile uf;
+     FILE * fpp = ((domain->pid < 0 || GFS_OUTPUT (event)->parallel) ? fp:
+ 		  gfs_union_open (GFS_OUTPUT (event)->file->fp, domain->pid, &uf));
++>>>>>>> upstream/20131206+dfsg
      guint i;
  
      if (GFS_OUTPUT (event)->first_call) {
@@@ -1204,10 -1204,8 +1209,15 @@@
      g_free (pformat);
      g_free (vformat);
      fflush (fp);
++<<<<<<< HEAD
 +    if (!(domain->pid < 0 || GFS_OUTPUT (event)->parallel)) {
 +      fflush (fpp);
 +      gfs_union_close (GFS_OUTPUT (event)->file->fp, domain->pid, fpp);
 +    }
++=======
+     if (!(domain->pid < 0 || GFS_OUTPUT (event)->parallel))
+       gfs_union_close (GFS_OUTPUT (event)->file->fp, domain->pid, &uf);
++>>>>>>> upstream/20131206+dfsg
      return TRUE;
    }
    return FALSE;
@@@ -1395,11 -1393,11 +1405,19 @@@ static gboolean output_simulation_even
  
  	fputs ("# 1:x 2:y 3:z", fp);
  	while (i) {
++<<<<<<< HEAD
 +	  g_assert (GFS_VARIABLE1 (i->data)->name);
 +	  fprintf (fp, " %d:%s", nv++, GFS_VARIABLE1 (i->data)->name);
 +	  i = i->next;
 +	}
 +	fputc ('\n', fp);
++=======
+ 	  g_assert (GFS_VARIABLE (i->data)->name);
+ 	  fprintf (fp, " %d:%s", nv++, GFS_VARIABLE (i->data)->name);
+ 	  i = i->next;
+ 	}
+ 	fprintf (fp, " %g\n", sim->time.t);
++>>>>>>> upstream/20131206+dfsg
        }
        gpointer data[2];
        data[0] = output;
@@@ -1410,12 -1408,13 +1428,21 @@@
  				  (FttCellTraverseFunc) write_text, data);
        }
        else {
++<<<<<<< HEAD
 +	FILE * fpp = gfs_union_open (GFS_OUTPUT (event)->file->fp, domain->pid);
++=======
+ 	GfsUnionFile uf;
+ 	FILE * fpp = gfs_union_open (GFS_OUTPUT (event)->file->fp, domain->pid, &uf);
++>>>>>>> upstream/20131206+dfsg
  	data[1] = fpp;
  	gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEVEL|FTT_TRAVERSE_LEAFS,
  				  output->max_depth,
  				  (FttCellTraverseFunc) write_text, data);
++<<<<<<< HEAD
 +	gfs_union_close (GFS_OUTPUT (event)->file->fp, domain->pid, fpp);
++=======
+ 	gfs_union_close (GFS_OUTPUT (event)->file->fp, domain->pid, &uf);
++>>>>>>> upstream/20131206+dfsg
        }
        break;
      }
@@@ -1657,6 -1661,8 +1689,11 @@@ static void gfs_output_scalar_destroy (
      gts_object_destroy (GTS_OBJECT (output->condition));
    if (output->w)
      gts_object_destroy (GTS_OBJECT (output->w));
++<<<<<<< HEAD
++=======
+   if (output->format)
+     g_free (output->format);
++>>>>>>> upstream/20131206+dfsg
    
    (* GTS_OBJECT_CLASS (gfs_output_scalar_class ())->parent_class->destroy) (o);
  }
@@@ -1764,11 -1770,30 +1801,37 @@@ static void gfs_output_scalar_read (Gts
        if (fp->type != '=') {
  	gts_file_error (fp, "expecting '='");
  	return;
++<<<<<<< HEAD
++      }
++=======
+       }
+       gts_file_next_token (fp);
+       if (!output->w)
+ 	output->w = gfs_function_new (gfs_function_class (), 0.);
+       gfs_function_read (output->w, gfs_object_simulation (*o), fp);
+     }
+     else if (!strcmp (fp->token->str, "format")) {
+       gts_file_next_token (fp);
+       if (fp->type != '=') {
+ 	gts_file_error (fp, "expecting '='");
+ 	return;
        }
        gts_file_next_token (fp);
+       if (fp->type != GTS_STRING) {
+ 	gts_file_error (fp, "expecting a string");
+ 	return;
+       }
+       if (fp->token->str[0] == '"') {
+ 	output->format = g_strdup (&(fp->token->str[1]));
+ 	output->format[strlen(output->format) - 1] = '\0';
+       }
+       else
+ 	output->format = g_strdup (fp->token->str);
++>>>>>>> upstream/20131206+dfsg
+       gts_file_next_token (fp);
 +      if (!output->w)
 +	output->w = gfs_function_new (gfs_function_class (), 0.);
 +      gfs_function_read (output->w, gfs_object_simulation (*o), fp);
      }
      else {
        gts_file_error (fp, "unknown keyword `%s'", fp->token->str);
@@@ -1805,6 -1830,8 +1868,11 @@@ static void gfs_output_scalar_write (Gt
      fputs (" w = ", fp);
      gfs_function_write (output->w, fp);
    }
++<<<<<<< HEAD
++=======
+   if (output->format)
+     fprintf (fp, " format = %s", output->format);
++>>>>>>> upstream/20131206+dfsg
    if (!output->autoscale)
      fprintf (fp, " min = %g max = %g }", output->min, output->max);
    else
@@@ -1851,16 -1878,17 +1919,30 @@@ static gboolean gfs_output_scalar_even
  	gfs_variable_is_dimensional (output->v)) {
        output->v = gfs_temporary_variable (domain);
        gfs_catch_floating_point_exceptions ();
++<<<<<<< HEAD
 +      output_scalar_traverse (output,
 +			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttCellTraverseFunc) update_v, output);
 +      gfs_restore_fpe_for_function (output->f);
 +    }
 +    if (output->maxlevel >= 0)
 +      output_scalar_traverse (output,
 +			      FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
 +			      (FttCellTraverseFunc) output->v->fine_coarse,
 +			      output->v);
++=======
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) update_v, output);
+       gfs_restore_fpe_for_function (output->f);
+       gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, output->v);
+     }
+     if (output->maxlevel >= 0) {
+       gfs_domain_cell_traverse (domain,
+ 				FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ 				(FttCellTraverseFunc) output->v->fine_coarse,
+ 				output->v);
+       gfs_domain_bc (domain, FTT_TRAVERSE_NON_LEAFS, -1, output->v);
+     }
++>>>>>>> upstream/20131206+dfsg
      if (output->autoscale) {
        GtsRange stats = gfs_domain_stats_variable (domain, output->v, 
  						  FTT_TRAVERSE_LEAFS|FTT_TRAVERSE_LEVEL, 
@@@ -2002,10 -2030,18 +2084,23 @@@ static gboolean gfs_output_scalar_stats
  						output->maxlevel,
  						output->condition ? cell_condition : NULL,
  						output->condition);
++<<<<<<< HEAD
 +    fprintf (GFS_OUTPUT (event)->file->fp, 
 +	     "%s time: %g min: %10.3e avg: %10.3e | %10.3e max: %10.3e\n",
++=======
+     gchar * format;
+     if (output->format) {
+       gchar * f = output->format;
+       format = g_strdup_printf ("%%s time: %s min: %s avg: %s | %s max: %s\n",
+ 				f, f, f, f, f);
+     }
+     else
+       format = g_strdup ("%s time: %g min: %10.3e avg: %10.3e | %10.3e max: %10.3e\n");
+     fprintf (GFS_OUTPUT (event)->file->fp, format,
++>>>>>>> upstream/20131206+dfsg
  	     output->name, sim->time.t,
  	     stats.min, stats.mean, stats.stddev, stats.max);
+     g_free (format);
      return TRUE;
    }
    return FALSE;
@@@ -2043,6 -2079,6 +2138,7 @@@ GfsOutputClass * gfs_output_scalar_stat
   * Computing the sum of a scalar field.
   * \beginobject{GfsOutputScalarSum}
   */
++<<<<<<< HEAD
  
  typedef struct {
    GfsVariable * v;
@@@ -2050,6 -2086,6 +2146,15 @@@
    gdouble sum;
  } SumData;
  
++=======
++
++typedef struct {
++  GfsVariable * v;
++  GfsFunction * w;
++  gdouble sum;
++} SumData;
++
++>>>>>>> upstream/20131206+dfsg
  static void add (FttCell * cell, SumData * s)
  {
    gdouble vol = s->w ? gfs_function_value (s->w, cell) : gfs_cell_volume (cell, s->v->domain);
@@@ -2071,9 -2107,16 +2176,22 @@@ static gboolean gfs_output_scalar_sum_e
      gfs_all_reduce (GFS_DOMAIN (sim), s.sum, MPI_DOUBLE, MPI_SUM);
      if (!output->w)
        s.sum *= pow (sim->physical_params.L, FTT_DIMENSION);
++<<<<<<< HEAD
 +    fprintf (GFS_OUTPUT (event)->file->fp,
 +	     "%s time: %g sum: % 15.6e\n", 
 +	     output->name, sim->time.t, s.sum);
++=======
+     gchar * format;
+     if (output->format) {
+       gchar * f = output->format;
+       format = g_strdup_printf ("%%s time: %s sum: %s\n", f, f);
+     }
+     else
+       format = g_strdup ("%s time: %g sum: % 15.6e\n");
+     fprintf (GFS_OUTPUT (event)->file->fp, format,
+ 	     output->name, sim->time.t, s.sum);
+     g_free (format);
++>>>>>>> upstream/20131206+dfsg
      return TRUE;
    }
    return FALSE;
@@@ -2569,12 -2612,19 +2687,23 @@@ static gboolean gfs_output_droplet_sums
  	g_free (p.v);
  	p.v = gv;
        }
++<<<<<<< HEAD
 +#endif /* HAVE_MPI */      
++=======
+ #endif /* HAVE_MPI */
++>>>>>>> upstream/20131206+dfsg
        qsort (p.v, p.n, sizeof (VolumePair), volume_sort);
+       gchar * f = GFS_OUTPUT_SCALAR (event)->format;
+       gchar * format;
+       if (f)
+ 	format = g_strdup_printf ("%s %%d %s\n", f, f);
+       else
+ 	format = g_strdup ("%g %d %.12g\n");
        guint i;
        for (i = 0; i < p.n; i++)
- 	fprintf (GFS_OUTPUT (event)->file->fp, "%g %d %.12g\n", sim->time.t, i + 1, p.v[i].f);
+ 	fprintf (GFS_OUTPUT (event)->file->fp, format, sim->time.t, i + 1, p.v[i].f);
        g_free (p.v);
+       g_free (format);
      }
      if (p.tag != d->tag)
        gts_object_destroy (GTS_OBJECT (p.tag));
@@@ -2851,10 -2901,18 +2980,23 @@@ static gboolean gfs_output_error_norm_e
        if (snorm.second > 0.) norm.second /= snorm.second;
        if (snorm.infty > 0.)  norm.infty  /= snorm.infty;
      }
++<<<<<<< HEAD
 +    fprintf (GFS_OUTPUT (event)->file->fp,
 +	     "%s time: %g first: % 10.3e second: % 10.3e infty: % 10.3e bias: %10.3e\n",
++=======
+     gchar * format;
+     if (output->format) {
+       gchar * f = output->format;
+       format = g_strdup_printf ("%%s time: %s first: %s second: %s infty: %s bias: %s\n",
+ 				f, f, f, f, f);
+     }
+     else
+       format = g_strdup ("%s time: %g first: %10.3e second: %10.3e infty: %10.3e bias: %10.3e\n");
+     fprintf (GFS_OUTPUT (event)->file->fp, format,
++>>>>>>> upstream/20131206+dfsg
  	     output->name, sim->time.t,
  	     norm.first, norm.second, norm.infty, norm.bias);
+     g_free (format);
      return TRUE;
    }
    return FALSE;
@@@ -3225,20 -3290,13 +3374,30 @@@ static gboolean gfs_output_grd_event (G
    if ((* GFS_EVENT_CLASS (GTS_OBJECT_CLASS (gfs_output_grd_class ())->parent_class)->event) 
        (event, sim)) {
      GfsOutputScalar * output = GFS_OUTPUT_SCALAR (event);
++<<<<<<< HEAD
 +#if FTT_2D
 +    GfsDomain * domain = GFS_DOMAIN (sim);
 +#else /* 3D */
 +    GfsDomain * domain = GFS_IS_OCEAN (sim) ? GFS_OCEAN (sim)->toplayer : GFS_DOMAIN (sim);
 +#endif /* 3D */
 +    FttVector o = {0.,0.,0.};
 +    gfs_simulation_map_inverse (sim, &o);
 +    gfs_write_grd (domain,
 +		   output->condition,
 +		   output->v,
 +		   o.x, o.y, sim->physical_params.L,
 +		   FTT_TRAVERSE_LEAFS|FTT_TRAVERSE_LEVEL, output->maxlevel,
 +		   GFS_OUTPUT (event)->file->fp,
 +		   GFS_OUTPUT (event)->parallel);
++=======
+     gfs_write_grd (sim,
+ 		   output->condition,
+ 		   output->v,
+ 		   FTT_TRAVERSE_LEAFS|FTT_TRAVERSE_LEVEL, output->maxlevel,
+ 		   GFS_OUTPUT (event)->file->fp,
+ 		   GFS_OUTPUT (event)->parallel,
+ 		   TRUE);
++>>>>>>> upstream/20131206+dfsg
      return TRUE;
    }
    return FALSE;
diff --cc src/output.h
index 25ea944,e3747db..541e0ee
--- a/src/output.h
+++ b/src/output.h
@@@ -190,6 -190,7 +190,10 @@@ struct _GfsOutputScalar 
    gdouble min, max;
    gint maxlevel;
    GfsFunction * condition, * w;
++<<<<<<< HEAD
++=======
+   gchar * format;
++>>>>>>> upstream/20131206+dfsg
  };
  
  #define GFS_OUTPUT_SCALAR(obj)            GTS_OBJECT_CAST (obj,\
diff --cc src/particle.c
index 93ce3db,c49f25b..0386ee3
--- a/src/particle.c
+++ b/src/particle.c
@@@ -1,4 -1,4 +1,8 @@@
++<<<<<<< HEAD
 +/* Gerris - The GNU Flow Solver			(-*-C-*-)
++=======
+ /* Gerris - The GNU Flow Solver
++>>>>>>> upstream/20131206+dfsg
   * Copyright (C) 2009 National Institute of Water and Atmospheric Research
   *
   * This program is free software; you can redistribute it and/or
diff --cc src/particle.h
index 8124a49,bfe726d..1df22b4
--- a/src/particle.h
+++ b/src/particle.h
@@@ -1,4 -1,4 +1,8 @@@
++<<<<<<< HEAD
 +/* Gerris - The GNU Flow Solver			(-*-C-*-)
++=======
+ /* Gerris - The GNU Flow Solver
++>>>>>>> upstream/20131206+dfsg
   * Copyright (C) 2009 National Institute of Water and Atmospheric Research
   *
   * This program is free software; you can redistribute it and/or
diff --cc src/poisson.c
index 4880364,198f183..f0f7af1
--- a/src/poisson.c
+++ b/src/poisson.c
@@@ -78,9 -80,11 +80,14 @@@ void gfs_multilevel_params_init (GfsMul
  
    par->dimension = FTT_DIMENSION;
    par->weighted = FALSE;
-   par->beta = 0.5;
+   par->beta = 1.;
    par->omega = 1.;
  
++<<<<<<< HEAD
++=======
+   par->function = FALSE;
+ 
++>>>>>>> upstream/20131206+dfsg
    par->poisson_solve = gfs_poisson_solve;
  }
  
@@@ -239,12 -234,14 +237,20 @@@ void gfs_linear_problem_destroy (GfsLin
      gfs_stencil_destroy (g_ptr_array_index (lp->LP, i));
  
    g_ptr_array_free (lp->LP, TRUE);
++<<<<<<< HEAD
++=======
+   g_free (lp);
++>>>>>>> upstream/20131206+dfsg
  }
  
  typedef struct {
    GfsLinearProblem * lp;
    GfsVariable * dia;
    gint maxlevel;
++<<<<<<< HEAD
++=======
+   GfsVariable * metric, * rhs;
++>>>>>>> upstream/20131206+dfsg
  } RelaxStencilParams;
  
  static void relax_stencil (FttCell * cell, RelaxStencilParams * p)
@@@ -267,7 -264,7 +273,11 @@@
      }
    }
  
++<<<<<<< HEAD
 +  if (g.a > 0.)
++=======
+   if (g.a != 0.)
++>>>>>>> upstream/20131206+dfsg
      gfs_stencil_add_element (stencil, cell, p->lp, -g.a);
    else {
      gfs_stencil_destroy (stencil);
@@@ -285,7 -282,6 +295,10 @@@ static void relax_dirichlet_stencil (Ft
    FttCellFace f;
    GfsGradient ng;
    GfsVariable * id = p->lp->id;
++<<<<<<< HEAD
 +
++=======
++>>>>>>> upstream/20131206+dfsg
    GfsStencil * stencil = gfs_stencil_new (cell, p->lp, 0.);
  
    g.a = GFS_VALUE (cell, p->dia);
@@@ -302,8 -298,8 +315,13 @@@
      gfs_face_cm_weighted_gradient_stencil (&f, &ng, p->maxlevel, p->lp, stencil);
      g.a += ng.a;
    }
++<<<<<<< HEAD
 +  if (g.a > 0.)
 +    gfs_stencil_add_element (stencil, cell, p->lp,  -g.a);
++=======
+   if (g.a != 0.)
+     gfs_stencil_add_element (stencil, cell, p->lp, -g.a);
++>>>>>>> upstream/20131206+dfsg
    else {
      gfs_stencil_destroy (stencil);
      stencil = gfs_stencil_new (cell, p->lp, 1.);
@@@ -402,6 -398,31 +420,34 @@@ static void check_box_dirichlet (GfsBo
      }
  }
  
++<<<<<<< HEAD
++=======
+ static void cell_numbering (GfsDomain * domain,
+ 			    GfsLinearProblem * lp,
+ 			    GfsVariable * rhs, GfsVariable * lhs,
+ 			    gint maxlevel)
+ {
+   /* fixme: should it be FTT_TRAVERSE_LEVEL | FTT_TRAVERSE_LEAFS */
+   NumberingParams np = { lp, lhs, rhs, 0, maxlevel, (FttFaceTraverseFunc) bc_number };
+ 
+   gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, maxlevel,
+ 			    (FttCellTraverseFunc) leaves_numbering, &np);
+ 
+ #ifdef HAVE_MPI
+   /* Renumbering of the different subdomains for parallel simulations */
+   if (domain->pid >= 0) {
+     set_mpi_domain_index (domain, lp);
+ 
+     np.nleafs = lp->istart;
+     gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, maxlevel,
+ 			      (FttCellTraverseFunc) leaves_renumbering, &np);
+   }
+ #endif /* HAVE_MPI */  
+ 
+   gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, maxlevel, lp->id);
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  /**
   * gfs_get_poisson_problem:
   * @domain: the domain over which the poisson problem is defined
@@@ -423,32 -444,10 +469,39 @@@ GfsLinearProblem * gfs_get_poisson_prob
    gfs_domain_timer_start (domain, "get_poisson_problem");
  
    GfsLinearProblem * lp = gfs_linear_problem_new (domain);
++<<<<<<< HEAD
 +  
 +  /* Cell numbering */
 +  
 +  /* fixme: should it be FTT_TRAVERSE_LEVEL | FTT_TRAVERSE_LEAFS */
 +  NumberingParams np = { lp, lhs, rhs, 0, maxlevel, (FttFaceTraverseFunc) bc_number };
 +
 +  gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, maxlevel,
 +			    (FttCellTraverseFunc) leaves_numbering, &np);
 +
 +  if (domain->pid >= 0)
 +    gfs_domain_bc (domain, FTT_TRAVERSE_LEVEL | FTT_TRAVERSE_LEAFS, -1, lp->id);
 +
 +#ifdef HAVE_MPI
 +  /* Renumbering of the different subdomains for parallel simulations */
 +  if (domain->pid >= 0) {
 +    set_mpi_domain_index (domain, lp);
 +
 +    np.nleafs = lp->istart;
 +    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, maxlevel,
 +			    (FttCellTraverseFunc) leaves_renumbering, &np);
 +
 +    gfs_domain_bc (domain, FTT_TRAVERSE_LEVEL | FTT_TRAVERSE_LEAFS, -1, lp->id);
 +  }
 +#endif /* HAVE_MPI */
 + 
 +  /* Creates stencils on the fly */
++=======
+  
+   cell_numbering (domain, lp, rhs, lhs, maxlevel);
+  
+   /* Create stencils on the fly */
++>>>>>>> upstream/20131206+dfsg
    RelaxStencilParams p = { lp, dia, maxlevel };
  
    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_reset_bc, lp);
@@@ -550,43 -548,43 +602,72 @@@ static void relax2D (FttCell * cell, Re
        g.b += ng.b;
      }
    }
-   if (g.a > 0.)
-     GFS_VARIABLE (cell, p->u) = 
-       (1. - p->omega)*GFS_VARIABLE (cell, p->u) 
-       + p->omega*(g.b - GFS_VARIABLE (cell, p->rhs))/g.a;
+   if (g.a != 0.)
+     GFS_VALUEI (cell, p->u) = 
+       (1. - p->omega)*GFS_VALUEI (cell, p->u) 
+       + p->omega*(g.b - GFS_VALUEI (cell, p->rhs))/g.a;
    else
-     GFS_VARIABLE (cell, p->u) = 0.;
+     GFS_VALUEI (cell, p->u) = 0.;
+ }
+ 
+ /* relax_dirichlet_stencil() needs to be updated whenever this
+    function is modified */
+ static void relax_dirichlet (FttCell * cell, RelaxParams * p)
+ {
+   GfsGradient g;
+   FttCellNeighbors neighbor;
+   FttCellFace f;
+   GfsGradient ng;
+ 
+   g.a = GFS_VALUEI (cell, p->dia);
+   if (GFS_IS_MIXED (cell) && ((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
+     g.b = gfs_cell_dirichlet_gradient_flux (cell, p->u, p->maxlevel, 0.);
+   else
+     g.b = 0.;
+ 
+   f.cell = cell;
+   ftt_cell_neighbors (cell, &neighbor);
+   for (f.d = 0; f.d < FTT_NEIGHBORS; f.d++) {
+     f.neighbor = neighbor.c[f.d];
+     gfs_face_cm_weighted_gradient (&f, &ng, p->u, p->maxlevel);
+     g.a += ng.a;
+     g.b += ng.b;
+   }
+   if (g.a != 0.)
+     GFS_VALUEI (cell, p->u) = (g.b - GFS_VALUEI (cell, p->rhs))/g.a;
+   else
+     GFS_VALUEI (cell, p->u) = 0.;
  }
  
 +/* relax_dirichlet_stencil() needs to be updated whenever this
 +   function is modified */
 +static void relax_dirichlet (FttCell * cell, RelaxParams * p)
 +{
 +  GfsGradient g;
 +  FttCellNeighbors neighbor;
 +  FttCellFace f;
 +  GfsGradient ng;
 +
 +  g.a = GFS_VARIABLE (cell, p->dia);
 +  if (GFS_IS_MIXED (cell) && ((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
 +    g.b = gfs_cell_dirichlet_gradient_flux (cell, p->u, p->maxlevel, 0.);
 +  else
 +    g.b = 0.;
 +
 +  f.cell = cell;
 +  ftt_cell_neighbors (cell, &neighbor);
 +  for (f.d = 0; f.d < FTT_NEIGHBORS; f.d++) {
 +    f.neighbor = neighbor.c[f.d];
 +    gfs_face_cm_weighted_gradient (&f, &ng, p->u, p->maxlevel);
 +    g.a += ng.a;
 +    g.b += ng.b;
 +  }
 +  if (g.a > 0.)
 +    GFS_VARIABLE (cell, p->u) = (g.b - GFS_VARIABLE (cell, p->rhs))/g.a;
 +  else
 +    GFS_VARIABLE (cell, p->u) = 0.;
 +}
 +
  /**
   * gfs_relax:
   * @domain: the domain to relax.
@@@ -675,35 -673,35 +756,60 @@@ static void residual_set2D (FttCell * c
        g.b += ng.b;
      }
    }
-   GFS_VARIABLE (cell, p->res) = GFS_VARIABLE (cell, p->rhs) - 
-     (g.b - GFS_VARIABLE (cell, p->u)*g.a);
+   GFS_VALUEI (cell, p->res) = GFS_VALUEI (cell, p->rhs) - 
+     (g.b - GFS_VALUEI (cell, p->u)*g.a);
+ }
+ 
+ static void residual_set_dirichlet (FttCell * cell, RelaxParams * p)
+ {
+   GfsGradient g;
+   FttCellNeighbors neighbor;
+   FttCellFace f;
+   GfsGradient ng;
+ 
+   g.a = GFS_VALUEI (cell, p->dia);
+   if (GFS_IS_MIXED (cell) && ((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
+     g.b = gfs_cell_dirichlet_gradient_flux (cell, p->u, p->maxlevel, GFS_STATE (cell)->solid->fv);
+   else
+     g.b = 0.;
+ 
+   f.cell = cell;
+   ftt_cell_neighbors (cell, &neighbor);
+   for (f.d = 0; f.d < FTT_NEIGHBORS; f.d++) {
+     f.neighbor = neighbor.c[f.d];
+     gfs_face_cm_weighted_gradient (&f, &ng, p->u, p->maxlevel);
+     g.a += ng.a;
+     g.b += ng.b;
+   }
+   GFS_VALUEI (cell, p->res) = GFS_VALUEI (cell, p->rhs) - 
+     (g.b - GFS_VALUEI (cell, p->u)*g.a);
  }
  
 +static void residual_set_dirichlet (FttCell * cell, RelaxParams * p)
 +{
 +  GfsGradient g;
 +  FttCellNeighbors neighbor;
 +  FttCellFace f;
 +  GfsGradient ng;
 +
 +  g.a = GFS_VARIABLE (cell, p->dia);
 +  if (GFS_IS_MIXED (cell) && ((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
 +    g.b = gfs_cell_dirichlet_gradient_flux (cell, p->u, p->maxlevel, GFS_STATE (cell)->solid->fv);
 +  else
 +    g.b = 0.;
 +
 +  f.cell = cell;
 +  ftt_cell_neighbors (cell, &neighbor);
 +  for (f.d = 0; f.d < FTT_NEIGHBORS; f.d++) {
 +    f.neighbor = neighbor.c[f.d];
 +    gfs_face_cm_weighted_gradient (&f, &ng, p->u, p->maxlevel);
 +    g.a += ng.a;
 +    g.b += ng.b;
 +  }
 +  GFS_VARIABLE (cell, p->res) = GFS_VARIABLE (cell, p->rhs) - 
 +    (g.b - GFS_VARIABLE (cell, p->u)*g.a);
 +}
 +
  /**
   * gfs_residual:
   * @domain: a domain.
@@@ -796,10 -797,20 +905,27 @@@ static void poisson_coeff (FttCellFace 
  
  static void poisson_mixed_coeff (FttCell * cell, PoissonCoeff * p)
  {
++<<<<<<< HEAD
 +  reset_coeff (cell, NULL);
 +  if (GFS_IS_MIXED (cell)) {
 +    gdouble alpha = p->alpha ? gfs_function_value (p->alpha, cell) : 1.;
 +    GFS_STATE (cell)->solid->v = alpha*gfs_domain_solid_metric (p->domain, cell);
++=======
+   if (GFS_IS_MIXED (cell)) {
+     gdouble alpha = p->alpha ? gfs_function_value (p->alpha, cell) : 1.;
+     if (((cell)->flags & GFS_FLAG_DIRICHLET) == 0) 
+       /* Neumann condition (prescribed flux) */
+       GFS_STATE (cell)->solid->v.x += alpha;
+     else {
+       /* Dirichlet */
+       GfsSolidVector * s = GFS_STATE (cell)->solid;
+       FttVector m = {1.,1.,1.};
+       gfs_domain_solid_metric (p->domain, cell, &m);
+       FttComponent c;
+       for (c = 0; c < FTT_DIMENSION; c++)
+ 	(&s->v.x)[c] += alpha*(&m.x)[c]*(s->s[2*c + 1] - s->s[2*c]);
+     }
++>>>>>>> upstream/20131206+dfsg
  
      if (alpha <= 0. && p->positive) {
        FttVector p;
@@@ -845,6 -858,7 +973,10 @@@ static void face_coeff_from_below (FttC
   * @alpha: the inverse of density or %NULL.
   * @positive: if %TRUE, @alpha must be strictly positive.
   * @centered: %TRUE if solving for a centered variable.
++<<<<<<< HEAD
++=======
+  * @reset: %TRUE if resetting previous coefficients.
++>>>>>>> upstream/20131206+dfsg
   *
   * Initializes the face coefficients for the Poisson equation
   * \f$\nabla\cdot\alpha\nabla p=\dots\f$.
@@@ -854,7 -868,8 +986,12 @@@
  void gfs_poisson_coefficients (GfsDomain * domain,
  			       GfsFunction * alpha,
  			       gboolean positive,
++<<<<<<< HEAD
 +			       gboolean centered)
++=======
+ 			       gboolean centered,
+ 			       gboolean reset)
++>>>>>>> upstream/20131206+dfsg
  {
    PoissonCoeff p;
    FttComponent i;
@@@ -869,11 -884,11 +1006,19 @@@
    p.alpha = alpha;
    p.domain = domain;
    p.positive = positive;
++<<<<<<< HEAD
 +  if (centered)
 +    gfs_domain_cell_traverse (domain,
 +			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttCellTraverseFunc) reset_coeff, &p);
 +  else
++=======
+   if (reset)
+     gfs_domain_cell_traverse (domain,
+ 			      FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			      (FttCellTraverseFunc) reset_coeff, &p);
+   if (!centered)
++>>>>>>> upstream/20131206+dfsg
      gfs_domain_cell_traverse (domain,
  			      FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
  			      (FttCellTraverseFunc) poisson_mixed_coeff, &p);
@@@ -1284,12 -1300,24 +1430,30 @@@ static void diffusion_coef (FttCellFac
    }
  }
  
- static void diffusion_mixed_coef (FttCell * cell, DiffusionCoeff * c)
+ static void diffusion_mixed_coeff (FttCell * cell, DiffusionCoeff * c)
  {
    reset_coeff (cell, NULL);
++<<<<<<< HEAD
 +  if (GFS_IS_MIXED (cell))
 +    GFS_STATE (cell)->solid->v = 
 +      c->dt*gfs_domain_solid_metric (c->domain, cell)*gfs_source_diffusion_cell (c->d, cell);
++=======
+   if (GFS_IS_MIXED (cell)) {
+     gdouble diffusion = c->dt*gfs_source_diffusion_cell (c->d, cell);
+     if (((cell)->flags & GFS_FLAG_DIRICHLET) == 0)
+       /* Neumann condition (prescribed flux) */
+       GFS_STATE (cell)->solid->v.x = diffusion;
+     else {
+       /* Dirichlet */
+       GfsSolidVector * s = GFS_STATE (cell)->solid;
+       FttVector m = {1.,1.,1.};
+       gfs_domain_solid_metric (c->domain, cell, &m);
+       FttComponent i;
+       for (i = 0; i < FTT_DIMENSION; i++)
+ 	(&s->v.x)[i] = diffusion*(&m.x)[i]*(s->s[2*i + 1] - s->s[2*i]);
+     }
+   }
++>>>>>>> upstream/20131206+dfsg
    if (c->rhoc) {
      gdouble rho = c->alpha ? 1./gfs_function_value (c->alpha, cell) : 1.;
      if (rho <= 0.) {
@@@ -1348,11 -1379,15 +1515,23 @@@ void gfs_diffusion_coefficients (GfsDom
    coef.rhoc = rhoc;
    coef.alpha = alpha;
    coef.domain = domain;
++<<<<<<< HEAD
 +  coef.axi = axi;
 +  gfs_catch_floating_point_exceptions ();
 +  gfs_domain_cell_traverse (domain,
 +			    FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
 +			    (FttCellTraverseFunc) diffusion_mixed_coef, &coef);
++=======
+   coef.metric = metric;
+   gfs_catch_floating_point_exceptions ();
+   gfs_domain_cell_traverse (domain,
+ 			    FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			    (FttCellTraverseFunc) diffusion_mixed_coeff, &coef);
+   if (coef.metric && coef.rhoc)
+     gfs_domain_cell_traverse (domain,
+ 			      FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			      (FttCellTraverseFunc) viscous_metric_coeff, &coef);
++>>>>>>> upstream/20131206+dfsg
    gfs_restore_fpe_for_function (alpha);
    gfs_domain_face_traverse (domain, FTT_XYZ, 
  			    FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
@@@ -1386,15 -1422,11 +1566,18 @@@ static void diffusion_rhs (FttCell * ce
  
      face.neighbor = neighbor.c[face.d];
      gfs_face_cm_weighted_gradient (&face, &g, p->u, -1);
++<<<<<<< HEAD
 +    if (face.d/2 == p->component) {
 +      g.a *= 2.;
 +      g.b *= 2.;
 +    }
++=======
++>>>>>>> upstream/20131206+dfsg
      f += g.b - g.a*val;
    }
-   GFS_VARIABLE (cell, p->rhs) += p->beta*f/(h*h*GFS_VARIABLE (cell, p->dia));
-   if (p->axi)
-     GFS_VARIABLE (cell, p->rhs) -= val*p->beta*GFS_VARIABLE (cell, p->axi);
+   GFS_VALUEI (cell, p->rhs) += p->beta*f/(h*h*GFS_VALUEI (cell, p->dia));
+   if (p->metric)
+     GFS_VALUEI (cell, p->rhs) -= val*p->beta*GFS_VALUEI (cell, p->metric);
  }
  
  /**
@@@ -1443,9 -1475,8 +1626,8 @@@ static void diffusion_relax (FttCell * 
    FttCellNeighbors neighbor;
    FttCellFace face;
  
-   a = GFS_VARIABLE (cell, p->dia);
    if (GFS_IS_MIXED (cell) && ((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
 -    g.b = gfs_cell_dirichlet_gradient_flux (cell, p->u, p->maxlevel, 0.);
 +    g.b = gfs_cell_dirichlet_gradient_flux (cell, p->u, p->maxlevel, 0.) ;
  
    face.cell = cell;
    ftt_cell_neighbors (cell, &neighbor);
@@@ -1454,10 -1485,6 +1636,13 @@@
  
      face.neighbor = neighbor.c[face.d];
      gfs_face_cm_weighted_gradient (&face, &ng, p->u, p->maxlevel);
++<<<<<<< HEAD
 +    if (face.d/2 == p->component) {
 +      ng.a *= 2.;
 +      ng.b *= 2.;
 +    }
++=======
++>>>>>>> upstream/20131206+dfsg
      g.a += ng.a;
      g.b += ng.b;
    }
@@@ -1495,10 -1556,6 +1714,13 @@@ static void diffusion_residual (FttCel
  
      face.neighbor = neighbor.c[face.d];
      gfs_face_cm_weighted_gradient (&face, &ng, p->u, -1);
++<<<<<<< HEAD
 +    if (face.d/2 == p->component) {
 +      ng.a *= 2.;
 +      ng.b *= 2.;
 +    }
++=======
++>>>>>>> upstream/20131206+dfsg
      g.a += ng.a;
      g.b += ng.b;
    }
@@@ -1607,8 -1662,7 +1827,12 @@@ void gfs_diffusion_cycle (GfsDomain * d
    p.u = dp->i;
    p.res = res->i;
    p.dia = rhoc->i;
++<<<<<<< HEAD
 +  p.component = GFS_IS_AXI (domain) ? u->component : FTT_DIMENSION;
 +  p.axi = axi ? axi->i : FALSE;
++=======
+   p.metric = metric ? metric->i : FALSE;
++>>>>>>> upstream/20131206+dfsg
  
    gfs_domain_cell_traverse (domain, 
  			    FTT_PRE_ORDER, FTT_TRAVERSE_LEVEL, levelmin,
diff --cc src/poisson.h
index a23b8f9,123750b..7b4fd84
--- a/src/poisson.h
+++ b/src/poisson.h
@@@ -76,7 -76,8 +76,12 @@@ void                  gfs_residua
  void                  gfs_poisson_coefficients       (GfsDomain * domain,
  						      GfsFunction * alpha,
  						      gboolean positive,
++<<<<<<< HEAD
 +						      gboolean centered);
++=======
+ 						      gboolean centered,
+ 						      gboolean reset);
++>>>>>>> upstream/20131206+dfsg
  void                  gfs_poisson_cycle              (GfsDomain * domain,
  						      GfsMultilevelParams * p,
  						      GfsVariable * u,
@@@ -132,16 -133,23 +137,33 @@@ struct _GfsLinearProblem 
    gint istart;
  };
  
++<<<<<<< HEAD
++=======
+ GfsLinearProblem * gfs_linear_problem_new            (GfsDomain * domain);
+ void               gfs_linear_problem_add_stencil    (GfsLinearProblem * lp, 
+ 						      GfsStencil * stencil);
+ void               gfs_linear_problem_destroy        (GfsLinearProblem * lp);
++>>>>>>> upstream/20131206+dfsg
  GfsLinearProblem * gfs_get_poisson_problem           (GfsDomain * domain,
  						      GfsVariable * rhs, 
  						      GfsVariable * lhs,
  						      GfsVariable * dia,
  						      gint maxlevel,
  						      GfsVariable * v);
++<<<<<<< HEAD
 +GfsLinearProblem * gfs_linear_problem_new            (GfsDomain * domain);
 +void               gfs_linear_problem_add_stencil    (GfsLinearProblem * lp, 
 +						      GfsStencil * stencil);
 +void               gfs_linear_problem_destroy        (GfsLinearProblem * lp);
++=======
+ GfsLinearProblem * gfs_get_diffusion_problem         (GfsDomain * domain,
+ 						      GfsVariable * rhs, 
+ 						      GfsVariable * lhs,
+ 						      GfsVariable * rhoc,
+ 						      GfsVariable * metric,
+ 						      gint maxlevel,
+ 						      GfsVariable * v);
++>>>>>>> upstream/20131206+dfsg
  
  #ifdef __cplusplus
  }
diff --cc src/river.c
index 7cbdef8,bb35dd3..c61045e
--- a/src/river.c
+++ b/src/river.c
@@@ -16,20 -16,231 +16,245 @@@
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   * 02111-1307, USA.  
   */
 +/*! \file
 + * \brief GfsRiver model.
 + */
  
++<<<<<<< HEAD
++=======
+ /*
+  * Relevant references:
+  *
+  * Saint-Venant:
+  * 
+  * [Audusse2005] E. Audusse and M.-O. Bristeau. A well-balanced,
+  * positivity-preserving second-order scheme for shallow-water flows
+  * on unstructured meshes, JCP, 2005, 311-333.
+  *
+  * [Popinet2011] S. Popinet. Quadtree-adaptive tsunami modelling. Ocean Dynamics
+  * 61(9):1261-1285, 2011.
+  *
+  * [An2012] Hyunuk An, Soonyoung Yu. Well-balanced shallow water flow
+  * simulation on quadtree cut cell grids. Advances in Water Resources
+  * 39:60-70, 2012.
+  *
+  * Multi-layer Saint-Venant, constant density:
+  *
+  * [Audusse2011a] E. Audusse, M.-O. Bristeau, B. Perthame and J. Sainte-Marie. A
+  * multilayer Saint-Venant system with mass exchanges for
+  * shallow-water flows. Derivation and numerical
+  * validation. Mathematical Modelling and Numerical analysis, 2011.
+  * 
+  * Multi-layer Saint-Venant, variable density:
+  *
+  * [Audusse2011b] E. Audusse, M.-O. Bristeau, M. Pelanti,
+  * J. Sainte-Marie. Approximation of the hydrostatic Navier-Stokes
+  * system for density stratified flows by a multilayer model. Kinetic
+  * interpretation and numerical solution, JCP, 2011.
+  */
+ 
+ /*! \file
+  * \brief GfsRiver model.
+  */
+ 
++>>>>>>> upstream/20131206+dfsg
  #include <stdlib.h>
  #include "river.h"
  #include "adaptive.h"
  #include "source.h"
++<<<<<<< HEAD
 +#include "init.h"
 +
++=======
+ #include "solid.h"
+ #include "init.h"
+ 
+ /* generalisation of the limited gradients (in fluid.c) to mixed cells */
+ 
+ static gdouble generic_limiter (gdouble r, gdouble beta)
+ {
+   gdouble v1 = MIN (r, beta), v2 = MIN (beta*r, 1.);
+   v1 = MAX (0., v1);
+   return MAX (v1, v2);
+ }
+ 
+ static gdouble minmod_limiter (gdouble r)
+ {
+   return generic_limiter (r, 1.);
+ }
+ 
+ static gdouble superbee_limiter (gdouble r)
+ {
+   return generic_limiter (r, 2.);
+ }
+ 
+ static gdouble sweby_limiter (gdouble r)
+ {
+   return generic_limiter (r, 1.5);
+ }
+ 
+ static gdouble center_limited_gradient_full (FttCell * cell,
+ 					     FttComponent c,
+ 					     guint v,
+ 					     gdouble (* limiter) (gdouble))
+ {
+   FttDirection d = 2*c;
+   FttCellFace f1;
+   gdouble v0;
+ 
+   f1 = gfs_cell_face (cell, FTT_OPPOSITE_DIRECTION (d));
+   v0 = GFS_VALUEI (cell, v);
+   if (f1.neighbor) {
+     FttCellFace f2 = gfs_cell_face (cell, d);
+     if (f2.neighbor) {
+       /* two neighbors */
+       gdouble x1 = 1., v1, x2 = 1., v2;
+       v1 = gfs_neighbor_value (&f1, v, &x1);
+       v2 = gfs_neighbor_value (&f2, v, &x2);
+ 
+       gdouble g;
+       if (v0 == v1)
+ 	g = 0.;
+       else
+ 	g = (* limiter) ((v2 - v0)*x1/((v0 - v1)*x2))*(v0 - v1)/x1;
+       return g;
+     }
+   }
+   /* only one or no neighbors */
+   return 0.;
+ }
+ 
+ static gdouble center_limited_gradient (FttCell * cell,
+ 					FttComponent c,
+ 					guint v,
+ 					gdouble (* limiter) (gdouble))
+ {
+   FttDirection d = 2*c;
+   FttCellFace f1, f2;
+   f1 = gfs_cell_face (cell, FTT_OPPOSITE_DIRECTION (d));
+   f2 = gfs_cell_face (cell, d);
+   if (!GFS_IS_MIXED (cell) && 
+       (!f1.neighbor || !GFS_IS_MIXED (f1.neighbor)) &&
+       (!f2.neighbor || !GFS_IS_MIXED (f2.neighbor)))
+     return center_limited_gradient_full (cell, c, v, limiter);
+   gdouble h = ftt_cell_size (cell);
+   FttVector cm;
+   gfs_cell_cm (cell, &cm);  
+   gdouble v0 = GFS_VALUEI (cell, v), g = 0.;
+   
+   if (f1.neighbor && f2.neighbor) {
+     /* two neighbors */
+     gdouble x1, x2;
+     gdouble v1 = gfs_neighbor_value (&f1, v, &x1);
+     gdouble v2 = gfs_neighbor_value (&f2, v, &x2);
+     if (v0 != v1) {
+       FttVector cm1, cm2;
+       gfs_cell_cm (f1.neighbor, &cm1);
+       gfs_cell_cm (f2.neighbor, &cm2);       
+       /* fixme: this is not correct at coarse/fine boundaries */
+       x1 = ((&cm.x)[c] - (&cm1.x)[c])/h;
+       x2 = ((&cm2.x)[c] - (&cm.x)[c])/h;
+       g = (* limiter) ((v2 - v0)*x1/((v0 - v1)*x2))*(v0 - v1)/x1;
+     }
+   }
+  
+   /* mixed cells gradient following Causon et al. (2000) */
+   if (GFS_IS_MIXED (cell)) {
+     GfsSolidVector * s = GFS_STATE (cell)->solid;
+     FttVector ca = s->ca;
+     FttVector n;
+     gdouble nn;
+ 
+     gfs_solid_normal (cell, &n);
+     nn = sqrt (n.x*n.x + n.y*n.y);
+     n.x /= nn;
+     n.y /= nn;
+     
+     /* solid is on the right side of the cell */
+     if (s->s[2*c] < s->s[2*c + 1]) {
+       if (f1.neighbor) {
+ 	gdouble vr;
+ 	/* fixme: this relies on specific indices for U and V. Not recommended. */
+ 	if (v == 2) vr = v0 - 2.*(n.x*GFS_VALUEI (cell, 2) + n.y*GFS_VALUEI (cell, 3))*n.x;
+ 	else if (v == 3) vr = v0 - 2.*(n.x*GFS_VALUEI (cell, 2) + n.y*GFS_VALUEI (cell, 3))*n.y;
+ 	else return s->s[2*c]*g/s->s[2*c + 1];
+ 	gdouble x1, v1 = gfs_neighbor_value (&f1, v, &x1);
+ 	FttVector cm1;
+ 	gfs_cell_cm (f1.neighbor, &cm1);
+ 	/* fixme: this is not correct at coarse/fine boundaries */
+ 	x1 = ((&cm.x)[c] - (&cm1.x)[c])/h;
+ 	gdouble x2 = 2.*((&ca.x)[c] - (&cm.x)[c])/h;
+ 	gdouble gs = ((v0 - v1)*x2 == 0. || x1 == 0.) ? 0. :
+ 	  (* limiter) ((vr - v0)*x1/((v0 - v1)*x2))*(v0 - v1)/x1;
+ 	return (s->s[2*c]*g + (s->s[2*c + 1] - s->s[2*c])*gs)/s->s[2*c + 1];
+       }
+       else 
+ 	return 0;
+     }    
+     /* solid is on the left side of the cell */
+     else if (s->s[2*c] > s->s[2*c + 1]) {
+       if (f2.neighbor) {
+ 	gdouble vr;
+ 	/* fixme: this relies on specific indices for U and V. Not recommended. */
+ 	if (v == 2) vr = v0 - 2.*(n.x*GFS_VALUEI (cell, 2) + n.y*GFS_VALUEI (cell, 3))*n.x; 
+ 	else if (v == 3) vr = v0 - 2.*(n.x*GFS_VALUEI (cell, 2) + n.y*GFS_VALUEI (cell, 3))*n.y; 
+ 	else return s->s[2*c + 1]*g/s->s[2*c];
+ 	gdouble x2, v2 = gfs_neighbor_value (&f2, v, &x2);
+ 	FttVector cm2;
+ 	gfs_cell_cm (f2.neighbor, &cm2);
+ 	/* fixme: this is not correct at coarse/fine boundaries */
+ 	gdouble x1 = 2.*((&cm.x)[c] - (&ca.x)[c])/h;
+ 	x2 = ((&cm2.x)[c] - (&cm.x)[c])/h;
+  	gdouble gs = ((v0 - vr)*x2 == 0. || x1 == 0.) ? 0. :
+ 	  (* limiter) ((v2 - v0)*x1/((v0 - vr)*x2))*(v0 - vr)/x1;
+ 	return (s->s[2*c + 1]*g + (s->s[2*c] - s->s[2*c + 1])*gs)/s->s[2*c];
+       }
+       else 
+ 	return 0;
+     }
+   }
+   return g;
+ }
+ 
+ static gdouble center_minmod_gradient (FttCell * cell,
+ 				       FttComponent c,
+ 				       guint v)
+ {
+   return center_limited_gradient (cell, c, v, minmod_limiter);
+ }
+ 
+ static gdouble center_superbee_gradient (FttCell * cell,
+ 					 FttComponent c,
+ 					 guint v)
+ {
+   return center_limited_gradient (cell, c, v, superbee_limiter);
+ }
+ 
+ static gdouble center_sweby_gradient (FttCell * cell,
+ 				      FttComponent c,
+ 				      guint v)
+ {
+   return center_limited_gradient (cell, c, v, sweby_limiter);
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  /**
   * Solves the Saint-Venant equations.
   * \beginobject{GfsRiver}
   */
++<<<<<<< HEAD
++=======
+ 
+ #define H  0
+ #define U  1
+ #define V  2
+ #define HL 3
+ #define T(i,l) ((2 + (i))*r->nlayers + 1 + (l))
+ #define RHO(l) ((2 + r->nt)*r->nlayers + 3*(l) + 1)
+ #define HP(l)  ((2 + r->nt)*r->nlayers + 3*(l) + 2)
+ #define HPT(l) ((2 + r->nt)*r->nlayers + 3*(l) + 3)
+ #define ZB (r->nvar)
++>>>>>>> upstream/20131206+dfsg
  
  static void flux (const gdouble * u, gdouble g, gdouble * f)
  {
@@@ -105,12 -403,39 +417,46 @@@ typedef struct 
  
  #define CFL_CLAMP(u, umax) (fabs (u) <= (umax) ? (u) : (u) > 0. ? (umax) : - (umax))
  
++<<<<<<< HEAD
 +static void face_fluxes (FttCellFace * face, GfsRiver * r)
 +{
 +  if (GFS_VALUE (face->cell, r->v1[0]) <= r->dry &&
 +      GFS_VALUE (face->neighbor, r->v1[0]) <= r->dry)
++=======
+ static double left (const GfsRiver * r, const FttCellFace * f, int i, double a)
+ {
+   return GFS_VALUE (f->cell, r->v1[i]) + a*GFS_VALUE (f->cell, r->dv[f->d/2][i]);
+ }
+ 
+ static double right (const GfsRiver * r, const FttCellFace * f, int i, double a)
+ {
+   return GFS_VALUE (f->neighbor, r->v1[i]) - a*GFS_VALUE (f->neighbor, r->dv[f->d/2][i]);
+ }
+ 
+ static void face_fluxes (FttCellFace * face, GfsRiver * r)
+ {
+   gdouble eta = GFS_VALUE (face->cell, r->v1[H]), etan = GFS_VALUE (face->neighbor, r->v1[H]);
+ 
+   if (eta <= r->dry && etan <= r->dry)
++>>>>>>> upstream/20131206+dfsg
      return;
  
+   gdouble a = 1., b = 1.;
+   if (GFS_IS_MIXED (face->cell)) {
+     FttVector ca, cm;
+     gfs_face_ca (face, &ca);
+     gfs_cell_cm (face->cell, &cm);
+     FttComponent c = face->d/2;
+     a = fabs (2.*((&ca.x)[c] - (&cm.x)[c])/ftt_cell_size (face->cell));
+   }
+   if (GFS_IS_MIXED (face->neighbor)) {
+     FttVector ca, cm;
+     gfs_face_ca (face, &ca); /* fixme?: this is not symmetric with the above for face->cell */
+     gfs_cell_cm (face->neighbor, &cm);
+     FttComponent c = face->d/2;
+     b = fabs (2.*((&ca.x)[c] - (&cm.x)[c])/ftt_cell_size (face->neighbor));
+   } 
+ 
    static Sym sym[4] = {
      {U,  1., V,  1.},
      {U, -1., V, -1.},
@@@ -118,137 -443,405 +464,510 @@@
      {V, -1., U,  1.}
    };
    Sym * s = &sym[face->d];
++<<<<<<< HEAD
 +  gdouble etaL = (GFS_VALUE (face->cell, r->v1[0]) < r->dry ? 0. :
 +		  GFS_VALUE (face->cell, r->v1[0]) + 
 +		  s->du*GFS_VALUE (face->cell, r->dv[face->d/2][0]));
 +  gdouble zbL = (GFS_VALUE (face->cell, r->v[3]) + 
 +		 s->du*GFS_VALUE (face->cell, r->dv[face->d/2][3]));
 +  gdouble zbR = (GFS_VALUE (face->neighbor, r->v[3]) -
 +		 s->du*GFS_VALUE (face->neighbor, r->dv[face->d/2][3]));
++=======
+ 
+   gdouble etaL = (eta <= r->dry ? 0. : left (r, face, H, a*s->du));
+   gdouble zbL = (GFS_VALUE (face->cell, r->zb)
+ 		 + a*s->du*GFS_VALUE (face->cell, r->dv[face->d/2][ZB]));
+   gdouble zbR = (GFS_VALUE (face->neighbor, r->zb)
+ 		 - b*s->du*GFS_VALUE (face->neighbor, r->dv[face->d/2][ZB])); 
++>>>>>>> upstream/20131206+dfsg
    gdouble zbLR = MAX (zbL, zbR);
-   gdouble uL[4], uR[4], f[3];
  
++<<<<<<< HEAD
 +  if (etaL > r->dry) {
 +    uL[1] = s->du*(GFS_VALUE (face->cell, r->v1[s->u]) +
 +		   s->du*GFS_VALUE (face->cell, r->dv[face->d/2][s->u]))/etaL; /* u = uh/h */
 +    uL[2] = s->dv*(GFS_VALUE (face->cell, r->v1[s->v]) +
 +		   s->du*GFS_VALUE (face->cell, r->dv[face->d/2][s->v]))/etaL; /* v = vh/h */
 +  }
 +  else
 +    uL[1] = uL[2] = 0.;
 +  uL[0] = MAX (0., etaL + zbL - zbLR);
 +  uL[3] = 0.;
 +
 +  gdouble etaR = (GFS_VALUE (face->neighbor, r->v1[0]) < r->dry ? 0. :
 +		  GFS_VALUE (face->neighbor, r->v1[0]) -
 +		  s->du*GFS_VALUE (face->neighbor, r->dv[face->d/2][0]));
 +  switch (ftt_face_type (face)) {
 +  case FTT_FINE_FINE: case FTT_FINE_COARSE:
 +    /* fixme: this is only first-order accurate for fine/coarse */
 +    if (etaR > r->dry) {
 +      uR[1] = s->du*(GFS_VALUE (face->neighbor, r->v1[s->u]) -
 +		     s->du*GFS_VALUE (face->neighbor, r->dv[face->d/2][s->u]))/etaR; /* u = uh/h */
 +      uR[2] = s->dv*(GFS_VALUE (face->neighbor, r->v1[s->v]) -
 +		     s->du*GFS_VALUE (face->neighbor, r->dv[face->d/2][s->v]))/etaR; /* v = vh/h */
++=======
+   gdouble * uL = r->uL, * uR = r->uR;
+   int l;
+   if (etaL > r->dry)
+     for (l = 0; l < r->nlayers; l++) {
+       gdouble etal = etaL*r->dz[l];
+       /* ul = uhl/hl */
+       uL[U + 2*l] = s->du*left (r, face, s->u + 2*l, a*s->du)/etal;
+       /* vl = vhl/hl */
+       uL[V + 2*l] = s->dv*left (r, face, s->v + 2*l, a*s->du)/etal;
+       /* tl = thl/hl */
+       for (int i = 0; i < r->nt; i++)
+ 	uL[T(i,l)] = left (r, face, T(i,l), a*s->du)/etal;
      }
-     else
-       uR[1] = uR[2] = 0.;
-     uR[0] = MAX (0., etaR + zbR - zbLR);
-     uR[3] = 0.;
-     break;
+   else
+     for (l = 0; l < r->nlayers; l++) {
+       uL[U + 2*l] = uL[V + 2*l] = 0.;
+       for (int i = 0; i < r->nt; i++)
+ 	uL[T(i,l)] = 0.; /* fixme! */
+     }
+   uL[H] = MAX (0., etaL + zbL - zbLR);
+ 
+   gdouble etaR = (etan <= r->dry ? 0. : right (r, face, H, b*s->du));
+   /* fixme: this is only first-order accurate for fine/coarse */
+   if (etaR > r->dry)
+     for (l = 0; l < r->nlayers; l++) {
+       gdouble etal = etaR*r->dz[l];
+       /* ul = uhl/hl */
+       uR[U + 2*l] = s->du*right (r, face, s->u + 2*l, b*s->du)/etal;
+       /* vl = vhl/hl */
+       uR[V + 2*l] = s->dv*right (r, face, s->v + 2*l, b*s->du)/etal;
+       /* tl = thl/hl */
+       for (int i = 0; i < r->nt; i++)
+ 	uR[T(i,l)] = right (r, face, T(i,l), a*s->du)/etal;
+     }
+   else
+     for (l = 0; l < r->nlayers; l++) {
+       uR[U + 2*l] = uR[V + 2*l] = 0.;
+       for (int i = 0; i < r->nt; i++)
+ 	uR[T(i,l)] = 0.; /* fixme! */
+     }
+   uR[H] = MAX (0., etaR + zbR - zbLR);
+ 
+   gdouble h = ftt_cell_size (face->cell);
+   gdouble umax = GFS_SIMULATION (r)->advection_params.cfl*h/r->dt;
+   for (l = 0; l < r->nlayers; l++) {
+     uL[U + 2*l] = CFL_CLAMP (uL[U + 2*l], umax);
+     uR[U + 2*l] = CFL_CLAMP (uR[U + 2*l], umax);
+     uL[V + 2*l] = CFL_CLAMP (uL[V + 2*l], umax);
+     uR[V + 2*l] = CFL_CLAMP (uR[V + 2*l], umax);
+   }
+ 
+   gdouble * u, * un;
+   if (r->variable_density) {
+     hydrostatic_pressure (r, uL, face->cell);
+     hydrostatic_pressure (r, uR, face->cell);
+ 
+     u = g_malloc ((r->nvar + 3*(r->nlayers + 1))*sizeof (gdouble));
+     un = g_malloc ((r->nvar + 3*(r->nlayers + 1))*sizeof (gdouble));
+     u[H] = eta; un[H] = etan;
+     for (l = 0; l < r->nlayers; l++) {
+       gdouble etal = eta*r->dz[l];
+       gdouble etanl = etan*r->dz[l];
+       for (int i = 0; i < r->nt; i++) {
+ 	u[T(i,l)] = etal > 0. ? GFS_VALUE (face->cell, r->v1[T(i,l)])/etal : 0.; /* fixme! */
+ 	un[T(i,l)] = etanl > 0. ? GFS_VALUE (face->neighbor, r->v1[T(i,l)])/etanl : 0.; /* fixme! */
+       }
+     }
+     hydrostatic_pressure (r, u, face->cell);
+     hydrostatic_pressure (r, un, face->cell);
+   }
+   else
+     u = un = NULL;
  
-   default:
-     g_assert_not_reached ();
+   /* Riemann solver */
+   gdouble * f = r->f;
+   (* r->scheme) (r, uL, uR, f);
+ 
+   gdouble dt = gfs_domain_face_fraction (GFS_DOMAIN (r), face)*r->dt/h;
+   GFS_VALUE (face->cell, r->flux[H]) -= dt*f[H];
+   gdouble nn = (ftt_face_type (face) == FTT_FINE_COARSE ? FTT_CELLS : 1.);
+   GFS_VALUE (face->neighbor, r->flux[H]) += dt*f[H]/nn;
+ 
+   gdouble zb = GFS_VALUE (face->cell, r->zb);
+   gdouble zbn = GFS_VALUE (face->neighbor, r->zb);
+   gdouble SbL0, SbR0, SbL, SbR;
+   if (r->variable_density) {
+     /* eq. (89) of Audusse2011b (corrected) */
+     SbL0 = (uL[HPT(0)] + u[HPT(0)])*(zbLR - zb)/2.;
+     SbR0 = (uR[HPT(0)] + un[HPT(0)])*(zbLR - zbn)/2.;
+     SbL = SbR = 0.;
+   }
+   else { /* constant density */
+     if (eta <= r->dry) eta = 0.;
+     if (etan <= r->dry) etan = 0.;
+     /* see Audusse2005, equations 4.4 and 5.13 */
+     /* Slope source term "S_{i,j,p}" and second-order correction for
+        slope source term "Sc_{i,j,p}" of An2012, equations (11) and (12) */
+     SbL = r->g/2.*(uL[H]*uL[H] - etaL*etaL - (etaL + eta)*(zbL - zb));
+     SbR = r->g/2.*(uR[H]*uR[H] - etaR*etaR - (etaR + etan)*(zbR - zbn));
+     SbL0 = SbR0 = 0.;
+   }
+ 
+   gdouble G = 0.;
+   for (l = 0; l < r->nlayers; l++) {
+     gdouble dz = r->dz[l];
+     if (r->variable_density) {
+       /* eq. (84-85) of Audusse2011b (corrected) */
+       zbLR += (uL[H] + uR[H])*dz/2.;
+       zb += u[H]*dz; zbn += un[H]*dz;
+       /* eq. (89) of Audusse2011b (corrected) */
+       gdouble SbL = (uL[HPT(l + 1)] + u[HPT(l + 1)])*(zbLR - zb)/2.;
+       gdouble SbR = (uR[HPT(l + 1)] + un[HPT(l + 1)])*(zbLR - zbn)/2.;
+       GFS_VALUE (face->cell, r->flux[s->u + 2*l]) -= s->du*dt*(
+ 							       f[U + 3*l] 
+ 							       - SbL + SbL0
+ 							       );
+       GFS_VALUE (face->neighbor, r->flux[s->u + 2*l]) += s->du*dt*(
+ 								   f[U + 3*l] 
+ 								   - SbR + SbR0
+ 								   )/nn;
+       SbL0 = SbL;
+       SbR0 = SbR;
++>>>>>>> upstream/20131206+dfsg
+     }
+     else { /* constant density */
+       GFS_VALUE (face->cell, r->flux[s->u + 2*l]) -= s->du*dt*(f[U + 3*l] - dz*SbL);
+       GFS_VALUE (face->neighbor, r->flux[s->u + 2*l]) += s->du*dt*(f[U + 3*l] - dz*SbR)/nn;
+     }
+     GFS_VALUE (face->cell, r->flux[s->v + 2*l]) -= s->dv*dt*f[V + 3*l];
+     GFS_VALUE (face->neighbor, r->flux[s->v + 2*l]) += s->dv*dt*f[V + 3*l]/nn;
+     /* mass flux between layers */
+     G += dt*(f[HL + 3*l] - dz*f[H]); /* eq. (5.109) of Audusse2011a and (75) of Audusse2011b */
+     if (l < r->nlayers - 1) {
+       GFS_VALUE (face->cell, r->massflux[l]) += G;
+       GFS_VALUE (face->neighbor, r->massflux[l]) -= G/nn;
+     }
+     /* horizontal tracer advection */
+     for (int i = 0; i < r->nt; i++) {
+       double flux = dt*f[HL + 3*l];
+       flux *= flux > 0. ? uL[T(i,l)] : uR[T(i,l)];
+       GFS_VALUE (face->cell, r->flux[T(i,l)]) -= flux;
+       GFS_VALUE (face->neighbor, r->flux[T(i,l)]) += flux/nn;
+     }
    }
  
+   if (r->variable_density) {
+     g_free (u);
+     g_free (un);
+   }
+ }
+ 
++<<<<<<< HEAD
 +  gdouble h = ftt_cell_size (face->cell);
 +  gdouble umax = GFS_SIMULATION (r)->advection_params.cfl*h/r->dt;
 +  uL[1] = CFL_CLAMP (uL[1], umax);
 +  uR[1] = CFL_CLAMP (uR[1], umax);
 +  uL[2] = CFL_CLAMP (uL[2], umax);
 +  uR[2] = CFL_CLAMP (uR[2], umax);
 +
 +  riemann_hllc (uL, uR, r->g, f);
 +
 +  gdouble dt = gfs_domain_face_fraction (GFS_DOMAIN (r), face)*r->dt/h;
 +  f[0] *= dt;
 +  f[2] = s->dv*dt*f[2];
 +  GFS_VALUE (face->cell, r->flux[0])    -= f[0];
 +  /* see equation 2.16 of Audusse et al, 2004 */
 +  GFS_VALUE (face->cell, r->flux[s->u]) -= s->du*dt*(f[1] - r->g/2.*(uL[0]*uL[0] - etaL*etaL));
 +  GFS_VALUE (face->cell, r->flux[s->v]) -= f[2];
++=======
+ static gdouble limited_gradient (const FttCell * cell, const GfsRiver * r, 
+ 				 int i0, int i1, int i2, 
+ 				 int l,
+ 				 gdouble (* limiter) (gdouble))
+ {
+   if (l < 1 || l > r->nlayers - 2)
+     return 0.;
+   gdouble v0 = GFS_VALUE (cell, r->v1[i0]);
+   gdouble v1 = GFS_VALUE (cell, r->v1[i1]);
+   if (v0 == v1)
+     return 0.;
+ 
+   gdouble x1 = (r->dz[l] + r->dz[l - 1])/(2.*r->dz[l]);
+   gdouble v2 = GFS_VALUE (cell, r->v1[i2]);
+   gdouble x2 = (r->dz[l] + r->dz[l + 1])/(2.*r->dz[l]);
+   return (* limiter) ((v2 - v0)*x1/((v0 - v1)*x2))*(v0 - v1)/x1;
+ }
  
-   f[1] = s->du*dt*(f[1] - r->g/2.*(uR[0]*uR[0] - etaR*etaR));
-   if (ftt_face_type (face) == FTT_FINE_COARSE) {
-     f[0] /= FTT_CELLS;
-     f[1] /= FTT_CELLS;
-     f[2] /= FTT_CELLS;
-   }
-   GFS_VALUE (face->neighbor, r->flux[0])    += f[0];
-   GFS_VALUE (face->neighbor, r->flux[s->u]) += f[1];
-   GFS_VALUE (face->neighbor, r->flux[s->v]) += f[2];
+ /* fixme: minmod limiter for vertical advection may be too diffusive */
+ #define limited_gradient_u(l) limited_gradient(cell, r, c+2*(l), c+2*((l)-1), c+2*((l)+1), l, \
+ 					       minmod_limiter)
+ #define limited_gradient_t(l) limited_gradient(cell, r, T(i,l), T(i,(l)-1), T(i,(l)+1), l, \
+ 					       minmod_limiter)
++>>>>>>> upstream/20131206+dfsg
+ 
+ static void vertical_advection (FttCell * cell, const GfsRiver * r)
+ {
+   double eta = GFS_VALUE (cell, r->v1[H]);
+   if (eta > r->dry)
+     for (int l = 0; l < r->nlayers - 1; l++) {
+       double dz = eta*(r->dz[l] + r->dz[l + 1])/2.;
+       double G = GFS_VALUE (cell, r->massflux[l])/dz;
+       for (FttComponent c = U; c <= V; c++) {
+ 	double flux = G < 0. ?
+ 	  G*(GFS_VALUE (cell, r->v1[c + 2*l]) + limited_gradient_u (l)/2.) :
+ 	  G*(GFS_VALUE (cell, r->v1[c + 2*(l + 1)]) - limited_gradient_u (l + 1)/2.);
+ 	GFS_VALUE (cell, r->flux[c + 2*l]) += flux;
+ 	GFS_VALUE (cell, r->flux[c + 2*(l + 1)]) -= flux;
+       }
+       for (int i = 0; i < r->nt; i++) {
+ 	double flux = G < 0. ? 
+ 	  G*(GFS_VALUE (cell, r->v1[T(i,l)]) +  limited_gradient_t (l)/2.) :
+ 	  G*(GFS_VALUE (cell, r->v1[T(i,l + 1)]) - limited_gradient_t (l + 1)/2.);
+ 	GFS_VALUE (cell, r->flux[T(i,l)]) += flux;
+ 	GFS_VALUE (cell, r->flux[T(i,l + 1)]) -= flux;
+       }
+     }
  }
  
  static void reset_fluxes (FttCell * cell, const GfsRiver * r)
  {
-   guint v;
-   for (v = 0; v < GFS_RIVER_NVAR; v++)
-     GFS_VALUE (cell, r->flux[v]) = 0.;
+   int i;
+   for (i = 0; i < r->nvar; i++)
+     GFS_VALUE (cell, r->flux[i]) = 0.;
+   for (i = 0; i < r->nlayers - 1; i++)
+     GFS_VALUE (cell, r->massflux[i]) = 0.;
  }
  
- static void sources (FttCell * cell, GfsRiver * r)
+ static void solid_boundary_fluxes (FttCell * cell, GfsRiver * r)
  {
++<<<<<<< HEAD
 +  /* metric coefficients */
 +  gdouble fm[FTT_NEIGHBORS], cm;
 +
 +  /* Geometric source terms (see doc/figures/lonlat.tm) */
 +  if (GFS_DOMAIN (r)->cell_metric) {
 +    GfsDomain * domain = GFS_DOMAIN (r);
 +    FttCellFace face = { cell };
 +    for (face.d = 0; face.d < FTT_NEIGHBORS; face.d++)
 +      fm[face.d] = (* domain->face_metric) (domain, &face);
 +    gdouble dh_dl = fm[FTT_RIGHT] - fm[FTT_LEFT];
 +    gdouble dh_dt = fm[FTT_TOP]   - fm[FTT_BOTTOM];
 +    cm = (* domain->cell_metric) (domain, cell)*ftt_cell_size (cell);
 +    gdouble dldh = cm*GFS_SIMULATION (r)->physical_params.L;
 +    gdouble 
 +      phiu = GFS_VALUE (cell, r->v1[1]), 
 +      phiv = GFS_VALUE (cell, r->v1[2]);
 +    gdouble fG = phiv*dh_dl - phiu*dh_dt;
 +    gdouble g = GFS_SIMULATION (r)->physical_params.g;
 +
 +    gdouble etaL = GFS_VALUE (cell, r->v1[0]) - GFS_VALUE (cell, r->dv[0][0]);
 +    gdouble etaR = GFS_VALUE (cell, r->v1[0]) + GFS_VALUE (cell, r->dv[0][0]);
 +    GFS_VALUE (cell, r->v[1]) += r->dt*(g*(etaL*etaL + etaR*etaR)/4.*dh_dl + fG*phiv)/dldh;
 +
 +    etaL = GFS_VALUE (cell, r->v1[0]) - GFS_VALUE (cell, r->dv[1][0]);
 +    etaR = GFS_VALUE (cell, r->v1[0]) + GFS_VALUE (cell, r->dv[1][0]);
 +    GFS_VALUE (cell, r->v[2]) += r->dt*(g*(etaL*etaL + etaR*etaR)/4.*dh_dt - fG*phiu)/dldh;
 +  }
 +  else { /* metric unity */
 +    FttDirection d;
 +    for (d = 0; d < FTT_NEIGHBORS; d++)
 +      fm[d] = 1.;
 +    cm = ftt_cell_size (cell);
 +  }
 +
 +  /* Second-order correction for slope source term ("Sci" of Audusse
 +     et al, 2004, SIAM, 25(6):2050-2065, equation 3.8) */
 +  gdouble etaL = GFS_VALUE (cell, r->v1[0]) - GFS_VALUE (cell, r->dv[0][0]);
 +  gdouble zbL = GFS_VALUE (cell, r->v[3]) - GFS_VALUE (cell, r->dv[0][3]);
 +  gdouble etaR = GFS_VALUE (cell, r->v1[0]) + GFS_VALUE (cell, r->dv[0][0]);
 +  gdouble zbR = GFS_VALUE (cell, r->v[3]) + GFS_VALUE (cell, r->dv[0][3]);
 +
 +  GFS_VALUE (cell, r->v[1]) += 
 +    r->dt*r->g/4.*(fm[FTT_RIGHT] + fm[FTT_LEFT])*(etaL + etaR)*(zbL - zbR)/cm;
++=======
+   gdouble h = ftt_cell_size (cell);
+   GfsSolidVector * s = GFS_STATE (cell)->solid;
+   FttVector cm;
+ 
+   gdouble hh = MAX (GFS_VALUE (cell, r->v1[H]), 0.);
+   gfs_cell_cm (cell, &cm);
+   gdouble hs = hh + 2.*((s->ca.x - cm.x)*GFS_VALUE (cell, r->dv[0][H]) + 
+ 			(s->ca.y - cm.y)*GFS_VALUE (cell, r->dv[1][H]))/h;
+   gdouble zbs = 2.*((s->ca.x - cm.x)*GFS_VALUE (cell, r->dv[0][ZB]) +
+ 		    (s->ca.y - cm.y)*GFS_VALUE (cell, r->dv[1][ZB]))/h;
+   gdouble hszbs = 
+     r->dt/h*r->g/2.*(
+ 		     /* the normal component of the velocity is zero at the solid boundary. */  
+ 		     hs*hs +
+ 		     /* Second-order correction for slope source term ("Sc_{i,j,s}" of 
+ 			An2012, equation (27) */
+ 		     (hs + hh)*zbs);
+   FttVector n;
+   gfs_solid_normal (cell, &n);
+   GFS_VALUE (cell, r->flux[U]) -= n.x*hszbs;
+   GFS_VALUE (cell, r->flux[V]) -= n.y*hszbs;
+ }
  
-   etaL = GFS_VALUE (cell, r->v1[0]) - GFS_VALUE (cell, r->dv[1][0]);
-   zbL = GFS_VALUE (cell, r->v[3]) - GFS_VALUE (cell, r->dv[1][3]);
-   etaR = GFS_VALUE (cell, r->v1[0]) + GFS_VALUE (cell, r->dv[1][0]);
-   zbR = GFS_VALUE (cell, r->v[3]) + GFS_VALUE (cell, r->dv[1][3]);
+ /* Metric source terms (see doc/figures/lonlat.tm) */
+ static void metric_sources (FttCell * cell, GfsRiver * r)
+ {
+   if (GFS_VALUE (cell, r->v1[H]) > r->dry) {
+     /* fixme: this will probably not work when combined with solids */
+     GfsDomain * domain = GFS_DOMAIN (r);
+     gdouble fm[FTT_NEIGHBORS], cm;
+     FttCellFace face = { cell };
+     for (face.d = 0; face.d < FTT_NEIGHBORS; face.d++)
+       fm[face.d] = (* domain->face_metric) (domain, &face);
+     gdouble dh_dl = fm[FTT_RIGHT] - fm[FTT_LEFT];
+     gdouble dh_dt = fm[FTT_TOP]   - fm[FTT_BOTTOM];
+     cm = (* domain->cell_metric) (domain, cell)*ftt_cell_size (cell);
+     gdouble dldh = cm*GFS_SIMULATION (r)->physical_params.L;
+     gdouble 
+       phiu = GFS_VALUE (cell, r->v1[U]), 
+       phiv = GFS_VALUE (cell, r->v1[V]);
+     gdouble fG = phiv*dh_dl - phiu*dh_dt;
+     gdouble g = GFS_SIMULATION (r)->physical_params.g;
  
+     gdouble eta = GFS_VALUE (cell, r->v1[H]);
+     GFS_VALUE (cell, r->v[U]) += r->dt*(g*eta*eta/2.*dh_dl + fG*phiv)/dldh;
+     GFS_VALUE (cell, r->v[V]) += r->dt*(g*eta*eta/2.*dh_dt - fG*phiu)/dldh;
+   }
+ }
+ 
+ typedef struct {
+   double * a; /* sub-diagonal indexed from 1..n-1 */
+   double * b; /* diagonal (destroyed) */
+   double * c; /* sup-diagonal indexed from 0..n-2 */
+   double * v; /* rhs (destroyed) */
+   int n;
+ } Tridiagonal;
+ 
+ static void tridiagonal_init (Tridiagonal * t, int n)
+ {
+   t->a = g_malloc (sizeof (double)*n);
+   t->b = g_malloc (sizeof (double)*n);
+   t->c = g_malloc (sizeof (double)*(n - 1));
+   t->v = g_malloc (sizeof (double)*n);
+   t->n = n;
+ }
++>>>>>>> upstream/20131206+dfsg
+ 
+ static void tridiagonal_solve (Tridiagonal * t, double * x)
+ {
+   int n = t->n;
+   double * a = t->a, * b = t->b, * c = t->c, * v = t->v;
+   for (int i = 1; i < n; i++) {
+     double m = a[i]/b[i-1];
+     b[i] -= m*c[i-1];
+     v[i] -= m*v[i-1];
+   }
+   x[n-1] = v[n-1]/b[n-1];  
+   for (int i = n - 2; i >= 0; i--)
+     x[i] = (v[i] - c[i]*x[i+1])/b[i];  
+ }
+ 
++<<<<<<< HEAD
 +  GFS_VALUE (cell, r->v[2]) += 
 +    r->dt*r->g/4.*(fm[FTT_TOP] + fm[FTT_BOTTOM])*(etaL + etaR)*(zbL - zbR)/cm;
++=======
+ static void tridiagonal_free (Tridiagonal * t)
+ {
+   g_free (t->a);
+   g_free (t->b);
+   g_free (t->c);
+   g_free (t->v);
+ }
+ 
+ /* see doc/figures/diffusion.tm */
+ static void vertical_diffusion (double * u, 
+ 				const double * mu, const double * dz,
+ 				int N, double dt,
+ 				double dut, 
+ 				double lambdab, double ub, double k,
+ 				Tridiagonal * t,
+ 				/* working array of size N */
+ 				double * a)
+ {
+   if (k > 0.) { /* use Navier coefficient k rather than slip length */
+     lambdab = mu[0]/k;
+     ub = 0.;
+   }
+   for (int l = 0; l < N - 1; l++)
+     a[l] = dt*(mu[l] + mu[l+1])/(dz[l]*(dz[l] + dz[l+1]));
+   a[N-1] = dt*mu[N-1]/(dz[N-1]*dz[N-1]);
+   double am = dt*mu[0]/(dz[0]*dz[0]);
+   t->b[0] = 1. + a[0] + (1. - (2.*lambdab - dz[0])/(2.*lambdab + dz[0]))*am;
+   t->c[0] = - a[0];
+   t->v[0] = u[0] + 2.*dz[0]/(2.*lambdab + dz[0])*ub*am;
+   for (int l = 1; l < N - 1; l++) {
+     t->a[l] = - a[l-1];
+     t->b[l] = 1. + a[l] + a[l-1];
+     t->c[l] = - a[l];
+     t->v[l] = u[l];
+   }
+   t->a[N-1] = - a[N-2];
+   t->b[N-1] = 1. + a[N-2];
+   t->v[N-1] = u[N-1] + dut*dz[N-1]*a[N-1];
+   tridiagonal_solve (t, u);
+ }
+ 
+ /* bottom friction for a single layer. For more than one layer, bottom
+    friction is a boundary condition for vertical_diffusion() above  */
+ static void bottom_friction (FttCell * cell, GfsRiver * r)
+ {
+   double h = GFS_VALUE (cell, r->v[H]);
+   if (h > r->dry) {
+     double a = 1. + gfs_function_value (r->k, cell)/h*r->dt;
+     GFS_VALUE (cell, r->v[U]) /= a;
+     GFS_VALUE (cell, r->v[V]) /= a;
+   }
+   else
+     GFS_VALUE (cell, r->v[U]) = GFS_VALUE (cell, r->v[V]) = 0.;
+ }
+ 
+ static void domain_vertical_diffusion (GfsRiver * r, double dt)
+ {
+   Tridiagonal tri;
+   int n = r->nlayers;
+   tridiagonal_init (&tri, n);
+   double * a = g_malloc (n*sizeof (double));
+   double * u = g_malloc (n*sizeof (double));
+   double * mu = g_malloc (n*sizeof (double));
+   double * dz = g_malloc (n*sizeof (double));
+ 
+   FttCellTraverse * t = gfs_domain_cell_traverse_new (GFS_DOMAIN (r), 
+ 						      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1);
+   FttCell * cell;
+   while ((cell = ftt_cell_traverse_next (t))) {
+     double h = GFS_VALUE (cell, r->v[H]);
+     if (h > r->dry) {
+       double nu = gfs_function_value (r->nu, cell);
+       for (int l = 0; l < n; l++) {
+ 	mu[l] = nu;
+ 	dz[l] = r->dz[l]*h;
+ 	u[l] = GFS_VALUE (cell, r->v[U + 2*l])/dz[l];
+       }
+       double lambdab = 0., ub = 0., dut = r->dut ? gfs_function_value (r->dut, cell) : 0.;
+       double k = r->k ? gfs_function_value (r->k, cell) : 0.;
+       vertical_diffusion (u, mu, dz, n, dt, dut, lambdab, ub, k, &tri, a);
+       for (int l = 0; l < n; l++) {
+ 	GFS_VALUE (cell, r->v[U + 2*l]) = u[l]*dz[l];
+ 	u[l] = GFS_VALUE (cell, r->v[V + 2*l])/dz[l];
+       }
+       dut = 0.;
+       vertical_diffusion (u, mu, dz, n, dt, dut, lambdab, ub, k, &tri, a);
+       for (int l = 0; l < n; l++)
+ 	GFS_VALUE (cell, r->v[V + 2*l]) = u[l]*dz[l];
+     }
+     else
+       for (int l = 0; l < n; l++) {
+ 	GFS_VALUE (cell, r->v[U + 2*l]) = 0.;
+ 	GFS_VALUE (cell, r->v[V + 2*l]) = 0.;
+       }
+   }
+   ftt_cell_traverse_destroy (t);
+ 
+   g_free (a);
+   g_free (u);
+   g_free (mu);
+   g_free (dz);
+   tridiagonal_free (&tri);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void advance (GfsRiver * r, gdouble dt)
@@@ -294,21 -919,21 +1045,38 @@@ static void cell_gradients (FttCell * c
    FttComponent c;
    guint v;
  
++<<<<<<< HEAD
 +  if (GFS_VALUE (cell, r->v[0]) < r->dry) {
 +    for (c = 0; c < FTT_DIMENSION; c++) {
 +      for (v = 0; v < GFS_RIVER_NVAR; v++)
 +	GFS_VALUE (cell, r->dv[c][v]) = 0.;
 +      GFS_VALUE (cell, r->dv[c][3]) = 0.;
++=======
+   if (GFS_VALUE (cell, r->v[H]) <= r->dry) {
+     for (c = 0; c < FTT_DIMENSION; c++) {
+       for (v = 0; v < r->nvar; v++)
+ 	GFS_VALUE (cell, r->dv[c][v]) = 0.;
+       GFS_VALUE (cell, r->dv[c][ZB]) = 0.;
++>>>>>>> upstream/20131206+dfsg
      }
    }
    else { /* wet */
      for (c = 0; c < FTT_DIMENSION; c++) {
++<<<<<<< HEAD
 +      for (v = 0; v < GFS_RIVER_NVAR; v++)
 +	GFS_VALUE (cell, r->dv[c][v]) = (* r->gradient) (cell, c, r->v[v]->i)/2.;
 +      /* recontruct Zb + eta rather than Zb: see Theorem 3.1 of Audusse et al, 2004 */
 +      GFS_VALUE (cell, r->dv[c][3]) =
 +	(* r->gradient) (cell, c, r->H->i)/2.
 +	- GFS_VALUE (cell, r->dv[c][0]);
++=======
+       for (v = 0; v < r->nvar; v++)
+ 	GFS_VALUE (cell, r->dv[c][v]) = (* r->gradient) (cell, c, r->v[v]->i)/2.;
+       /* recontruct Zb + eta rather than Zb: see Theorem 3.1 of Audusse et al, 2004 */
+       GFS_VALUE (cell, r->dv[c][ZB]) =
+ 	(* r->gradient) (cell, c, r->h->i)/2.
+ 	- GFS_VALUE (cell, r->dv[c][H]);
++>>>>>>> upstream/20131206+dfsg
      }
    }
  }
@@@ -417,22 -1080,22 +1223,41 @@@ static void river_run (GfsSimulation * 
  }
  
  static gdouble maximum_face_metric (FttCell * cell, GfsDomain * domain, FttComponent c)
++<<<<<<< HEAD
 +{
 +  if (domain->face_metric) {
 +    FttCellFace f;
 +    f.cell = cell; f.d = 2*c;
 +    gdouble fm1 = (* domain->face_metric) (domain, &f);
 +    f.d = 2*c + 1;
 +    gdouble fm2 = (* domain->face_metric) (domain, &f);
 +    return MAX (fm1, fm2);
 +  }
 +  else
 +    return 1.;
 +}
 +
 +static void minimum_cfl (FttCell * cell, GfsRiver * r)
 +{
 +  gdouble h = GFS_VALUE (cell, r->v[0]);
++=======
+ {
+   if (domain->face_metric) {
+     FttCellFace f;
+     f.cell = cell; f.d = 2*c;
+     gdouble fm1 = (* domain->face_metric) (domain, &f);
+     f.d = 2*c + 1;
+     gdouble fm2 = (* domain->face_metric) (domain, &f);
+     return MAX (fm1, fm2);
+   }
+   else
+     return 1.;
+ }
+ 
+ static void minimum_cfl (FttCell * cell, GfsRiver * r)
+ {
+   gdouble h = GFS_VALUE (cell, r->v[H]);
++>>>>>>> upstream/20131206+dfsg
    if (h > r->dry) {
      GfsDomain * domain = GFS_DOMAIN (r);
      gdouble vol = ftt_cell_size (cell);
@@@ -441,11 -1104,14 +1266,22 @@@
      gdouble cg = sqrt (r->g*h);
      FttComponent c;
      for (c = FTT_X; c <= FTT_Y; c++) {
++<<<<<<< HEAD
 +      gdouble uh = fabs (GFS_VALUE (cell, r->v[c + 1]));
 +      gdouble fm = maximum_face_metric (cell, domain, c);
 +      gdouble cfl = vol/(fm*(uh/h + cg));
 +      if (cfl < r->cfl)
 +	r->cfl = cfl;
++=======
+       gdouble fm = maximum_face_metric (cell, domain, c);
+       int l;
+       for (l = 0; l < r->nlayers; l++) {
+ 	gdouble uh = fabs (GFS_VALUE (cell, r->v[c + 1 + 2*l]));
+ 	gdouble cfl = vol/(fm*(uh/(r->dz[l]*h) + cg));
+ 	if (cfl < r->cfl)
+ 	  r->cfl = cfl;
+       }
++>>>>>>> upstream/20131206+dfsg
      }
    }
  }
@@@ -468,9 -1184,28 +1354,34 @@@ static void river_read (GtsObject ** o
    GfsRiver * river = GFS_RIVER (*o);
    if (fp->type == '{') {
      double dry;
++<<<<<<< HEAD
 +    GtsFileVariable var[] = {
 +      {GTS_UINT,   "time_order", TRUE, &river->time_order},
 +      {GTS_DOUBLE, "dry",        TRUE, &dry},
++=======
+     gchar * scheme = NULL;
+     if (!river->nu) {
+       river->nu = gfs_function_new (gfs_function_class (), 1.);
+       gfs_function_set_units (river->nu, 2.);
+       gfs_object_simulation_set (river->nu, river);
+     }
+     if (!river->dut) {
+       river->dut = gfs_function_new (gfs_function_class (), 0.);
+       gfs_object_simulation_set (river->dut, river);
+     }
+     if (!river->k) {
+       river->k = gfs_function_new (gfs_function_class (), 0.);
+       gfs_function_set_units (river->k, 1.);
+       gfs_object_simulation_set (river->k, river);
+     }
+     GtsFileVariable var[] = {
+       {GTS_UINT,   "time_order", TRUE, &river->time_order},
+       {GTS_DOUBLE, "dry",        TRUE, &dry},
+       {GTS_STRING, "scheme",     TRUE, &scheme},
+       {GTS_OBJ,    "nu",         TRUE, &river->nu},
+       {GTS_OBJ,    "dut",        TRUE, &river->dut},
+       {GTS_OBJ,    "k",          TRUE, &river->k},
++>>>>>>> upstream/20131206+dfsg
        {GTS_NONE}
      };
      gts_file_assign_variables (fp, var);
@@@ -478,7 -1213,42 +1389,45 @@@
        return;
      if (var[1].set)
        river->dry = dry/GFS_SIMULATION (river)->physical_params.L;
++<<<<<<< HEAD
++=======
+     if (!var[3].set || river->nlayers < 2) {
+       gts_object_destroy (GTS_OBJECT (river->nu));
+       river->nu = NULL;
+     }
+     if (!var[4].set || river->nlayers < 2) {
+       gts_object_destroy (GTS_OBJECT (river->dut));
+       river->dut = NULL;
+     }
+     if (var[5].set) {
+       if (river->nlayers > 1 && !river->nu) {
+ 	gts_file_variable_error (fp, var, "k", "Navier condition requires viscosity to be set");
+ 	return;
+       }
+     }
+     else {
+       gts_object_destroy (GTS_OBJECT (river->k));
+       river->k = NULL;
+     }
+     if (scheme) {
+       if (!strcmp (scheme, "hllc")) {
+ 	if (river->nlayers > 1)
+ 	  gts_file_error (fp, "HLLC solver can only be used for a single layer");
+ 	else
+ 	  river->scheme = riemann_hllc;
+       }
+       else if (!strcmp (scheme, "kinetic"))
+ 	river->scheme = riemann_kinetic;
+       else
+ 	gts_file_error (fp, "unknown scheme '%s'", scheme);
+       g_free (scheme);
+     }
++>>>>>>> upstream/20131206+dfsg
    }
+ 
+   GfsSourceCoriolis * s = gfs_has_source_coriolis (GFS_DOMAIN (river));
+   if (s)
+     s->beta = 1.; /* backward Euler */
  }
  
  static void river_write (GtsObject * o, FILE * fp)
@@@ -489,9 -1259,50 +1438,56 @@@
    fprintf (fp, " {\n"
  	   "  time_order = %d\n"
  	   "  dry = %g\n"
++<<<<<<< HEAD
 +	   "}",
 +	   river->time_order,
 +	   river->dry*GFS_SIMULATION (river)->physical_params.L);
++=======
+ 	   "  scheme = %s\n",
+ 	   river->time_order,
+ 	   river->dry*GFS_SIMULATION (river)->physical_params.L,
+ 	   river->scheme == riemann_hllc ? "hllc" : "kinetic");
+   if (river->nu) {
+     fputs ("  nu =", fp);
+     gfs_function_write (river->nu, fp);
+   }
+   if (river->dut) {
+     fputs ("  dut =", fp);
+     gfs_function_write (river->dut, fp);
+   }
+   if (river->k) {
+     fputs ("  k =", fp);
+     gfs_function_write (river->k, fp);
+   }
+   fputs ("\n}", fp);
+ }
+ 
+ static void river_destroy (GtsObject * o)
+ {
+   GfsRiver * r = GFS_RIVER (o);
+ 
+   g_free (r->v);
+   g_free (r->v1);
+   g_free (r->flux);
+   g_free (r->massflux);
+   g_free (r->uL);
+   g_free (r->uR);
+   g_free (r->f);
+   int i;
+   for (i = 0; i < FTT_DIMENSION; i++)
+     g_free (r->dv[i]);
+   if (r->nu)
+     gts_object_destroy (GTS_OBJECT (r->nu));
+   if (r->dut)
+     gts_object_destroy (GTS_OBJECT (r->dut));
+   if (r->k)
+     gts_object_destroy (GTS_OBJECT (r->k));
+ 
+   /* restore the default read() method for tracers */
+   GTS_OBJECT_CLASS (gfs_variable_tracer_class ())->read = default_tracer_read;
+ 
+   (* GTS_OBJECT_CLASS (gfs_river_class ())->parent_class->destroy) (o);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void river_class_init (GfsSimulationClass * klass)
@@@ -528,8 -1340,63 +1525,68 @@@ static void momentum_coarse_fine (FttCe
       shallow cells, childrens' initial momentum defaults to zero. This
       prevents creating spurious large velocities. */
    GfsRiver * r = GFS_RIVER (v->domain);
++<<<<<<< HEAD
 +  if (GFS_VALUE (parent, r->v[0]) > 2.*r->dry)
 +    gfs_cell_coarse_fine (parent, v);
++=======
+   if (GFS_VALUE (parent, r->v[H]) > 2.*r->dry)
+     gfs_cell_coarse_fine (parent, v);
+ }
+ 
+ static GfsVariable * massflux (GfsDomain * domain, int l)
+ {
+   gchar * name = g_strdup_printf ("G%d", l);
+   gchar * description = g_strdup_printf ("Mass flux between layer %d and %d", l + 1, l);
+   GfsVariable * v = gfs_domain_get_or_add_variable (domain, name, description);
+   g_free (name);
+   g_free (description);
+   return v;
+ }
+ 
+ static void allocate_river (GfsRiver * r, int start, int nl)
+ {
+   r->nlayers = nl;
+   r->dz = g_realloc (r->dz, r->nlayers*sizeof (gdouble));
+   int l;
+   for (l = 0; l < r->nlayers; l++)
+     r->dz[l] = 1./r->nlayers;
+   r->nvar = 2*r->nlayers + 1;
+   r->v = g_realloc (r->v, (r->nvar + 1)*sizeof (GfsVariable *));
+   r->v1 = g_realloc (r->v1, r->nvar*sizeof (GfsVariable *));
+   for (FttComponent c = 0; c < FTT_DIMENSION; c++)
+     r->dv[c] = g_realloc (r->dv[c], (r->nvar + 1)*sizeof (GfsVariable *));
+   r->dv[0][ZB] = r->dv[0][3];
+   r->dv[1][ZB] = r->dv[1][3];
+   r->flux = g_realloc (r->flux, r->nvar*sizeof (GfsVariable *));
+   r->massflux = g_realloc (r->massflux, (r->nlayers - 1)*sizeof (GfsVariable *));
+ 
+   r->uL = g_realloc (r->uL, (r->nvar + 3*(r->nlayers + 1))*sizeof (gdouble));
+   r->uR = g_realloc (r->uR, (r->nvar + 3*(r->nlayers + 1))*sizeof (gdouble));
+   r->f = g_realloc (r->f, (3*r->nlayers + 1)*sizeof (gdouble));
+ 
+   GfsDomain * domain = GFS_DOMAIN (r);
+   if (r->nlayers > 1)
+     r->massflux[0] = massflux (domain, 0);
+ 
+   for (l = start; l < r->nlayers; l++) {
+     r->flux[U + 2*l] = gfs_domain_add_variable (domain, NULL, NULL);
+     r->flux[V + 2*l] = gfs_domain_add_variable (domain, NULL, NULL);
+ 
+     if (l < r->nlayers - 1)
+       r->massflux[l] = massflux (domain, l);
+ 
+     r->v1[U + 2*l] = gfs_domain_add_variable (domain, NULL, NULL);
+     r->v1[V + 2*l] = gfs_domain_add_variable (domain, NULL, NULL);
+     gfs_variable_set_vector (&r->v1[U + 2*l], 2);
+ 
+     GfsVariable * tensor[2][2];
+     r->dv[0][U + 2*l] = tensor[0][0] = gfs_domain_add_variable (domain, NULL, NULL);
+     r->dv[1][U + 2*l] = tensor[0][1] = gfs_domain_add_variable (domain, NULL, NULL);
+     r->dv[0][V + 2*l] = tensor[1][0] = gfs_domain_add_variable (domain, NULL, NULL);
+     r->dv[1][V + 2*l] = tensor[1][1] = gfs_domain_add_variable (domain, NULL, NULL);
+     gfs_variable_set_tensor (tensor);
+   }
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void river_init (GfsRiver * r)
@@@ -538,46 -1405,44 +1595,86 @@@
  
    gts_object_destroy (GTS_OBJECT (gfs_variable_from_name (domain->variables, "Pmac")));
  
++<<<<<<< HEAD
 +  r->v[0] = gfs_variable_from_name (domain->variables, "P");
 +  r->v[0]->units = 1.;
 +  g_free (r->v[0]->description);
 +  r->v[0]->description = g_strdup ("Fluid depth");
 +
 +  r->v[1] = gfs_variable_from_name (domain->variables, "U");
 +  r->v[1]->units = 2.;
 +  g_free (r->v[1]->description);
 +  r->v[1]->description = g_strdup ("x-component of the fluid flux");
 +  r->v[1]->coarse_fine = momentum_coarse_fine;
 +
 +  r->v[2] = gfs_variable_from_name (domain->variables, "V");
 +  r->v[2]->units = 2.;
 +  g_free (r->v[2]->description);
 +  r->v[2]->description = g_strdup ("y-component of the fluid flux");
 +  r->v[2]->coarse_fine = momentum_coarse_fine;
++=======
+   allocate_river (r, 0, 1); /* one layer by default */
+ 
+   r->v[H] = gfs_variable_from_name (domain->variables, "P");
+   r->v[H]->units = 1.;
+   g_free (r->v[H]->description);
+   r->v[H]->description = g_strdup ("Fluid depth");
+   r->v1[H] = gfs_domain_add_variable (domain, NULL, NULL);
+   r->flux[H] = gfs_domain_add_variable (domain, NULL, NULL);
++>>>>>>> upstream/20131206+dfsg
  
    r->zb = gfs_domain_add_variable (domain, "Zb", "Bed elevation above datum");
    r->zb->units = 1.;
  
++<<<<<<< HEAD
 +  r->H = gfs_domain_add_variable (domain, "H", "Elevation above datum (Zb + P)");
 +  r->H->units = 1.;
 +
 +  r->flux[0] = gfs_domain_add_variable (domain, NULL, NULL);
 +  r->flux[1] = gfs_domain_add_variable (domain, NULL, NULL);
 +  r->flux[2] = gfs_domain_add_variable (domain, NULL, NULL);
 +
 +  r->v1[0] = gfs_domain_add_variable (domain, NULL, NULL);
 +  r->v1[1] = gfs_domain_add_variable (domain, NULL, NULL);
 +  r->v1[2] = gfs_domain_add_variable (domain, NULL, NULL);
 +  gfs_variable_set_vector (&r->v1[1], 2);
 +
 +  r->dv[0][0] = gfs_domain_add_variable (domain, "Px", "x-component of the depth gradient");
 +  r->dv[1][0] = gfs_domain_add_variable (domain, "Py", "y-component of the depth gradient");
 +  r->dv[0][1] = gfs_domain_add_variable (domain, "Ux", "x-component of the flux gradient");
 +  r->dv[1][1] = gfs_domain_add_variable (domain, "Uy", "y-component of the flux gradient");
 +  r->dv[0][2] = gfs_domain_add_variable (domain, "Vx", "x-component of the flux gradient");
 +  r->dv[1][2] = gfs_domain_add_variable (domain, "Vy", "y-component of the flux gradient");
 +  r->dv[0][3] = gfs_domain_add_variable (domain, "Zbx", "x-component of the bed slope");
 +  r->dv[1][3] = gfs_domain_add_variable (domain, "Zby", "y-component of the bed slope");
++=======
+   r->h = gfs_domain_add_variable (domain, "H", "Elevation above datum (Zb + P)");
+   r->h->units = 1.;
+ 
+   GfsVariable * u[2];
+   r->dv[0][H] = u[0] = gfs_domain_add_variable (domain, "Px", "x-component of the depth gradient");
+   r->dv[1][H] = u[1] = gfs_domain_add_variable (domain, "Py", "y-component of the depth gradient");
+   gfs_variable_set_vector (u, 2);
+ 
+   r->dv[0][ZB] = u[0] = gfs_domain_add_variable (domain, "Zbx", "x-component of the bed slope");
+   r->dv[1][ZB] = u[1] = gfs_domain_add_variable (domain, "Zby", "y-component of the bed slope");
+   gfs_variable_set_vector (u, 2);
+ 
+   GfsVariable * v;
+   r->v[U] = r->qx = v = gfs_variable_from_name (domain->variables, "U");
+   v->units = 2.;
+   v->face_source = FALSE;
+   g_free (v->description);
+   v->description = g_strdup ("x-component of the (depth-integrated) fluid flux");
+   v->coarse_fine = momentum_coarse_fine;
+   
+   r->v[V] = r->qy = v = gfs_variable_from_name (domain->variables, "V");
+   v->units = 2.;
+   v->face_source = FALSE;
+   g_free (v->description);
+   v->description = g_strdup ("y-component of the (depth-integrated) fluid flux");
+   v->coarse_fine = momentum_coarse_fine;
++>>>>>>> upstream/20131206+dfsg
  
    GFS_SIMULATION (r)->advection_params.gradient = gfs_center_minmod_gradient;
    GFS_SIMULATION (r)->advection_params.cfl = 0.5;
@@@ -595,6 -1460,14 +1692,17 @@@
  
    r->time_order = 2;
    r->dry = 1e-6;
++<<<<<<< HEAD
++=======
+   r->scheme = riemann_kinetic;
+ 
+   /* overload the default read() method for tracers */
+   if (!default_tracer_read) {
+     GtsObjectClass * klass = GTS_OBJECT_CLASS (gfs_variable_tracer_class ());
+     default_tracer_read = klass->read;
+     klass->read = river_tracer_read;
+   }
++>>>>>>> upstream/20131206+dfsg
  }
  
  GfsSimulationClass * gfs_river_class (void)
@@@ -621,6 -1493,142 +1728,145 @@@
  /** \endobject{GfsRiver} */
  
  /**
++<<<<<<< HEAD
++=======
+  * Add multiple layers.  
+  * \beginobject{GfsLayers}
+  */
+ 
+ static void traverse_layers (GfsDomain * domain, FttCellTraverseFunc func, gpointer data)
+ {
+   GfsRiver * r = GFS_RIVER (domain);
+   GfsVariable ** u = gfs_domain_velocity (domain);
+   for (r->l = 0; r->l < r->nlayers; r->l++) {
+     for (int i = 0; i < r->nt; i++)
+       gfs_variables_swap (r->v[T(i,r->l)], PARENT_TRACER (r->v[T(i,r->l)]));
+     for (FttComponent c = 0; c < FTT_DIMENSION; c++)
+       gfs_variables_swap (r->v[U + c + 2*r->l], u[c]);
+     gfs_domain_traverse_leaves (domain, func, data);
+     for (FttComponent c = 0; c < FTT_DIMENSION; c++)
+       gfs_variables_swap (r->v[U + c + 2*r->l], u[c]);
+     for (int i = 0; i < r->nt; i++)
+       gfs_variables_swap (r->v[T(i,r->l)], PARENT_TRACER (r->v[T(i,r->l)]));
+   }
+ }
+ 
+ static gdouble cell_sigma (FttCell * cell, FttCellFace * face, GfsSimulation * sim)
+ {
+   GfsRiver * r = GFS_RIVER (sim);
+   g_assert (r->l < r->nlayers);
+   double sigma = r->dz[r->l]/2.;
+   for (int i = 0; i < r->l; i++)
+     sigma += r->dz[i];
+   return sigma;
+ }
+ 
+ static gdouble cell_z (FttCell * cell, FttCellFace * face, GfsSimulation * sim)
+ {
+   GfsRiver * r = GFS_RIVER (sim);
+   double zb = cell ? GFS_VALUE (cell, r->zb) : gfs_face_interpolated_value (face, r->zb->i);
+   double h = cell ? GFS_VALUE (cell, r->v[H]) : gfs_face_interpolated_value (face, r->v[H]->i);
+   return (zb + cell_sigma (cell, face, sim)*h)*sim->physical_params.L;
+ }
+ 
+ static void gfs_layers_read (GtsObject ** o, GtsFile * fp)
+ {
+   gts_file_next_token (fp);
+   if (fp->type != GTS_INT) {
+     gts_file_error (fp, "expecting an integer (number of layers)");
+     return;
+   }
+   GfsLayers * layers = GFS_LAYERS (*o);
+   layers->nl = atoi (fp->token->str);
+   if (layers->nl < 1) {
+     gts_file_error (fp, "number of layers must be > 0)");
+     return;
+   }
+   gts_file_next_token (fp);
+ 
+   /* this is specific to GfsRiver for the moment */
+   GfsSimulation * sim = gfs_object_simulation (layers);
+   if (!GFS_IS_RIVER (sim)) {
+     gts_file_error (fp, "layering is only valid for GfsRiver");
+     return;
+   }
+   if (layers->nl < 2)
+     return;
+ 
+   GfsRiver * r = GFS_RIVER (sim);
+   GfsDomain * domain = GFS_DOMAIN (r);
+ 
+   allocate_river (r, 1, layers->nl);
+ 
+   /* allocate (Ul,Vl) in separate loops so that values are contiguous in memory */
+   for (FttComponent c = 0; c < 2; c++)
+     for (int l = 0; l < r->nlayers; l++) {
+       gchar * name = g_strdup_printf ("%s%d", c ? "V" : "U", l);
+       gchar * description = g_strdup_printf ("%s-component of the fluid flux for layer %d",
+ 					     c ? "y" : "x", l);
+       GfsVariable * v = gfs_domain_get_or_add_variable (domain, name, description);
+       g_free (name);
+       g_free (description);
+       r->v[U + c + 2*l] = v;
+       v->units = 2.;
+       v->coarse_fine = momentum_coarse_fine;
+     }
+   for (int l = 0; l < r->nlayers; l++) {
+     GfsVariable * u[2] = { r->v[U + 2*l], r->v[V + 2*l] };
+     gfs_variable_set_vector (u, 2);
+   }
+ 
+   /* configure layers traversal */
+   domain->traverse_layers = traverse_layers;
+   GfsDerivedVariable * z = gfs_derived_variable_from_name (domain->derived_variables, "z");
+   z->func = cell_z;
+   GfsDerivedVariableInfo info = { "sigma", "vertical coordinate", cell_sigma };
+   gfs_domain_add_derived_variable (domain, info);
+ }
+ 
+ static void gfs_layers_write (GtsObject * o, FILE * fp)
+ {
+   fprintf (fp, "%s %d", o->klass->info.name, GFS_LAYERS (o)->nl);
+ }
+ 
+ static void gfs_layers_class_init (GtsObjectClass * klass)
+ {
+   GFS_REFINE_CLASS (klass)->refine = NULL;
+   klass->read = gfs_layers_read;
+   klass->write = gfs_layers_write;
+ }
+ 
+ static void gfs_layers_init (GfsLayers * l)
+ {
+   l->nl = 1;
+ }
+ 
+ GtsObjectClass * gfs_layers_class (void)
+ {
+   static GtsObjectClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsLayers",
+       sizeof (GfsLayers),
+       sizeof (GfsRefineClass),
+       (GtsObjectClassInitFunc) gfs_layers_class_init,
+       (GtsObjectInitFunc) gfs_layers_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_refine_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /**
+  * \endobject{GfsLayers}
+  */
+ 
+ /**
++>>>>>>> upstream/20131206+dfsg
   * 
   * \beginobject{GfsBcSubcritical}
   */
@@@ -720,7 -1728,7 +1966,11 @@@ static void discharge_elevation_read (G
    else
      gfs_object_simulation_set (bd->profile, domain);
  
++<<<<<<< HEAD
 +  bd->P = GFS_RIVER (domain)->v[0];
++=======
+   bd->P = GFS_RIVER (domain)->v[H];
++>>>>>>> upstream/20131206+dfsg
    g_free (GFS_CONSTANT (bd)->derived->description);
    GFS_CONSTANT (bd)->derived->description = g_strdup ("Elevation for a given discharge");
  }
@@@ -738,18 -1746,18 +1988,30 @@@ static void boundary_flux (FttCellFace 
    gdouble profile = gfs_function_face_value (b->profile, f);
    if (profile != GFS_NODATA) {
      GfsRiver * river = GFS_RIVER (gfs_object_simulation (b));
++<<<<<<< HEAD
 +    GFS_VALUE (f->cell, river->flux[0]) = 0.;
 +    gdouble v1 = GFS_VALUE (f->cell, river->v1[0]);
 +    GFS_VALUE (f->cell, river->v1[0]) = MAX (0.,
++=======
+     GFS_VALUE (f->cell, river->flux[H]) = 0.;
+     gdouble v1 = GFS_VALUE (f->cell, river->v1[H]);
+     GFS_VALUE (f->cell, river->v1[H]) = MAX (0.,
++>>>>>>> upstream/20131206+dfsg
  					     profile + GFS_CONSTANT (b)->val - 
  					     gfs_face_interpolated_value (f, river->zb->i));
      gdouble dt = river->dt;
      river->dt = 1.;
      face_fluxes (f, river);
      river->dt = dt;
++<<<<<<< HEAD
 +    GFS_VALUE (f->cell, river->v1[0]) = v1;
 +    double h = ftt_cell_size (f->cell);
 +    b->flow -= GFS_VALUE (f->cell, river->flux[0])*h*h;
++=======
+     GFS_VALUE (f->cell, river->v1[H]) = v1;
+     double h = ftt_cell_size (f->cell);
+     b->flow -= GFS_VALUE (f->cell, river->flux[H])*h*h;
++>>>>>>> upstream/20131206+dfsg
    }
  }
  
@@@ -777,7 -1785,7 +2039,11 @@@ static gboolean discharge_elevation_eve
      GfsRiver * r = GFS_RIVER (sim);
      guint v;
        
++<<<<<<< HEAD
 +    for (v = 0; v < GFS_RIVER_NVAR; v++)
++=======
+     for (v = 0; v < r->nvar; v++)
++>>>>>>> upstream/20131206+dfsg
        gfs_variables_swap (r->v[v], r->v1[v]);
        
      gfs_catch_floating_point_exceptions ();
@@@ -816,7 -1824,7 +2082,11 @@@
      c->val *= L;
      /* g_message ("### flow: %g H: %g nitermax: %d\n", bd->flow*pow(L,3), c->val, n); */
  
++<<<<<<< HEAD
 +    for (v = 0; v < GFS_RIVER_NVAR; v++)
++=======
+     for (v = 0; v < r->nvar; v++)
++>>>>>>> upstream/20131206+dfsg
        gfs_variables_swap (r->v[v], r->v1[v]);
  
      return TRUE;
@@@ -834,6 -1842,7 +2104,10 @@@ static void gfs_discharge_elevation_cla
  
  static void gfs_discharge_elevation_init (GfsDischargeElevation * b)
  {
++<<<<<<< HEAD
++=======
+   GFS_EVENT (b)->start = 0.; /* this is not an "Init" event */
++>>>>>>> upstream/20131206+dfsg
    b->tolerance = 1e-2;
    b->Q = gfs_function_new (gfs_function_class (), 0.);
    gfs_function_set_units (b->Q, 3.);
@@@ -863,3 -1872,205 +2137,208 @@@ GfsEventClass * gfs_discharge_elevation
  }
  
  /** \endobject{GfsDischargeElevation} */
++<<<<<<< HEAD
++=======
+ 
+ /**
+  * "Pipe" between two locations.
+  * \beginobject{GfsSourcePipe}
+  */
+ 
+ static gboolean read_position (GtsFile * fp, FttVector * p)
+ {
+   gchar * start[FTT_DIMENSION];
+   if (!gfs_read_vector (fp, start))
+     return FALSE;
+   FttComponent c;
+   p->z = 0.;
+   for (c = 0; c < FTT_DIMENSION; c++) {
+     (&p->x)[c] = atof (start[c]);
+     g_free (start[c]);
+   }
+   return TRUE;
+ }
+ 
+ static void source_pipe_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_source_pipe_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsSimulation * sim = gfs_object_simulation (*o);
+   if (!GFS_IS_RIVER (sim)) {
+     gts_file_error (fp, "%s only makes sense for GfsRiver simulations",
+ 		    (*o)->klass->info.name);
+     return;
+   }
+   GfsVariable * v = GFS_RIVER (sim)->v[H];
+   if (v->sources == NULL)
+     v->sources = gts_container_new (GTS_CONTAINER_CLASS (gts_slist_container_class ()));
+   gts_container_add (v->sources, GTS_CONTAINEE (*o));
+ 
+   GfsSourcePipe * p = GFS_SOURCE_PIPE (*o);
+   if (!read_position (fp, &p->start))
+     return;
+   if (!read_position (fp, &p->end))
+     return;
+ 
+   p->diameter = gfs_read_constant (fp, GFS_DOMAIN (gfs_object_simulation (p)));
+   if (p->diameter == G_MAXDOUBLE)
+     return;
+ }
+ 
+ static void source_pipe_write (GtsObject * o, FILE * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_source_pipe_class ())->parent_class->write) (o, fp);
+   GfsSourcePipe * p = GFS_SOURCE_PIPE (o);
+   fprintf (fp, " (%f,%f) (%f,%f) %f",
+ 	   p->start.x, p->start.y,
+ 	   p->end.x, p->end.y,
+ 	   p->diameter);
+ }
+ 
+ #define DQ (1e-4/L3)
+ 
+ static double flow_rate_Q (double z1, double h1, double z2, double h2,
+ 			   double l, double g, GfsSourcePipe * p,
+ 			   double a1, double a2, double Q)
+ {
+   double Q1 = (*p->flow_rate) (z1, h1 - Q/a1, z2, h2 + Q/a2, l, g, p);
+   if (Q1 > 0.) Q1 = MIN (Q1, a1*h1);
+   if (Q1 < 0.) Q1 = MAX (Q1, - a2*h2);
+   return Q1;
+ }
+ 
+ static gboolean source_pipe_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* gfs_event_class ()->event) (event, sim)) {
+     GfsSourcePipe * p = GFS_SOURCE_PIPE (event);
+     GfsDomain * domain = GFS_DOMAIN (sim);
+     FttVector start = p->start, end = p->end;
+     gfs_simulation_map (sim, &start);
+     gfs_simulation_map (sim, &end);
+     /* fixme: this won't work in parallel if the ends of the pipe are on different PEs */
+     p->scell = gfs_domain_locate (domain, start, -1, NULL);
+     p->ecell = gfs_domain_locate (domain, end, -1, NULL);
+     p->Q = 0.;
+     if (p->scell && p->ecell && p->scell != p->ecell) {
+       gdouble L = sim->physical_params.L, g = sim->physical_params.g;
+       GfsVariable * h = GFS_RIVER (sim)->v[H], * zb = GFS_RIVER (sim)->zb;
+       gdouble h1 = MAX (L*GFS_VALUE (p->scell, h), 0.), z1 = L*GFS_VALUE (p->scell, zb);
+       gdouble h2 = MAX (L*GFS_VALUE (p->ecell, h), 0.), z2 = L*GFS_VALUE (p->ecell, zb);      
+       /* fixme: the length below does not take into account metric
+ 	 properly (e.g. won't work for MetricLonLat) */
+       gdouble l = L*sqrt ((start.x - end.x)*(start.x - end.x) +
+ 			  (start.y - end.y)*(start.y - end.y));
+       gdouble L2 = L*L, L3 = L*L*L;
+       gdouble a1 = L2*gfs_cell_volume (p->scell, GFS_DOMAIN (sim))/sim->advection_params.dt;
+       gdouble a2 = L2*gfs_cell_volume (p->ecell, GFS_DOMAIN (sim))/sim->advection_params.dt;
+ 
+       /* secant-bisection root-finding: solves flow_rate(h, l, Q) - Q = 0 for the flow rate Q */
+       p->Q = (*p->flow_rate) (z1, h1, z2, h2, l, g, p)/L3;
+       gdouble Q1 = p->Q*2.;
+       gdouble v1 = flow_rate_Q (z1, h1, z2, h2, l, g, p, a1, a2, Q1*L3)/L3 - Q1;
+       gdouble Q2 = 0.;
+       gdouble v2 = p->Q;
+       if (fabs (v1) > DQ && fabs (v2) > DQ) {
+ 	if (v1 > v2) {
+ 	  gdouble v = v1;
+ 	  v1 = v2; v2 = v;
+ 	  v = Q1;
+ 	  Q1 = Q2; Q2 = v;
+ 	}
+ 	if (v1*v2 >= 0.)
+ 	  g_warning ("source_pipe_event: v1: %g v2: %g", v1*L3, v2*L3);
+ 	else {
+ 	  guint nitermax = 1000;
+ 	  gdouble Qb;
+ 	  p->Q = (v1*Q2 - v2*Q1)/(v1 - v2);
+ 	  do {
+ 	    Qb = p->Q;
+ 	    gdouble v = flow_rate_Q (z1, h1, z2, h2, l, g, p, a1, a2, p->Q*L3)/L3 - p->Q;
+ 	    if (v < 0.) {
+ 	      v1 = v; Q1 = p->Q;
+ 	    }
+ 	    else {
+ 	      v2 = v; Q2 = p->Q;
+ 	    }
+ 	    if (v2 > v1)
+ 	      p->Q = (v1*Q2 - v2*Q1)/(v1 - v2);
+ 	    nitermax--;
+ 	  } while (fabs (p->Q - Qb) > DQ && nitermax);
+ 	  if (nitermax == 0)
+ 	    g_warning ("source_pipe_event: failed to converge! %g %g", 
+ 		       p->Q*L3, fabs (p->Q - Qb)*L3);
+ 	}
+       }
+     }
+     return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ static void source_pipe_class_init (GfsSourceGenericClass * klass)
+ {
+   GTS_OBJECT_CLASS (klass)->read = source_pipe_read;
+   GTS_OBJECT_CLASS (klass)->write = source_pipe_write;
+   GFS_EVENT_CLASS (klass)->event = source_pipe_event;
+ }
+ 
+ static gdouble source_pipe_value (GfsSourceGeneric * s, 
+ 				  FttCell * cell, 
+ 				  GfsVariable * v)
+ {
+   GfsSourcePipe * p = GFS_SOURCE_PIPE (s);
+   if (cell == p->scell)
+     return - p->Q/gfs_cell_volume (cell, v->domain);
+   if (cell == p->ecell)
+     return   p->Q/gfs_cell_volume (cell, v->domain);
+   return 0.;
+ }
+ 
+ /* This is a simplistic flow rate model for a circular pipe. 
+    The pipe is assumed to be always fully submerged. */
+ static double pipe_flow_rate (double z1, double h1, /* terrain elevation and flow depth at inlet */
+ 			      double z2, double h2, /* terrain elevation and flow depth at outlet */
+ 			      double l,             /* pipe length */
+ 			      double g,             /* acceleration of gravity */
+ 			      GfsSourcePipe * p)
+ {
+   gdouble r = p->diameter/2.;
+   gdouble A = M_PI*r*r; /* area */
+   gdouble P = 2.*M_PI*r; /* perimeter */
+   gdouble Rh = A/P; /* hydraulic radius */
+   gdouble S = fabs (z1 + h1 - z2 - h2)/l; /* slope */
+   gdouble n = 0.03; /* Gauckler-Manning coefficient */
+   /* Gauckler-Manning-Strickler formula for the (signed) flow rate */
+   return (z1 + h1 > z2 + h2 ? 1. : -1.)*A/n*pow (Rh, 2./3.)*sqrt (S);
+ }
+ 
+ static void source_pipe_init (GfsSourceGeneric * s)
+ {
+   s->mac_value = s->centered_value = source_pipe_value;
+   GFS_SOURCE_PIPE (s)->flow_rate = pipe_flow_rate;
+ }
+ 
+ GfsSourceGenericClass * gfs_source_pipe_class (void)
+ {
+   static GfsSourceGenericClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsSourcePipe",
+       sizeof (GfsSourcePipe),
+       sizeof (GfsSourceGenericClass),
+       (GtsObjectClassInitFunc) source_pipe_class_init,
+       (GtsObjectInitFunc) source_pipe_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_source_generic_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsSourcePipe} */
++>>>>>>> upstream/20131206+dfsg
diff --cc src/river.h
index 89715c1,f34988f..a97e477
--- a/src/river.h
+++ b/src/river.h
@@@ -45,6 -66,11 +66,14 @@@ struct _GfsRiver 
    GfsCenterGradient gradient;
    guint time_order;
    gdouble dry;
++<<<<<<< HEAD
++=======
+   void (* scheme) (const GfsRiver * r,
+ 		   const gdouble * uL, const gdouble * uR, 
+ 		   gdouble * f);
+   GfsFunction * nu, * dut, * k;
+   gboolean variable_density;
++>>>>>>> upstream/20131206+dfsg
  };
  
  #define GFS_RIVER(obj)            GTS_OBJECT_CAST (obj,\
@@@ -84,6 -110,34 +113,37 @@@ struct _GfsDischargeElevation 
  
  GfsEventClass * gfs_discharge_elevation_class (void);
  
++<<<<<<< HEAD
++=======
+ /* GfsSourcePipe: Header */
+ 
+ typedef struct _GfsSourcePipe         GfsSourcePipe;
+ 
+ struct _GfsSourcePipe {
+   /*< private >*/
+   GfsSourceGeneric parent;
+   FttCell * scell, * ecell;
+   gdouble Q;
+ 
+   /*< public >*/
+   double (* flow_rate) (double z1, double h1, /* terrain elevation and flow depth at inlet */
+ 			double z2, double h2, /* terrain elevation and flow depth at outlet */
+ 			double l,             /* pipe length */
+ 			double g,             /* acceleration of gravity */
+ 			GfsSourcePipe * p);
+   FttVector start, end;
+   gdouble diameter;
+ };
+ 
+ #define GFS_SOURCE_PIPE(obj)            GTS_OBJECT_CAST (obj,\
+ 					         GfsSourcePipe,\
+ 					         gfs_source_pipe_class ())
+ #define GFS_IS_SOURCE_PIPE(obj)         (gts_object_is_from_class (obj,\
+ 						 gfs_source_pipe_class ()))
+ 
+ GfsSourceGenericClass * gfs_source_pipe_class  (void);
+ 
++>>>>>>> upstream/20131206+dfsg
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
diff --cc src/simulation.c
index 36083c2,5252979..4398ff5
--- a/src/simulation.c
+++ b/src/simulation.c
@@@ -69,14 -69,8 +69,17 @@@ static void simulation_destroy (GtsObje
    g_slist_free (sim->globals);
    g_slist_foreach (sim->preloaded_modules, (GFunc) module_close, NULL);
    g_slist_free (sim->preloaded_modules);
++<<<<<<< HEAD
 +
 +  GHashTable * function_cache = sim->function_cache;
++=======
++>>>>>>> upstream/20131206+dfsg
  
    (* GTS_OBJECT_CLASS (gfs_simulation_class ())->parent_class->destroy) (object);
 +
 +  /* it is now safe to destroy the function cache (all the functions
 +     used in GfsBoxes etc.. have been destroyed) */
 +  g_hash_table_destroy (function_cache);
  }
  
  static void simulation_write (GtsObject * object, FILE * fp)
@@@ -213,7 -204,15 +213,19 @@@ static GModule * load_module (GtsFile 
  				  "3D"
  #endif
  				  , NULL);
++<<<<<<< HEAD
 +      gchar * path = g_module_build_path (GFS_MODULES_DIR, name);
++=======
+ #ifdef MODULES_SUFFIX
+       gchar * path;
+       if (name[0] != G_DIR_SEPARATOR)
+ 	path = g_strconcat (GFS_MODULES_DIR, G_DIR_SEPARATOR_S, "lib", name, MODULES_SUFFIX, NULL);
+       else
+ 	path = g_strdup (name);
+ #else
+       gchar * path = g_module_build_path (GFS_MODULES_DIR, name);
+ #endif
++>>>>>>> upstream/20131206+dfsg
        g_free (name);
        module = g_module_open (path, 0);
        g_free (path);
@@@ -313,14 -311,14 +324,25 @@@ static void simulation_read (GtsObject 
        if (fp->type == GTS_ERROR)
  	return;
        if (sim->advection_params.linear) {
++<<<<<<< HEAD
 +	sim->u0[0] = gfs_domain_get_or_add_variable (GFS_DOMAIN (sim), 
 +						     "U0", "x-component of the base velocity");
 +	sim->u0[0]->units = 1.;
 +	sim->u0[1] = gfs_domain_get_or_add_variable (GFS_DOMAIN (sim), 
 +						     "V0", "y-component of the base velocity");
 +	sim->u0[1]->units = 1.;
 +#if (!FTT_2D)
 +	sim->u0[2] = gfs_domain_get_or_add_variable (GFS_DOMAIN (sim), 
++=======
+ 	sim->u0[0] = gfs_domain_get_or_add_variable (domain, 
+ 						     "U0", "x-component of the base velocity");
+ 	sim->u0[0]->units = 1.;
+ 	sim->u0[1] = gfs_domain_get_or_add_variable (domain, 
+ 						     "V0", "y-component of the base velocity");
+ 	sim->u0[1]->units = 1.;
+ #if (!FTT_2D)
+ 	sim->u0[2] = gfs_domain_get_or_add_variable (domain, 
++>>>>>>> upstream/20131206+dfsg
  						     "W0", "z-component of the base velocity");
  	sim->u0[2]->units = 1.;
  #endif /* FTT_3D */
@@@ -391,16 -396,17 +420,21 @@@
  
  /**
   * gfs_advance_tracers:
++<<<<<<< HEAD
 + * @domain: a #GfsDomain.
++=======
+  * @sim: a #GfsSimulation.
++>>>>>>> upstream/20131206+dfsg
   * @dt: the timestep.
   *
-  * Performs advection/difussion of tracers associated with @domain.
+  * Performs advection/difussion of tracers associated with @sim.
   */
- void gfs_advance_tracers (GfsDomain * domain, gdouble dt)
+ void gfs_advance_tracers (GfsSimulation * sim, gdouble dt)
  {
-   g_return_if_fail (domain != NULL);
+   g_return_if_fail (sim != NULL);
  
-   GSList * i = domain->variables;
+   GfsDomain * domain = GFS_DOMAIN (sim);
+   GSList * i = sim->events->items;
    while (i) {
      if (GFS_IS_VARIABLE_TRACER_VOF (i->data)) {
        GfsVariableTracer * t = i->data;
@@@ -460,10 -466,10 +494,14 @@@ static void simulation_run (GfsSimulati
    if (sim->time.i == 0) {
      gfs_approximate_projection (domain,
  				&sim->approx_projection_params,
++<<<<<<< HEAD
 +				&sim->advection_params,
++=======
+ 				sim->advection_params.dt,
++>>>>>>> upstream/20131206+dfsg
  				p, sim->physical_params.alpha, res, g, NULL);
      gfs_simulation_set_timestep (sim);
-     gfs_advance_tracers (domain, sim->advection_params.dt/2.);
+     gfs_advance_tracers (sim, sim->advection_params.dt/2.);
    }
    else if (sim->advection_params.gc)
      gfs_update_gradients (domain, p, sim->physical_params.alpha, g);
@@@ -490,7 -496,7 +528,11 @@@
      gfs_variables_swap (p, pmac);
      gfs_mac_projection (domain,
      			&sim->projection_params, 
++<<<<<<< HEAD
 +    			&sim->advection_params,
++=======
+     			sim->advection_params.dt/2.,
++>>>>>>> upstream/20131206+dfsg
  			p, sim->physical_params.alpha, gmac, NULL);
      gfs_variables_swap (p, pmac);
  
@@@ -520,7 -526,7 +562,11 @@@
  
      gfs_approximate_projection (domain,
     				&sim->approx_projection_params, 
++<<<<<<< HEAD
 +    				&sim->advection_params, 
++=======
+     				sim->advection_params.dt, 
++>>>>>>> upstream/20131206+dfsg
  				p, sim->physical_params.alpha, res, g, NULL);
  
      sim->time.t = sim->tnext;
@@@ -553,11 -559,11 +599,19 @@@ static gdouble simulation_cfl (GfsSimul
      GfsVariable * v = i->data;
  
      if (GFS_IS_VARIABLE_TRACER (v) && 
++<<<<<<< HEAD
 +	GFS_VARIABLE_TRACER (v)->advection.scheme != GFS_NONE &&
 +	gts_vector_norm (GFS_VARIABLE_TRACER (v)->advection.sink) > 0.) {
 +      gfs_add_sinking_velocity (GFS_DOMAIN (sim), GFS_VARIABLE_TRACER (v)->advection.sink);
 +      gdouble cfl = gfs_domain_cfl (GFS_DOMAIN (sim), FTT_TRAVERSE_LEAFS, -1);
 +      gfs_remove_sinking_velocity (GFS_DOMAIN (sim), GFS_VARIABLE_TRACER (v)->advection.sink);
++=======
+  	GFS_VARIABLE_TRACER (v)->advection.scheme != GFS_NONE &&
+ 	GFS_VARIABLE_TRACER (v)->advection.sink[0]) {
+       gfs_add_sinking_velocity (GFS_DOMAIN (sim), &GFS_VARIABLE_TRACER (v)->advection);
+       gdouble cfl = gfs_domain_cfl (GFS_DOMAIN (sim), FTT_TRAVERSE_LEAFS, -1);
+       gfs_remove_sinking_velocity (GFS_DOMAIN (sim), &GFS_VARIABLE_TRACER (v)->advection);
++>>>>>>> upstream/20131206+dfsg
        if (cfl < cflmin)
  	cflmin = cfl;
      }
@@@ -924,11 -957,14 +1005,22 @@@ static void simulation_init (GfsSimulat
    GfsVariable * u[FTT_DIMENSION];
    u[0] = gfs_domain_add_variable (domain, "U",    "x-component of the velocity");
    u[0]->units = 1.;
++<<<<<<< HEAD
 +  u[1] = gfs_domain_add_variable (domain, "V",    "y-component of the velocity");
 +  u[1]->units = 1.;
 +#if (!FTT_2D)
 +  u[2] = gfs_domain_add_variable (domain, "W",    "z-component of the velocity");
 +  u[2]->units = 1.;
++=======
+   u[0]->face_source = TRUE;
+   u[1] = gfs_domain_add_variable (domain, "V",    "y-component of the velocity");
+   u[1]->units = 1.;
+   u[1]->face_source = TRUE;
+ #if (!FTT_2D)
+   u[2] = gfs_domain_add_variable (domain, "W",    "z-component of the velocity");
+   u[2]->units = 1.;
+   u[2]->face_source = TRUE;
++>>>>>>> upstream/20131206+dfsg
  #endif /* FTT_3D */
    gfs_variable_set_vector (u, FTT_DIMENSION);
  
@@@ -968,12 -1004,8 +1060,15 @@@
  					(GTS_CONTAINER_CLASS
  					 (gts_slist_container_class ())));
    object->modules = object->preloaded_modules = NULL;
++<<<<<<< HEAD
 +
 +  object->deferred_compilation = FALSE;
++=======
++>>>>>>> upstream/20131206+dfsg
    
    object->tnext = 0.;
 +
 +  object->function_cache = g_hash_table_new (g_str_hash, g_str_equal);
  }
  
  GfsSimulationClass * gfs_simulation_class (void)
@@@ -1262,8 -1293,16 +1356,21 @@@ GfsSimulation * gfs_simulation_read (Gt
      g_slist_free (ml);
      return NULL;
    }
++<<<<<<< HEAD
 +  if (d)
 +    GFS_SIMULATION (d)->preloaded_modules = g_slist_reverse (ml);
++=======
+   if (d) {
+     gfs_pending_functions_compilation (fp);
+     if (fp->type == GTS_ERROR) {
+       gts_object_destroy (GTS_OBJECT (d));
+       g_slist_free (ml);
+       return NULL;
+     }
+     else
+       GFS_SIMULATION (d)->preloaded_modules = g_slist_reverse (ml);
+   }
++>>>>>>> upstream/20131206+dfsg
    else
      g_slist_free (ml);
    return GFS_SIMULATION (d);
@@@ -1291,18 -1346,7 +1414,22 @@@ void gfs_simulation_write (GfsSimulatio
  
    fprintf (fp, "# Gerris Flow Solver %dD version %s (%s)\n",
  	   FTT_DIMENSION, GFS_VERSION, GFS_BUILD_VERSION);
++<<<<<<< HEAD
 +  GSList * i = sim->preloaded_modules;
 +  while (i) {
 +    void (* module_write) (FILE *);
 +    const gchar * name = NULL;
 +    fprintf (fp, "GModule %s", 
 +	     g_module_symbol (i->data, "gfs_module_name", (gpointer) &name) ? name : 
 +	     g_module_name (i->data));
 +    if (g_module_symbol (i->data, "gfs_module_write", (gpointer) &module_write))
 +      (* module_write) (fp);
 +    fputc ('\n', fp);
 +    i = i->next;
 +  }
++=======
+   write_preloaded_modules (sim, fp);
++>>>>>>> upstream/20131206+dfsg
    domain = GFS_DOMAIN (sim);
    depth = domain->max_depth_write;
    domain->max_depth_write = max_depth;
@@@ -1380,6 -1424,7 +1507,10 @@@ void gfs_simulation_union_write (GfsSim
      if (domain->pid == 0) {
        fprintf (fp, "# Gerris Flow Solver %dD version %s (%s)\n",
  	       FTT_DIMENSION, GFS_VERSION, GFS_BUILD_VERSION);
++<<<<<<< HEAD
++=======
+       write_preloaded_modules (sim, fp);
++>>>>>>> upstream/20131206+dfsg
        guint i, nboxes = 0;
        for (i = 0; i < gsize; i++)
  	nboxes += nbox[i];
@@@ -1397,17 -1442,18 +1528,30 @@@
        nnode += nbox[i];
      g_free (nbox);
  
++<<<<<<< HEAD
 +    FILE * fpp = gfs_union_open (fp, domain->pid);
++=======
+     GfsUnionFile uf;
+     FILE * fpp = gfs_union_open (fp, domain->pid, &uf);
++>>>>>>> upstream/20131206+dfsg
      data[0] = fpp;
      data[1] = &nnode;
      domain->max_depth_write = max_depth;
      gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) write_node, data);
      domain->max_depth_write = depth;
++<<<<<<< HEAD
 +    gfs_union_close (fp, domain->pid, fpp);
 +
 +    fpp = gfs_union_open (fp, domain->pid);
 +    gts_graph_foreach_edge (g, (GtsFunc) write_edge, fpp);
 +    gfs_union_close (fp, domain->pid, fpp);
++=======
+     gfs_union_close (fp, domain->pid, &uf);
+ 
+     fpp = gfs_union_open (fp, domain->pid, &uf);
+     gts_graph_foreach_edge (g, (GtsFunc) write_edge, fpp);
+     gfs_union_close (fp, domain->pid, &uf);
++>>>>>>> upstream/20131206+dfsg
  
      gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) gts_object_reset_reserved, NULL);
  #endif /* HAVE_MPI */
@@@ -1797,41 -1855,81 +1953,118 @@@ void gfs_simulation_map_inverse (GfsSim
    FttComponent c;
    for (c = 0; c < 3; c++)
      (&p->x)[c] *= sim->physical_params.L/(&GFS_DOMAIN (sim)->lambda.x)[c];
++<<<<<<< HEAD
 +  GSList * reverse = g_slist_reverse (sim->maps->items);
 +  GSList * i = reverse;
 +  while (i) {
 +    (* GFS_MAP (i->data)->inverse) (i->data, p, p);
 +    i = i->next;
 +  }
 +  sim->maps->items = g_slist_reverse (reverse);
 +}
 +
 +/**
 + * gfs_simulation_map_inverse_cell:
 + * @sim: a #GfsSimulation.
 + * @p: an array of #FttVector.
 + *
 + * Array @p should contain the (x,y) coordinates of the four corners
 + * of a #FttCell. This function will inverse transform these
 + * coordinates taking into account any specificity of the mapping
 + * (e.g. periodicity).
 + */
 +void gfs_simulation_map_inverse_cell (GfsSimulation * sim, FttVector p[4])
 +{
 +  g_return_if_fail (sim != NULL);
 +  g_return_if_fail (p != NULL);
 +  
++=======
+ }
+ 
+ /**
+  * gfs_simulation_map_vector:
+  * @sim: a #GfsSimulation.
+  * @p: the position.
+  * @v: a #FttVector.
+  *
+  * Applies the mapping transformations associated with @sim at
+  * location @p, to vector @v.
+  */
+ void gfs_simulation_map_vector (GfsSimulation * sim, const FttVector * p, FttVector * v)
+ {
+   g_return_if_fail (sim != NULL);
+   g_return_if_fail (p != NULL);
+   g_return_if_fail (v != NULL);
+ 
+   GSList * i = sim->maps->items;
+   while (i) {
+     (* GFS_MAP (i->data)->transform_vector) (i->data, p, v, v);
+     i = i->next;
+   }
+ }
+ 
+ /**
+  * gfs_simulation_map_inverse_vector:
+  * @sim: a #GfsSimulation.
+  * @p: the position.
+  * @v: a #FttVector.
+  *
+  * Applies the inverse mapping transformations associated with @sim at
+  * location @p, to vector @v.
+  */
+ void gfs_simulation_map_inverse_vector (GfsSimulation * sim, const FttVector * p, FttVector * v)
+ {
+   g_return_if_fail (sim != NULL);
+   g_return_if_fail (p != NULL);
+   g_return_if_fail (v != NULL);
+   
+   GSList * reverse = g_slist_reverse (sim->maps->items);
+   GSList * i = reverse;
+   while (i) {
+     (* GFS_MAP (i->data)->inverse_vector) (i->data, p, v, v);
+     i = i->next;
+   }
+   sim->maps->items = g_slist_reverse (reverse);
+ }
+ 
+ /**
+  * gfs_simulation_map_inverse_cell:
+  * @sim: a #GfsSimulation.
+  * @p: an array of #FttVector.
+  *
+  * Array @p should contain the (x,y) coordinates of the four corners
+  * of a #FttCell. This function will inverse transform these
+  * coordinates taking into account any specificity of the mapping
+  * (e.g. periodicity).
+  */
+ void gfs_simulation_map_inverse_cell (GfsSimulation * sim, FttVector p[4])
+ {
+   g_return_if_fail (sim != NULL);
+   g_return_if_fail (p != NULL);
+   
+   GSList * reverse = g_slist_reverse (sim->maps->items);
+   GSList * i = reverse;
+   while (i) {
+     (* GFS_MAP (i->data)->inverse_cell) (i->data, p, p);
+     i = i->next;
+   }
+   sim->maps->items = g_slist_reverse (reverse);
+ 
++>>>>>>> upstream/20131206+dfsg
    FttComponent j, c;
    for (j = 0; j < 4; j++)
      for (c = 0; c < 3; c++)
        (&p[j].x)[c] *= sim->physical_params.L/(&GFS_DOMAIN (sim)->lambda.x)[c];
++<<<<<<< HEAD
 +  GSList * reverse = g_slist_reverse (sim->maps->items);
 +  GSList * i = reverse;
 +  while (i) {
 +    (* GFS_MAP (i->data)->inverse_cell) (i->data, p, p);
 +    i = i->next;
 +  }
 +  sim->maps->items = g_slist_reverse (reverse);
++=======
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
@@@ -1873,6 -1971,18 +2106,21 @@@ gboolean gfs_variable_is_dimensional (G
   * The advection solver.
   * \beginobject{GfsAdvection}
   */
++<<<<<<< HEAD
++=======
+ 
+ static void event_do_adapt (GfsEvent * event, GfsSimulation * sim)
+ {
+   if (GFS_IS_ADAPT (event))
+     gfs_event_do (event, sim);
+ }
+ 
+ static void event_do_not_adapt (GfsEvent * event, GfsSimulation * sim)
+ {
+   if (!GFS_IS_ADAPT (event))
+     gfs_event_do (event, sim);
+ }
++>>>>>>> upstream/20131206+dfsg
  
  static void advection_run (GfsSimulation * sim)
  {
@@@ -1896,27 -2006,29 +2144,43 @@@
  	 sim->time.i < sim->time.iend) {
      gdouble tstart = gfs_clock_elapsed (domain->timer);
  
++<<<<<<< HEAD
 +    gts_container_foreach (GTS_CONTAINER (sim->events), (GtsFunc) gfs_event_do, sim);
 +    if (!streamfunction) {
 +      gfs_domain_face_traverse (domain, FTT_XYZ,
 +				FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +				(FttFaceTraverseFunc) gfs_face_reset_normal_velocity, NULL);
 +      gfs_domain_face_traverse (domain, FTT_XYZ,
 +				FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +				(FttFaceTraverseFunc) gfs_face_interpolated_normal_velocity,
 +				gfs_domain_velocity (domain));
 +    }
 +    gfs_simulation_set_timestep (sim);
- 
-     gfs_advance_tracers (domain, sim->advection_params.dt);
- 
-     gts_container_foreach (GTS_CONTAINER (sim->events), (GtsFunc) gfs_event_half_do, sim);
++=======
+     gts_container_foreach (GTS_CONTAINER (sim->events), (GtsFunc) event_do_adapt, sim);
  
      gfs_domain_cell_traverse (domain,
- 			      FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
- 			      (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
+     			      FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+     			      (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
      gfs_simulation_adapt (sim);
  
+     gts_container_foreach (GTS_CONTAINER (sim->events), (GtsFunc) event_do_not_adapt, sim);
++>>>>>>> upstream/20131206+dfsg
+ 
+     if (!streamfunction) {
+       gfs_domain_face_traverse (domain, FTT_XYZ,
+ 				FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 				(FttFaceTraverseFunc) gfs_face_reset_normal_velocity, NULL);
+       gfs_domain_face_traverse (domain, FTT_XYZ,
+ 				FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 				(FttFaceTraverseFunc) gfs_face_interpolated_normal_velocity,
+ 				gfs_domain_velocity (domain));
+     }
+ 
+     gfs_simulation_set_timestep (sim);
+ 
+     gfs_advance_tracers (sim, sim->advection_params.dt);
+ 
      sim->time.t = sim->tnext;
      sim->time.i++;
  
@@@ -1955,6 -2067,6 +2219,20 @@@ GfsSimulationClass * gfs_advection_clas
  }
  
  /** \endobject{GfsAdvection} */
++<<<<<<< HEAD
++
++/**
++ * The Poisson solver.
++ * \beginobject{GfsPoisson}
++ */
++
++typedef struct {
++  GfsVariable * divu, * div;
++  gdouble ddiv;
++  GtsRange vol;
++} DivData;
++
++=======
  
  /**
   * The Poisson solver.
@@@ -1967,6 -2079,6 +2245,7 @@@ typedef struct 
    GtsRange vol;
  } DivData;
  
++>>>>>>> upstream/20131206+dfsg
  static void rescale_div (FttCell * cell, DivData * p)
  {
    gdouble size = ftt_cell_size (cell);
@@@ -1988,28 -2100,40 +2267,64 @@@ static void correct_div (GfsDomain * do
    gts_range_init (&p.vol);
    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  			    (FttCellTraverseFunc) rescale_div, &p);
++<<<<<<< HEAD
 +
 +  if (!dirichlet) {
 +    gts_range_update (&p.vol);
 +    
 +    p.ddiv = - gfs_domain_stats_variable (domain, div, 
 +					  FTT_TRAVERSE_LEAFS, -1, 
 +					  NULL, NULL).mean/p.vol.mean;
 +    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttCellTraverseFunc) add_ddiv, &p);
 +  }
++=======
+   if (!dirichlet) {
+     gts_range_update (&p.vol);
+     
+     p.ddiv = - gfs_domain_stats_variable (domain, div, 
+ 					  FTT_TRAVERSE_LEAFS, -1, 
+ 					  NULL, NULL).mean/p.vol.mean;
+     gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			      (FttCellTraverseFunc) add_ddiv, &p);
+   }
  }
  
- static void copy_res (FttCell * cell, gpointer * data)
+ static void has_dirichlet (FttCell * cell, GfsVariable * p)
  {
+   if (((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
+     p->centered = FALSE;
++>>>>>>> upstream/20131206+dfsg
+ }
+ 
+ typedef struct {
+   GfsVariable * lhs;
+   gboolean dirichlet;
+ } CompatPar;
+ 
+ static void check_box_dirichlet (GfsBox * box, CompatPar * p)
+ {
++<<<<<<< HEAD
 +  GfsVariable * res = data[0], * res1 = data[1];
 +  GFS_VALUE (cell, res) = GFS_VALUE (cell, res1);
 +}
 +
 +static void has_dirichlet (FttCell * cell, GfsVariable * p)
 +{
 +  if (((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
 +    p->centered = FALSE;
++=======
+   FttDirection d;
+   for (d = 0; d < FTT_NEIGHBORS; d++)
+     if (GFS_IS_BOUNDARY (box->neighbor[d])) {
+       GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]);
+       GfsBc * bc = gfs_boundary_lookup_bc (b, p->lhs);
+       if (GFS_IS_BC_DIRICHLET (bc)) {
+ 	p->dirichlet = TRUE;
+ 	return;
+       }	
+     }
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void poisson_run (GfsSimulation * sim)
@@@ -2038,9 -2162,18 +2353,24 @@@
        g_warning ("the solid surface cuts %d boundary cells,\n"
  		 "this may cause errors for the Poisson solution\n", nf);
    }
++<<<<<<< HEAD
 +
 +  div = gfs_temporary_variable (domain);
 +  res1 = gfs_temporary_variable (domain);
++=======
+   gboolean dirichlet = !p->centered;
+   gfs_all_reduce (domain, dirichlet, MPI_INT, MPI_MAX);
+   if (!dirichlet) {
+     /* check whether any boundary has a Dirichlet condition on @p */
+     CompatPar q = { p, FALSE };
+     gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) check_box_dirichlet, &q);
+     gfs_all_reduce (domain, q.dirichlet, MPI_INT, MPI_MAX);
+     dirichlet = q.dirichlet;
+   }
+ 
+   div = gfs_temporary_variable (domain);
+   res1 = res ? res : gfs_temporary_variable (domain);
++>>>>>>> upstream/20131206+dfsg
    dia = gfs_temporary_variable (domain);
  
    while (sim->time.i < sim->time.iend && sim->time.t < sim->time.end) {
@@@ -2050,23 -2183,15 +2380,35 @@@
  			      FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
  			      (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
      gfs_simulation_adapt (sim);
++<<<<<<< HEAD
 +
 +    if (res) {
 +      gpointer data[2];
 +      data[0] = res;
 +      data[1] = res1;
 +      gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +				(FttCellTraverseFunc) copy_res, data);
 +    }
 +    
 +    gfs_domain_surface_bc (domain, p);
 +    correct_div (domain, gfs_variable_from_name (domain->variables, "Div"), div, !p->centered);
 +    gfs_poisson_coefficients (domain, sim->physical_params.alpha, FALSE, p->centered);
 +    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
 +			      (FttCellTraverseFunc) gfs_cell_reset, dia);
 +
 +    par->poisson_solve (domain, par, p, div, res1, dia, 1.);
 +
++=======
+ 
+     gfs_domain_surface_bc (domain, p);
+     correct_div (domain, gfs_variable_from_name (domain->variables, "Div"), div, dirichlet);
+     gfs_poisson_coefficients (domain, sim->physical_params.alpha, FALSE, p->centered, TRUE);
+     gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			      (FttCellTraverseFunc) gfs_cell_reset, dia);
+ 
+     par->poisson_solve (domain, par, p, div, res1, dia, 1.);
+ 
++>>>>>>> upstream/20131206+dfsg
      sim->time.t = sim->tnext;
      sim->time.i++;
  
@@@ -2145,10 -2280,29 +2497,33 @@@ static gdouble axi_cell_metric (const G
    return p.y;
  }
  
++<<<<<<< HEAD
 +static gdouble axi_solid_metric (const GfsDomain * domain, const FttCell * cell)
++=======
+ static void axi_solid_metric (const GfsDomain * domain, const FttCell * cell, FttVector * m)
++>>>>>>> upstream/20131206+dfsg
  {
    g_assert (GFS_IS_MIXED (cell));
-   return GFS_STATE (cell)->solid->ca.y;
+   m->x = m->y = GFS_STATE (cell)->solid->ca.y;
+ }
+ 
+ static gdouble axi_scale_metric (const GfsDomain * domain, const FttCell * cell, FttComponent c)
+ {
+   if (c < 2)
+     return 1.;
+   FttVector p;
+   gfs_cell_cm (cell, &p);
+   return p.y;
+ }
+ 
+ static gdouble axi_viscous_metric_implicit (const GfsDomain * domain, 
+ 					    FttCell * cell, FttComponent c)
+ {
+   if (c != FTT_Y)
+     return 0.;
+   FttVector p;
+   gfs_cell_cm (cell, &p);
+   return 1./(p.y*p.y);
  }
  
  static void axi_class_init (GfsSimulationClass * klass)
@@@ -2161,6 -2315,8 +2536,11 @@@ static void axi_init (GfsDomain * domai
    domain->face_metric  = axi_face_metric;
    domain->cell_metric  = axi_cell_metric;
    domain->solid_metric = axi_solid_metric;
++<<<<<<< HEAD
++=======
+   domain->scale_metric = axi_scale_metric;
+   domain->viscous_metric_implicit = axi_viscous_metric_implicit;
++>>>>>>> upstream/20131206+dfsg
  }
  
  GfsSimulationClass * gfs_axi_class (void)
@@@ -2184,3 -2340,31 +2564,34 @@@
  }
  
  /** \endobject{GfsAxi} */
++<<<<<<< HEAD
++=======
+ 
+ /**
+  * The axisymmetric advection solver.
+  * \beginobject{GfsAdvectionAxi}
+  */
+ 
+ GfsSimulationClass * gfs_advection_axi_class (void)
+ {
+   static GfsSimulationClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo gfs_advection_axi_info = {
+       "GfsAdvectionAxi",
+       sizeof (GfsSimulation),
+       sizeof (GfsSimulationClass),
+       (GtsObjectClassInitFunc) gfs_advection_class_init,
+       (GtsObjectInitFunc) NULL,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_axi_class ()),
+ 				  &gfs_advection_axi_info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsAdvectionAxi} */
++>>>>>>> upstream/20131206+dfsg
diff --cc src/simulation.h
index 57b6346,28599bf..84ec779
--- a/src/simulation.h
+++ b/src/simulation.h
@@@ -79,9 -79,6 +79,10 @@@ struct _GfsSimulation 
    gdouble tnext;
  
    GfsVariable * u0[FTT_DIMENSION];
++<<<<<<< HEAD
 +  GHashTable * function_cache;
++=======
++>>>>>>> upstream/20131206+dfsg
  };
  
  struct _GfsSimulationClass {
@@@ -120,6 -117,12 +121,15 @@@ void                 gfs_simulation_ma
  						  FttVector * p);
  void                 gfs_simulation_map_inverse  (GfsSimulation * sim, 
  						  FttVector * p);
++<<<<<<< HEAD
++=======
+ void                 gfs_simulation_map_vector   (GfsSimulation * sim, 
+ 						  const FttVector * p,
+ 						  FttVector * v);
+ void                 gfs_simulation_map_inverse_vector  (GfsSimulation * sim, 
+ 							 const FttVector * p,
+ 							 FttVector * v);
++>>>>>>> upstream/20131206+dfsg
  void                 gfs_simulation_map_inverse_cell (GfsSimulation * sim, 
  						      FttVector p[4]);
  gdouble              gfs_dimensional_value       (GfsVariable * v, 
diff --cc src/solid.c
index d3d6d4c,1948073..c8df1d5
--- a/src/solid.c
+++ b/src/solid.c
@@@ -945,6 -945,10 +945,13 @@@ void gfs_init_solid_fractions_from_chil
    gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) foreach_box, &p);
    g_slist_foreach (p.solid_boxes, (GFunc) gts_object_destroy, NULL);
    g_slist_free (p.solid_boxes);
++<<<<<<< HEAD
++=======
+   if (p.solid_boxes) {
+     gfs_locate_array_destroy (domain->array);
+     domain->array = gfs_locate_array_new (domain);
+   }
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
diff --cc src/source.c
index d8667b2,6f3a3b2..212ff73
--- a/src/source.c
+++ b/src/source.c
@@@ -24,9 -24,9 +24,13 @@@
  #include <math.h>
  #include "source.h"
  #include "simulation.h"
 +#include "river.h"
  #include "solid.h"
  #include "init.h"
++<<<<<<< HEAD
++=======
+ #include "vof.h"
++>>>>>>> upstream/20131206+dfsg
  
  /**
   * gfs_variable_mac_source:
@@@ -544,7 -621,7 +625,11 @@@ static gdouble source_control_field_fac
  						FttCellFace * face, 
  						GfsVariable * v)
  {
++<<<<<<< HEAD
 +  return gfs_face_interpolated_value (face, GFS_SOURCE_CONTROL_FIELD (s)->s->i);
++=======
+   return gfs_face_interpolated_value_generic (face, GFS_SOURCE_CONTROL_FIELD (s)->s);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void source_control_field_read (GtsObject ** o, GtsFile * fp)
@@@ -575,8 -652,7 +660,12 @@@
    f->s = gfs_temporary_variable (GFS_DOMAIN (gfs_object_simulation (*o)));
  
    GfsSourceGeneric * s = GFS_SOURCE_GENERIC (*o);
++<<<<<<< HEAD
 +  gchar * name = GFS_SOURCE_SCALAR (s)->v->name;
 +  if (!strcmp (name, "U") || !strcmp (name, "V") || !strcmp (name, "W")) {
++=======
+   if (GFS_SOURCE_SCALAR (s)->v->face_source) {
++>>>>>>> upstream/20131206+dfsg
      s->mac_value = s->centered_value = NULL;
      s->face_value = source_control_field_face_value;
    }
@@@ -612,7 -688,7 +701,11 @@@ static void extrapolate (FttCell * cell
  
  static void extrapolate_field (FttCell * root, GfsSourceControlField * f)
  {
++<<<<<<< HEAD
 +  gdouble corners[4*(FTT_DIMENSION - 1)];
++=======
+   gdouble corners[4*(FTT_DIMENSION - 1) + 1];
++>>>>>>> upstream/20131206+dfsg
    ExtraData p = { root, corners, f->s };
    gfs_cell_corner_values (root, f->s, f->level, corners);
    g_assert (!FTT_CELL_IS_LEAF (root));
@@@ -1105,10 -1216,11 +1233,18 @@@ static void add_diffusion_explicit_flu
    FttCellFace face;
    
    if (GFS_IS_MIXED (cell)) {
++<<<<<<< HEAD
 +    if (((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
 +      f = gfs_cell_dirichlet_gradient_flux (cell, p->v->i, -1, GFS_STATE (cell)->solid->fv);
 +    else
 +      f = GFS_STATE (cell)->solid->fv;
++=======
+     GfsSolidVector * solid = GFS_STATE (cell)->solid;
+     if (((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
+       f = gfs_cell_dirichlet_gradient_flux (cell, p->v->i, -1, solid->fv);
+     else
+       f = solid->fv*solid->v.x;
++>>>>>>> upstream/20131206+dfsg
    }
    else
      f = 0.; /* Neumann condition by default */
@@@ -1135,9 -1247,9 +1271,15 @@@ static void source_diffusion_explicit_f
  					    GfsVariable * v, GfsVariable * sv, 
  					    gdouble dt)
  {
++<<<<<<< HEAD
 +  GfsVariable * phi = GFS_SOURCE_DIFFUSION_EXPLICIT (s)->phi;
 +  gfs_diffusion_coefficients (domain, GFS_SOURCE_DIFFUSION (s), dt, NULL, NULL, NULL, 1.);
 +  gfs_domain_surface_bc (domain, phi);
++=======
+   GfsVariable * phi = GFS_SOURCE_DIFFUSION (s)->phi;
+   gfs_domain_surface_bc (domain, phi);
+   gfs_diffusion_coefficients (domain, GFS_SOURCE_DIFFUSION (s), dt, NULL, NULL, NULL, 1.);
++>>>>>>> upstream/20131206+dfsg
    FluxPar p = { s, phi, sv };
    gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) add_diffusion_explicit_flux, &p);
  }
@@@ -1149,29 -1261,11 +1291,35 @@@ static void gfs_source_diffusion_explic
        (o, fp);
    if (fp->type == GTS_ERROR)
      return;
++<<<<<<< HEAD
 +
 +  GfsSourceDiffusionExplicit * s = GFS_SOURCE_DIFFUSION_EXPLICIT (*o);
 +  GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (s));
 +  if (fp->type != GTS_STRING)
 +    s->phi = GFS_SOURCE_SCALAR (s)->v;
 +  else {
 +    s->phi = gfs_variable_from_name (domain->variables, fp->token->str);
 +    if (!s->phi) {
 +      gts_file_error (fp, "unknown variable '%s'", fp->token->str);
 +      return;
 +    }
 +    gts_file_next_token (fp);
 +    gfs_function_set_units (GFS_SOURCE_DIFFUSION (s)->D->val, 
 +			    2. + GFS_SOURCE_SCALAR (s)->v->units - s->phi->units);
 +  }
++=======
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void gfs_source_diffusion_explicit_write (GtsObject * o, FILE * fp)
  {
    (* GTS_OBJECT_CLASS (gfs_source_diffusion_explicit_class ())->parent_class->write) (o, fp);
++<<<<<<< HEAD
 +  GfsSourceDiffusionExplicit * s = GFS_SOURCE_DIFFUSION_EXPLICIT (o);
 +  if (s->phi != GFS_SOURCE_SCALAR (s)->v)
 +    fprintf (fp, " %s", s->phi->name);
++=======
++>>>>>>> upstream/20131206+dfsg
  }
  
  typedef struct {
@@@ -1218,7 -1312,7 +1366,11 @@@ static gdouble source_diffusion_stabili
    par.s = s;
    par.dtmax = G_MAXDOUBLE;
    par.alpha = NULL;
++<<<<<<< HEAD
 +  if (GFS_SOURCE_SCALAR (s)->v == GFS_SOURCE_DIFFUSION_EXPLICIT (s)->phi)
++=======
+   if (GFS_SOURCE_SCALAR (s)->v == GFS_SOURCE_DIFFUSION (s)->phi)
++>>>>>>> upstream/20131206+dfsg
      gfs_domain_cell_traverse (GFS_DOMAIN (sim), FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  			      (FttCellTraverseFunc) cell_diffusion_stability, &par);
    /* else
@@@ -1261,36 -1355,11 +1413,30 @@@ GfsSourceGenericClass * gfs_source_diff
  }
  
  /** \endobject{GfsSourceDiffusionExplicit} */
++<<<<<<< HEAD
 +
 +/**
 + * Viscous terms.
 + * \beginobject{GfsSourceViscosity}
 + */
 +
 +static void add_viscosity_transverse_flux (FttCell * cell, FluxPar * p)
 +{
 +  FttCellFace f;
 +  FttCellNeighbors n;
 +  gdouble transverse = 0.;
 +
 +  f.cell = cell;
 +  ftt_cell_neighbors (cell, &n);
 +#if FTT_2D
 +  FttComponent ortho = (p->v->component + 1) % FTT_DIMENSION;
++=======
++>>>>>>> upstream/20131206+dfsg
  
-   for (f.d = 2*ortho; f.d <= 2*ortho + 1; f.d++) {
-     f.neighbor = n.c[f.d];
-     transverse += (FTT_FACE_DIRECT (&f) ? 1. : -1.)*
-       gfs_face_weighted_interpolated_value (&f, p->tv->i);
-   }
- #else
-   g_assert_not_implemented ();
- #endif  
- 
-   GfsFunction * alpha = gfs_object_simulation (p->s)->physical_params.alpha;
-   gdouble h = ftt_cell_size (cell);
-   GFS_VALUE (cell, p->sv) += (alpha ? gfs_function_value (alpha, cell) : 1.)*transverse/h;
- }
+ /**
+  * Viscous terms.
+  * \beginobject{GfsSourceViscosity}
+  */
  
  static void compute_transverse (FttCell * cell, FluxPar * p)
  {
@@@ -1301,26 -1370,6 +1447,29 @@@
  						 v[(p->v->component + 1) % FTT_DIMENSION]->i)/h;
  }
  
++<<<<<<< HEAD
 +static void source_viscosity_transverse_flux (GfsSourceGeneric * s, 
 +					      GfsDomain * domain, 
 +					      GfsVariable * v, GfsVariable * sv, 
 +					      gdouble dt)
 +{
 +  FluxPar p;
 +
 +  gfs_diffusion_coefficients (domain, GFS_SOURCE_DIFFUSION (s), dt, NULL, NULL, NULL, 1.);
 +  p.s = s;
 +  p.v = v;
 +  p.sv = sv;
 +  p.dt = dt;
 +  p.tv = gfs_temporary_variable (domain);
 +  gfs_traverse_and_bc (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +		       (FttCellTraverseFunc) compute_transverse, &p,
 +		       p.tv, p.tv);
 +  gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) add_viscosity_transverse_flux, &p);
 +  gts_object_destroy (GTS_OBJECT (p.tv));
 +}
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  static void source_viscosity_read (GtsObject ** o, GtsFile * fp)
  {
    GfsSourceViscosity * source;
@@@ -1577,7 -1628,7 +1728,11 @@@ GfsSourceGenericClass * gfs_source_visc
  /** \endobject{GfsSourceViscosityExplicit} */
  
  /**
++<<<<<<< HEAD
 + * Coriolis acceleration and linear friction.
++=======
+  * Coriolis acceleration, linear friction and/or advection metric terms.
++>>>>>>> upstream/20131206+dfsg
   * \beginobject{GfsSourceCoriolis}
   */
  
@@@ -1625,15 -1676,12 +1780,30 @@@ static void gfs_source_coriolis_read (G
  
    GfsSourceCoriolis * s = GFS_SOURCE_CORIOLIS (*o);
  
++<<<<<<< HEAD
 +  if (GFS_IS_RIVER (domain))
 +    s->beta = 1.; /* backward Euler */
 +
++=======
++>>>>>>> upstream/20131206+dfsg
    s->omegaz = gfs_function_new (gfs_function_class (), 0.);
    gfs_function_read (s->omegaz, gfs_object_simulation (s), fp);
  
    if (fp->type != '\n') {
      s->drag = gfs_function_new (gfs_function_class (), 0.);
      gfs_function_read (s->drag, gfs_object_simulation (s), fp);
++<<<<<<< HEAD
++  }
++
++  if (s->beta < 1.)
++    for (c = 0; c <  FTT_DIMENSION; c++)
++      s->u[c] = gfs_temporary_variable (domain);
++  else {
++    GFS_SOURCE_GENERIC (s)->centered_value = NULL;
++    GFS_SOURCE_GENERIC (s)->mac_value = NULL;
++  }
++
++=======
    }
  
    if (s->beta < 1.)
@@@ -1644,6 -1692,6 +1814,7 @@@
      GFS_SOURCE_GENERIC (s)->mac_value = NULL;
    }
  
++>>>>>>> upstream/20131206+dfsg
  #if !FTT_2D
    if (fp->type == '{') {
      GtsFileVariable var[] = {
@@@ -1677,6 -1725,26 +1848,29 @@@ static void gfs_source_coriolis_write (
      gfs_function_write (s->drag, fp);
    if (s->d[2] != 1.)
      fprintf (fp," { x = %g y = %g z = %g }", s->d[0], s->d[1], s->d[2]);
++<<<<<<< HEAD
++=======
+ }
+ 
+ static void coriolis_drag_metric_coefficients (GfsSourceCoriolis * sc,
+ 					       FttCell * cell,
+ 					       GfsVariable ** u,
+ 					       FttComponent c1,
+ 					       gdouble f[2])
+ {
+   f[0] = sc->drag ? gfs_function_value (sc->drag, cell) : 0.;
+   f[1] = sc->omegaz ? gfs_function_value (sc->omegaz, cell) : 0.;
+ 
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (sc));
+   if (domain->advection_metric) {
+     /* fixme: 2D only */
+     FttComponent c2 = (c1 + 1) % 2;
+     gdouble m[2];
+     (* domain->advection_metric) (domain, cell, c1, m);
+     f[0] += GFS_VALUE (cell, u[c2])*m[0];
+     f[1] += (c1 == FTT_X ? 1. : -1.)*GFS_VALUE (cell, u[c2])*m[1];
+   }
++>>>>>>> upstream/20131206+dfsg
  }
  
  static gdouble gfs_source_coriolis_mac_value (GfsSourceGeneric * s,
@@@ -1689,32 -1767,33 +1893,54 @@@
    gdouble e = sc->drag ? gfs_function_value (sc->drag, cell) : 0.;
  
    switch (v->component) {
++<<<<<<< HEAD
 +#if FTT_2D
 +  case FTT_X: return   f*GFS_VALUE (cell, sv->v[1]) - e*GFS_VALUE (cell, sv->v[0]);
 +  case FTT_Y: return - e*GFS_VALUE (cell, sv->v[1]) - f*GFS_VALUE (cell, sv->v[0]);
 +#else  /* 3D */
++=======
++>>>>>>> upstream/20131206+dfsg
    case FTT_X: return - e*GFS_VALUE (cell, sv->v[0]) +
        f*(GFS_VALUE (cell, sv->v[1])*sc->d[2] - GFS_VALUE (cell, sv->v[2])*sc->d[1]);
    case FTT_Y: return - e*GFS_VALUE (cell, sv->v[1]) +
        f*(GFS_VALUE (cell, sv->v[2])*sc->d[0] - GFS_VALUE (cell, sv->v[0])*sc->d[2]);
    case FTT_Z: return - e*GFS_VALUE (cell, sv->v[2]) +
        f*(GFS_VALUE (cell, sv->v[0])*sc->d[1] - GFS_VALUE (cell, sv->v[1])*sc->d[0]);
++<<<<<<< HEAD
 +#endif /* 3D */
++=======
++>>>>>>> upstream/20131206+dfsg
    default: g_assert_not_reached ();
    }
+ #endif /* 3D */
    return 0.;
  }
  
  static void save_coriolis (FttCell * cell, GfsSourceCoriolis * s)
  {
    GfsSourceVelocity * sv = GFS_SOURCE_VELOCITY (s);
++<<<<<<< HEAD
 +  gdouble f = gfs_function_value (s->omegaz, cell)*(1. - s->beta);
 +  gdouble e = s->drag ? gfs_function_value (s->drag, cell)*(1. - s->beta) : 0.;
 +
 +#if FTT_2D
 +  GFS_VALUE (cell, s->u[0]) =   f*GFS_VALUE (cell, sv->v[1]) - e*GFS_VALUE (cell, sv->v[0]);
 +  GFS_VALUE (cell, s->u[1]) = - e*GFS_VALUE (cell, sv->v[1]) - f*GFS_VALUE (cell, sv->v[0]);
 +#else  /* 3D */
++=======
+ #if FTT_2D
+   gdouble f[2];
+   coriolis_drag_metric_coefficients (s, cell, sv->v, FTT_X, f);
+   GFS_VALUE (cell, s->u[0]) =   
+     (1. - s->beta)*(f[1]*GFS_VALUE (cell, sv->v[1]) - f[0]*GFS_VALUE (cell, sv->v[0]));
+   coriolis_drag_metric_coefficients (s, cell, sv->v, FTT_Y, f);
+   GFS_VALUE (cell, s->u[1]) = 
+     (1. - s->beta)*(- f[0]*GFS_VALUE (cell, sv->v[1]) - f[1]*GFS_VALUE (cell, sv->v[0]));
+ #else  /* 3D */
+   gdouble f = gfs_function_value (s->omegaz, cell)*(1. - s->beta);
+   gdouble e = s->drag ? gfs_function_value (s->drag, cell)*(1. - s->beta) : 0.;
+ 
++>>>>>>> upstream/20131206+dfsg
    GFS_VALUE (cell, s->u[0]) = - e*GFS_VALUE (cell, sv->v[0]) +
      f*(GFS_VALUE (cell, sv->v[1])*s->d[2] - GFS_VALUE (cell, sv->v[2])*s->d[1]);
    GFS_VALUE (cell, s->u[1]) = - e*GFS_VALUE (cell, sv->v[1]) +
@@@ -1730,8 -1809,7 +1956,12 @@@ static gboolean gfs_source_coriolis_eve
        (event, sim)) {
      if (GFS_SOURCE_CORIOLIS (event)->beta < 1.) {
        gfs_catch_floating_point_exceptions ();
++<<<<<<< HEAD
 +      gfs_domain_cell_traverse (GFS_DOMAIN (sim), FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +				(FttCellTraverseFunc) save_coriolis, event);
++=======
+       gfs_domain_traverse_layers (GFS_DOMAIN (sim), (FttCellTraverseFunc) save_coriolis, event);
++>>>>>>> upstream/20131206+dfsg
        if (gfs_restore_floating_point_exceptions ()) {
  	GfsSourceCoriolis * c = GFS_SOURCE_CORIOLIS (event);
  	gchar * s = g_strconcat ("\n", gfs_function_description (c->omegaz, FALSE), NULL);
@@@ -1823,26 -1901,29 +2053,71 @@@ GfsSourceCoriolis * gfs_has_source_cori
  static void implicit_coriolis_2D (FttCell * cell, GfsSourceCoriolis * s)
  {
    GfsSourceVelocity * sv = GFS_SOURCE_VELOCITY (s);
-   gdouble c, u, v;
+   gdouble m[2][2];
+   gdouble f[2];
    GfsSimulation * sim = gfs_object_simulation (s);
+   gdouble dt = sim->advection_params.dt*s->beta;
  
++<<<<<<< HEAD
 +  c = sim->advection_params.dt*gfs_function_value (s->omegaz, cell)*s->beta;
 +  u = GFS_VALUE (cell, sv->v[0]);
 +  v = GFS_VALUE (cell, sv->v[1]);
 +  if (s->drag) {
 +    gdouble e = sim->advection_params.dt*gfs_function_value (s->drag, cell)*s->beta;
 +    GFS_VALUE (cell, sv->v[0]) = (u + c*v/(1. + e))/((1. + e) + c*c/(1. + e));
 +    GFS_VALUE (cell, sv->v[1]) = (v - c*u/(1. + e))/((1. + e) + c*c/(1. + e));
 +  }
 +  else {
 +    GFS_VALUE (cell, sv->v[0]) = (u + c*v)/(1. + c*c);
 +    GFS_VALUE (cell, sv->v[1]) = (v - c*u)/(1. + c*c);
++=======
+   coriolis_drag_metric_coefficients (s, cell, sv->v, FTT_X, f);
+   m[0][0] = 1. + f[0]*dt;
+   m[0][1] = - f[1]*dt;
+   coriolis_drag_metric_coefficients (s, cell, sv->v, FTT_Y, f);
+   m[1][0] =   f[1]*dt;
+   m[1][1] = 1. + f[0]*dt;
+ 
+   gdouble det = m[0][0]*m[1][1] - m[0][1]*m[1][0];
+   gdouble u = GFS_VALUE (cell, sv->v[0]);
+   gdouble v = GFS_VALUE (cell, sv->v[1]);
+ 
+   GFS_VALUE (cell, sv->v[0]) = (  m[1][1]*u - m[0][1]*v)/det;
+   GFS_VALUE (cell, sv->v[1]) = (- m[1][0]*u + m[0][0]*v)/det;
+ }
+ 
+ static void implicit_coriolis_3D (FttCell * cell, GfsSourceCoriolis * s)
+ {
+   GfsSourceVelocity * sv = GFS_SOURCE_VELOCITY (s);
++  GfsSimulation * sim = gfs_object_simulation (s);
++  gdouble c = sim->advection_params.dt*gfs_function_value (s->omegaz, cell)*s->beta;
++  gdouble e = s->drag ? sim->advection_params.dt*gfs_function_value (s->drag, cell)*s->beta : 0.;
++  GtsMatrix * m = gts_matrix_new (    1. + e, -c*s->d[2],   c*s->d[1],  0.,
++				   c*s->d[2],     1. + e,  -c*s->d[0],  0.,
++				  -c*s->d[1],  c*s->d[0],      1. + e,  0.,
++				          0.,         0.,          0.,  0.);
++  GtsMatrix * im = gts_matrix3_inverse (m);
++  g_assert (im);
++  gint i, j;
++  gdouble vel[3];
++
++  for (i = 0; i < 3; i++)
++    vel[i] = GFS_VALUE (cell, sv->v[i]);
++  
++  for (i = 0; i < 3; i++) {
++    GFS_VALUE (cell, sv->v[i]) = 0.;
++    for (j = 0; j < 3; j++)
++      GFS_VALUE (cell, sv->v[i]) += im[i][j]*vel[j];
++>>>>>>> upstream/20131206+dfsg
 +  }
++
++  gts_matrix_destroy (m);
++  gts_matrix_destroy (im);
 +}
 +
 +static void implicit_coriolis_3D (FttCell * cell, GfsSourceCoriolis * s)
 +{
 +  GfsSourceVelocity * sv = GFS_SOURCE_VELOCITY (s);
    GfsSimulation * sim = gfs_object_simulation (s);
    gdouble c = sim->advection_params.dt*gfs_function_value (s->omegaz, cell)*s->beta;
    gdouble e = s->drag ? sim->advection_params.dt*gfs_function_value (s->drag, cell)*s->beta : 0.;
diff --cc src/source.h
index 728ab62,909a106..983f7fc
--- a/src/source.h
+++ b/src/source.h
@@@ -181,29 -183,27 +183,51 @@@ struct _GfsSourceControlField 
  GfsSourceGenericClass * gfs_source_control_field_class  (void);
  
  /* GfsSourceFlux: Header */
++<<<<<<< HEAD
 +
 +typedef struct _GfsSourceFlux         GfsSourceFlux;
 +
 +struct _GfsSourceFlux {
 +  /*< private >*/
 +  GfsSourceScalar parent;
 +  gdouble s;
 +
 +  /*< public >*/
 +  GfsFunction * intensity, * fraction;
 +};
 +
 +#define GFS_SOURCE_FLUX(obj)            GTS_OBJECT_CAST (obj,\
 +					         GfsSourceFlux,\
 +					         gfs_source_flux_class ())
 +#define GFS_IS_SOURCE_FLUX(obj)         (gts_object_is_from_class (obj,\
 +						 gfs_source_flux_class ()))
 +
 +GfsSourceGenericClass * gfs_source_flux_class  (void);
 +
 +/* GfsDiffusion: Header */
++=======
++>>>>>>> upstream/20131206+dfsg
  
- typedef struct _GfsDiffusion         GfsDiffusion;
+ typedef struct _GfsSourceFlux         GfsSourceFlux;
+ 
+ struct _GfsSourceFlux {
+   /*< private >*/
+   GfsSourceScalar parent;
+   gdouble s;
+ 
+   /*< public >*/
+   GfsFunction * intensity, * fraction;
+ };
+ 
+ #define GFS_SOURCE_FLUX(obj)            GTS_OBJECT_CAST (obj,\
+ 					         GfsSourceFlux,\
+ 					         gfs_source_flux_class ())
+ #define GFS_IS_SOURCE_FLUX(obj)         (gts_object_is_from_class (obj,\
+ 						 gfs_source_flux_class ()))
+ 
+ GfsSourceGenericClass * gfs_source_flux_class  (void);
+ 
+ /* GfsDiffusion: Header */
  
  struct _GfsDiffusion {
    /*< private >*/
@@@ -272,7 -274,6 +298,10 @@@ struct _GfsSourceDiffusionExplicit 
    GfsSourceDiffusion parent;
  
    /*< public >*/
++<<<<<<< HEAD
 +  GfsVariable * phi;
++=======
++>>>>>>> upstream/20131206+dfsg
  };
  
  #define GFS_SOURCE_DIFFUSION_EXPLICIT(obj)            GTS_OBJECT_CAST (obj,\
diff --cc src/surface.c
index 86a9bcb,757843c..5e111be
--- a/src/surface.c
+++ b/src/surface.c
@@@ -836,8 -840,7 +840,12 @@@ gdouble gfs_surface_implicit_value (Gfs
    if (s->f) { /* spatial function */
      if (s->m)
        gts_point_transform (&p, s->m);
++<<<<<<< HEAD
 +    return (s->flip ? -1. : 1.)*(gfs_function_spatial_value (s->f, (FttVector *)&p.x)
 +				 /* fixme?? */ + 1e-6);
++=======
+     return (s->flip ? -1. : 1.)*gfs_function_spatial_value (s->f, (FttVector *)&p.x) + 1e-20;
++>>>>>>> upstream/20131206+dfsg
    }
    else { /* bounding-box tree */
      GtsBBox * bbox;
diff --cc src/tension.c
index 284f094,c4f5953..eacd0b5
--- a/src/tension.c
+++ b/src/tension.c
@@@ -635,7 -635,7 +635,11 @@@ static void variable_curvature_from_fra
      gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, kmax);
      variable_curvature_diffuse (kmax, GFS_VARIABLE_CURVATURE (event)->f, sim, 1);
    }
++<<<<<<< HEAD
 +  variable_curvature_diffuse (GFS_VARIABLE1 (event), NULL, sim, 1);
++=======
+   variable_curvature_diffuse (GFS_VARIABLE (event), NULL, sim, 1);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void normal (FttCell * cell, gpointer * data)
@@@ -722,7 -722,80 +726,84 @@@ static void variable_curvature_from_dis
    for (c = 0; c < FTT_DIMENSION + 1; c++)
      gts_object_destroy (GTS_OBJECT (n[c]));
  
++<<<<<<< HEAD
 +  variable_curvature_diffuse (GFS_VARIABLE1 (event), NULL, sim, 2);
++=======
+   variable_curvature_diffuse (GFS_VARIABLE (event), NULL, sim, 2);
+ }
+ 
+ typedef struct {
+   GfsVariableCurvature * k;
+   FttComponent c;
+   GfsVariable * max;
+ } CurvatureData;
+ 
+ static gboolean is_interfacial (FttCell * cell, gpointer data)
+ {
+   GfsVariable * f = data;
+   return (GFS_VALUE (cell, f) > 0. && GFS_VALUE (cell, f) < 1.);
+ }
+ 
+ static void set_undefined (FttCell * cell, CurvatureData * p)
+ {
+   GFS_VALUE (cell, GFS_VARIABLE (p->k)) = GFS_NODATA;
+   GFS_VALUE (cell, p->max) = -1.;
+ }
+ 
+ static void set_curvature (FttCell * cell, gdouble kappa, gdouble kmax, CurvatureData * p)
+ {
+   GfsVariableTracerVOF * u = GFS_VARIABLE_TRACER_VOF (p->k->f);
+   if (fabs (GFS_VALUE (cell, u->m[p->c])) > GFS_VALUE (cell, p->max)) {
+     GFS_VALUE (cell, GFS_VARIABLE (p->k)) = kappa;
+     GFS_VALUE (cell, p->max) = fabs (GFS_VALUE (cell, u->m[p->c]));
+     if (p->k->kmax)
+       GFS_VALUE (cell, p->k->kmax) = kmax;
+   }
+ }
+ 
+ static void propagate_curvature (FttCell * cell, gdouble kappa, gdouble kmax, CurvatureData * p)
+ {
+   GfsVariableTracerVOFHeight * t = GFS_VARIABLE_TRACER_VOF_HEIGHT (p->k->f);
+   GfsVariable * hv = gfs_closest_height (cell, t, p->c, NULL);
+   g_assert (hv);
+   guint level = ftt_cell_level (cell);
+   FttDirection d;
+   for (d = 2*p->c; d <= 2*p->c + 1; d++) {
+     FttCell * n = ftt_cell_neighbor (cell, d);
+     while (n &&
+ 	   ftt_cell_level (n) == level &&
+ 	   is_interfacial (n, p->k->f) &&
+ 	   gfs_closest_height (n, t, p->c, NULL) == hv) {
+       set_curvature (n, kappa, kmax, p);
+       n = ftt_cell_neighbor (n, d);
+     }
+   }
+ }
+ 
+ static void height_curvature_max (FttCell * cell, CurvatureData * p)
+ {
+   GfsVariableTracerVOFHeight * t = GFS_VARIABLE_TRACER_VOF_HEIGHT (p->k->f);
+   gdouble kappa, kmax;
+   if (gfs_curvature_along_direction (cell, t, p->c, &kappa, &kmax)) {
+     set_curvature (cell, kappa, kmax, p);
+     propagate_curvature (cell, kappa, kmax, p);
+   }
+ }
+ 
+ static void remaining_curvatures (FttCell * cell, GfsVariable * v)
+ {
+   if (!GFS_HAS_DATA (cell, v)) {
+     GfsVariableTracerVOFHeight * t = GFS_VARIABLE_TRACER_VOF_HEIGHT (GFS_VARIABLE_CURVATURE (v)->f);
+     GfsVariable * kmax = GFS_VARIABLE_CURVATURE (v)->kmax;
+     if (kmax) {
+       gdouble k;
+       GFS_VALUE (cell, v) = gfs_height_curvature_new (cell, t, &k);
+       GFS_VALUE (cell, kmax) = k;
+     }
+     else
+       GFS_VALUE (cell, v) = gfs_height_curvature_new (cell, t, NULL);
+   }
++>>>>>>> upstream/20131206+dfsg
  }
  
  static gboolean variable_curvature_event (GfsEvent * event, GfsSimulation * sim)
diff --cc src/timestep.c
index 3dcce32,bd718e5..6d717fb
--- a/src/timestep.c
+++ b/src/timestep.c
@@@ -28,23 -28,33 +28,39 @@@
  #include "solid.h"
  #include "tension.h"
  
- static void reset_cell_gradients (FttCell * cell, gpointer * data)
+ typedef struct {
+   GfsVariable ** g;
+   guint dimension;
+ } GradientData;
+ 
+ static void reset_cell_gradients (FttCell * cell, GradientData * p)
  {
-   GfsVariable ** g = data[0];
-   guint * dimension = data[1];    
    FttComponent c;
++<<<<<<< HEAD
 +
 +  for (c = 0; c < *dimension; c++)
 +    GFS_VALUE (cell, g[c]) = 0.;
++=======
+   for (c = 0; c < p->dimension; c++)
+     GFS_VALUE (cell, p->g[c]) = 0.;
++>>>>>>> upstream/20131206+dfsg
  }
  
- static void reset_gradients (GfsDomain * domain, guint dimension, GfsVariable ** g)
+ /**
+  * gfs_reset_gradients:
+  * @domain: a #GfsDomain.
+  * @g: an array of @dimension #GfsVariables.
+  * @dimension: the number of dimension.
+  *
+  * Resets the gradient vector @g.
+  */
+ void gfs_reset_gradients (GfsDomain * domain, guint dimension, GfsVariable ** g)
  {
-   gpointer data[2];
-   data[0] = g;
-   data[1] = &dimension;
-   gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
- 			    (FttCellTraverseFunc) reset_cell_gradients, data);
+   g_return_if_fail (domain != NULL);
+   g_return_if_fail (g != NULL);
+ 
+   GradientData p = { g, dimension };
+   gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) reset_cell_gradients, &p);
  }
  
  static void scale_cell_gradients (FttCell * cell, gpointer * data)
@@@ -289,10 -312,10 +318,14 @@@ void gfs_update_gradients (GfsDomain * 
    g_return_if_fail (g != NULL);
  
    /* Add face sources */
-   reset_gradients (domain, FTT_DIMENSION, g);
-   velocity_face_sources (domain, gfs_domain_velocity (domain), 0., alpha, g);
+   gfs_reset_gradients (domain, FTT_DIMENSION, g);
+   gfs_velocity_face_sources (domain, gfs_domain_velocity (domain), 0., alpha, g);
    /* Initialize face coefficients */
++<<<<<<< HEAD
 +  gfs_poisson_coefficients (domain, alpha, TRUE, TRUE);
++=======
+   gfs_poisson_coefficients (domain, alpha, TRUE, TRUE, TRUE);
++>>>>>>> upstream/20131206+dfsg
    /* Add pressure gradient */
    gfs_correct_normal_velocities (domain, FTT_DIMENSION, p, g, 0.);
    gfs_scale_gradients (domain, FTT_DIMENSION, g);
@@@ -338,7 -361,7 +371,11 @@@ static void mac_projection (GfsDomain 
  			    GfsVariable * res,
  			    GfsVariable ** g,
  			    void (* divergence_hook) (GfsDomain * domain, 
++<<<<<<< HEAD
 +						      GfsAdvectionParams * apar, 
++=======
+ 						      gdouble dt,
++>>>>>>> upstream/20131206+dfsg
  						      GfsVariable * div)
  			    )
  {
@@@ -351,7 -374,15 +388,19 @@@
    GfsVariable * res1 = res ? res : gfs_temporary_variable (domain);
  
    /* Initialize face coefficients */
++<<<<<<< HEAD
 +  gfs_poisson_coefficients (domain, alpha, TRUE, TRUE);
++=======
+   gfs_poisson_coefficients (domain, alpha, TRUE, TRUE, TRUE);
+ 
+   /* hydrostatic pressure */
+   GSList * i = domain->variables;
+   while (i) {
+     if (GFS_IS_HYDROSTATIC_PRESSURE (i->data))
+       gfs_correct_normal_velocities (domain, FTT_DIMENSION, i->data, g, dt);
+     i = i->next;
+   }
++>>>>>>> upstream/20131206+dfsg
  
    /* Initialize diagonal coefficient */
    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
@@@ -363,7 -394,7 +412,11 @@@
  
    /* Divergence hook */
    if (divergence_hook)
++<<<<<<< HEAD
 +    (* divergence_hook) (domain, apar, div);
++=======
+     (* divergence_hook) (domain, dt, div);
++>>>>>>> upstream/20131206+dfsg
  
    /* add volume sources (if any) */
    if (p->sources)
@@@ -372,7 -403,7 +425,11 @@@
    /* Scale divergence */
    gpointer data[2];
    data[0] = div;
++<<<<<<< HEAD
 +  data[1] = &apar->dt;
++=======
+   data[1] = &dt;
++>>>>>>> upstream/20131206+dfsg
    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
    			    (FttCellTraverseFunc) scale_divergence, data);
  
@@@ -389,7 -420,7 +446,11 @@@
    }
  #endif
    
++<<<<<<< HEAD
 +  par->poisson_solve (domain, par, p, div, res1, dia, apar->dt);
++=======
+   par->poisson_solve (domain, par, p, div, res1, dia, dt);
++>>>>>>> upstream/20131206+dfsg
  
    gts_object_destroy (GTS_OBJECT (dia));
    gts_object_destroy (GTS_OBJECT (div));
@@@ -433,7 -464,7 +494,11 @@@ void gfs_mac_projection (GfsDomain * do
  			 GfsFunction * alpha,
  			 GfsVariable ** g,
  			 void (* divergence_hook) (GfsDomain * domain, 
++<<<<<<< HEAD
 +						   GfsAdvectionParams * apar, 
++=======
+ 						   gdouble dt,
++>>>>>>> upstream/20131206+dfsg
  						   GfsVariable * div)
  			 )
  {
@@@ -447,21 -475,7 +509,25 @@@
  
    gfs_domain_timer_start (domain, "mac_projection");
  
++<<<<<<< HEAD
 +  dt = apar->dt;
 +  apar->dt /= 2.;
 +
 +  mac_projection (domain, par, apar, p, alpha, NULL, g, divergence_hook);
 +
 +#if 0
 +  {
 +    FILE * fp = fopen ("/tmp/macafter", "wt");
 +
 +    gfs_write_mac_velocity (domain, 0.9, FTT_TRAVERSE_LEAFS, -1, NULL, fp);
 +    fclose (fp);
 +  }
 +#endif
 +  
 +  apar->dt = dt;
++=======
+   mac_projection (domain, par, dt, p, alpha, NULL, g, divergence_hook);
++>>>>>>> upstream/20131206+dfsg
  
    gfs_domain_timer_stop (domain, "mac_projection");
  
@@@ -551,7 -565,7 +617,11 @@@ void gfs_approximate_projection (GfsDom
  				 GfsVariable * res,
  				 GfsVariable ** g,
  				 void (* divergence_hook) (GfsDomain * domain, 
++<<<<<<< HEAD
 +							   GfsAdvectionParams * apar, 
++=======
+ 							   gdouble dt,
++>>>>>>> upstream/20131206+dfsg
  							   GfsVariable * div)
  				 )
  {
@@@ -572,9 -585,9 +641,13 @@@
  			    (FttFaceTraverseFunc) gfs_face_interpolated_normal_velocity, 
  			    gfs_domain_velocity (domain));
    
++<<<<<<< HEAD
 +  mac_projection (domain, par, apar, p, alpha, res, g, divergence_hook);
++=======
+   mac_projection (domain, par, dt, p, alpha, res, g, divergence_hook);
++>>>>>>> upstream/20131206+dfsg
  
-   gfs_correct_centered_velocities (domain, FTT_DIMENSION, g, apar->dt);
+   gfs_correct_centered_velocities (domain, FTT_DIMENSION, g, dt);
  
    gfs_domain_timer_stop (domain, "approximate_projection");
  
@@@ -676,7 -761,7 +821,11 @@@ void gfs_diffusion (GfsDomain * domain
    par->niter = 0;
    while (par->niter < par->nitermin ||
  	 (par->residual.infty > par->tolerance && par->niter < par->nitermax)) {
++<<<<<<< HEAD
 +    gfs_diffusion_cycle (domain, minlevel, maxlevel, par->nrelax, v, rhs, rhoc, axi, res);
++=======
+     gfs_diffusion_cycle (domain, minlevel, maxlevel, par->nrelax, v, rhs, rhoc, metric, res);
++>>>>>>> upstream/20131206+dfsg
      par->residual = gfs_domain_norm_variable (domain, res, NULL, 
  					      FTT_TRAVERSE_LEAFS, -1, NULL, NULL);
      if (par->residual.infty == res_max_before) /* convergence has stopped!! */
@@@ -723,54 -811,52 +875,99 @@@ static void add_pressure_gradient (FttC
    GFS_VALUE (cell, par->fv) -= GFS_VALUE (cell, par->g[par->v->component])*par->dt;
  }
  
++<<<<<<< HEAD
 +static void add_sinking (FttCellFace * face, GtsVector sink)
 +{
 +  GFS_FACE_NORMAL_VELOCITY_LEFT (face) += sink[face->d/2];
 +  GFS_FACE_NORMAL_VELOCITY_RIGHT (face) += sink[face->d/2];
++=======
+ static void add_sinking (FttCellFace * face, GfsAdvectionParams * par)
+ {
+   GFS_FACE_NORMAL_VELOCITY_LEFT (face) += gfs_function_face_value ( par->sink[face->d/2], face);
+   GFS_FACE_NORMAL_VELOCITY_RIGHT (face) +=  gfs_function_face_value (par->sink[face->d/2], face);
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
   * gfs_add_sinking_velocity:
   * @domain: a #GfsDomain.
++<<<<<<< HEAD
 + * @sinking: the sinking velocity vector.
 + *
 + * Adds the constant sinking velocity to the MAC
 + * velocity field of @domain.
 + */
 +void gfs_add_sinking_velocity (GfsDomain * domain, GtsVector sinking)
 +{
 +  g_return_if_fail (domain != NULL);
 +  g_return_if_fail (sinking != NULL);
 +
 +  if (gts_vector_norm (sinking) > 0.)
 +    gfs_domain_face_traverse (domain, FTT_XYZ,
 +			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttFaceTraverseFunc) add_sinking, sinking);
 +}
 +
 +static void remove_sinking (FttCellFace * face, GtsVector sink)
 +{
 +  GFS_FACE_NORMAL_VELOCITY_LEFT (face) -= sink[face->d/2];
 +  GFS_FACE_NORMAL_VELOCITY_RIGHT (face) -= sink[face->d/2];
++=======
+  * @par: the advection parameters.
+  *
+  * Adds the sinking velocity to the MAC velocity field of @domain.
+  */
+ void gfs_add_sinking_velocity (GfsDomain * domain, GfsAdvectionParams * par)
+ {
+   g_return_if_fail (domain != NULL);
+   g_return_if_fail (par != NULL);
+ 
+   if (par->sink[0])
+     gfs_domain_face_traverse (domain, FTT_XYZ,
+ 			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			      (FttFaceTraverseFunc) add_sinking, par);
+ }
+ 
+ static void remove_sinking (FttCellFace * face, GfsAdvectionParams * par)
+ {
+   GFS_FACE_NORMAL_VELOCITY_LEFT (face) -= gfs_function_face_value (par->sink[face->d/2], face);
+   GFS_FACE_NORMAL_VELOCITY_RIGHT (face) -= gfs_function_face_value (par->sink[face->d/2], face);
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
   * gfs_remove_sinking_velocity:
   * @domain: a #GfsDomain.
++<<<<<<< HEAD
 + * @sinking: the sinking velocity vector.
 + *
 + * Removes the constant sinking velocity from the MAC
 + * velocity field of @domain.
 + */
 +void gfs_remove_sinking_velocity (GfsDomain * domain, GtsVector sinking)
 +{
 +  g_return_if_fail (domain != NULL);
 +  g_return_if_fail (sinking != NULL);
 +
 +  if (gts_vector_norm (sinking) > 0.)
 +    gfs_domain_face_traverse (domain, FTT_XYZ,
 +			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttFaceTraverseFunc) remove_sinking, sinking);
++=======
+  * @par: the advection parameters.
+  *
+  * Removes the sinking velocity from the MAC velocity field of @domain.
+  */
+ void gfs_remove_sinking_velocity (GfsDomain * domain, GfsAdvectionParams * par)
+ {
+   g_return_if_fail (domain != NULL);
+   g_return_if_fail (par != NULL);
+ 
+   if (par->sink[0])
+     gfs_domain_face_traverse (domain, FTT_XYZ,
+ 			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			      (FttFaceTraverseFunc) remove_sinking, par);
++>>>>>>> upstream/20131206+dfsg
  }
  
  static void variable_sources (GfsDomain * domain,
@@@ -786,16 -872,14 +983,27 @@@
      par->g = gmac;
      par->fv = gfs_temporary_variable (domain);
      par->upwinding = GFS_FACE_UPWINDING;
++<<<<<<< HEAD
 +    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttCellTraverseFunc) gfs_cell_reset, par->fv);
 +    gfs_add_sinking_velocity (domain, par->sink);
 +    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttCellTraverseFunc) gfs_cell_advected_face_values, par);
 +    gfs_domain_face_bc (domain, FTT_XYZ, par->v);
 +    gfs_domain_face_traverse (domain, FTT_XYZ,
 +			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttFaceTraverseFunc) par->flux, par);
 +    gfs_remove_sinking_velocity (domain, par->sink);
++=======
+     gfs_domain_face_traverse (domain, FTT_XYZ, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			      (FttFaceTraverseFunc) gfs_face_reset, par->fv);
+     gfs_add_sinking_velocity (domain, par);
+     face_values_set ((FttCellTraverseFunc) gfs_cell_advected_face_values, par);
+     gfs_domain_face_traverse (domain, FTT_XYZ,
+ 			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			      (FttFaceTraverseFunc) par->flux, par);
+     gfs_remove_sinking_velocity (domain, par);
++>>>>>>> upstream/20131206+dfsg
      par->v = sv;
      gfs_domain_traverse_merged (domain, par->update, par);
      par->v = v;
diff --cc src/timestep.h
index 7b9ca9a,4c76910..fc3c8cd
--- a/src/timestep.h
+++ b/src/timestep.h
@@@ -46,8 -49,8 +49,13 @@@ void          gfs_mac_projectio
  					       GfsVariable * p,
  					       GfsFunction * alpha,
  					       GfsVariable ** g,
++<<<<<<< HEAD
 +					       void (* divergence_hook) (GfsDomain * domain, 
 +									 GfsAdvectionParams * apar, 
++=======
+ 					       void (* divergence_hook) (GfsDomain * domain,
+ 									 gdouble dt,
++>>>>>>> upstream/20131206+dfsg
  									 GfsVariable * div)
  					       );
  void          gfs_correct_centered_velocities (GfsDomain * domain,
@@@ -62,7 -65,7 +70,11 @@@ void          gfs_approximate_projectio
  					       GfsVariable * res,
  					       GfsVariable ** g,
  					       void (* divergence_hook) (GfsDomain * domain, 
++<<<<<<< HEAD
 +									 GfsAdvectionParams * apar, 
++=======
+ 									 gdouble dt,
++>>>>>>> upstream/20131206+dfsg
  									 GfsVariable * div)
  					       );
  void          gfs_predicted_face_velocities   (GfsDomain * domain,
@@@ -82,11 -85,17 +94,24 @@@ void          gfs_centered_velocity_adv
  							 GfsVariable ** g,
  							 GfsFunction * alpha);
  void          gfs_add_sinking_velocity        (GfsDomain * domain, 
++<<<<<<< HEAD
 +					       GtsVector sinking);
 +void          gfs_remove_sinking_velocity     (GfsDomain * domain, 
 +					       GtsVector sinking);
 +void          gfs_tracer_advection_diffusion  (GfsDomain * domain,
++=======
++>>>>>>> upstream/20131206+dfsg
  					       GfsAdvectionParams * par);
+ void          gfs_remove_sinking_velocity     (GfsDomain * domain, 
+ 					       GfsAdvectionParams * par);
+ void          gfs_tracer_advection_diffusion  (GfsDomain * domain,
+ 					       GfsAdvectionParams * par,
+ 					       GfsFunction * alpha);
+ void          gfs_velocity_face_sources       (GfsDomain * domain,
+                                                GfsVariable ** u,
+                                                gdouble dt,
+                                                GfsFunction * alpha,
+                                                GfsVariable ** g);
  
  /* GfsSurfaceGenericBc: Header */
  
diff --cc src/utils.c
index 90f8eb9,9fcd70f..fbfab77
--- a/src/utils.c
+++ b/src/utils.c
@@@ -21,10 -21,14 +21,20 @@@
   */
  
  #include <stdlib.h>
+ #include <string.h>
+ #include <stdarg.h>
  #include <ctype.h>
++<<<<<<< HEAD
 +#include <sys/stat.h>
 +#include <sys/wait.h>
 +#include <sys/mman.h>
++=======
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <sys/times.h>
+ #include <sys/types.h>
++>>>>>>> upstream/20131206+dfsg
  #include <unistd.h>
  #include <signal.h>
  #include <math.h>
@@@ -97,18 -254,6 +260,21 @@@ typedef gdouble (* GfsFunctionDerivedFu
  					    GfsSimulation * sim,
  					    gpointer data);
  
++<<<<<<< HEAD
 +static GfsDerivedVariable * lookup_derived_variable (const gchar * name,
 +						     GSList * i)
 +{
 +  while (i) {
 +    GfsDerivedVariable * v = i->data;
 +    if (!strcmp (v->name, name))
 +      return v;
 +    i = i->next;
 +  }
 +  return NULL;
 +}
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  /**
   * Global functions.
   * \beginobject{GfsGlobal}
@@@ -189,14 -335,24 +356,35 @@@ GtsObjectClass * gfs_global_class (void
    return klass;
  }
  
++<<<<<<< HEAD
 +/* GfsModule: Header */
 +
 +typedef struct {
 +  GModule * module;
 +  gchar * expression;
 +  guint refcount;
 +  GfsFunctionFunc f;
 +} GfsModule;
++=======
+ static void gfs_global_append (GfsGlobal * g, GString * s)
+ {
+   g_string_append_printf (s, "#line %d \"GfsGlobal\"\n", g->line);
+   g_string_append (s, g->s);
+   g->appended = TRUE;
+   g_string_append_c (s, '\n');
+ }
+ 
+ /* GfsModule: Header */
+ 
+ typedef struct _GfsModule GfsModule;
+ 
+ struct _GfsModule {
+   gchar * key;
+   guint id;
+   GModule * module;
+   GSList * l; /* list of GfsFunctions */
+ };
++>>>>>>> upstream/20131206+dfsg
  
  /* GfsFunction: Header */
  
@@@ -214,67 -370,396 +402,455 @@@ struct _GfsFunction 
    GfsDerivedVariable * dv;
    gdouble val;
    gboolean spatial, constant, nomap;
++<<<<<<< HEAD
 +  GtsFile fpd;
++=======
++>>>>>>> upstream/20131206+dfsg
    gdouble units;
+   GfsVariable ** var;
+   GfsDerivedVariable ** dvar;
  };
  
  /** \endobject{GfsGlobal} */
  
  /* GfsModule: object */
  
++<<<<<<< HEAD
 +static GfsModule * gfs_module_new (GtsFile * fp, const gchar * mname,
 +				   GHashTable * cache, const gchar * finname)
 +{
 +  GModule * module;
 +  GfsFunctionFunc f;
 +  gchar * path = g_module_build_path (GFS_MODULES_DIR, mname);
 +  module = g_module_open (path, 0);
 +  g_free (path);
 +  if (module == NULL)
 +    module = g_module_open (mname, 0);
 +  if (module == NULL) {
 +    gts_file_error (fp, "cannot load module: %s", g_module_error ());
 +    return NULL;
 +  }
 +  if (!g_module_symbol (module, "f", (gpointer) &f)) {
 +    gts_file_error (fp, "module `%s' does not export function `f'", mname);
 +    g_module_close (module);
 +    return NULL;
 +  }
 +  GfsModule * m = g_malloc (sizeof (GfsModule));
 +  m->module = module;
 +  m->f = f;
 +  m->refcount = 0;
 +
 +  g_assert (g_file_get_contents (finname, &m->expression, NULL, NULL));
 +  g_hash_table_insert (cache, m->expression, m);
 +
 +  return m;
 +}
 +
 +static void gfs_module_ref (GfsModule * m, GfsFunction * f)
 +{
 +  if (f->constant) {
 +    f->val = (* m->f) (NULL, NULL, NULL);
++=======
+ static gchar * function_key (const GfsFunction * f)
+ {
+   GString * s = g_string_new (f->expr->str);
+   if (f->spatial)
+     g_string_append (s, "spatial");
+   else if (f->constant)
+     g_string_append (s, "constant");
+   GfsSimulation * sim = gfs_object_simulation (f);
+   GSList * i = sim->globals;
+   while (i) {
+     g_string_append (s, GFS_GLOBAL (i->data)->s);
+     i = i->next;
+   }
+   gchar * key = s->str;
+   g_string_free (s, FALSE);
+   return key;
+ }
+ 
+ static gchar * find_identifier (const gchar * s, const gchar * i)
+ {
+   gchar * f = strstr (s, i);
+   static gchar allowed[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890";
+ 
+   while (f) {
+     if (gfs_char_in_string (f[strlen(i)], allowed) ||
+ 	(f > s && gfs_char_in_string (f[-1], allowed)))
+       f = strstr (++f, i);
+     else
+       return f;
+   }
+   return NULL;
+ }
+ 
+ /* source code for functions pending compilation */
+ static GString * pending_functions = NULL;
+ static guint n_pending_functions = 0;
+ 
+ /* append source code for @f to pending compilations */
+ static void append_pending_function (const GfsFunction * f, guint line, guint id)
+ {
+   GfsSimulation * sim = gfs_object_simulation (f);
+   GfsDomain * domain = GFS_DOMAIN (sim);
+   GSList * lv = NULL, * ldv = NULL, * i;
+ 
+   if (!pending_functions) {
+     pending_functions = g_string_new ("#include <stdlib.h>\n"
+ 				      "#include <stdio.h>\n"
+ 				      "#include <math.h>\n"
+ 				      "#include <gfs.h>\n"
+ 				      "#include <gerris/spatial.h>\n"
+ 				      "#include <gerris/function.h>\n"
+ 				      "typedef double (* Func) (const FttCell * cell,\n"
+ 				      "                         const FttCellFace * face,\n"
+ 				      "                         GfsSimulation * sim,\n"
+ 				      "                         gpointer data);\n");
+     g_slist_foreach (sim->globals, (GFunc) gfs_global_append, pending_functions);
+   }
+   else {
+     i = sim->globals;
+     while (i) {
+       if (!GFS_GLOBAL (i->data)->appended)
+ 	gfs_global_append (i->data, pending_functions);
+       i = i->next;
+     }
+   }
+     
+   if (f->spatial)
+     g_string_append_printf (pending_functions, 
+ 			    "\ndouble f%u (double x, double y, double z, double t) {\n"
+ 			    "  _x = x; _y = y; _z = z;\n", id);
+   else if (f->constant)
+     g_string_append_printf (pending_functions, "\ndouble f%u (void) {\n", id);
+   else {
+     g_string_append_printf (pending_functions, "char * variables%u[] = {", id);
+     i = domain->variables;
+     while (i) {
+       if (GFS_VARIABLE (i->data)->name && 
+ 	  find_identifier (f->expr->str, GFS_VARIABLE (i->data)->name)) {
+ 	lv = g_slist_prepend (lv, i->data);
+ 	g_string_append_printf (pending_functions, "\"%s\", ", GFS_VARIABLE (i->data)->name);
+       }
+       i = i->next;
+     }
+     g_string_append (pending_functions, "NULL};\n");
+     lv = g_slist_reverse (lv);
+ 
+     g_string_append_printf (pending_functions, "char * dvariables%u[] = {", id);
+     i = domain->derived_variables;
+     while (i) {
+       GfsDerivedVariable * v = i->data;
+       if (find_identifier (f->expr->str, v->name)) {
+ 	ldv = g_slist_prepend (ldv, v);
+ 	g_string_append_printf (pending_functions, "\"%s\", ", v->name);
+       }
+       i = i->next;
+     }
+     g_string_append (pending_functions, "NULL};\n");
+     ldv = g_slist_reverse (ldv);
+ 
+     g_string_append_printf (pending_functions,
+ 			    "\ndouble f%u (FttCell * cell, FttCellFace * face,\n"
+ 			    "            GfsSimulation * sim, GfsVariable ** var,\n"
+ 			    "            GfsDerivedVariable ** dvar) {\n"
+ 			    "  _sim = sim; _cell = cell;\n",
+ 			    id);
+     if (lv || ldv) {
+       GSList * i = lv;
+ 
+       while (i) {
+ 	GfsVariable * v = i->data;
+ 	g_string_append_printf (pending_functions, "  double %s;\n", v->name);
+ 	i = i->next;
+       }
+       i = ldv;
+       while (i) {
+ 	GfsDerivedVariable * v = i->data;
+ 	g_string_append_printf (pending_functions, "  double %s;\n", v->name);
+ 	i = i->next;
+       }
+       if (lv) {
+ 	int index = 0;
+ 	g_string_append (pending_functions, "  if (cell) {\n");
+ 	i = lv;
+ 	while (i) {
+ 	  GfsVariable * v = i->data;
+ 	  g_string_append_printf (pending_functions,
+ 		   "    %s = gfs_dimensional_value (var[%d], GFS_VALUE (cell, var[%d]));\n", 
+ 				  v->name, index, index);
+ 	  i = i->next; index++;
+ 	}
+ 	g_string_append (pending_functions, "  } else {\n");
+ 	i = lv; index = 0;
+ 	while (i) {
+ 	  GfsVariable * v = i->data;
+ 	  g_string_append_printf (pending_functions,
+ 		   "    %s = gfs_dimensional_value (var[%d],\n"
+ 		   "           gfs_face_interpolated_value_generic (face, var[%d]));\n", 
+ 		   v->name, index, index);
+ 	  i = i->next; index++;
+ 	}
+ 	g_string_append (pending_functions, "  }\n");
+ 	g_slist_free (lv);
+       }
+       if (ldv) {
+ 	i = ldv; int index = 0;
+ 	while (i) {
+ 	  GfsDerivedVariable * v = i->data;
+ 	  g_string_append_printf (pending_functions,
+ 		   "  %s = (* (Func) dvar[%d]->func) (cell, face, sim, dvar[%d]->data);\n", 
+ 		   v->name, index, index);
+ 	  i = i->next; index++;
+ 	}
+ 	g_slist_free (ldv);
+       }
+     }
+   }
+   g_string_append_printf (pending_functions, "#line %d \"GfsFunction\"\n", line);
+ 
+   if (f->isexpr)
+     g_string_append_printf (pending_functions, "return %s;\n}\n", f->expr->str);
+   else {
+     gchar * s = f->expr->str;
+     guint len = strlen (s);
+     g_assert (s[0] == '{' && s[len-1] == '}');
+     s[len-1] = '\0';
+     g_string_append_printf (pending_functions, "%s\n}\n", &s[1]);
+     s[len-1] = '}';
+   }
+ }
+ 
+ static GHashTable * get_function_cache (void)
+ {
+   static GHashTable * function_cache = NULL;
+   if (!function_cache)
+     function_cache = g_hash_table_new (g_str_hash, g_str_equal);
+   return function_cache;
+ }
+ 
+ static void link_module (GfsFunction * f)
+ {
+   g_assert (f->module);
+   GModule * module = f->module->module;
+   g_assert (module);
+   guint id = f->module->id;
+   gchar * name = g_strdup_printf ("f%u", id);
+   g_assert (g_module_symbol (module, name, (gpointer) &f->f));
+   g_free (name);
+   if (f->constant) {
+     f->val = (* f->f) (NULL, NULL, NULL, NULL, NULL);
++>>>>>>> upstream/20131206+dfsg
      f->f = NULL;
      if (f->expr) g_string_free (f->expr, TRUE);
      f->expr = NULL;
    }
++<<<<<<< HEAD
 +  else
 +    f->f = m->f;
 +  f->module = m;
 +  m->refcount++;
 +}
 +
 +static void gfs_module_unref (GfsModule * m, GHashTable * cache)
 +{
 +  m->refcount--;
 +  if (m->refcount == 0) {
 +    if (!g_module_close (m->module))
 +      g_warning ("%s: %s", g_module_name (m->module), g_module_error ());
 +    g_assert (g_hash_table_remove (cache, m->expression));
 +    g_free (m->expression);
 +    g_free (m);
++=======
+   else if (!f->spatial) {
+     char ** variables;
+     name = g_strdup_printf ("variables%u", id);
+     g_assert (g_module_symbol (module, name, (gpointer) &variables));
+     g_free (name);
+     char ** s = variables;
+     int n = 0;
+     while (*s) { n++; s++; }
+     if (n > 0) {
+       f->var = g_malloc (n*sizeof (GfsVariable *));
+       GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (f));
+       s = variables; n = 0;
+       while (*s) {
+ 	g_assert ((f->var[n] = gfs_variable_from_name (domain->variables, *s)));
+ 	n++; s++;
+       }
+     }
+     name = g_strdup_printf ("dvariables%u", id);
+     g_assert (g_module_symbol (module, name, (gpointer) &variables));
+     g_free (name);
+     s = variables;
+     n = 0;
+     while (*s) { n++; s++; }
+     if (n > 0) {
+       f->dvar = g_malloc (n*sizeof (GfsDerivedVariable *));
+       GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (f));
+       s = variables; n = 0;
+       while (*s) {
+ 	g_assert ((f->dvar[n] = 
+ 		   gfs_derived_variable_from_name (domain->derived_variables, *s)));
+ 	n++; s++;
+       }
+     }
+   }
+ }
+ 
+ static void gfs_module_ref (GfsModule * m, GfsFunction * f)
+ {
+   f->module = m;
+   m->l = g_slist_prepend (m->l, f);
+   if (m->module)
+     link_module (f);
+ }
+ 
+ static void gfs_module_unref (GfsModule * m, GfsFunction * f)
+ {
+   m->l = g_slist_remove (m->l, f);
+   /* modules are kept "forever" in case they come up again e.g. during
+      dynamic load-balancing */
+ }
+ 
+ static gboolean lookup_function (GfsFunction * f)
+ {
+   GHashTable * function_cache = get_function_cache ();
+   gchar * key = function_key (f);
+   GfsModule * module = g_hash_table_lookup (function_cache, key);
+   g_free (key);
+   if (module) {
+     gfs_module_ref (module, f);
+     return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ static void gfs_module_new (GfsFunction * f, guint line)
+ {
+   if (!lookup_function (f)) {
+     GfsModule * m = g_malloc0 (sizeof (GfsModule));
+     m->key = function_key (f);
+     m->id = n_pending_functions++;
+     g_hash_table_insert (get_function_cache (), m->key, m);
+     append_pending_function (f, line, m->id);
+     gfs_module_ref (m, f);
+   }
+ }
+ 
+ static double current_time (void)
+ {
+   GTimeVal r;
+   g_get_current_time (&r);
+   return r.tv_sec + 1e-6*r.tv_usec;
+ }
+ 
+ static GModule * compile (GtsFile * fp, const gchar * dirname, const gchar * finname)
+ {
+   GModule * module = NULL;
+   gfs_debug ("starting compilation");
+   double start = current_time ();
+   char pwd[512];
+   g_assert (getcwd (pwd, 512));
+   GString * build_command = g_string_new ("");
+   g_string_printf (build_command,
+ 		   "cd %s && %s/build_function "
+ #if FTT_2D
+ 		   "gerris2D"
+ #else /* 3D */
+ 		   "gerris3D"
+ #endif
+ 		   " \"%s\""
+ 		   , dirname, GFS_DATA_DIR, pwd);
+   g_string_append (build_command, " > log 2>&1");
+   gint status = system (build_command->str);
+   g_string_free (build_command, TRUE);
+   if (WIFSIGNALED (status) && (WTERMSIG (status) == SIGINT || WTERMSIG (status) == SIGQUIT))
+     status = SIGQUIT;
+   else if (status == -1 || WEXITSTATUS (status) != 0) {
+     gchar * errname = g_strconcat (dirname, "/log", NULL);
+     FILE * ferr = fopen (errname, "r");
+     g_free (errname);
+     gchar * needle;
+     GString * msg = g_string_new ("");
+     gint c;
+ 
+     while ((c = fgetc (ferr)) != EOF)
+       g_string_append_c (msg, c);
+     fclose (ferr);
+     while ((needle = strstr (msg->str, "GfsFunction:")))
+       g_string_erase (msg, needle - msg->str, strlen ("GfsFunction:"));
+     gts_file_error (fp, "error compiling expression\n%s", msg->str);
+     g_string_free (msg, TRUE);
+     status = SIGABRT;
+   }
+   else {
+     gchar * mname = g_strconcat (dirname, "/module.so", NULL);
+     gchar * path = g_module_build_path (GFS_MODULES_DIR, mname);
+     module = g_module_open (path, 0);
+     g_free (path);
+     if (module == NULL)
+       module = g_module_open (mname, 0);
+     if (module == NULL)
+       gts_file_error (fp, "cannot load module: %s", g_module_error ());
+     g_free (mname);
+   }
+ #if 1
+   gchar * cleanup = g_strconcat ("rm -r -f ", dirname, NULL);
+   gint status1 = system (cleanup);
+   g_free (cleanup);
+   if (status1 == -1 || WEXITSTATUS (status1) != 0)
+     g_warning ("error when cleaning up %s", dirname);
+ #else
+   g_warning ("not cleaning up %s", dirname);
+ #endif
+   gfs_debug ("compilation completed in %g s", current_time () - start);
+   return module;
+ }
+ 
+ static void update_module (gchar * key, GfsModule * m, GModule * module)
+ {
+   if (m->module == NULL) {
+     m->module = module;
+     g_slist_foreach (m->l, (GFunc) link_module, module);
+   }
+ }
+ 
+ /**
+  * gfs_pending_functions_compilation:
+  * @fp: a #GtsFile.
+  *
+  * Compiles and links pending #GfsFunction definitions.
+  *
+  * Compilation errors are reported in @fp.
+  */
+ void gfs_pending_functions_compilation (GtsFile * fp)
+ {
+   g_return_if_fail (fp != NULL);
+ 
+   if (pending_functions && fp->type != GTS_ERROR) {
+     gchar * dirname = gfs_template ();
+     if (g_mkdtemp (dirname) == NULL) {
+       gts_file_error (fp, "cannot create temporary directory\n%s", strerror (errno));
+       g_free (dirname);
+       return;
+     }
+     gchar * finname = g_strdup_printf ("%s/function.c", dirname);
+     FILE * fin = fopen (finname, "w");
+     fputs (pending_functions->str, fin);
+     fclose (fin);
+     GModule * module = compile (fp, dirname, finname);
+     if (module)
+       g_hash_table_foreach (get_function_cache (), (GHFunc) update_module, module);
+     /* note that if there is an error in some pending functions
+        (i.e. fp->type == GTS_ERROR) something needs to be done to fix
+        this (e.g. abort the whole thing). */
+     g_string_free (pending_functions, TRUE);
+     pending_functions = NULL;
+     n_pending_functions = 0;
+     g_free (dirname);
+     g_free (finname);
++>>>>>>> upstream/20131206+dfsg
    }
  }
  
@@@ -339,7 -796,7 +887,11 @@@ static GtsSurface * read_surface (gcha
  static gboolean fit_index_dimension (GfsCartesianGrid * grid, guint * val, GtsFile * fp)
  {
    guint i, j;
++<<<<<<< HEAD
 +  gchar list[] = {'x','y','z','t'};
++=======
+   gchar * list[INDEX_T + 2] = {"x", "y", "z", "rx", "ry", "rz", "t", NULL};
++>>>>>>> upstream/20131206+dfsg
  
    if (grid->N > 4) {
      gts_file_error (fp, "Cartesian grids can only use four dimensions or less");
@@@ -347,8 -804,11 +899,16 @@@
    }
  
    for (i = 0; i < grid->N; i++) {
++<<<<<<< HEAD
 +    for (j = 0; j < 4 && *grid->name[i] != list[j]; j++);
 +    if (j == 4) {
++=======
+     gchar ** name = list; j = 0;
+     while (*name != NULL && strcmp (*name, grid->name[i])) {
+       name++; j++;
+     }
+     if (!name) {
++>>>>>>> upstream/20131206+dfsg
        gts_file_error (fp, "unknown Cartesian grid index `%s'", grid->name[i]);
        return FALSE;
      }
@@@ -361,25 -821,32 +921,49 @@@ static gboolean cgd_is_spatial (GfsFunc
  {
    guint i;
    for (i = 0; i < f->g->N; i++)
++<<<<<<< HEAD
 +    if (f->index[i] < 3)
++=======
+     if (f->index[i] < INDEX_T)
++>>>>>>> upstream/20131206+dfsg
        return TRUE;
    return FALSE;
  }
  
++<<<<<<< HEAD
 +static gdouble interpolated_cgd (GfsFunction * f, FttVector * p)
++=======
+ static gdouble interpolated_cgd (const GfsFunction * f, const FttVector * r)
++>>>>>>> upstream/20131206+dfsg
  {
    gdouble vector[4];
    gdouble val;
    guint i;
  
-   gfs_simulation_map_inverse (gfs_object_simulation (f), p);
+   FttVector p = *r;
+   gboolean mapped = FALSE;
    for (i = 0; i < f->g->N; i++)
++<<<<<<< HEAD
 +    switch (f->index[i]) {
 +    case 0: vector[i] = p->x; break;
 +    case 1: vector[i] = p->y; break;
 +    case 2: vector[i] = p->z; break;
 +    case 3: vector[i] = gfs_object_simulation (f)->time.t; break;
 +    default: g_assert_not_reached ();
++=======
+     if (f->index[i] < 3) { /* x,y,z */
+       if (!mapped) {
+ 	gfs_simulation_map_inverse (gfs_object_simulation (f), &p);
+ 	mapped = TRUE;
+       }
+       vector[i] = (&p.x)[f->index[i]];
+     }
+     else if (f->index[i] < 6) /* rx,ry,rz */
+       vector[i] = (&r->x)[f->index[i] - 3];
+     else { /* t */
+       g_assert (f->index[i] == INDEX_T);
+       vector[i] = gfs_object_simulation (f)->time.t;
++>>>>>>> upstream/20131206+dfsg
      }
  
    if (!gfs_cartesian_grid_interpolate (f->g, vector, &val))
@@@ -495,6 -962,6 +1079,7 @@@ GString * gfs_function_expression (GtsF
  	while (c != EOF && gfs_char_in_string (c, spaces)) {
  	  g_string_append_c (expr, c);
  	  c = gts_file_getc (fp);
++<<<<<<< HEAD
  	}
        }
        else {
@@@ -515,270 -982,6 +1100,289 @@@
    }
  }
  
 +static gboolean lookup_function (GfsFunction * f, const gchar * finname)
 +{
 +  GHashTable * function_cache = gfs_object_simulation (f)->function_cache;
 +  gchar * contents;
 +  if (!g_file_get_contents (finname, &contents, NULL, NULL))
 +    return FALSE;
 +  GfsModule * module = g_hash_table_lookup (function_cache, contents);
 +  g_free (contents);
 +  if (module) {
 +    gfs_module_ref (module, f);
 +    return TRUE;
 +  }
 +  return FALSE;
 +}
 +
 +static gint compile (GtsFile * fp, GfsFunction * f, const gchar * finname)
 +{
 +  gchar foutname[] = "/tmp/gfsXXXXXX";
 +  gchar ferrname[] = "/tmp/gfsXXXXXX";
 +  gchar ftmpname[] = "/tmp/gfsXXXXXX";
 +  gint foutd, ferrd, ftmpd;
 +  gchar * cc;
 +  gint status;
 +  
 +  foutd = mkstemp (foutname);
 +  ferrd = mkstemp (ferrname);
 +  ftmpd = mkstemp (ftmpname);
 +  if (foutd < 0 || ferrd < 0 || ftmpd < 0) {
 +    gts_file_error (fp, "cannot create temporary file");
 +    return SIGABRT;
 +  }
 +  gchar * cccommand = g_strdup_printf ("gcc `pkg-config "
 +#if FTT_2D
 +				       "gerris2D"
 +#else /* 3D */
 +				       "gerris3D"
 +#endif
 +				       " --cflags --libs` -O -Wall -Wno-unused -Werror "
 +				       " -D_GFSLINE_=%d "
 +				       MODULES_FLAGS,
 +				       fp->line);
 +  cc = g_strjoin (" ",
 +		  cccommand, ftmpname, 
 +		  "-o", foutname,
 +                  "`sed 's/@/#/g' <", finname,
 +		  "| awk '{"
 +		  "   if ($1 == \"#\" && $2 == \"link\") {"
 +		  "     for (i = 3; i <= NF; i++) printf (\"%s \", $i);"
 +		  "     print \"\" > \"/dev/stderr\";"
 +		  "   }"
 +		  "   else if ($1 == \"#link\") {"
 +		  "     for (i = 2; i <= NF; i++) printf (\"%s \", $i);"
 +		  "     print \"\" > \"/dev/stderr\";"
 +		  "   } else print $0 > \"/dev/stderr\";"
 +		  "}' 2>", ftmpname, "` 2>",
 +		  ferrname, NULL);
 +  g_free (cccommand);
 +  status = system (cc);
 +  g_free (cc);
 +  close (ftmpd);
 +  remove (ftmpname);
 +  if (WIFSIGNALED (status) && (WTERMSIG (status) == SIGINT || WTERMSIG (status) == SIGQUIT))
 +    status = SIGQUIT;
 +  else if (status == -1 || WEXITSTATUS (status) != 0) {
 +    GString * msg = g_string_new ("");
 +    FILE * ferr = fdopen (ferrd, "r");
 +    gchar * needle;
 +    gint c;
 +
 +    while ((c = fgetc (ferr)) != EOF)
 +      g_string_append_c (msg, c);
 +    fclose (ferr);
 +    while ((needle = strstr (msg->str, "GfsFunction:")))
 +      g_string_erase (msg, needle - msg->str, strlen ("GfsFunction:"));
 +    gts_file_error (fp, "error compiling expression\n%s", msg->str);
 +    g_string_free (msg, TRUE);
 +    status = SIGABRT;
 +  }
 +  else {
 +    GfsModule * module = gfs_module_new (fp, foutname, 
 +					 gfs_object_simulation (f)->function_cache, finname);
 +    if (module) {
 +      gfs_module_ref (module, f);
 +      status = SIGCONT;
 +    }
 +    else
 +      status = SIGABRT;
 +  }
 +  close (foutd);
 +  remove (foutname);
 +  close (ferrd);
 +  remove (ferrname);
 +  return status;
 +}
 +
 +static gchar * find_identifier (const gchar * s, const gchar * i)
 +{
 +  gchar * f = strstr (s, i);
 +  static gchar allowed[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890";
 +
 +  while (f) {
 +    if (gfs_char_in_string (f[strlen(i)], allowed) ||
 +	(f > s && gfs_char_in_string (f[-1], allowed)))
 +      f = strstr (++f, i);
 +    else
 +      return f;
 +  }
 +  return NULL;
 +}
 +
 +static void function_compile (GfsFunction * f, GtsFile * fp)
 +{
 +  if (!HAVE_PKG_CONFIG) {
 +    gts_file_error (fp, "expecting a number, variable or GTS surface (val)\n"
 +		    "(functions are not supported on this system)");
 +    return;
 +  }
 +  else {
 +    GfsSimulation * sim = gfs_object_simulation (f);
 +    GfsDomain * domain = GFS_DOMAIN (sim);
 +    gchar finname[] = "/tmp/gfsXXXXXX";
 +    gint find;
 +    FILE * fin;
 +    GSList * lv = NULL, * ldv = NULL, * i;
 +
 +    find = mkstemp (finname);
 +    if (find < 0) {
 +      gts_file_error (fp, "cannot create temporary file");
 +      return;
 +    }
 +    fin = fdopen (find, "w");
 +    fputs ("#include <stdlib.h>\n"
 +	   "#include <stdio.h>\n"
 +	   "#include <math.h>\n"
 +	   "#include <gfs.h>\n",
 +	   fin);
 +    if (f->spatial)
 +      fputs ("#include <gerris/spatial.h>\n", fin);
 +    else if (!f->constant)
 +      fputs ("#include <gerris/function.h>\n", fin);
 +    i = sim->globals;
 +    while (i) {
 +      fprintf (fin, "#line %d \"GfsGlobal\"\n", GFS_GLOBAL (i->data)->line);
 +      fputs (GFS_GLOBAL (i->data)->s, fin);
 +      fputc ('\n', fin);
 +      i = i->next;
 +    }
 +    if (f->spatial)
 +      fputs ("double f (double x, double y, double z, double t) {\n"
 +	     "  _x = x; _y = y; _z = z;\n", 
 +	     fin);
 +    else if (f->constant)
 +      fputs ("double f (void) {\n", fin);
 +    else {
 +      fputs ("typedef double (* Func) (const FttCell * cell,\n"
 +	     "                         const FttCellFace * face,\n"
 +	     "                         GfsSimulation * sim,\n"
 +	     "                         gpointer data);\n"
 +	     "double f (FttCell * cell, FttCellFace * face, GfsSimulation * sim) {\n"
 +	     "  _sim = sim; _cell = cell;\n",
 +	     fin);
 +      i = domain->variables;
 +      while (i) {
 +	if (GFS_VARIABLE1 (i->data)->name && 
 +	    find_identifier (f->expr->str, GFS_VARIABLE1 (i->data)->name))
 +	  lv = g_slist_prepend (lv, i->data);
 +	i = i->next;
 +      }
 +      i = domain->derived_variables;
 +      while (i) {
 +	GfsDerivedVariable * v = i->data;
 +	if (find_identifier (f->expr->str, v->name))
 +	  ldv = g_slist_prepend (ldv, v);
 +	i = i->next;
 +      }
 +      if (lv || ldv) {
 +	GSList * i = lv;
 +
 +	while (i) {
 +	  GfsVariable * v = i->data;
 +	  fprintf (fin, "  double %s;\n", v->name);
 +	  i = i->next;
 +	}
 +	i = ldv;
 +	while (i) {
 +	  GfsDerivedVariable * v = i->data;
 +	  fprintf (fin, "  double %s;\n", v->name);
 +	  i = i->next;
 +	}
 +	if (lv) {
 +	  fputs ("  if (cell) {\n", fin);
 +	  i = lv;
 +	  while (i) {
 +	    GfsVariable * v = i->data;
 +	    fprintf (fin, 
 +		     "    %s = gfs_dimensional_value (GFS_VARIABLE1 (%p),\n"
 +		     "           GFS_VALUE (cell, GFS_VARIABLE1 (%p)));\n", 
 +		     v->name, v, v);
 +	    i = i->next;
 +	  }
 +	  fputs ("  } else {\n", fin);
 +	  i = lv;
 +	  while (i) {
 +	    GfsVariable * v = i->data;
 +	    fprintf (fin, 
 +		     "    %s = gfs_dimensional_value (GFS_VARIABLE1 (%p),\n"
 +		     "           gfs_face_interpolated_value (face, GFS_VARIABLE1 (%p)->i));\n", 
 +		     v->name, v, v);
 +	    i = i->next;
 +	  }
 +	  fputs ("  }\n", fin);
 +	  g_slist_free (lv);
 +	}
 +	if (ldv) {
 +	  i = ldv;
 +	  while (i) {
 +	    GfsDerivedVariable * v = i->data;
 +	    fprintf (fin, "  %s = (* (Func) %p) (cell, face, sim, ((GfsDerivedVariable *) %p)->data);\n", 
 +		     v->name, v->func, v);
 +	    i = i->next;
 +	  }
 +	  g_slist_free (ldv);
++=======
++>>>>>>> upstream/20131206+dfsg
 +	}
 +      }
++      else {
++	is_constant = FALSE;
++	if (c == '(') scope++;
++	else if (c == ')') scope--;
++	if (scope < 0) {
++	  fp->next_token = c;
++	  break;
++	}
++	g_string_append_c (expr, c);
++	c = gts_file_getc (fp);
++      }
 +    }
++<<<<<<< HEAD
 +    fputs ("#line _GFSLINE_ \"GfsFunction\"\n", fin);
 +
 +    if (f->isexpr)
 +      fprintf (fin, "return %s;\n}\n", f->expr->str);
 +    else {
 +      gchar * s = f->expr->str;
 +      guint len = strlen (s);
 +      g_assert (s[0] == '{' && s[len-1] == '}');
 +      s[len-1] = '\0';
 +      fprintf (fin, "%s\n}\n", &s[1]);
 +      s[len-1] = '}';
 +    }
 +    fclose (fin);
 +    close (find);
 +
 +    if (!lookup_function (f, finname)) {
 +      gint status = compile (fp, f, finname);
 +      g_assert (status != SIGQUIT);
 +    }
 +    remove (finname);
 +  }
 +}
 +
 +#define DEFERRED_COMPILATION ((GfsFunctionFunc) 0x1)
 +
 +static void check_for_deferred_compilation (GfsFunction * f)
 +{
 +  if (f->f == DEFERRED_COMPILATION) {
 +    function_compile (f, &f->fpd);
 +    if (f->fpd.type == GTS_ERROR) {
 +      g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
 +	     "error in deferred compilation\n%s\n%s", 
 +	     f->expr ? f->expr->str : NULL,
 +	     f->fpd.error);
 +      exit (1);
 +    }
++=======
++    g_strchomp (expr->str);
++    fp->comments = comments;
++    return expr;
++>>>>>>> upstream/20131206+dfsg
 +  }
 +}
 +
  static void function_read (GtsObject ** o, GtsFile * fp)
  {
    GfsFunction * f = GFS_FUNCTION (*o);
@@@ -807,7 -1010,7 +1411,11 @@@
        return;
      }
      else if (!strcmp (&(fp->token->str[strlen (fp->token->str) - 4]), ".cgd")) {
++<<<<<<< HEAD
 +      if ((f->g = read_cartesian_grid (fp->token->str, fp)) == NULL)
++=======
+       if ((f->g = gfs_cartesian_grid_read (fp->token->str, fp)) == NULL)
++>>>>>>> upstream/20131206+dfsg
  	return;
        if (!fit_index_dimension (f->g, f->index, fp))
  	return;
@@@ -830,7 -1034,7 +1439,11 @@@
      }
      else if (fp->type == GTS_STRING && !f->spatial && !f->constant) {
        if ((f->v = gfs_variable_from_name (domain->variables, f->expr->str)) ||
++<<<<<<< HEAD
 +	  (f->dv = lookup_derived_variable (f->expr->str, domain->derived_variables))) {
++=======
+ 	  (f->dv = gfs_derived_variable_from_name (domain->derived_variables, f->expr->str))) {
++>>>>>>> upstream/20131206+dfsg
  	gts_file_next_token (fp);
  	return;
        }
@@@ -858,8 -1057,6 +1466,11 @@@ static void function_write (GtsObject 
  
    if (f->expr)
      fprintf (fp, " %s", f->expr->str);
++<<<<<<< HEAD
 +  else if (f->module)
 +    fprintf (fp, " %s", g_module_name (f->module->module));
++=======
++>>>>>>> upstream/20131206+dfsg
    else if (f->v)
      fprintf (fp, " %s", f->v->name);
    else if (f->s || f->g)
@@@ -873,7 -1070,7 +1484,11 @@@ static void function_destroy (GtsObjec
    GfsFunction * f = GFS_FUNCTION (object);
  
    if (f->module)
++<<<<<<< HEAD
 +    gfs_module_unref (f->module, gfs_object_simulation (f)->function_cache);
++=======
+     gfs_module_unref (f->module, f);
++>>>>>>> upstream/20131206+dfsg
    if (f->expr) g_string_free (f->expr, TRUE);
    if (f->s) {
      gts_object_destroy (GTS_OBJECT (f->s));
@@@ -1231,7 -1443,6 +1861,10 @@@ gdouble gfs_function_spatial_value (Gfs
    if (f->f) {
      GfsSimulation * sim = gfs_object_simulation (f);
      FttVector q = *p;
++<<<<<<< HEAD
 +    check_for_deferred_compilation (f);
++=======
++>>>>>>> upstream/20131206+dfsg
      if (!f->nomap)
        gfs_simulation_map_inverse (sim, &q);
      dimensional = (* (GfsFunctionSpatialFunc) f->f) (q.x, q.y, q.z, sim->time.t);
@@@ -1699,6 -1911,7 +2333,10 @@@ void gfs_clock_destroy (GfsClock * t
   * gfs_union_open:
   * @fp: a file pointer.
   * @rank: the rank of the current parallel process.
++<<<<<<< HEAD
++=======
+  * @file: a #GfsUnionFile.
++>>>>>>> upstream/20131206+dfsg
   *
   * Opens a "parallel" file which serialises multiple parallel (write)
   * accesses to the file pointed to by @fp.
@@@ -1707,9 -1920,10 +2345,16 @@@
   *
   * Returns: a "parallel" file pointer associated with @fp.
   */
++<<<<<<< HEAD
 +FILE * gfs_union_open (FILE * fp, int rank)
 +{
 +  g_return_val_if_fail (fp != NULL, NULL);
++=======
+ FILE * gfs_union_open (FILE * fp, int rank, GfsUnionFile * file)
+ {
+   g_return_val_if_fail (fp != NULL, NULL);
+   g_return_val_if_fail (file != NULL, NULL);
++>>>>>>> upstream/20131206+dfsg
  
    if (rank <= 0) /* master */
      return fp;
@@@ -1720,7 -1934,10 +2365,14 @@@
      MPI_Recv (&pe, 1, MPI_INT, 0, rank, MPI_COMM_WORLD, &status);
      g_assert (rank == pe);
  #endif /* HAVE_MPI */
++<<<<<<< HEAD
 +    return tmpfile ();
++=======
+     file->fp = open_memstream (&file->buf, &file->len);
+     if (file->fp == NULL)
+       g_error ("gfs_union_open(): could not open_memstream:\n%s", strerror (errno));
+     return file->fp;
++>>>>>>> upstream/20131206+dfsg
    }
  }
  
@@@ -1728,14 -1945,14 +2380,25 @@@
   * gfs_union_close:
   * @fp: a file pointer.
   * @rank: the rank of the current parallel process.
++<<<<<<< HEAD
 + * @fpp: a "parallel" file pointer returned by a call to gfs_union_open().
 + *
 + * Closes a "parallel" file previously opened using gfs_union_open().
 + */
 +void gfs_union_close (FILE * fp, int rank, FILE * fpp)
 +{
 +  g_return_if_fail (fp != NULL);
 +  g_return_if_fail (fpp != NULL);
++=======
+  * @file: a #GfsUnionFile returned by a call to gfs_union_open().
+  *
+  * Closes a "parallel" file previously opened using gfs_union_open().
+  */
+ void gfs_union_close (FILE * fp, int rank, GfsUnionFile * file)
+ {
+   g_return_if_fail (fp != NULL);
+   g_return_if_fail (file != NULL);
++>>>>>>> upstream/20131206+dfsg
  
    if (rank == 0) { /* master */
  #ifdef HAVE_MPI
@@@ -1759,21 -1976,15 +2422,33 @@@
  #endif /* HAVE_MPI */
    }
    else if (rank > 0) { /* slaves */
++<<<<<<< HEAD
 +#ifdef HAVE_MPI
 +    int fd = fileno (fpp);
 +    struct stat sb;
 +    fflush (fpp);
 +    g_assert (fstat (fd, &sb) != -1);
 +    long length = sb.st_size;
 +    MPI_Send (&length, 1, MPI_LONG, 0, rank, MPI_COMM_WORLD);
 +    if (length > 0) {
 +      char * buf = mmap (NULL, length, PROT_READ, MAP_PRIVATE, fd, 0);
 +      g_assert (buf != MAP_FAILED);
 +      MPI_Send (buf, length, MPI_BYTE, 0, rank + 1, MPI_COMM_WORLD);
 +      munmap (buf, length);
 +    }
 +#endif /* HAVE_MPI */
 +    fclose (fpp);
++=======
+     fclose (file->fp);
+     long length = file->len;
+ #ifdef HAVE_MPI
+     MPI_Send (&length, 1, MPI_LONG, 0, rank, MPI_COMM_WORLD);
+     if (length > 0)
+       MPI_Send (file->buf, length, MPI_BYTE, 0, rank + 1, MPI_COMM_WORLD);
+ #endif /* HAVE_MPI */
+     if (length > 0)
+       g_free (file->buf);
++>>>>>>> upstream/20131206+dfsg
    }
  }
  
@@@ -1997,3 -2208,220 +2672,223 @@@ gdouble gfs_format_time_value (GSList 
    g_free (copy);
    return val;
  }
++<<<<<<< HEAD
++=======
+ 
+ /**
+  * gfs_cell_message:
+  * @cell: a #FttCell.
+  * @format: a string format.
+  * ...: arguments for format.
+  *
+  * Logs a message preceded by the pointer, position and level of @cell.
+  */
+ void gfs_cell_message (const FttCell * cell, 
+ 		       const gchar * format,
+ 		       ...)
+ {
+   g_return_if_fail (cell != NULL);
+   g_return_if_fail (format != NULL);
+ 
+   FttVector p;
+   ftt_cell_pos (cell, &p);
+   gchar * s = g_strdup_printf ("%p:(%g,%g,%g):%d", cell, p.x, p.y, p.z, ftt_cell_level (cell));
+   va_list ap;
+   va_start (ap, format);
+   gchar * s1 = g_strdup_vprintf (format, ap);
+   g_message ("%s\n%s", s, s1);
+   g_free (s);
+   g_free (s1);
+ }
+ 
+ static gboolean GfsDebug = FALSE;
+ 
+ /**
+  * gfs_debug:
+  * @format: a string format.
+  * ...: arguments for format.
+  *
+  * Logs a debugging message (only when gfs_debug_enabled() is set to
+  * %TRUE).
+  */
+ void gfs_debug (const gchar * format,
+ 		...)
+ {
+   if (GfsDebug) {
+     g_return_if_fail (format != NULL);
+     va_list ap;
+     va_start (ap, format);    
+     g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, ap);
+   }  
+ }
+ 
+ /**
+  * gfs_debug_enabled:
+  * @enabled: whether to enable debug message logging.
+  * 
+  * Enables or disables debug message logging (see also gfs_debug()).
+  */
+ void gfs_debug_enabled (gboolean enabled)
+ {
+   GfsDebug = enabled;
+ }
+ 
+ /**
+  * gfs_read_vector:
+  * @fp: a #GtsFile.
+  * @component: an array of vector component names.
+  *
+  * Reads a vector from @fp and fills @component. Note that the
+  * component strings need to be freed after use.
+  *
+  * Returns: %TRUE if all vector components have been read, %FALSE
+  * otherwise, in which case the error is reported in @fp.
+  */
+ gboolean gfs_read_vector (GtsFile * fp, gchar * component[FTT_DIMENSION])
+ {
+   g_return_val_if_fail (fp != NULL, FALSE);
+   g_return_val_if_fail (component != NULL, FALSE);
+ 
+   if (fp->type != '(') {
+     gts_file_error (fp, "expecting an opening bracket '('");
+     return FALSE;
+   }
+   gint c = gts_file_getc (fp), parlevel = 0, n = 0;
+   GString * s = g_string_new ("");
+   while ((parlevel > 0 || c != ')') && c != EOF) {
+     if (c == ',' && parlevel == 0) {
+       /* end of component */
+       if (n == FTT_DIMENSION) {
+ 	gts_file_error (fp, "too many vector components");
+ 	gint i;
+ 	for (i = 0; i < n; i++)
+ 	  g_free (component[i]);
+ 	g_string_free (s, TRUE);
+ 	return FALSE;
+       }
+       component[n++] = s->str;
+       g_string_free (s, FALSE);
+       s = g_string_new ("");
+     }
+     else {
+       /* expression */
+       g_string_append_c (s, c);
+       if (c == '(' || c == '[' || c == '{')
+ 	parlevel++;
+       else if (c == ')' || c == ']' || c == '}')
+ 	parlevel--;
+     }
+     c = gts_file_getc (fp);
+   }
+   if (c != ')') {
+     gts_file_error (fp, "parse error (missing closing bracket ')'?)"); 
+     gint i;
+     for (i = 0; i < n; i++)
+       g_free (component[i]);
+     g_string_free (s, TRUE);
+     return FALSE;
+   }
+   if (n != FTT_DIMENSION - 1) {
+     gts_file_error (fp, "not enough vector components");
+     gint i;
+     for (i = 0; i < n; i++)
+       g_free (component[i]);
+     g_string_free (s, TRUE);
+     return FALSE;
+   }
+   component[n++] = s->str;
+   g_string_free (s, FALSE);
+   gts_file_next_token (fp);
+   return TRUE;
+ }
+ 
+ /**
+  * gfs_read_variable_vector:
+  * @fp: a #GtsFile.
+  * @vector: an array of vector component variables.
+  * @domain: the #GfsDomain to which @vector belongs.
+  *
+  * Reads a vector from @fp and fills @vector.
+  *
+  * Returns: %TRUE if all vector components have been read, %FALSE
+  * otherwise, in which case the error is reported in @fp.
+  */
+ gboolean gfs_read_variable_vector (GtsFile * fp, 
+ 				   GfsVariable * vector[FTT_DIMENSION], 
+ 				   GfsDomain * domain)
+ {
+   g_return_val_if_fail (fp != NULL, FALSE);
+   g_return_val_if_fail (vector != NULL, FALSE);
+   g_return_val_if_fail (domain != NULL, FALSE);
+ 
+   gchar * component[FTT_DIMENSION];
+   if (!gfs_read_vector (fp, component))
+     return FALSE;
+ 
+   gint i;
+   gboolean status = TRUE;
+   for (i = 0; i < FTT_DIMENSION && status; i++) {
+     if (!(vector[i] = gfs_variable_from_name (domain->variables, component[i]))) {
+       gts_file_error (fp, "unknown variable '%s'", component[i]);
+       status = FALSE;
+     }
+     else if (vector[i]->component != i) {
+       gts_file_error (fp, "variable '%s' is not the correct vector component", component[i]);
+       status = FALSE;
+     }
+   }
+   for (i = 0; i < FTT_DIMENSION; i++)
+     g_free (component[i]);
+   return status;
+ }
+ 
+ /**
+  * gfs_read_function_vector:
+  * @fp: a #GtsFile.
+  * @vector: an array of vector component variables.
+  * @function: an array of vector component #GfsFunction corresponding
+  * to @vector.
+  * @sim: the #GfsSimulation to which @vector belongs.
+  *
+  * Reads a vector from @fp and fills @vector.
+  *
+  * Returns: %TRUE if all vector components have been read, %FALSE
+  * otherwise, in which case the error is reported in @fp.
+  */
+ gboolean gfs_read_function_vector (GtsFile * fp, 
+ 				   GfsVariable * vector[FTT_DIMENSION], 
+ 				   GfsFunction * function[FTT_DIMENSION],
+ 				   gpointer sim)
+ {
+   g_return_val_if_fail (fp != NULL, FALSE);
+   g_return_val_if_fail (vector != NULL, FALSE);
+   g_return_val_if_fail (function != NULL, FALSE);
+   g_return_val_if_fail (sim != NULL, FALSE);
+ 
+   gchar * component[FTT_DIMENSION];
+   if (!gfs_read_vector (fp, component))
+     return FALSE;
+ 
+   gboolean status = TRUE;
+   gint i;
+   for (i = 0; i < FTT_DIMENSION && status; i++) {
+     function[i] = gfs_function_new (gfs_function_class (), 0.);
+     gfs_function_set_units (function[i], vector[i]->units);
+     GtsFile * fp1 = gts_file_new_from_string (component[i]);
+     gfs_function_read (function[i], sim, fp1);
+     if (fp1->type == GTS_ERROR) {
+       gts_file_error (fp, "%s", fp1->error);
+       gint j;
+       for (j = 0; j <= i; j++) {
+ 	gts_object_destroy (GTS_OBJECT (function[i]));
+ 	function[i] = NULL;
+       }	
+       status = FALSE;
+     }
+     gts_file_destroy (fp1);
+   }
+   for (i = 0; i < FTT_DIMENSION; i++)
+     g_free (component[i]);
+   return status;
+ }
++>>>>>>> upstream/20131206+dfsg
diff --cc src/utils.h
index 372620b,ad52b11..41713cc
--- a/src/utils.h
+++ b/src/utils.h
@@@ -64,6 -65,13 +65,16 @@@ extern "C" 
  #  endif /* doesn't HAVE_MPI */
  #endif /* HAVE_CONFIG_H */
  
++<<<<<<< HEAD
++=======
+ #if !HAVE_G_MKDTEMP
+ gchar * g_mkdtemp (gchar * tmpl);
+ #endif
+ #if !HAVE_OPEN_MEMSTREAM
+ FILE * open_memstream (char **buf, size_t *len);
+ #endif
+ 
++>>>>>>> upstream/20131206+dfsg
  #ifndef M_PI
  #  define M_PI 3.14159265358979323846
  #endif
@@@ -71,6 -79,9 +82,12 @@@
  #define GFS_DOUBLE_TO_POINTER(d)     (*((gpointer *) &(d)))
  #define GFS_NODATA                   G_MAXDOUBLE
  #define GFS_HAS_DATA(cell,v)         (GFS_VALUE (cell, v) != GFS_NODATA)
++<<<<<<< HEAD
++=======
+ 
+ gchar * gfs_mkftemp  (gchar * tmpl);
+ gchar * gfs_template (void);
++>>>>>>> upstream/20131206+dfsg
  
  gboolean gfs_char_in_string (char c, const char * s);
  gchar *  gfs_file_statement (GtsFile * fp);
@@@ -183,11 -199,18 +205,26 @@@ void               gfs_clock_sto
  gdouble            gfs_clock_elapsed        (GfsClock * t);
  void               gfs_clock_destroy        (GfsClock * t);
  
++<<<<<<< HEAD
 +FILE *             gfs_union_open           (FILE * fp, 
 +					     int rank);
 +void               gfs_union_close          (FILE * fp, 
 +					     int rank, 
 +					     FILE * fpp);
++=======
+ typedef struct {
+   FILE * fp;
+   char * buf;
+   size_t len;
+ } GfsUnionFile;
+ 
+ FILE *             gfs_union_open           (FILE * fp, 
+ 					     int rank,
+ 					     GfsUnionFile * file);
+ void               gfs_union_close          (FILE * fp, 
+ 					     int rank, 
+ 					     GfsUnionFile * file);
++>>>>>>> upstream/20131206+dfsg
  
  /* GfsFormat: Header */
  
@@@ -216,7 -239,80 +253,84 @@@ gchar *            gfs_format_strin
  				          gdouble time);
  gdouble            gfs_format_time_value (GSList * format, 
  					  const gchar * string);
- 
++<<<<<<< HEAD
++
++=======
+ void               gfs_cell_message      (const FttCell * cell, 
+ 					  const gchar *format,
+ 					  ...);
+ void               gfs_debug             (const gchar * format,
+ 					  ...);
+ void               gfs_debug_enabled     (gboolean enabled);
+ gboolean           gfs_read_vector       (GtsFile * fp, 
+ 					  gchar * component[FTT_DIMENSION]);
+ gboolean           gfs_read_variable_vector (GtsFile * fp, 
+ 					     GfsVariable * vector[FTT_DIMENSION], 
+ 					     GfsDomain * domain);
+ gboolean           gfs_read_function_vector (GtsFile * fp, 
+ 					     GfsVariable * vector[FTT_DIMENSION], 
+ 					     GfsFunction * function[FTT_DIMENSION],
+ 					     gpointer sim);
+ 
+ /* The code below redefines the g_assert() macros so that they behave
+    consistently between Glib versions. In particular, we want to be
+    able to add error handlers.  */
+ 
+ #undef g_assert
+ #undef g_assert_not_reached
+ 
+ #ifdef G_DISABLE_ASSERT
+ 
+ #define g_assert(expr)		G_STMT_START{ (void)0; }G_STMT_END
+ #define g_assert_not_reached()	G_STMT_START{ (void)0; }G_STMT_END
+ 
+ #else /* !G_DISABLE_ASSERT */
+ 
+ #ifdef __GNUC__
+ 
+ #define g_assert(expr)			G_STMT_START{		\
+       if G_LIKELY(expr) { } else {				\
+         g_log (G_LOG_DOMAIN,                                    \
+                G_LOG_LEVEL_ERROR, 	                        \
+                "file %s: line %d (%s): assertion failed: (%s)",	\
+ 	       __FILE__,    			                \
+ 	       __LINE__,	      			        \
+ 	       __PRETTY_FUNCTION__,	      	                \
+ 	       #expr);		                                \
+         abort ();} }G_STMT_END
+ 
+ #define g_assert_not_reached()		G_STMT_START{		\
+         g_log (G_LOG_DOMAIN,                                    \
+                G_LOG_LEVEL_ERROR, 	                        \
+                "file %s: line %d (%s): should not be reached",	\
+ 	       __FILE__,    			                \
+ 	       __LINE__,	      			        \
+ 	       __PRETTY_FUNCTION__);				\
+         abort (); }G_STMT_END
+ 
+ #else /* !__GNUC__ */
+ 
+ #define g_assert(expr)			G_STMT_START{		\
+      if (expr) { } else						\
+        g_log (G_LOG_DOMAIN,					\
+ 	      G_LOG_LEVEL_ERROR,				\
+ 	      "file %s: line %d: assertion failed: (%s)",	\
+ 	      __FILE__,						\
+ 	      __LINE__,						\
+ 	      #expr);			}G_STMT_END
+ 
+ #define g_assert_not_reached()		G_STMT_START{	\
+      g_log (G_LOG_DOMAIN,				\
+ 	    G_LOG_LEVEL_ERROR,				\
+ 	    "file %s: line %d: should not be reached",	\
+ 	    __FILE__,					\
+ 	    __LINE__);		}G_STMT_END
+ 
+ #endif /* __GNUC__ */
+ 
+ #endif /* !G_DISABLE_ASSERT */
+   
++>>>>>>> upstream/20131206+dfsg
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
diff --cc src/variable.c
index 417a75f,f9fc02c..e29a8d6
--- a/src/variable.c
+++ b/src/variable.c
@@@ -21,8 -21,11 +21,14 @@@
   */
  
  #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
  #include "variable.h"
  #include "vof.h"
++<<<<<<< HEAD
++=======
+ #include "source.h"
++>>>>>>> upstream/20131206+dfsg
  #include "init.h"
  
  /**
@@@ -252,7 -262,7 +265,11 @@@ void gfs_variable_set_vector (GfsVariab
    guint i, j;
  
    g_return_if_fail (v != NULL);
++<<<<<<< HEAD
 +  g_return_if_fail (n <= FTT_DIMENSION);
++=======
+   g_return_if_fail (n > 1 && n <= FTT_DIMENSION);
++>>>>>>> upstream/20131206+dfsg
  
    for (i = 0; i < n; i++) {
      g_return_if_fail (v[i] != NULL);
@@@ -260,6 -270,68 +277,71 @@@
      for (j = 0; j < n; j++)
        v[i]->vector[j] = v[j];
    }
++<<<<<<< HEAD
++=======
+   
+   /* for rotated boundary conditions i.e. gfs_boundary_periodic_rotate() */
+   v[0]->orientation =  1.;
+   v[1]->orientation = -1.;
+ }
+ 
+ /**
+  * gfs_variable_set_tensor:
+  * @t: the components of the 2x2 tensor.
+  *
+  * Sets @t[0][0],..., at t[1][1] as components of a tensor.
+  */
+ void gfs_variable_set_tensor (GfsVariable * t[2][2])
+ {
+   g_return_if_fail (t != NULL);
+ 
+   /* for rotated boundary conditions i.e. gfs_boundary_periodic_rotate() */
+   t[0][0]->component = 0; t[0][0]->vector[0] = t[0][0]; t[0][0]->vector[1] = t[1][1];
+   t[0][0]->orientation = + 1.; t[0][0]->even = TRUE;
+   t[1][1]->component = 1; t[1][1]->vector[0] = t[0][0]; t[1][1]->vector[1] = t[1][1];
+   t[1][1]->orientation = + 1.; t[1][1]->even = TRUE;
+   t[0][1]->component = 0; t[0][1]->vector[0] = t[0][1]; t[0][1]->vector[1] = t[1][0];
+   t[0][1]->orientation = - 1.; t[0][1]->even = TRUE;
+   t[1][0]->component = 1; t[1][0]->vector[0] = t[0][1]; t[1][0]->vector[1] = t[1][0];
+   t[1][0]->orientation = - 1.; t[1][0]->even = TRUE;
+ }
+ 
+ /**
+  * gfs_variable_clone:
+  * @v: a #GfsVariable.
+  * @name: a name.
+  *
+  * Returns: a new #GfsVariable called @name and clone of @v.
+  */
+ GfsVariable * gfs_variable_clone (GfsVariable * v, gchar * name)
+ {
+   g_return_val_if_fail (v != NULL, NULL);
+   g_return_val_if_fail (name != NULL, NULL);
+ 
+   char * buf;
+   size_t len;
+   FILE * f = open_memstream (&buf, &len);
+   if (f == NULL)
+     g_error ("gfs_variable_clone(): could not open_memstream:\n%s", strerror (errno));
+   gchar * s = v->name;
+   v->name = name;
+   GtsObject * o = GTS_OBJECT (v);
+   (* o->klass->write) (o, f);
+   fclose (f);
+   v->name = s;
+   GtsFile * fp = gts_file_new_from_buffer (buf, len);
+   GtsObject * clone = gts_object_new (o->klass);
+   gfs_object_simulation_set (clone, gfs_object_simulation (o));
+   (* o->klass->read) (&clone, fp);
+   if (fp->type == GTS_ERROR)
+     g_error ("gfs_variable_clone:\n%d:%d:%s", fp->line, fp->pos, fp->error);
+   gts_file_destroy (fp);
+   free (buf);
+   GFS_VARIABLE (clone)->units = v->units;
+   GFS_VARIABLE (clone)->fine_coarse = v->fine_coarse;
+   GFS_VARIABLE (clone)->coarse_fine = v->coarse_fine;
+   return GFS_VARIABLE (clone);
++>>>>>>> upstream/20131206+dfsg
  }
  
  /** \endobject{GfsVariable} */
@@@ -447,7 -519,7 +529,11 @@@ GfsVariableClass * gfs_variable_residua
  /** \endobject{GfsVariableResidual} */
  
  /**
++<<<<<<< HEAD
 + * Spatial filtering .
++=======
+  * Spatial filtering.
++>>>>>>> upstream/20131206+dfsg
   * \beginobject{GfsVariableFiltered}
   */
  
@@@ -588,7 -660,7 +674,11 @@@ static void variable_diagonal (FttCell 
        g.b += ng.b;
      }
    }
++<<<<<<< HEAD
 +  if (g.a > 0.)
++=======
+   if (g.a != 0.)
++>>>>>>> upstream/20131206+dfsg
      GFS_VALUE (cell, v) = g.b/g.a;
    else
      GFS_VALUE (cell, v) = G_MAXDOUBLE;
@@@ -607,10 -679,10 +697,14 @@@ static gboolean variable_diagonal_even
      gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  			      (FttCellTraverseFunc) unity, tmp);
      gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, tmp);
++<<<<<<< HEAD
 +    gfs_poisson_coefficients (domain, sim->physical_params.alpha, TRUE, TRUE);
++=======
+     gfs_poisson_coefficients (domain, sim->physical_params.alpha, TRUE, TRUE, TRUE);
++>>>>>>> upstream/20131206+dfsg
      gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  			      (FttCellTraverseFunc) variable_diagonal, data);
-     gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, GFS_VARIABLE1 (event));
+     gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, GFS_VARIABLE (event));
      gts_object_destroy (GTS_OBJECT (tmp));
      return TRUE;
    }
@@@ -744,16 -816,23 +838,33 @@@ static gdouble face_metric (FttCell * c
      return 1.;
  }
  
++<<<<<<< HEAD
++=======
+ static gdouble face_metric_inverse (FttCell * cell, FttDirection d, GfsDomain * domain)
+ {
+   gdouble fm = face_metric (cell, d, domain);
+   /* for degenerate metric e.g. lon-lat */
+   return fm > 1e-6 ? 1./fm : 0.;
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  static void init_mac_from_stream_function (FttCell * cell,
  					   gdouble psi0, gdouble psi1, gdouble psi2, gdouble psi3,
  					   gdouble h,
  					   GfsDomain * domain,
  					   GfsVariable ** u)
  {
++<<<<<<< HEAD
 +  GFS_STATE (cell)->f[0].un = (psi2 - psi1)/(h*face_metric (cell, 0, domain));
 +  GFS_STATE (cell)->f[1].un = (psi3 - psi0)/(h*face_metric (cell, 1, domain));
 +  GFS_STATE (cell)->f[2].un = (psi3 - psi2)/(h*face_metric (cell, 2, domain));
 +  GFS_STATE (cell)->f[3].un = (psi0 - psi1)/(h*face_metric (cell, 3, domain));
++=======
+   GFS_STATE (cell)->f[0].un = (psi2 - psi1)*face_metric_inverse (cell, 0, domain)/h;
+   GFS_STATE (cell)->f[1].un = (psi3 - psi0)*face_metric_inverse (cell, 1, domain)/h;
+   GFS_STATE (cell)->f[2].un = (psi3 - psi2)*face_metric_inverse (cell, 2, domain)/h;
+   GFS_STATE (cell)->f[3].un = (psi0 - psi1)*face_metric_inverse (cell, 3, domain)/h;
++>>>>>>> upstream/20131206+dfsg
  
    GFS_VALUE (cell, u[0]) = (GFS_STATE (cell)->f[0].un + GFS_STATE (cell)->f[1].un)/2.;
    GFS_VALUE (cell, u[1]) = (GFS_STATE (cell)->f[2].un + GFS_STATE (cell)->f[3].un)/2.;
@@@ -799,26 -878,53 +910,75 @@@ static void variable_stream_function_co
    }
  }
  
++<<<<<<< HEAD
++=======
+ static void variable_stream_function_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_function_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsVariableFunction * v = GFS_VARIABLE_FUNCTION (*o);
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
+   if (fp->type == GTS_STRING && gfs_variable_from_name (domain->variables, fp->token->str)) {
+     /* variable */
+     gfs_function_read (v->f, domain, fp);
+     g_assert (gfs_function_get_variable (v->f));
+     if (fp->type == GTS_ERROR)
+       return;
+     /* fixme: what about the equivalent coarse_fine() method? */
+   }
+   else { /* spatial function */
+     gts_object_destroy (GTS_OBJECT (v->f));
+     v->f = gfs_function_new (gfs_function_spatial_class (), 0.);
+     gfs_function_read (v->f, domain, fp);
+     if (fp->type == GTS_ERROR)
+       return;
+     gfs_function_set_units (v->f, GFS_VARIABLE (*o)->units);
+     GFS_VARIABLE (v)->coarse_fine = variable_stream_function_coarse_fine;
+   }
+ }
+ 
++>>>>>>> upstream/20131206+dfsg
  static void variable_stream_function_fine_coarse (FttCell * cell, GfsVariable * v)
  {
    FttCellChildren child;
    ftt_cell_children (cell, &child);
++<<<<<<< HEAD
 +  double s = 2.*face_metric (cell, 0, v->domain);
 +  GFS_STATE (cell)->f[0].un = 
 +    (face_metric (child.c[1], 0, v->domain)*GFS_STATE (child.c[1])->f[0].un +
 +     face_metric (child.c[3], 0, v->domain)*GFS_STATE (child.c[3])->f[0].un)/s;
 +  s = 2.*face_metric (cell, 1, v->domain);
 +  GFS_STATE (cell)->f[1].un = 
 +    (face_metric (child.c[0], 1, v->domain)*GFS_STATE (child.c[0])->f[1].un +
 +     face_metric (child.c[2], 1, v->domain)*GFS_STATE (child.c[2])->f[1].un)/s;
 +  s = 2.*face_metric (cell, 2, v->domain);
 +  GFS_STATE (cell)->f[2].un = 
 +    (face_metric (child.c[0], 2, v->domain)*GFS_STATE (child.c[0])->f[2].un +
 +     face_metric (child.c[1], 2, v->domain)*GFS_STATE (child.c[1])->f[2].un)/s;
 +  s = 2.*face_metric (cell, 3, v->domain);
 +  GFS_STATE (cell)->f[3].un = 
 +    (face_metric (child.c[3], 3, v->domain)*GFS_STATE (child.c[3])->f[3].un +
 +     face_metric (child.c[2], 3, v->domain)*GFS_STATE (child.c[2])->f[3].un)/s;
++=======
+   GFS_STATE (cell)->f[0].un = 
+     face_metric_inverse (cell, 0, v->domain)/2.*
+     (face_metric (child.c[1], 0, v->domain)*GFS_STATE (child.c[1])->f[0].un +
+      face_metric (child.c[3], 0, v->domain)*GFS_STATE (child.c[3])->f[0].un);
+   GFS_STATE (cell)->f[1].un = 
+     face_metric_inverse (cell, 1, v->domain)/2.*
+     (face_metric (child.c[0], 1, v->domain)*GFS_STATE (child.c[0])->f[1].un +
+      face_metric (child.c[2], 1, v->domain)*GFS_STATE (child.c[2])->f[1].un);
+   GFS_STATE (cell)->f[2].un = 
+     face_metric_inverse (cell, 2, v->domain)/2.*
+     (face_metric (child.c[0], 2, v->domain)*GFS_STATE (child.c[0])->f[2].un +
+      face_metric (child.c[1], 2, v->domain)*GFS_STATE (child.c[1])->f[2].un);
+   GFS_STATE (cell)->f[3].un = 
+     face_metric_inverse (cell, 3, v->domain)/2.*
+     (face_metric (child.c[3], 3, v->domain)*GFS_STATE (child.c[3])->f[3].un +
+      face_metric (child.c[2], 3, v->domain)*GFS_STATE (child.c[2])->f[3].un);
++>>>>>>> upstream/20131206+dfsg
    GFS_VALUE (cell, v) = (GFS_VALUE (child.c[0], v) + GFS_VALUE (child.c[1], v) + 
  			 GFS_VALUE (child.c[2], v) + GFS_VALUE (child.c[3], v))/4.;
  }
@@@ -841,10 -947,35 +1001,42 @@@ static void init_streamfunction (FttCel
  				 v->domain, gfs_domain_velocity (v->domain));
  }
  
++<<<<<<< HEAD
 +static gboolean variable_stream_function_event (GfsEvent * event, GfsSimulation * sim)
 +{
 +  if ((* GFS_EVENT_CLASS (gfs_variable_function_class ())->event) (event, sim)) {
 +    gfs_domain_traverse_leaves (GFS_DOMAIN (sim), (FttCellTraverseFunc) init_streamfunction, event);
++=======
+ static void init_streamfunction_from_variable (FttCell * cell, GfsVariable * v)
+ {
+   FttDirection d[FTT_DIMENSION];
+   d[0] = FTT_LEFT; d[1] = FTT_BOTTOM;
+   gdouble psi0 = gfs_cell_corner_value (cell, d, v, -1);
+   d[0] = FTT_RIGHT; d[1] = FTT_BOTTOM;
+   gdouble psi1 = gfs_cell_corner_value (cell, d, v, -1);
+   d[0] = FTT_RIGHT; d[1] = FTT_TOP;
+   gdouble psi2 = gfs_cell_corner_value (cell, d, v, -1);
+   d[0] = FTT_LEFT; d[1] = FTT_TOP;
+   gdouble psi3 = gfs_cell_corner_value (cell, d, v, -1);
+   init_mac_from_stream_function (cell, psi0, psi1, psi2, psi3, ftt_cell_size (cell),
+ 				 v->domain, gfs_domain_velocity (v->domain));
+ }
+ 
+ static gboolean variable_stream_function_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (gfs_variable_function_class ())->event) (event, sim)) {
+     GfsDomain * domain = GFS_DOMAIN (sim);
+     GfsVariable * v = gfs_function_get_variable (GFS_VARIABLE_FUNCTION (event)->f);
+     if (v)
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) init_streamfunction_from_variable, 
+ 				  v);
+     else
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) init_streamfunction, event);
+     GfsVariable ** u = gfs_domain_velocity (domain);
+     FttComponent c;
+     for (c = 0; c < FTT_DIMENSION; c++)
+       gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, u[c]);
++>>>>>>> upstream/20131206+dfsg
      return TRUE;
    }
    return FALSE;
@@@ -852,16 -983,14 +1044,24 @@@
  
  static void variable_stream_function_class_init (GfsEventClass * klass)
  {
++<<<<<<< HEAD
++=======
+   GTS_OBJECT_CLASS (klass)->read = variable_stream_function_read;
++>>>>>>> upstream/20131206+dfsg
    klass->event = variable_stream_function_event;
  }
  
  static void variable_stream_function_init (GfsVariable * v)
  {
    v->units = 2.;
++<<<<<<< HEAD
 +  v->coarse_fine = variable_stream_function_coarse_fine;
 +  v->fine_coarse = variable_stream_function_fine_coarse;
 +  gts_object_destroy (GTS_OBJECT (GFS_VARIABLE_FUNCTION (v)->f));
 +  GFS_VARIABLE_FUNCTION (v)->f = gfs_function_new (gfs_function_spatial_class (), 0.);
++=======
+   v->fine_coarse = variable_stream_function_fine_coarse;
++>>>>>>> upstream/20131206+dfsg
    GFS_EVENT (v)->istep = G_MAXINT/2;
  }
  
@@@ -891,6 -1020,213 +1091,216 @@@ GfsVariableClass * gfs_variable_stream_
  #endif /* FTT_2D */
  
  /**
++<<<<<<< HEAD
++=======
+  * A variable, solution of a Poisson equation.
+  * \beginobject{GfsVariablePoisson}
+  */
+ 
+ static void variable_poisson_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_poisson_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   if (fp->type == '{')
+     gfs_multilevel_params_read (&GFS_VARIABLE_POISSON (*o)->par, fp);
+ }
+ 
+ static void variable_poisson_write (GtsObject * o, FILE * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_poisson_class ())->parent_class->write) (o, fp);
+ 
+   fputc (' ', fp);
+   gfs_multilevel_params_write (&GFS_VARIABLE_POISSON (o)->par, fp);
+ }
+ 
+ static void has_dirichlet (FttCell * cell, GfsVariable * p)
+ {
+   if (((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
+     p->centered = FALSE;
+ }
+ 
+ typedef struct {
+   GfsFunction * f;
+   GfsVariable * div;
+ } DivData;
+ 
+ static void rescale_div (FttCell * cell, DivData * p)
+ {
+   gdouble size = ftt_cell_size (cell);
+   gdouble a = size*size*gfs_domain_cell_fraction (p->div->domain, cell);
+   GFS_VALUE (cell, p->div) = gfs_function_value (p->f, cell)*a;
+ }
+ 
+ static gboolean variable_poisson_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (gfs_variable_class ())->event) (event, sim)) {
+     GfsDomain * domain = GFS_DOMAIN (sim);
+     GfsVariable * dia = gfs_temporary_variable (domain);
+     GfsVariable * div = gfs_temporary_variable (domain);
+     GfsVariable * res = gfs_temporary_variable (domain);
+     GfsVariable * v = GFS_VARIABLE (event);
+     GfsVariablePoisson * pv = GFS_VARIABLE_POISSON (v);
+ 
+     gfs_domain_surface_bc (domain, v);
+     gfs_domain_traverse_mixed (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS,
+ 			       (FttCellTraverseFunc) has_dirichlet, v);
+     DivData p = { GFS_VARIABLE_FUNCTION (event)->f, div };
+     gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) rescale_div, &p);
+     gfs_poisson_coefficients (domain, NULL, FALSE, TRUE, TRUE);
+     gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			      (FttCellTraverseFunc) gfs_cell_reset, dia);
+     pv->par.poisson_solve (domain, &pv->par, v, div, res, dia, 1.);
+     if (pv->par.residual.infty > pv->par.tolerance) {
+       g_warning ("VariablePoisson %s: max residual %g > %g",
+ 		 v->name, pv->par.residual.infty, pv->par.tolerance);
+       gfs_multilevel_params_stats_write (&pv->par, stderr);
+     }
+ 
+     gts_object_destroy (GTS_OBJECT (dia));
+     gts_object_destroy (GTS_OBJECT (div));
+     gts_object_destroy (GTS_OBJECT (res));
+     return TRUE;
+   }
+   return FALSE;  
+ }
+ 
+ static void variable_poisson_class_init (GtsObjectClass * klass)
+ {
+   klass->read = variable_poisson_read;
+   klass->write = variable_poisson_write;
+   GFS_EVENT_CLASS (klass)->event = variable_poisson_event;
+ }
+ 
+ static void variable_poisson_init (GfsVariable * v)
+ {
+   v->centered = TRUE;
+   v->coarse_fine = (GfsVariableFineCoarseFunc) gfs_cell_coarse_fine;
+   gfs_multilevel_params_init (&GFS_VARIABLE_POISSON (v)->par);
+ }
+ 
+ GfsVariableClass * gfs_variable_poisson_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo gfs_variable_poisson_info = {
+       "GfsVariablePoisson",
+       sizeof (GfsVariablePoisson),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) variable_poisson_class_init,
+       (GtsObjectInitFunc) variable_poisson_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_function_class ()), 
+ 				  &gfs_variable_poisson_info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsVariablePoisson} */
+ 
+ /**
+  * The Laplacian of a function.
+  * \beginobject{GfsVariableLaplacian}
+  */
+ 
+ typedef struct {
+   GfsVariable * lap;
+   GfsFunction * f;
+   GfsVariable * u;
+ } LapData;
+ 
+ static void evaluate_function (FttCell * cell, LapData * p)
+ {
+   GFS_VALUE (cell, p->u) = gfs_function_value (p->f, cell);
+ }
+ 
+ static void laplacian (FttCell * cell, LapData * p)
+ {
+   GfsGradient g;
+   FttCellNeighbors neighbor;
+   FttCellFace f;
+   GfsGradient ng;
+ 
+   g.a = g.b = 0.;
+   f.cell = cell;
+   ftt_cell_neighbors (cell, &neighbor);
+   for (f.d = 0; f.d < FTT_NEIGHBORS; f.d++) {
+     f.neighbor = neighbor.c[f.d];
+     if (f.neighbor) {
+       gfs_face_weighted_gradient (&f, &ng, p->u->i, -1);
+       g.a += ng.a;
+       g.b += ng.b;
+     }
+   }
+ 
+   gdouble h = ftt_cell_size (cell);
+   GFS_VALUE (cell, p->lap) = (g.b - g.a*GFS_VALUE (cell, p->u))/
+     (h*h*gfs_domain_cell_fraction (p->lap->domain, cell));
+ }
+ 
+ static gboolean variable_laplacian_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (gfs_variable_class ())->event) (event, sim)) {
+     GfsDomain * domain = GFS_DOMAIN (sim);
+     LapData p = { GFS_VARIABLE (event), GFS_VARIABLE_FUNCTION (event)->f };
+     p.u = gfs_function_get_variable (p.f);
+     if (p.u == NULL) {
+       p.u = gfs_temporary_variable (domain);
+       gfs_function_set_units (p.f, 0.);
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) evaluate_function, &p);
+       gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, p.u);
+     }
+     gfs_poisson_coefficients (domain, NULL, TRUE, TRUE, TRUE);
+     gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) laplacian, &p);
+     gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, p.lap);
+     if (!gfs_function_get_variable (p.f))
+       gts_object_destroy (GTS_OBJECT (p.u));
+     return TRUE;
+   }
+   return FALSE;  
+ }
+ 
+ static void variable_laplacian_class_init (GtsObjectClass * klass)
+ {
+   GFS_EVENT_CLASS (klass)->event = variable_laplacian_event;
+ }
+ 
+ static void variable_laplacian_init (GfsVariable * v)
+ {
+   v->units = -2.;
+   v->centered = TRUE;
+   v->coarse_fine = (GfsVariableFineCoarseFunc) gfs_cell_coarse_fine;
+ }
+ 
+ GfsVariableClass * gfs_variable_laplacian_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsVariableLaplacian",
+       sizeof (GfsVariableFunction),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) variable_laplacian_class_init,
+       (GtsObjectInitFunc) variable_laplacian_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_function_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsVariableLaplacian} */
+ 
+ /**
++>>>>>>> upstream/20131206+dfsg
   * How old is this cell?.
   * \beginobject{GfsVariableAge}
   */
@@@ -951,6 -1287,313 +1361,316 @@@ GfsVariableClass * gfs_variable_age_cla
  /** \endobject{GfsVariableAge} */
  
  /**
++<<<<<<< HEAD
++=======
+  * Averaging along a coordinate direction.
+  * \beginobject{GfsVariableAverage}
+  */
+ 
+ static void variable_average_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_average_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   if (fp->type != GTS_STRING) {
+     gts_file_error (fp, "expecting a string (component)");
+     return;
+   }
+   gchar s[][2] = {"x", "y", "z"};
+   GfsVariableAverage * v = GFS_VARIABLE_AVERAGE (*o);
+   for (v->c = 0; v->c < FTT_DIMENSION; v->c++)
+     if (!strcmp (fp->token->str, s[v->c]))
+       break;
+   if (v->c == FTT_DIMENSION) {
+     gts_file_error (fp, "unknown component '%s'", fp->token->str);
+     return;
+   }
+   gts_file_next_token (fp);
+ }
+ 
+ static void variable_average_write (GtsObject * o, FILE * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_average_class ())->parent_class->write) (o, fp);
+ 
+   gchar s[][2] = {"x", "y", "z"};
+   fprintf (fp, " %s", s[GFS_VARIABLE_AVERAGE (o)->c]);
+ }
+ 
+ /* see also hydrostatic_pressure() */
+ static void average (FttCell * cell, GfsVariable * v)
+ {
+   FttDirection d = 2*GFS_VARIABLE_AVERAGE (v)->c + 1;
+   gdouble avg = 0., vol = 0.;
+   GtsFifo * fifo = gts_fifo_new (), * column = gts_fifo_new ();
+ 
+   gts_fifo_push (fifo, cell);
+   while ((cell = gts_fifo_pop (fifo))) {
+     double w = gfs_cell_volume (cell, v->domain);
+     vol += w;
+     avg += w*gfs_function_value (GFS_VARIABLE_FUNCTION (v)->f, cell);
+     gts_fifo_push (column, cell);
+ 
+     FttCell * neighbor = ftt_cell_neighbor (cell, d);
+     if (neighbor) {
+       if (FTT_CELL_IS_LEAF (neighbor)) {
+ 	if (ftt_cell_level (neighbor) == ftt_cell_level (cell))
+ 	  /* neighbor at same level */
+ 	  gts_fifo_push (fifo, neighbor);
+ 	else {
+ 	  /* coarser neighbour */
+ #if 1
+ 	  g_assert_not_implemented ();
+ #else
+ 	  if (gts_fifo_top (fifo) == NULL) { /* only consider the last fine cell */
+ 	    FttDirection od = FTT_OPPOSITE_DIRECTION (d);
+ 	    double dp = GFS_STATE (neighbor)->f[od].un*ftt_cell_size (neighbor)/
+ 	      GFS_STATE (neighbor)->f[od].v;
+ 	    double p = 0.;
+ 	    FttCellChildren child;
+ 	    int i, n = ftt_cell_children_direction (ftt_cell_parent (cell), d, &child);
+ 	    for (i = 0; i < n; i++)
+ 	      p += GFS_VALUE (child.c[i], v);
+ 	    GFS_VALUE (neighbor, v) = p/n - 3.*dp/4.;
+ 	    gts_fifo_push (fifo, neighbor);
+ 	  }
+ #endif
+ 	}
+       }
+       else {
+ 	/* finer neighbor */
+ #if 1
+ 	  g_assert_not_implemented ();
+ #else
+ 	FttCellChildren child;
+ 	int i, n = ftt_cell_children_direction (neighbor, FTT_OPPOSITE_DIRECTION (d), &child);
+ 	double dp = GFS_STATE (cell)->f[d].un*ftt_cell_size (cell)/GFS_STATE (cell)->f[d].v;
+ 	double p = GFS_VALUE (cell, v) - 3.*dp/4.;
+ 	for (i = 0; i < n; i++) {
+ 	  GFS_VALUE (child.c[i], v) = p;
+ 	  gts_fifo_push (fifo, child.c[i]);
+ 	}
+ #endif
+       }
+     }
+   }
+   gts_fifo_destroy (fifo);
+ 
+   if (vol > 0.)
+     avg /= vol;
+ 
+   while ((cell = gts_fifo_pop (column)))
+     GFS_VALUE (cell, v) = avg;
+   gts_fifo_destroy (column);
+ }
+ 
+ static gboolean variable_average_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (GTS_OBJECT_CLASS (gfs_variable_function_class ())->parent_class)->event)
+       (event, sim)) {
+     GfsVariable * v = GFS_VARIABLE (event);
+     GfsVariableAverage * av = GFS_VARIABLE_AVERAGE (v);
+     gfs_domain_cell_traverse_boundary (v->domain, 2*av->c,
+ 				       FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 				       (FttCellTraverseFunc) average, av);
+     gfs_domain_bc (v->domain, FTT_TRAVERSE_LEAFS, -1, v);
+     return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ static void variable_average_class_init (GtsObjectClass * klass)
+ {
+   klass->read = variable_average_read;
+   klass->write = variable_average_write;
+   GFS_EVENT_CLASS (klass)->event = variable_average_event;
+ }
+ 
+ static void variable_average_init (GfsVariable * v)
+ {
+   v->coarse_fine = (GfsVariableFineCoarseFunc) gfs_cell_coarse_fine;
+ }
+ 
+ GfsVariableClass * gfs_variable_average_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsVariableAverage",
+       sizeof (GfsVariableAverage),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) variable_average_class_init,
+       (GtsObjectInitFunc) variable_average_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_function_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsVariableAverage} */
+ 
+ /**
+  * The hydrostatic pressure
+  * \beginobject{GfsHydrostaticPressure}
+  */
+ 
+ static FttComponent hydrostatic_component (GfsDomain * domain)
+ {
+   GfsVariable ** u = gfs_domain_velocity (domain);
+   FttComponent c;
+   for (c = 0; c < FTT_DIMENSION; c++)
+     if (u[c]->sources) {
+       GSList * i = GTS_SLIST_CONTAINER (u[c]->sources)->items;      
+       while (i) {
+ 	GfsSourceGeneric * s = i->data;
+ 	if (s->face_value)
+ 	  return c;
+ 	i = i->next;
+       }
+     }
+   return FTT_DIMENSION;
+ }
+ 
+ static void hydrostatic_pressure_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_hydrostatic_pressure_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsHydrostaticPressure * ph = GFS_HYDROSTATIC_PRESSURE (*o);
+   ph->c = hydrostatic_component (GFS_VARIABLE (*o)->domain);
+   if (ph->c == FTT_DIMENSION) {
+     gts_file_error (fp, "could not find any velocity sources");
+     return;
+   }
+ 
+   GFS_VARIABLE (*o)->units = 2.;
+ }
+ 
+ static gboolean hydrostatic_pressure_event (GfsEvent * event, GfsSimulation * sim)
+ {
+   if ((* GFS_EVENT_CLASS (gfs_variable_class ())->event) (event, sim)) {
+     gfs_hydrostatic_pressure_update (GFS_HYDROSTATIC_PRESSURE (event), sim->physical_params.alpha);
+     return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ static void hydrostatic_pressure_class_init (GtsObjectClass * klass)
+ {
+   klass->read = hydrostatic_pressure_read;
+   GFS_EVENT_CLASS (klass)->event = hydrostatic_pressure_event;
+ }
+ 
+ static void hydrostatic_pressure_init (GfsVariable * v)
+ {
+   GFS_EVENT (v)->start = -1;
+   v->coarse_fine = (GfsVariableFineCoarseFunc) gfs_cell_coarse_fine;
+ }
+ 
+ GfsVariableClass * gfs_hydrostatic_pressure_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsHydrostaticPressure",
+       sizeof (GfsHydrostaticPressure),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) hydrostatic_pressure_class_init,
+       (GtsObjectInitFunc) hydrostatic_pressure_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ static void hydrostatic_pressure (FttCell * cell, GfsVariable * v)
+ {
+   FttDirection d = 2*GFS_HYDROSTATIC_PRESSURE (v)->c + 1;
+   GtsFifo * fifo = gts_fifo_new ();
+ 
+   GFS_VALUE (cell, v) = 0.;
+   gts_fifo_push (fifo, cell);
+ 
+   while ((cell = gts_fifo_pop (fifo))) {
+     FttCell * neighbor = ftt_cell_neighbor (cell, d);
+     if (neighbor) {
+       if (FTT_CELL_IS_LEAF (neighbor)) {
+ 	if (ftt_cell_level (neighbor) == ftt_cell_level (cell)) {
+ 	  /* neighbor at same level */
+ 	  double dp = GFS_STATE (cell)->f[d].un*ftt_cell_size (cell)/GFS_STATE (cell)->f[d].v;
+ 	  GFS_VALUE (neighbor, v) = GFS_VALUE (cell, v) - dp;
+ 	  gts_fifo_push (fifo, neighbor);
+ 	}
+ 	else {
+ 	  /* coarser neighbour */
+ 	  if (gts_fifo_top (fifo) == NULL) { /* only consider the last fine cell */
+ 	    FttDirection od = FTT_OPPOSITE_DIRECTION (d);
+ 	    double dp = GFS_STATE (neighbor)->f[od].un*ftt_cell_size (neighbor)/
+ 	      GFS_STATE (neighbor)->f[od].v;
+ 	    double p = 0.;
+ 	    FttCellChildren child;
+ 	    int i, n = ftt_cell_children_direction (ftt_cell_parent (cell), d, &child);
+ 	    for (i = 0; i < n; i++)
+ 	      p += GFS_VALUE (child.c[i], v);
+ 	    GFS_VALUE (neighbor, v) = p/n - 3.*dp/4.;
+ 	    gts_fifo_push (fifo, neighbor);
+ 	  }
+ 	}
+       }
+       else {
+ 	/* finer neighbor */
+ 	FttCellChildren child;
+ 	int i, n = ftt_cell_children_direction (neighbor, FTT_OPPOSITE_DIRECTION (d), &child);
+ 	double dp = GFS_STATE (cell)->f[d].un*ftt_cell_size (cell)/GFS_STATE (cell)->f[d].v;
+ 	double p = GFS_VALUE (cell, v) - 3.*dp/4.;
+ 	for (i = 0; i < n; i++) {
+ 	  GFS_VALUE (child.c[i], v) = p;
+ 	  gts_fifo_push (fifo, child.c[i]);
+ 	}
+       }
+     }
+   }
+ 
+   gts_fifo_destroy (fifo);
+ }
+ 
+ /**
+  * gfs_hydrostatic_pressure_update:
+  * @p: a #GfsHydrostaticPressure.
+  * @alpha: the reciprocal of density or %NULL.
+  *
+  * Updates the hydrostatic pressure field @p. Note that face
+  * velocities are also reset.
+  */
+ void gfs_hydrostatic_pressure_update (GfsHydrostaticPressure * p, GfsFunction * alpha)
+ {
+   g_return_if_fail (p != NULL);
+ 
+   GfsVariable * v = GFS_VARIABLE (p);
+   gfs_domain_face_traverse (v->domain, FTT_XYZ,
+ 			    FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 			    (FttFaceTraverseFunc) gfs_face_reset_normal_velocity, NULL);
+   gfs_velocity_face_sources (v->domain, gfs_domain_velocity (v->domain), 1., NULL, NULL);
+   gfs_poisson_coefficients (v->domain, alpha, TRUE, TRUE, TRUE);
+   gfs_domain_cell_traverse_boundary (v->domain, 2*p->c,
+ 				     FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 				     (FttCellTraverseFunc) hydrostatic_pressure, p);
+   gfs_domain_bc (v->domain, FTT_TRAVERSE_LEAFS, -1, v);
+ }
+ 
+ /** \endobject{GfsHydrostaticPressure} */
+ 
+ /**
++>>>>>>> upstream/20131206+dfsg
   * Spatially-constant but time-dependent variables.
   * \beginobject{GfsConstant}
   */
diff --cc src/variable.h
index 309c52c,cd7600e..199696d
--- a/src/variable.h
+++ b/src/variable.h
@@@ -87,6 -91,9 +91,12 @@@ void                  gfs_variables_swa
  						     GfsVariable * v2);
  void                  gfs_variable_set_vector       (GfsVariable ** v,
  						     guint n);
++<<<<<<< HEAD
++=======
+ void                  gfs_variable_set_tensor       (GfsVariable * t[2][2]);
+ GfsVariable *         gfs_variable_clone            (GfsVariable * v, 
+ 						     gchar * name);
++>>>>>>> upstream/20131206+dfsg
  
  /* GfsVariableBoolean: header */
  
@@@ -185,6 -192,26 +195,29 @@@ GfsVariableClass * gfs_variable_stream_
  
  GfsVariableClass * gfs_variable_age_class  (void);
  
++<<<<<<< HEAD
++=======
+ /* GfsVariableAverage: header */
+ 
+ typedef struct _GfsVariableAverage                GfsVariableAverage;
+ 
+ struct _GfsVariableAverage {
+   /*< private >*/
+   GfsVariableFunction parent;
+ 
+   /*< public >*/
+   FttComponent c;
+ };
+ 
+ #define GFS_VARIABLE_AVERAGE(obj)            GTS_OBJECT_CAST (obj,\
+ 					           GfsVariableAverage,\
+ 					           gfs_variable_average_class ())
+ #define GFS_IS_VARIABLE_AVERAGE(obj)         (gts_object_is_from_class (obj,\
+ 					     gfs_variable_average_class ()))
+ 
+ GfsVariableClass * gfs_variable_average_class  (void);
+ 
++>>>>>>> upstream/20131206+dfsg
  /* GfsDerivedVariable: Header */
  
  struct _GfsDerivedVariable {
@@@ -249,6 -276,54 +282,57 @@@ struct _GfsSpatialSum 
  
  GfsEventClass * gfs_spatial_sum_class  (void);
  
++<<<<<<< HEAD
++=======
+ /* GfsVariablePoisson: Header */
+ 
+ typedef struct _GfsVariablePoisson                GfsVariablePoisson;
+ 
+ struct _GfsVariablePoisson {
+   /*< private >*/
+   GfsVariableFunction parent;
+ 
+   /*< public >*/
+   GfsMultilevelParams par;
+ };
+ 
+ #define GFS_VARIABLE_POISSON(obj)            GTS_OBJECT_CAST (obj,\
+ 					           GfsVariablePoisson,\
+ 					           gfs_variable_poisson_class ())
+ #define GFS_IS_VARIABLE_POISSON(obj)         (gts_object_is_from_class (obj,\
+ 					     gfs_variable_poisson_class ()))
+ 
+ GfsVariableClass * gfs_variable_poisson_class  (void);
+ 
+ /* GfsVariableLaplacian: Header */
+ 
+ #define GFS_IS_VARIABLE_LAPLACIAN(obj)         (gts_object_is_from_class (obj,\
+ 					     gfs_variable_laplacian_class ()))
+ 
+ GfsVariableClass * gfs_variable_laplacian_class  (void);
+ 
+ /* GfsHydrostaticPressure: Header */
+ 
+ typedef struct _GfsHydrostaticPressure GfsHydrostaticPressure;
+ 
+ /** \instance{GfsHydrostaticPressure} */
+ struct _GfsHydrostaticPressure {
+   /*< private >*/
+   GfsVariable parent;
+   FttComponent c;
+ };
+ 
+ #define GFS_HYDROSTATIC_PRESSURE(obj)            GTS_OBJECT_CAST (obj,\
+ 					         GfsHydrostaticPressure,\
+ 					         gfs_hydrostatic_pressure_class ())
+ #define GFS_IS_HYDROSTATIC_PRESSURE(obj)         (gts_object_is_from_class (obj,\
+ 						 gfs_hydrostatic_pressure_class ()))
+ 
+ GfsVariableClass * gfs_hydrostatic_pressure_class  (void);
+ void               gfs_hydrostatic_pressure_update (GfsHydrostaticPressure * p, 
+ 						    GfsFunction * alpha);
+ 
++>>>>>>> upstream/20131206+dfsg
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
diff --cc src/version.h
index 06fcc0f,4924bf7..b0c81b7
--- a/src/version.h
+++ b/src/version.h
@@@ -6,6 -6,6 +6,10 @@@
  #ifndef GFSVERSION_H
  #define GFSVERSION_H
  
++<<<<<<< HEAD
 +#define GFS_BUILD_VERSION "110330-091912"
++=======
+ #define GFS_BUILD_VERSION "131206-155120"
++>>>>>>> upstream/20131206+dfsg
  
  #endif /* GFSVERSION_H */
diff --cc src/vof.c
index 1cd3d09,455e5eb..c0c01c2
--- a/src/vof.c
+++ b/src/vof.c
@@@ -1295,38 -1357,64 +1357,79 @@@ static void vof_cell_fine_init (FttCel
      for (j = 0; j < 7; j++)
        P[i + 1] += m[i][j]*div[j + 1];
    }
-   GFS_STATE (child.c[0])->f[0].un = GFS_STATE (child.c[1])->f[1].un = P[1] - P[0];
-   GFS_STATE (child.c[2])->f[0].un = GFS_STATE (child.c[3])->f[1].un = P[3] - P[2];
-   GFS_STATE (child.c[0])->f[3].un = GFS_STATE (child.c[2])->f[2].un = P[0] - P[2];
-   GFS_STATE (child.c[1])->f[3].un = GFS_STATE (child.c[3])->f[2].un = P[1] - P[3];
+   if (child.c[0]) {
+     GFS_STATE (child.c[0])->f[0].un = P[1] - P[0];
+     GFS_STATE (child.c[0])->f[3].un = P[0] - P[2];
+     GFS_STATE (child.c[0])->f[5].un = P[0] - P[4];
+   }
+   if (child.c[1]) {
+     GFS_STATE (child.c[1])->f[1].un = P[1] - P[0];
+     GFS_STATE (child.c[1])->f[3].un = P[1] - P[3];
+     GFS_STATE (child.c[1])->f[5].un = P[1] - P[5];
+   }
+   if (child.c[2]) {
+     GFS_STATE (child.c[2])->f[0].un = P[3] - P[2];
+     GFS_STATE (child.c[2])->f[2].un = P[0] - P[2];
+     GFS_STATE (child.c[2])->f[5].un = P[2] - P[6];
+   }
+   if (child.c[3]) {
+     GFS_STATE (child.c[3])->f[1].un = P[3] - P[2];
+     GFS_STATE (child.c[3])->f[2].un = P[1] - P[3];
+     GFS_STATE (child.c[3])->f[5].un = P[3] - P[7];
+   }
+   if (child.c[4]) {
+     GFS_STATE (child.c[4])->f[0].un = P[5] - P[4];
+     GFS_STATE (child.c[4])->f[3].un = P[4] - P[6];
+     GFS_STATE (child.c[4])->f[4].un = P[0] - P[4];
+   }
+   if (child.c[5]) {
+     GFS_STATE (child.c[5])->f[1].un = P[5] - P[4];
+     GFS_STATE (child.c[5])->f[3].un = P[5] - P[7];
+     GFS_STATE (child.c[5])->f[4].un = P[1] - P[5];
+   }
+   if (child.c[6]) {
+     GFS_STATE (child.c[6])->f[0].un = P[7] - P[6];
+     GFS_STATE (child.c[6])->f[2].un = P[4] - P[6];
+     GFS_STATE (child.c[6])->f[4].un = P[2] - P[6];
+   }
+   if (child.c[7]) {
+     GFS_STATE (child.c[7])->f[1].un = P[7] - P[6];
+     GFS_STATE (child.c[7])->f[2].un = P[5] - P[7];
+     GFS_STATE (child.c[7])->f[4].un = P[3] - P[7];
+   }
+ #endif /* 3D */
+ }
  
-   GFS_STATE (child.c[4])->f[0].un = GFS_STATE (child.c[5])->f[1].un = P[5] - P[4];
-   GFS_STATE (child.c[6])->f[0].un = GFS_STATE (child.c[7])->f[1].un = P[7] - P[6];
-   GFS_STATE (child.c[4])->f[3].un = GFS_STATE (child.c[6])->f[2].un = P[4] - P[6];
-   GFS_STATE (child.c[5])->f[3].un = GFS_STATE (child.c[7])->f[2].un = P[5] - P[7];
+ /* Same as vof_cell_fine_init() but initialisation of MAC velocities
+    is done through a GfsVariableStreamFunction */
+ static void vof_cell_fine_init_with_streamfunction (FttCell * parent, VofParms * p)
+ {
+   gfs_cell_fine_init (parent, p->domain);
  
-   GFS_STATE (child.c[0])->f[5].un = GFS_STATE (child.c[4])->f[4].un = P[0] - P[4];
-   GFS_STATE (child.c[1])->f[5].un = GFS_STATE (child.c[5])->f[4].un = P[1] - P[5];
-   GFS_STATE (child.c[2])->f[5].un = GFS_STATE (child.c[6])->f[4].un = P[2] - P[6];
-   GFS_STATE (child.c[3])->f[5].un = GFS_STATE (child.c[7])->f[4].un = P[3] - P[7];
- #endif /* 3D */
+   FttCellChildren child;
+   guint n;
+   ftt_cell_children (parent, &child);
+   for (n = 0; n < FTT_CELLS; n++) {
+     g_assert (child.c[n]);
+     GFS_VALUE (child.c[n], p->vpar.v) = GFS_VALUE (parent, p->vpar.v);
+   }
  }
  
 +/* Same as vof_cell_fine_init() but initialisation of MAC velocities
 +   is done through a GfsVariableStreamFunction */
 +static void vof_cell_fine_init_with_streamfunction (FttCell * parent, VofParms * p)
 +{
 +  gfs_cell_fine_init (parent, p->domain);
 +
 +  FttCellChildren child;
 +  guint n;
 +  ftt_cell_children (parent, &child);
 +  for (n = 0; n < FTT_CELLS; n++) {
 +    g_assert (child.c[n]);
 +    GFS_VALUE (child.c[n], p->vpar.v) = GFS_VALUE (parent, p->vpar.v);
 +  }
 +}
 +
  static void refine_too_coarse (FttCell * cell, VofParms * p)
  {
    if (TOO_COARSE (cell)) {
@@@ -1420,36 -1618,36 +1633,66 @@@ static void f_over_dV (FttCell * cell, 
    GFS_VALUE (cell, p->par->v) = f < 1e-10 ? 0. : f > 1. - 1e-10 ? 1. : f;
  }
  
- /* refine cells which would lead to a loss of resolution at the interface */
- static void fix_too_coarse (GfsDomain * domain, VofParms * p)
+ static void concentration_over_dV (FttCell * cell, VofParms * p)
  {
++<<<<<<< HEAD
 +  p->depth = 0;
 +  p->domain = domain;
 +  p->too_coarse = 0;
 +  gfs_domain_face_traverse (domain, p->c,
 +			    FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			    (FttFaceTraverseFunc) face_too_coarse, p);
 +  gboolean streamfunction = FALSE;
 +#if FTT_2D
 +  GSList * i = domain->variables;
 +  while (i && !streamfunction) {
 +    streamfunction = (GFS_IS_VARIABLE_STREAM_FUNCTION (i->data) != NULL);
 +    i = i->next;
 +  }
 +#endif /* 2D */ 
 +  domain->cell_init = (FttCellInitFunc) (streamfunction ? 
 +					 vof_cell_fine_init_with_streamfunction : 
 +					 vof_cell_fine_init);
 +  domain->cell_init_data = p;
 +  if (p->too_coarse > 0)
 +    gfs_domain_cell_traverse (domain,
 +			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +			      (FttCellTraverseFunc) refine_too_coarse, p);
 +  gfs_all_reduce (domain, p->too_coarse, MPI_UNSIGNED, MPI_SUM);
 +  if (p->too_coarse > 0)
 +    gfs_domain_reshape (domain, p->depth);
 +  domain->cell_init = (FttCellInitFunc) gfs_cell_fine_init;
 +  domain->cell_init_data = domain;
++=======
+   gdouble f = GFS_VALUE (cell, p->vof);
+   if (f > 0.)
+     GFS_VALUE (cell, p->par->v) = GFS_VALUE (cell, p->par->v)/(GFS_VALUE (cell, p->vpar.v)*f);
+   else
+     GFS_VALUE (cell, p->par->v) = GFS_NODATA;
+ }
+ 
+ static void per_vof_volume (FttCell * cell, GfsVariable * v)
+ {
+   GfsVariable * vof = GFS_VARIABLE (GFS_VARIABLE_VOF_CONCENTRATION (v)->vof);
+   gdouble f = GFS_VALUE (cell, vof);
+   GFS_VALUE (cell, v) = f > 0. ? GFS_VALUE (cell, v)/f : GFS_NODATA;
+ }
+ 
+ static void per_cell_volume (FttCell * cell, GfsVariable * v)
+ {
+   GfsVariable * vof = GFS_VARIABLE (GFS_VARIABLE_VOF_CONCENTRATION (v)->vof);
+   GFS_VALUE (cell, v) *= GFS_VALUE (cell, vof);
+ }
+ 
+ static void add_sink_velocity (FttCell * cell, VofParms * p)
+ {
+   GFS_VALUE (cell, p->u) += gfs_function_value (p->sink, cell);
+ }
+ 
+ static void remove_sink_velocity (FttCell * cell, VofParms * p)
+ {
+   GFS_VALUE (cell, p->u) -= gfs_function_value (p->sink, cell);
++>>>>>>> upstream/20131206+dfsg
  }
  
  /**
@@@ -1496,15 -1703,52 +1748,62 @@@ void gfs_tracer_vof_advection (GfsDomai
      gfs_domain_face_traverse (domain, p.c,
  			      FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
  			      (FttFaceTraverseFunc) vof_flux, &p);
++<<<<<<< HEAD
 +    gfs_domain_traverse_merged (domain, (GfsMergedTraverseFunc) par->update, par);
 +    gfs_domain_traverse_merged (domain, (GfsMergedTraverseFunc) par->update, &p.vpar);
 +    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
 +    			      (FttCellTraverseFunc) f_over_dV, &p);
 +    gfs_domain_cell_traverse (domain, FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
 +			      (FttCellTraverseFunc) par->v->fine_coarse, par->v);
 +    gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, par->v);
++=======
+     j = concentrations;
+     while (j) {
+       GfsAdvectionParams * par = &GFS_VARIABLE_TRACER (j->data)->advection;
+       GfsVariable * fv = p.par->fv;
+       p.par->v = j->data;
+       p.par->fv = par->fv;
+       p.par->gradient = par->gradient;
+       if (par->sink[0]) {
+ 	p.sink = par->sink[p.c];
+ 	gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) add_sink_velocity, &p);
+ 	gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) grad_u, &p);
+ 	for (d = 0; d < FTT_DIMENSION - 1; d++)
+ 	  gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, p.du[d]);
+       }
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) concentration_face_values, &p);
+       gfs_domain_face_bc (domain, p.c, p.par->v);
+       gfs_domain_face_traverse (domain, p.c,
+ 				FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
+ 				(FttFaceTraverseFunc) vof_flux, &p);
+       if (p.sink) {
+ 	gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) remove_sink_velocity, &p);
+ 	p.sink = NULL;
+ 	gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) grad_u, &p);
+ 	for (d = 0; d < FTT_DIMENSION - 1; d++)
+ 	  gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, p.du[d]);
+       }
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) concentration_times_dV, &p);
+       gfs_domain_traverse_merged (domain, (GfsMergedTraverseFunc) par->update, par);
+       p.par->fv = fv;
+       p.par->v = p.vof;
+       j = j->next;
+     }
+     gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) f_times_dV, &p);
+     gfs_domain_traverse_merged (domain, (GfsMergedTraverseFunc) par->update, par);
+     gfs_domain_traverse_merged (domain, (GfsMergedTraverseFunc) par->update, &p.vpar);
+     gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) f_over_dV, &p);
+     j = concentrations;
+     while (j) {
+       p.par->v = j->data;
+       gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) concentration_over_dV, &p);
+       p.par->v = p.vof;
+       j = j->next;
+     }
++>>>>>>> upstream/20131206+dfsg
  
-     variable_tracer_vof_update (p.par->v, domain);
+     /* update VOF data (normals etc...) */
+     (* GFS_VARIABLE_TRACER_VOF_CLASS (GTS_OBJECT (p.par->v)->klass)->update) (p.par->v, domain);
    }
    cstart = (cstart + 1) % FTT_DIMENSION;
    gts_object_destroy (GTS_OBJECT (par->fv));
@@@ -1694,7 -1951,7 +2006,11 @@@ gdouble gfs_vof_facet_distance2 (FttCel
    g_return_val_if_fail (t != NULL, GFS_NODATA);
    g_return_val_if_fail (p != NULL, GFS_NODATA);
  
++<<<<<<< HEAD
 +  if (GFS_IS_FULL (GFS_VALUE (cell, GFS_VARIABLE1 (t))))
++=======
+   if (GFS_IS_FULL (GFS_VALUE (cell, GFS_VARIABLE (t))))
++>>>>>>> upstream/20131206+dfsg
      return GFS_NODATA;
  
    FttVector q, m;
@@@ -2346,8 -2604,11 +2663,16 @@@ gdouble gfs_height_curvature (FttCell 
    /* Could not compute curvature from the simple algorithm along any direction:
     * Try parabola fitting of the collected interface positions */
  
++<<<<<<< HEAD
 +  if (independent_positions (interface, n) < 3*(FTT_DIMENSION - 1))
 +    return GFS_NODATA;
++=======
+   if (independent_positions (interface, n) < 3*(FTT_DIMENSION - 1)) {
+     if (kmax)
+       *kmax = GFS_NODATA;
+     return GFS_NODATA;
+   }
++>>>>>>> upstream/20131206+dfsg
  
    gdouble h = ftt_cell_size (cell);
    ParabolaFit fit;
@@@ -2379,45 -2640,1073 +2704,1082 @@@
    return kappa;
  }
  
+ /* Returns: the height @h of the neighboring column in direction @d or
+    GFS_NODATA if it is undefined. Also fills @x with the coordinates
+    of the cell (3/4, 1 or 3/2 depending on its relative level). */
+ static gdouble neighboring_column (FttCell * cell, 
+ 				   GfsVariable * h, FttComponent c, gdouble orientation,
+ 				   FttDirection d, gdouble * x)
+ {
+   FttCell * n = ftt_cell_neighbor (cell, d);
+   if (!n)
+     return GFS_NODATA;
+   if (ftt_cell_level (cell) == ftt_cell_level (n)) {
+     if (GFS_HAS_DATA (n, h)) {
+       *x = 1.;
+       return GFS_VALUE (n, h);
+     }
+     else if (FTT_CELL_IS_LEAF (n))
+       return GFS_NODATA;
+     /* check finer neighbors */
+     FttCellChildren child;
+     int i, m = ftt_cell_children_direction (n, FTT_OPPOSITE_DIRECTION (d), &child);
+     for (i = 0; i < m; i++)
+       if (child.c[i] && GFS_HAS_DATA (child.c[i], h)) {
+ 	FttVector p;
+ 	ftt_cell_relative_pos (child.c[i], &p);
+ 	*x = 3./4.;
+ 	return GFS_VALUE (child.c[i], h)/2. + orientation*(&p.x)[c];
+       }
+     return GFS_NODATA;
+   }
+   else if (GFS_HAS_DATA (n, h)) {
+     /* coarser neighbor */
+     FttVector p;
+     ftt_cell_relative_pos (cell, &p);
+     *x = 3./2.;
+     return (GFS_VALUE (n, h) - orientation*(&p.x)[c])*2.;
+   }
+   return GFS_NODATA;
+ }
+ 
+ static void curvature_from_h (FttCell * cell, GfsDomain * domain,
+ 			      gdouble x[3], gdouble h[3],
+ 			      gdouble orientation, FttComponent c,
+ 			      gdouble * kappa, gdouble * kmax)
+ {
+   gdouble size = ftt_cell_size (cell);
+   gdouble det = x[0]*x[1]*(x[0] - x[1]), a = x[1]*(h[0] - h[2]), b = x[0]*(h[1] - h[2]);
+   gdouble hxx = 2.*(a - b)/det;
+   gdouble hx = (x[0]*b - x[1]*a)/det;
+   gdouble dnm = 1. + hx*hx;
+   *kappa = hxx/(size*sqrt (dnm*dnm*dnm));
+   if (kmax)
+     *kmax = fabs (*kappa);
+   if (GFS_IS_AXI (domain)) {
+     FttVector p;
+     ftt_cell_pos (cell, &p);
+     gdouble nr, r = p.y;
+     if (c == FTT_X)
+       nr = hx;
+     else {
+       r += orientation*h[2]*size;
+       nr = - orientation;
+     }
+     /* limit the minimum radius to half the grid size */
+     gdouble kaxi = nr/MAX (sqrt(dnm)*r, size/2.);
+     *kappa += kaxi;
+     if (kmax)
+       *kmax = MAX (*kmax, fabs (kaxi));
+   }
+ }
+ 
  /**
-  * gfs_vof_correctness:
+  * gfs_curvature_along_direction:
   * @cell: a #FttCell.
-  * @t: a #GfsVariableTracerVOF.
+  * @t: a #GfsVariableTracerVOFHeight.
+  * @c: x, y or z.
+  * @kappa: the curvature.
+  * @kmax: the maximum curvature.
   *
++<<<<<<< HEAD
 + * An implementation of the criterion of Cerne, Petelin, Tiselj
 + * (2002), to measure how well an interface is represented by a local
 + * VOF field.
++=======
+  * Tries to compute an interface curvature for @cell using
+  * height-functions on equally-spaced columns in direction @c.
++>>>>>>> upstream/20131206+dfsg
   *
-  * Returns: the "correctness" of the interface representation.
+  * Returns: %TRUE if the curvature was successfully computed, %FALSE
+  * otherwise.
   */
- gdouble gfs_vof_correctness (FttCell * cell, GfsVariableTracerVOF * t)
+ gboolean gfs_curvature_along_direction (FttCell * cell, 
+ 					GfsVariableTracerVOFHeight * t,
+ 					FttComponent c,
+ 					gdouble * kappa,
+ 					gdouble * kmax)
  {
-   GfsVariable * v = GFS_VARIABLE1 (t);
-   gdouble F(3,3,3);
-   
-   g_return_val_if_fail (cell != NULL, 0.);
-   g_return_val_if_fail (t != NULL, 0.);
+   g_return_val_if_fail (cell != NULL, FALSE);
+   g_return_val_if_fail (t != NULL, FALSE);
+   g_return_val_if_fail (kappa != NULL, FALSE);
  
-   if (GFS_VALUE (cell, v) <= 0. || GFS_VALUE (cell, v) >= 1.)
-     return 1.;
+ #ifdef FTT_2D
+   gdouble orientation;
+   GfsVariable * hv = gfs_closest_height (cell, t, c, &orientation);
+   if (!hv)
+     return FALSE;
+   else if (fabs (GFS_VALUE (cell, hv)) > 1.)
+     return FALSE; /* interface is too far */
+ 
+   FttComponent oc = FTT_ORTHOGONAL_COMPONENT (c);
+   gdouble x[3], h[3];
+   h[2] = GFS_VALUE (cell, hv); x[2] = 0.;
+   h[0] = neighboring_column (cell, hv, c, orientation, 2*oc, &x[0]);
+   if (h[0] != GFS_NODATA && x[0] == 1.) {
+     h[1] = neighboring_column (cell, hv, c, orientation, 2*oc + 1, &x[1]);
+     if (h[1] != GFS_NODATA && x[1] == 1.) {
+       x[1] = - x[1];
+       curvature_from_h (cell, GFS_VARIABLE (t)->domain, x, h, orientation, c, kappa, kmax);
+       return TRUE;
+     }
+   }
+ #else /* 3D */
+   g_assert_not_implemented ();
+ #endif /* 3D */
  
-   stencil (cell, v, f);
- #if FTT_2D
-   gdouble dx = f[2][0] + f[2][1] + f[2][2] - f[0][0] - f[0][1] - f[0][2];
-   gdouble dy = f[0][2] + f[1][2] + f[2][2] - f[0][0] - f[1][0] - f[2][0];
-   return sqrt ((dx*dx + dy*dy)/9.);
- #else
-   gdouble dx = (f[2][0][0] + f[2][1][0] + f[2][2][0] - f[0][0][0] - f[0][1][0] - f[0][2][0] +
- 		f[2][0][1] + f[2][1][1] + f[2][2][1] - f[0][0][1] - f[0][1][1] - f[0][2][1] +
- 		f[2][0][2] + f[2][1][2] + f[2][2][2] - f[0][0][2] - f[0][1][2] - f[0][2][2]);
-   gdouble dy = (f[0][2][0] + f[1][2][0] + f[2][2][0] - f[0][0][0] - f[1][0][0] - f[2][0][0] +
- 		f[0][2][1] + f[1][2][1] + f[2][2][1] - f[0][0][1] - f[1][0][1] - f[2][0][1] +
- 		f[0][2][2] + f[1][2][2] + f[2][2][2] - f[0][0][2] - f[1][0][2] - f[2][0][2]);
-   gdouble dz = (f[0][0][2] + f[1][0][2] + f[2][0][2] - f[0][0][0] - f[1][0][0] - f[2][0][0] +
- 		f[0][1][2] + f[1][1][2] + f[2][1][2] - f[0][1][0] - f[1][1][0] - f[2][1][0] +
- 		f[0][2][2] + f[1][2][2] + f[2][2][2] - f[0][2][0] - f[1][2][0] - f[2][2][0]);  
-   return sqrt ((dx*dx + dy*dy + dz*dz)/27.);
- #endif
+   return FALSE;
+ }
+ 
+ static gboolean curvature_along_direction_new (FttCell * cell, 
+ 					       GfsVariableTracerVOFHeight * t,
+ 					       FttComponent c,
+ 					       gdouble * kappa,
+ 					       gdouble * kmax,
+ 					       GtsVector * interface,
+ 					       guint * nb)
+ {
+ #ifdef FTT_2D
+   gdouble orientation;
+   GfsVariable * hv = gfs_closest_height (cell, t, c, &orientation);
+   FttComponent oc = FTT_ORTHOGONAL_COMPONENT (c);
+   if (!hv) {
+     /* no data for either directions, look "right" and "left" to
+        collect potential interface positions */
+     hv = gfs_closest_height (ftt_cell_neighbor (cell, 2*oc), t, c, &orientation);
+     if (!hv)
+       hv = gfs_closest_height (ftt_cell_neighbor (cell, 2*oc + 1), t, c, &orientation);
+     if (!hv) /* give up */
+       return FALSE;
+   }
+   else if (fabs (GFS_VALUE (cell, hv)) > 1.)
+     return FALSE; /* interface is too far */
+ 
+   gdouble x[3], h[3];
+   h[2] = GFS_VALUE (cell, hv); x[2] = 0.;
+   h[0] = neighboring_column (cell, hv, c, orientation, 2*oc, &x[0]);
+   h[1] = neighboring_column (cell, hv, c, orientation, 2*oc + 1, &x[1]);
+   x[1] = - x[1];
+ 
+   if (h[2] != GFS_NODATA && h[0] != GFS_NODATA && h[1] != GFS_NODATA) {
+     curvature_from_h (cell, GFS_VARIABLE (t)->domain, x, h, orientation, c, kappa, kmax);
+     return TRUE;
+   }
+   else { /* h[2] == GFS_NODATA || h[0] == GFS_NODATA || h[1] == GFS_NODATA */
+     /* collect interface positions (based on height function) */
+     int i;
+     for (i = 0; i < 3; i++)
+       if (h[i] != GFS_NODATA) {
+ 	interface[*nb][oc] = x[i];
+ 	interface[(*nb)++][c] = orientation*h[i]; 
+       }
+     return FALSE;
+   }
+ #else /* 3D */
+   g_assert_not_implemented ();
+ #endif /* 3D */
+ 
+   return FALSE;
+ }
+ 
+ /**
+  * gfs_height_curvature_new:
+  * @cell: a #FttCell containing an interface.
+  * @t: a #GfsVariableTracerVOFHeight.
+  * @kmax: a pointer or %NULL.
+  *
+  * Tries to estimate the curvature of an interface using
+  * height-functions, either on equally-spaced columns, non-equally
+  * spaced columns or using parabola fits of interface positions
+  * defined using the height-functions in all directions.
+  *
+  * If @kmax is not %NULL, it is filled with the absolute value of the
+  * maximum surface curvature (note that in 2D this is just the
+  * absolute value of the mean curvature).
+  *
+  * Returns: (double in 3D) the mean curvature of the interface
+  * contained in @cell, or %GFS_NODATA if the HF method could not
+  * compute a consistent curvature.
+  */
+ gdouble gfs_height_curvature_new (FttCell * cell, GfsVariableTracerVOFHeight * t, 
+ 				  gdouble * kmax)
+ {
+   g_return_val_if_fail (cell != NULL, 0.);
+   g_return_val_if_fail (t != NULL, 0.);
+ 
+   GfsVariable * v = GFS_VARIABLE (t);
+   gdouble f = GFS_VALUE (cell,  v);
+   g_return_val_if_fail (!GFS_IS_FULL (f), 0.);
+ 
+   FttVector m;
+   FttComponent c;
+   for (c = 0; c < FTT_DIMENSION; c++)
+     (&m.x)[c] = GFS_VALUE (cell, GFS_VARIABLE_TRACER_VOF (t)->m[c]);
+ 
+   FttComponent try[FTT_DIMENSION];
+   orientation (&m, try); /* sort directions according to normal */
+ 
+   gdouble kappa = 0.;
+   GtsVector interface[FTT_DIMENSION*NI];
+   guint n = 0;
+   for (c = 0; c < FTT_DIMENSION; c++) /* try each direction */
+     if (curvature_along_direction_new (cell, t, try[c], &kappa, kmax, interface, &n))
+       return kappa;
+ 
+   /* Could not compute curvature from the simple algorithm along any direction:
+    * Try parabola fitting of the collected interface positions */
+ 
+   if (independent_positions (interface, n) < 3*(FTT_DIMENSION - 1))
+     return GFS_NODATA;
+ 
+   gdouble h = ftt_cell_size (cell);
+   ParabolaFit fit;
+   guint j;
+   
+   FttVector p, fc;
+   ftt_cell_pos (cell, &p);
+   gdouble area = gfs_vof_center (cell, GFS_VARIABLE_TRACER_VOF (t), &fc);
+   fc.x = (fc.x - p.x)/h;
+   fc.y = (fc.y - p.y)/h;
+   fc.z = (fc.z - p.z)/h;
+   parabola_fit_init (&fit, &fc, &m);
+ #if FTT_2D
+   parabola_fit_add (&fit, &fc.x, PARABOLA_FIT_CENTER_WEIGHT);
+ #elif !PARABOLA_SIMPLER
+   parabola_fit_add (&fit, &fc.x, area*100.);
+ #endif
+   for (j = 0; j < n; j++)
+     parabola_fit_add (&fit, interface[j], 1.);
+   parabola_fit_solve (&fit);
+   kappa = parabola_fit_curvature (&fit, 2., kmax)/h;
+   if (kmax)
+     *kmax /= h;
+ #if FTT_2D
+   if (GFS_IS_AXI (v->domain))
+     parabola_fit_axi_curvature (&fit, fc.y*h + p.y, h, &kappa, kmax);
+ #endif
+   parabola_fit_destroy (&fit);
+   return kappa;
+ }
+ 
+ /**
+  * gfs_vof_correctness:
+  * @cell: a #FttCell.
+  * @t: a #GfsVariableTracerVOF.
+  *
+  * An implementation of the criterion of Cerne, Petelin, Tiselj
+  * (2002), to measure how well an interface is represented by a local
+  * VOF field.
+  *
+  * Returns: the "correctness" of the interface representation.
+  */
+ gdouble gfs_vof_correctness (FttCell * cell, GfsVariableTracerVOF * t)
+ {
+   GfsVariable * v = GFS_VARIABLE (t);
+   gdouble F(3,3,3);
+   
+   g_return_val_if_fail (cell != NULL, 0.);
+   g_return_val_if_fail (t != NULL, 0.);
+ 
+   if (GFS_VALUE (cell, v) <= 0. || GFS_VALUE (cell, v) >= 1.)
+     return 1.;
+ 
+   stencil (cell, v, f);
+ #if FTT_2D
+   gdouble dx = f[2][0] + f[2][1] + f[2][2] - f[0][0] - f[0][1] - f[0][2];
+   gdouble dy = f[0][2] + f[1][2] + f[2][2] - f[0][0] - f[1][0] - f[2][0];
+   return sqrt ((dx*dx + dy*dy)/9.);
+ #else
+   gdouble dx = (f[2][0][0] + f[2][1][0] + f[2][2][0] - f[0][0][0] - f[0][1][0] - f[0][2][0] +
+ 		f[2][0][1] + f[2][1][1] + f[2][2][1] - f[0][0][1] - f[0][1][1] - f[0][2][1] +
+ 		f[2][0][2] + f[2][1][2] + f[2][2][2] - f[0][0][2] - f[0][1][2] - f[0][2][2]);
+   gdouble dy = (f[0][2][0] + f[1][2][0] + f[2][2][0] - f[0][0][0] - f[1][0][0] - f[2][0][0] +
+ 		f[0][2][1] + f[1][2][1] + f[2][2][1] - f[0][0][1] - f[1][0][1] - f[2][0][1] +
+ 		f[0][2][2] + f[1][2][2] + f[2][2][2] - f[0][0][2] - f[1][0][2] - f[2][0][2]);
+   gdouble dz = (f[0][0][2] + f[1][0][2] + f[2][0][2] - f[0][0][0] - f[1][0][0] - f[2][0][0] +
+ 		f[0][1][2] + f[1][1][2] + f[2][1][2] - f[0][1][0] - f[1][1][0] - f[2][1][0] +
+ 		f[0][2][2] + f[1][2][2] + f[2][2][2] - f[0][2][0] - f[1][2][0] - f[2][2][0]);  
+   return sqrt ((dx*dx + dy*dy + dz*dz)/27.);
+ #endif
  }
  
  /** \endobject{GfsVariableTracerVOF} */
++<<<<<<< HEAD
++=======
+ 
+ /** \beginobject{GfsVariableVOFConcentration} */
+ 
+ static void variable_vof_concentration_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_vof_concentration_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+   
+   if (fp->type != GTS_STRING) {
+     gts_file_error (fp, "expecting a string (name)");
+     return;
+   }
+   GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
+   GfsVariable * v = gfs_variable_from_name (domain->variables, fp->token->str);  
+   if (v == NULL) {
+     gts_file_error (fp, "unknown variable `%s'", fp->token->str);
+     return;
+   }
+   if (!GFS_IS_VARIABLE_TRACER_VOF (v)) {
+     gts_file_error (fp, "variable `%s' is not a VOF tracer", fp->token->str);
+     return;
+   }
+   GfsVariableTracerVOF * vof = GFS_VARIABLE_TRACER_VOF (v);
+   GFS_VARIABLE_VOF_CONCENTRATION (*o)->vof = vof;
+   gts_container_add (GTS_CONTAINER (vof->concentrations), GTS_CONTAINEE (*o));
+   gts_file_next_token (fp);
+ }
+ 
+ static void variable_vof_concentration_write (GtsObject * o, FILE * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_vof_concentration_class ())->parent_class->write) (o, fp);
+   fprintf (fp, " %s", GFS_VARIABLE (GFS_VARIABLE_VOF_CONCENTRATION (o)->vof)->name);
+ }
+ 
+ static void variable_vof_concentration_class_init (GtsObjectClass * klass)
+ {
+   klass->read = variable_vof_concentration_read;
+   klass->write = variable_vof_concentration_write;
+ }
+ 
+ static void variable_vof_concentration_init (GfsVariable * v)
+ {
+   /* this is taken care of by the associated VOF tracer */
+   v->fine_coarse = v->coarse_fine = no_coarse_fine;
+   GFS_VARIABLE_TRACER (v)->advection.scheme = GFS_NONE;
+ }
+ 
+ GfsVariableClass * gfs_variable_vof_concentration_class (void)
+ {
+   static GfsVariableClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsVariableVOFConcentration",
+       sizeof (GfsVariableVOFConcentration),
+       sizeof (GfsVariableClass),
+       (GtsObjectClassInitFunc) variable_vof_concentration_class_init,
+       (GtsObjectInitFunc) variable_vof_concentration_init,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_tracer_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /** \endobject{GfsVariableVOFConcentration} */
+ 
+ /** \beginobject{GfsVariableTracerVOFHeight} */
+ 
+ typedef struct {
+   GfsVariable * f; /* volume fraction */
+   GfsVariable * hb, * ht; /* heights in either orientation */
+   GfsBc * angle; /* contact angle BC */
+   FttComponent c; /* x, y or z */
+   FttDirection d;
+ } HFState;
+ 
+ static gboolean is_interfacial (FttCell * cell, gpointer data)
+ {
+   GfsVariable * f = data;
+   return !GFS_IS_FULL (GFS_VALUE (cell, f));
+ }
+ 
+ static void undefined_height (FttCell * cell, HFState * hf)
+ {
+   GFS_VALUE (cell, hf->hb) = GFS_NODATA;
+   GFS_VALUE (cell, hf->ht) = GFS_NODATA;
+ }
+ 
+ #define HMAX 5
+ #define SIGN(x) ((x) > 0. ? 1. : -1.)
+ #define BOUNDARY_HIT (2.*HMAX)
+ 
+ static gint children_half_height (FttCell * cell, FttDirection d, GfsVariable * fv,
+ 				  gdouble * H, gint * n)
+ {
+   FttCellChildren child;
+   guint i, m = ftt_cell_children_direction (cell, FTT_OPPOSITE_DIRECTION (d), &child);
+   gint s = 0;
+   for (i = 0; i < m; i++)
+     if (child.c[i]) {
+       gdouble f = GFS_VALUE (child.c[i], fv);
+       if (f > 0. && f < 1.) {
+ 	s = 0;
+ 	break;
+       }
+       s = SIGN (f - 0.5);
+     }
+   if (s != 0)
+     return s;
+ 
+   *H += GFS_VALUE (cell, fv);
+   (*n)++;
+ 
+   m = ftt_cell_children_direction (cell, d, &child);
+   for (i = 0; i < m; i++)
+     if (child.c[i]) {
+       gdouble f = GFS_VALUE (child.c[i], fv);
+       if (f > 0. && f < 1.) {
+ 	return 0;
+       }
+       s = SIGN (f - 0.5);
+     }
+   return s;
+ }
+ 
+ static gint half_height (FttCell * cell, GfsVariable * fv, FttDirection d,
+ 			 gdouble * H, gint * n)
+ {
+   gint s = 0;
+   *n = 0;
+   guint level = ftt_cell_level (cell);
+   FttCell * neighbor = ftt_cell_neighbor (cell, d);
+   while (*n < HMAX && !s && neighbor) {
+     gdouble f = GFS_VALUE (neighbor, fv);
+     if (f > 0. && f < 1.) { /* interfacial cell */
+       if (ftt_cell_level (neighbor) < level) /* neighbor is coarser */
+ 	return 0;
+       if (GFS_CELL_IS_BOUNDARY (neighbor))
+ 	return 2;
+       if (FTT_CELL_IS_LEAF (neighbor)) {
+ 	*H += f;
+ 	(*n)++;
+       }
+       else
+ 	s = children_half_height (neighbor, d, fv, H, n);
+     }
+     else /* full or empty cell */
+       s = SIGN (f - 0.5);
+     neighbor = ftt_cell_neighbor (neighbor, d);
+   }
+   return s;
+ }
+ 
+ #define DMAX 2.
+ 
+ static void height_propagation (FttCell * cell, HFState * hf, GfsVariable * h, gdouble orientation)
+ {
+   guint level = ftt_cell_level (cell);
+   FttDirection d;
+   for (d = 2*hf->c; d <= 2*hf->c + 1; d++, orientation = - orientation) {
+     gdouble H = GFS_VALUE (cell, h);
+     FttCell * neighbor = ftt_cell_neighbor (cell, d);
+     gboolean interface = FALSE;
+     while (fabs (H) < DMAX - 1. && neighbor && !interface && 
+ 	   ftt_cell_level (neighbor) == level) {
+       H -= orientation;
+       GFS_VALUE (neighbor, h) = H;
+       interface = is_interfacial (neighbor, hf->f);
+       neighbor = ftt_cell_neighbor (neighbor, d);
+     }
+   }
+ }
+ 
+ static void height (FttCell * cell, HFState * hf)
+ {
+   if (!FTT_CELL_IS_LEAF (cell)) {
+     /* look for childrens' HF */
+     FttComponent c = FTT_ORTHOGONAL_COMPONENT (hf->c);
+     gdouble H = 0., orientation = 0.;
+     guint nc = 0;
+     GfsVariable * h = NULL;
+     FttDirection d;
+     for (d = 2*c; d <= 2*c + 1; d++) {
+       FttCellChildren child;
+       int i, n = ftt_cell_children_direction (cell, d, &child);
+       for (i = 0; i < n; i++)
+ 	if (child.c[i]) {
+ 	  if (h == NULL)
+ 	    h = gfs_closest_height (child.c[i], 
+ 				    GFS_VARIABLE_TRACER_VOF_HEIGHT (hf->f), hf->c, &orientation);
+ 	  if (h != NULL && GFS_HAS_DATA (child.c[i], h)) {
+ 	    FttVector p;
+ 	    ftt_cell_relative_pos (child.c[i], &p);
+ 	    H += GFS_VALUE (child.c[i], h)/2. + orientation*(&p.x)[hf->c];
+ 	    nc++;
+ 	    break;
+ 	  }
+ 	}
+     }
+     if (nc == 2) {
+       GFS_VALUE (cell, h) = H/nc;
+       height_propagation (cell, hf, h, orientation);
+       return;
+     }
+     /* try the standard way just in case */
+   }
+ 
+   gdouble H = GFS_VALUE (cell, hf->f);
+ 
+   /* top part of the column */
+   gint nt, st = half_height (cell, hf->f, 2*hf->c, &H, &nt);
+   if (!st) /* still an interfacial cell (or coarser neighboring cell found) */
+     return;
+ 
+   /* bottom part of the column */
+   gint nb, sb = half_height (cell, hf->f, 2*hf->c + 1, &H, &nb);
+   if (!sb) /* still an interfacial cell (or coarser neighboring cell found) */
+     return;
+ 
+   if (sb != 2 && st != 2) {
+     if (st*sb > 0) /* the column does not cross the interface */
+       return;
+   }
+   else { /* column hit a boundary */
+     if (sb == 2 && st == 2) /* cannot hit a boundary on both sides */
+       return;
+     if (sb == 2)
+       sb = - SIGN (st);
+     H += BOUNDARY_HIT;
+   }
+ 
+   if (sb > 0) {
+     GFS_VALUE (cell, hf->hb) = H - 0.5 - nb;
+     height_propagation (cell, hf, hf->hb, 1.);
+   }
+   else {
+     GFS_VALUE (cell, hf->ht) = H - 0.5 - nt;
+     height_propagation (cell, hf, hf->ht, -1.);
+   }
+ }
+ 
+ static GfsVariable * boundary_hit (FttCell * cell, HFState * hf)
+ {
+   if (GFS_HAS_DATA (cell, hf->hb) && GFS_VALUE (cell, hf->hb) > BOUNDARY_HIT/2.)
+     return hf->hb;
+   if (GFS_HAS_DATA (cell, hf->ht) && GFS_VALUE (cell, hf->ht) > BOUNDARY_HIT/2.)
+     return hf->ht;
+   return NULL;
+ }
+ 
+ static void height_propagation_from_boundary (FttCell * cell, HFState * hf, GfsVariable * h)
+ {
+   guint level = ftt_cell_level (cell);
+   FttDirection d = FTT_OPPOSITE_DIRECTION (hf->d);
+   gdouble orientation = (hf->d % 2 ? -1 : 1)*(h == hf->hb ? 1 : -1);
+   gdouble H = GFS_VALUE (cell, h);
+   cell = ftt_cell_neighbor (cell, d);
+   while (cell && GFS_HAS_DATA (cell, h) && GFS_VALUE (cell, h) > BOUNDARY_HIT/2. &&
+ 	 ftt_cell_level (cell) == level) {
+     H += orientation;
+     GFS_VALUE (cell, h) = H;
+     cell = ftt_cell_neighbor (cell, d);
+   }
+   /* propagate to non-interfacial cells up to DMAX */
+   while (fabs (H) < DMAX - 1. && cell && !is_interfacial (cell, hf->f) && 
+ 	 ftt_cell_level (cell) == level) {
+     H += orientation;
+     GFS_VALUE (cell, h) = H;
+     cell = ftt_cell_neighbor (cell, d);
+   }
+ }
+ 
+ static void height_periodic_bc (FttCell * cell, HFState * hf)
+ {
+   FttCell * neighbor = ftt_cell_neighbor (cell, hf->d);
+   g_assert (GFS_CELL_IS_BOUNDARY (neighbor));
+   GfsVariable * h = boundary_hit (cell, hf);
+   if (h) {
+     /* column hit boundary */
+     GfsVariable * hn = boundary_hit (neighbor, hf);
+     if (hn == h) {
+       /* the column crosses the interface */
+       /* propagate column height correction from one side (or PE) to the other */
+       gdouble orientation = (hf->d % 2 ? -1 : 1)*(h == hf->hb ? 1 : -1);
+       gdouble Hn = GFS_VALUE (neighbor, h) + 0.5 + 
+ 	(orientation - 1.)/2. -
+ 	2.*BOUNDARY_HIT;
+       GFS_VALUE (cell, h) += Hn;
+       height_propagation_from_boundary (cell, hf, h);
+     }
+     else {
+       /* the column does not cross the interface */
+       guint level = ftt_cell_level (cell);
+       while (cell && GFS_HAS_DATA (cell, h) && GFS_VALUE (cell, h) > BOUNDARY_HIT/2. &&
+ 	     ftt_cell_level (cell) == level) {
+ 	undefined_height (cell, hf);
+ 	cell = ftt_cell_neighbor (cell, FTT_OPPOSITE_DIRECTION (hf->d));
+       }
+     }
+   }
+   else {
+     /* column did not hit a boundary, propagate height across PE boundary */
+     if (GFS_HAS_DATA (neighbor, hf->hb))
+       height_propagation (neighbor, hf, hf->hb, 1.);
+     if (GFS_HAS_DATA (neighbor, hf->ht))
+       height_propagation (neighbor, hf, hf->ht, -1.);
+   }
+ }
+ 
+ #define SLOPE_MAX (2.*HMAX/3.)
+ #define THETA_MIN (atan(1./SLOPE_MAX))
+ 
+ static gdouble contact_angle_bc (FttCell * cell, HFState * hf)
+ {
+   if (hf->angle) {
+     FttCellFace f = ftt_cell_face (cell, hf->d);
+     g_assert (GFS_CELL_IS_BOUNDARY (f.neighbor));
+     return gfs_function_face_value (GFS_BC_VALUE (hf->angle)->val, &f)*M_PI/180.;
+   }
+   else
+     return M_PI/2.;
+ }
+ 
+ static void height_contact_normal_bc (FttCell * cell, HFState * hf)
+ {
+   GfsVariable * h = boundary_hit (cell, hf);
+   if (h) {
+     /* column hit boundary */
+     FttComponent oc = FTT_ORTHOGONAL_COMPONENT (hf->c);
+     FttDirection nd = 2*oc;
+     FttCell * n1 = ftt_cell_neighbor (cell, nd), * n2 = ftt_cell_neighbor (cell, nd + 1);
+     if (n1 && GFS_HAS_DATA (n1, h) && n2 && GFS_HAS_DATA (n2, h)) {
+       /* columns are defined on either side of @cell => it is not a contact line */
+       /* the boundary is dry or wet i.e. the column height is well defined */
+       /* reset the BOUNDARY_HIT flag on the whole column */
+       GFS_VALUE (cell, h) -= BOUNDARY_HIT;
+       height_propagation_from_boundary (cell, hf, h);
+     }
+     else {
+       GfsVariable * hb, * ht; /* use symmetries */
+       if (hf->d % 2) {
+ 	hb = hf->hb; ht = hf->ht;
+       }
+       else {
+ 	hb = hf->ht; ht = hf->hb;
+       }
+       gdouble full_or_empty = (h != hb);
+       if (n1 && GFS_VALUE (n1, hf->f) != full_or_empty) {
+ 	n1 = n2; nd++;
+       }
+       if (!n1 || GFS_VALUE (n1, hf->f) != full_or_empty) {
+ 	/* column is not neighbouring a full or empty cell => it is not a contact line */
+ 	/* the boundary is dry or wet i.e. the column height is well defined */
+ 	/* reset the BOUNDARY_HIT flag on the whole column */
+ 	GFS_VALUE (cell, h) -= BOUNDARY_HIT;
+ 	height_propagation_from_boundary (cell, hf, h);
+       }
+       /* contact line */
+       else {
+ 	gdouble theta = contact_angle_bc (cell, hf);
+ 	if ((h == hb && theta < atan (SLOPE_MAX)) || 
+ 	    (h == ht && theta > M_PI - atan (SLOPE_MAX))) {
+ 	  gdouble orientation = (h == hb ? 1. : -1.);
+ 	  FttVector m = { orientation*sin(theta), cos(theta), 0. };
+ 	  gdouble alpha = gfs_plane_alpha (&m, GFS_VALUE (cell, hf->f));
+ 	  GFS_VALUE (cell, h) = orientation*((alpha - m.x/2.)/m.y - 0.5);
+ 	  height_propagation_from_boundary (cell, hf, h);
+ 	  /* set height of neighbouring (non-interfacial) column */
+ 	  /* the line below ensures that the interface does not enter
+ 	     the non-interfacial neighbour */
+ 	  if (orientation*alpha > orientation*m.x) alpha = m.x;
+ 	  GFS_VALUE (n1, h) = ftt_cell_level (n1) == ftt_cell_level (cell) ? 
+ 	    orientation*((alpha - m.x*3./2.)/m.y - 0.5) : /* neighbour at same level */
+ 	    orientation*((alpha - m.x*2.)/m.y - 1.)/2.;   /* coarser neighbor */
+ 	  height_propagation_from_boundary (n1, hf, h);
+ 	}
+       }
+     }
+   }
+ }
+ 
+ static void contact_angle_height (FttCell * cell, GfsVariable * h, HFState * hf)
+ {
+   if (GFS_HAS_DATA (cell, h)) {
+     FttCell * neighbor = ftt_cell_neighbor (cell, hf->d);
+     if (!neighbor) /* boundary cell is a one-sided solid boundary: give up */
+       return;
+     g_assert (GFS_CELL_IS_BOUNDARY (neighbor));
+     /* fixme: 
+      * The boundary condition is not evaluated in the cell
+      * containing the contact line.
+      */
+     gdouble theta = contact_angle_bc (cell, hf);
+     if (theta == M_PI/2.)
+       GFS_VALUE (neighbor, h) = GFS_VALUE (cell, h);
+     else {
+       /* fixme?: 
+        * The tangential bc saturates at SLOPE_MAX. Curvatures defined
+        * using parabolic interpolation are not consistent when the
+        * ordinates differ too much. This is not a problem if the interface
+        * is well-resolved (because the curvature will then be defined
+        * using the heights in the other direction, which leads to a
+        * well-defined curvature with the correct contact angle condition).
+        *
+        * If the interface is not well-resolved and if the desired contact
+        * angle is smaller than THETA_MIN (or larger than M_PI -
+        * THETA_MIN), the contact angle will saturate at THETA_MIN = atan (1./SLOPE_MAX).
+        */
+       gdouble cotantheta = (theta < THETA_MIN ? SLOPE_MAX : 
+ 			    theta > M_PI - THETA_MIN ? - SLOPE_MAX :
+ 			    1./tan(theta));
+       GFS_VALUE (neighbor, h) = GFS_VALUE (cell, h) + cotantheta;
+     }
+   }
+ }
+ 
+ static void height_contact_tangential_bc (FttCell * cell, HFState * hf)
+ {
+   if (is_interfacial (cell, hf->f)) {
+     contact_angle_height (cell, hf->hb, hf);
+     contact_angle_height (cell, hf->ht, hf);
+   }
+ }
+ 
+ static void box_periodic_bc (GfsBox * box, HFState * hf)
+ {
+   for (hf->d = 2*hf->c; hf->d <= 2*hf->c + 1; hf->d++)
+     if (GFS_IS_BOUNDARY_PERIODIC (box->neighbor[hf->d]))
+       ftt_cell_traverse_boundary (box->root, hf->d, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 				  (FttCellTraverseFunc) height_periodic_bc, hf);
+ }
+ 
+ static void box_contact_bc (GfsBox * box, HFState * hf)
+ {
+   /* fixme: 2D only */
+   for (hf->d = 0; hf->d < FTT_NEIGHBORS; hf->d++)
+     if (GFS_IS_BOUNDARY (box->neighbor[hf->d]) && 
+ 	!GFS_IS_BOUNDARY_PERIODIC (box->neighbor[hf->d])) {
+       hf->angle = gfs_boundary_lookup_bc (GFS_BOUNDARY (box->neighbor[hf->d]), hf->f);
+       if (!GFS_IS_BC_ANGLE (hf->angle))
+ 	hf->angle = NULL; /* symmetry i.e. angle = PI/2 */
+       FttCellTraverseFunc contact_bc = 
+ 	(FttCellTraverseFunc) (hf->d/2 == hf->c ? 
+ 			       height_contact_normal_bc : height_contact_tangential_bc);
+       ftt_cell_traverse_boundary (box->root, hf->d, FTT_POST_ORDER, FTT_TRAVERSE_ALL, -1,
+ 				  contact_bc, hf);
+     }
+ }
+ 
+ static void remaining_boundary_height_undefined (FttCell * cell, HFState * hf)
+ {
+   GfsVariable * h = boundary_hit (cell, hf);
+   if (h)
+     GFS_VALUE (cell, h) = GFS_NODATA;
+ }
+ 
+ static gboolean height_normal (FttCell * cell, GfsVariable * v, FttVector * m)
+ {
+   gdouble slope = G_MAXDOUBLE;
+ #ifdef FTT_2D
+   GfsVariableTracerVOFHeight * t = GFS_VARIABLE_TRACER_VOF_HEIGHT (v);
+   FttComponent c;
+   m->x = 0.;
+   m->y = 1.;
+   for (c = 0; c < 2; c++) {
+     gdouble orientation;
+     GfsVariable * hv = gfs_closest_height (cell, t, c, &orientation);
+     if (hv != NULL && fabs (GFS_VALUE (cell, hv)) <= 1.) {
+       gdouble H = GFS_VALUE (cell, hv);
+       gdouble x[2], h[2];
+       FttComponent oc = FTT_ORTHOGONAL_COMPONENT (c);
+       h[0] = neighboring_column (cell, hv, c, orientation, 2*oc, &x[0]);
+       if (h[0] == GFS_NODATA)
+ 	continue;
+       h[1] = neighboring_column (cell, hv, c, orientation, 2*oc + 1, &x[1]);
+       if (h[1] == GFS_NODATA)
+ 	continue;
+       x[1] = - x[1];
+       
+       gdouble det = x[0]*x[1]*(x[0] - x[1]), a = x[1]*(h[0] - H), b = x[0]*(h[1] - H);
+       gdouble hx = (x[0]*b - x[1]*a)/det;
+       if (fabs (hx) < slope) {
+ 	slope = fabs (hx);
+ 	(&m->x)[c] = orientation;
+ 	(&m->x)[(c + 1) % 2] = - hx;
+       }
+     }
+   }
+ #else /* 3D */
+   g_assert_not_implemented ();
+ #endif /* 3D */
+   return slope < G_MAXDOUBLE;
+ }
+ 
+ static void vof_height_plane (FttCell * cell, GfsVariable * v)
+ {
+   if (FTT_CELL_IS_LEAF (cell)) {
+     GfsVariableTracerVOF * t = GFS_VARIABLE_TRACER_VOF (v);
+     gdouble f = GFS_VALUE (cell, v);
+     FttComponent c;
+ 
+     THRESHOLD (f);
+     if (GFS_IS_FULL (f)) {
+       for (c = 1; c < FTT_DIMENSION; c++)
+ 	GFS_VALUE (cell, t->m[c]) = 0.;
+       GFS_VALUE (cell, t->m[0]) = 1.;
+       GFS_VALUE (cell, t->alpha) = f;
+     }
+     else {
+       FttVector m;
+       gdouble n = 0.;
+ 
+       if (!height_normal (cell, v, &m))
+ 	myc_normal (cell, v, &m);
+       for (c = 0; c < FTT_DIMENSION; c++)
+ 	n += fabs ((&m.x)[c]);
+       if (n > 0.)
+ 	for (c = 0; c < FTT_DIMENSION; c++)
+ 	  (&m.x)[c] /= n;
+       else /* fixme: this is a small fragment */
+ 	m.x = 1.;
+       for (c = 0; c < FTT_DIMENSION; c++)
+ 	GFS_VALUE (cell, t->m[c]) = (&m.x)[c];
+       GFS_VALUE (cell, t->alpha) = gfs_plane_alpha (&m, f);
+     }
+   }
+ }
+ 
+ static void variable_tracer_vof_height_update (GfsVariable * v, GfsDomain * domain)
+ {
+   gfs_domain_cell_traverse (domain,
+ 			    FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ 			    (FttCellTraverseFunc) v->fine_coarse, v);
+   gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, v);
+   GSList * j = GFS_VARIABLE_TRACER_VOF (v)->concentrations->items;
+   while (j) {
+     gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, j->data);
+     j = j->next;
+   }
+ 
+   /* update height functions */
+   GfsVariableTracerVOFHeight * h = GFS_VARIABLE_TRACER_VOF_HEIGHT (v);
+   HFState hf;
+   hf.f = v;
+   for (hf.c = 0; hf.c < FTT_DIMENSION; hf.c++) {
+     hf.hb = h->hb[hf.c];
+     hf.ht = h->ht[hf.c];
+     gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			      (FttCellTraverseFunc) undefined_height, &hf);
+     gfs_domain_cell_traverse_condition (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 					(FttCellTraverseFunc) height, &hf,
+ 					is_interfacial, hf.f);
+     
+     gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, hf.hb);
+     gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, hf.ht);
+     /* update periodic boundaries first */
+     gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_periodic_bc, &hf);
+     /* apply bc again to make sure periodic bcs are in sync */
+     gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, hf.hb);
+     gfs_domain_bc (domain, FTT_TRAVERSE_ALL, -1, hf.ht);
+     /* apply contact angle bcs */
+     gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) box_contact_bc, &hf);
+ 
+     gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_ALL, -1,
+ 			      (FttCellTraverseFunc) remaining_boundary_height_undefined, &hf);
+   }
+ 
+   /* update normals and alpha */
+   GfsVariableTracerVOF * t = GFS_VARIABLE_TRACER_VOF (v);
+   guint l, depth = gfs_domain_depth (domain);
+   FttComponent c;
+   for (l = 0; l <= depth; l++) {
+     gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEVEL, l,
+ 			      (FttCellTraverseFunc) vof_height_plane, v);
+     for (c = 0; c < FTT_DIMENSION; c++)
+       gfs_domain_bc (domain, FTT_TRAVERSE_LEVEL, l, t->m[c]);
+     gfs_domain_bc (domain, FTT_TRAVERSE_LEVEL, l, t->alpha);
+   }
+ }
+ 
+ static void variable_tracer_vof_height_destroy (GtsObject * o)
+ {
+   GfsVariableTracerVOF * v = GFS_VARIABLE_TRACER_VOF (o);
+ 
+   if (v->alpha) {
+     FttComponent c;
+     for (c = 0; c < FTT_DIMENSION; c++) {
+       gts_object_destroy (GTS_OBJECT (GFS_VARIABLE_TRACER_VOF_HEIGHT (v)->hb[c]));
+       gts_object_destroy (GTS_OBJECT (GFS_VARIABLE_TRACER_VOF_HEIGHT (v)->ht[c]));
+     }
+   }
+ 
+   (* GTS_OBJECT_CLASS (gfs_variable_tracer_vof_height_class ())->parent_class->destroy) (o);
+ }
+ 
+ static void undefined_coarse_fine (FttCell * parent, GfsVariable * v)
+ {
+   FttCellChildren child;
+   int i;
+   ftt_cell_children (parent, &child);
+   for (i = 0; i < FTT_CELLS; i++)
+     if (child.c[i])
+       GFS_VALUE (child.c[i], v) = GFS_NODATA;
+ }
+ 
+ static void variable_tracer_vof_height_read (GtsObject ** o, GtsFile * fp)
+ {
+   (* GTS_OBJECT_CLASS (gfs_variable_tracer_vof_height_class ())->parent_class->read) (o, fp);
+   if (fp->type == GTS_ERROR)
+     return;
+ 
+   GfsVariable * v = GFS_VARIABLE (*o);
+   GfsVariableTracerVOFHeight * t = GFS_VARIABLE_TRACER_VOF_HEIGHT (v);
+   FttComponent c;
+   for (c = 0; c < FTT_DIMENSION; c++) {
+     static gchar index[][2] = {"x", "y", "z"};
+     gchar * name = g_strdup_printf ("%s_Hb%s", v->name, index[c]);
+     gchar * description = g_strdup_printf ("%s-component (bottom) of the height function for the interface defined by %s",
+ 					   index[c], v->name);
+     t->hb[c] = gfs_domain_get_or_add_variable (v->domain, name, description);
+     t->hb[c]->fine_coarse = no_coarse_fine;
+     t->hb[c]->coarse_fine = undefined_coarse_fine;
+     g_free (name);
+     g_free (description);
+ 
+     name = g_strdup_printf ("%s_Ht%s", v->name, index[c]);
+     description = g_strdup_printf ("%s-component (top) of the height function for the interface defined by %s",
+ 				   index[c], v->name);
+     t->ht[c] = gfs_domain_get_or_add_variable (v->domain, name, description);
+     t->ht[c]->fine_coarse = no_coarse_fine;
+     t->ht[c]->coarse_fine = undefined_coarse_fine;
+     g_free (name);
+     g_free (description);
+   }
+ }
+ 
+ static void variable_tracer_vof_height_class_init (GtsObjectClass * klass)
+ {
+   GFS_VARIABLE_TRACER_VOF_CLASS (klass)->update = variable_tracer_vof_height_update;
+   klass->destroy = variable_tracer_vof_height_destroy;
+   klass->read = variable_tracer_vof_height_read;
+ }
+ 
+ GfsVariableTracerVOFClass * gfs_variable_tracer_vof_height_class (void)
+ {
+   static GfsVariableTracerVOFClass * klass = NULL;
+ 
+   if (klass == NULL) {
+     GtsObjectClassInfo info = {
+       "GfsVariableTracerVOFHeight",
+       sizeof (GfsVariableTracerVOFHeight),
+       sizeof (GfsVariableTracerVOFClass),
+       (GtsObjectClassInitFunc) variable_tracer_vof_height_class_init,
+       (GtsObjectInitFunc) NULL,
+       (GtsArgSetFunc) NULL,
+       (GtsArgGetFunc) NULL
+     };
+     klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_variable_tracer_vof_class ()), &info);
+   }
+ 
+   return klass;
+ }
+ 
+ /**
+  * gfs_closest_height:
+  * @cell: a #FttCell.
+  * @t: a #GfsVariableTracerVOFHeight.
+  * @c: x, y or z.
+  * @orientation: the orientation or %NULL.
+  *
+  * Returns: the variable containing the height value (in direction @c)
+  * closest to the interface, in which case orientation is set to 1 or
+  * -1, or %NULL if no heights are defined for this cell.
+  */
+ GfsVariable * gfs_closest_height (FttCell * cell, 
+ 				  GfsVariableTracerVOFHeight * t,
+ 				  FttComponent c,
+ 				  gdouble * orientation)
+ {
+   g_return_val_if_fail (cell != NULL, NULL);
+   g_return_val_if_fail (t != NULL, NULL);
+ 
+   GfsVariable * hv = NULL;
+   gdouble o = 0.;
+   if (cell == NULL)
+     return NULL;
+   if (GFS_HAS_DATA (cell, t->hb[c])) {
+     hv = t->hb[c]; o = 1.;
+     if (GFS_HAS_DATA (cell, t->ht[c]) && 
+ 	fabs (GFS_VALUE (cell, t->ht[c])) < fabs (GFS_VALUE (cell, t->hb[c]))) {
+       hv = t->ht[c]; o = -1.;
+     }
+   }
+   else if (GFS_HAS_DATA (cell, t->ht[c])) {
+     hv = t->ht[c]; o = -1.;
+   }
+   if (orientation) *orientation = o;
+   return hv;
+ }
+ 
+ /** \endobject{GfsVariableTracerVOFHeight} */
+ 
+ static gdouble interface_fractions (FttVector m, gdouble alpha, FttDirection d)
+ {
+   gdouble f;
+ #if FTT_2D
+   FttComponent c1 = d > 1, c2 = !c1;
+   if ((&m.x)[c2] == 0) {
+     gdouble sign = (d % 2 ? -1. : 1.);
+     f = (sign*(&m.x)[c1] > 0.) ? 0. : 1.;
+   }
+   else {
+     f = (alpha-(&m.x)[c1]*!(d % 2))/(&m.x)[c2];
+     if(f < 0.) f = 0.; else if (f > 1.) f = 1.;
+     if((&m.x)[c2] < 0.) f = 1.-f;
+   }
+ #else /* 3D */
+   FttComponent c1 = (d/2+1) % 3, c2 = (d/2+2) % 3;
+   FttVector mp;
+   mp.x = (&m.x)[c1];
+   mp.y = (&m.x)[c2];
+   f = gfs_line_area (&mp, d % 2 ? alpha : alpha - (&m.x)[d/2]);
+ #endif /* 3D */
+   return f;
+ }
+ 
+ gdouble gfs_vof_face_fraction (const FttCellFace * face,
+ 			       GfsVariableTracerVOF * t)
+ {
+   g_return_val_if_fail (face != NULL, 0.);
+   g_return_val_if_fail (t != NULL, 0.);
+ 
+   GfsVariable * v = GFS_VARIABLE (t);
+   gdouble vright, vleft = GFS_VALUE (face->cell, v);
+ 
+   if (vleft == 0.)
+     return 0.;
+   else if (vleft != 1.0) {
+     FttComponent c;
+     FttVector m;
+     gdouble alpha;
+     for(c = 0; c < FTT_DIMENSION; c++)
+       (&m.x)[c] = GFS_VALUE (face->cell, t->m[c]);
+     alpha = GFS_VALUE (face->cell, t->alpha);
+     vleft = interface_fractions (m, alpha, face->d);
+   }
+ 
+   vright = GFS_VALUE (face->neighbor, v);
+   if (vright == 0.)
+     return 0.;
+   else if (vright != 1.0) {
+     FttComponent c;
+     FttVector m;
+     gdouble alpha;
+     for(c = 0; c < FTT_DIMENSION; c++)
+       (&m.x)[c] = GFS_VALUE (face->neighbor,t->m[c]);
+     alpha = GFS_VALUE (face->neighbor, t->alpha);
+     if (ftt_face_type (face) == FTT_FINE_COARSE) {
+       FttVector p, o, q;
+       ftt_face_pos (face, &p);
+       ftt_cell_pos (face->neighbor, &o);
+       ftt_cell_pos (face->cell, &q);
+       gdouble h = ftt_cell_size (face->neighbor);
+       (&p.x)[face->d/2] += face->d % 2 ? -h/4. : h/4.;
+       for (c = 0; c < FTT_DIMENSION; c++)
+ 	alpha -= (&m.x)[c]*(0.25 + ((&p.x)[c] - (&o.x)[c])/h);
+       alpha *= 2.;
+     }
+     vright = interface_fractions (m, alpha, FTT_OPPOSITE_DIRECTION (face->d));
+   }
+   return sqrt(vleft*vright);
+ }
++>>>>>>> upstream/20131206+dfsg
diff --cc src/wave.c
index d44d63d,105a5c2..62c1b2c
--- a/src/wave.c
+++ b/src/wave.c
@@@ -230,7 -230,7 +230,11 @@@ static void wave_run (GfsSimulation * s
  	  GfsVariable * t = GFS_WAVE (sim)->F[ik][ith];
  	  sim->advection_params.v = t;
  	  gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc) solid_flux, &par);
++<<<<<<< HEAD
 +	  gfs_tracer_advection_diffusion (domain, &sim->advection_params);
++=======
+ 	  gfs_tracer_advection_diffusion (domain, &sim->advection_params, NULL);
++>>>>>>> upstream/20131206+dfsg
  	  sim->advection_params.fv = par.fv;
  	  gfs_domain_traverse_merged (domain, (GfsMergedTraverseFunc) gfs_advection_update, 
  	  			      &sim->advection_params);
diff --cc test/Makefile.am
index 2b8aba7,ef0091a..333626d
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@@ -1,53 -1,6 +1,56 @@@
  ## Process this file with automake to produce Makefile.in
  
  AUTOMAKE_OPTIONS = parallel-tests
++<<<<<<< HEAD
 +
 +# new test cases need to be added to this list in the order in which
 +# they appear in template.tex
 +
 +TESTDIRS = \
 +	poisson \
 +	circle \
 +	dumbell \
 +	advection \
 +	shear \
 +	diffusion \
 +	conservation \
 +	reynolds \
 +	periodic \
 +	merging \
 +	source \
 +	axi \
 +	axiadvection \
 +	lid \
 +	poiseuille \
 +	couette \
 +	kinetic \
 +	hydrostatic \
 +	coriolis \
 +	lake \
 +	boundaries \
 +	channel \
 +	plate \
 +	hexagon \
 +	strouhal \
 +	spurious \
 +	capwave \
 +	oscillation \
 +	geo \
 +	waves \
 +	nz \
 +	parabola \
 +	lonlat \
 +	cosine \
 +	harmonic \
 +	gaussian \
 +	planar \
 +	bump \
 +	cylinder \
 +	electro
 +
 +WEBROOT = /var/www/gerris
++=======
++>>>>>>> upstream/20131206+dfsg
  
  EXTRA_DIST = \
  	template.tex \
@@@ -68,8 -20,25 +70,30 @@@ DOC = test
  
  # we need this for gfs.sty
  TEXINPUTS = .:$(top_srcdir)/doc/examples:
++<<<<<<< HEAD
 +
 +tests: tests.dvi
++=======
+ # and this for bibtex
+ BIBINPUTS = $(top_srcdir)/doc
+ 
+ Makefile.deps: template.tex depend.py Makefile.am
+ 	python depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
+ 	echo "" >> Makefile.deps
+ 	echo -n "TESTDIRS = " >> Makefile.deps
+ 	echo `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` >> Makefile.deps
+ 
+ include Makefile.deps
+ 
+ tests.tex: template.tex Makefile.deps
+ 	rm -r -f tests
+ 	python gfs2tex $(TESTDIRS)
+ 	sed -e 's/\\test{\(.*\)\/\(.*\)}/\\input{\1\/\2\/\2.tex}/g' \
+ 	    -e 's/\\test{\(.*\)}/\\input{\1\/\1.tex}/g' < template.tex > tests.tex
+ 
+ tests: tests.dvi
+ 	if ! test -d $(DOC); then mkdir $(DOC); fi
++>>>>>>> upstream/20131206+dfsg
  	TEXINPUTS=$(TEXINPUTS) hevea -fix -I $(top_srcdir)/doc/examples $(DOC).tex
  	TEXINPUTS=$(TEXINPUTS) imagen -res 500 -extra "pnmscale 0.24" $(DOC)
  	hacha $(DOC).html
@@@ -84,9 -53,9 +108,15 @@@
  	sh ../doc/examples/crossref.sh --url=http://gerris.dalembert.upmc.fr/gerris/tests/tests $(TESTDIRS)
  	mv references tests
  
++<<<<<<< HEAD
 +tests.dvi: tests.tex tests.bib
 +	- TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex > /dev/null 2>&1
 +	bibtex tests
++=======
+ tests.dvi: tests.tex $(top_srcdir)/doc/gerris.bib
+ 	- TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex > /dev/null 2>&1
+ 	BIBINPUTS=$(BIBINPUTS) bibtex tests
++>>>>>>> upstream/20131206+dfsg
  	- TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex > /dev/null 2>&1
  	TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex
  
@@@ -95,16 -64,6 +125,19 @@@ tests.pdf: tests.dv
  	ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true tests.ps tests.pdf
  	rm -f tests.ps
  
++<<<<<<< HEAD
 +tests.tex: template.tex Makefile.deps
 +	rm -r -f tests
 +	python gfs2tex $(TESTDIRS)
 +	cp -f template.tex tests.tex
 +
 +Makefile.deps: depend.py
 +	python depend.py $(TESTDIRS) > Makefile.deps
 +
 +include Makefile.deps
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  tests.tar.gz: tests $(DOCS)
  	tar czf tests.tar.gz tests $(DOCS)
  	rm -r -f tests
diff --cc test/Makefile.deps
index 155a39b,0c03522..e526eb6
--- a/test/Makefile.deps
+++ b/test/Makefile.deps
@@@ -1,3 -1,5 +1,8 @@@
++<<<<<<< HEAD
++=======
+ ## File generated automatically by depend.py: do not modify by hand
+ 
++>>>>>>> upstream/20131206+dfsg
  DOCS = \
  	poisson/poisson.gfs.html\
  	poisson/dirichlet/dirichlet.gfs.html\
@@@ -10,10 -12,16 +15,23 @@@
  	advection/advection.gfs.html\
  	shear/shear.gfs.html\
  	shear/curvature/curvature.gfs.html\
++<<<<<<< HEAD
++	diffusion/diffusion.gfs.html\
++	conservation/conservation.gfs.html\
++	reynolds/reynolds.gfs.html\
++	reynolds/box/box.gfs.html\
++=======
+ 	shear/concentration/concentration.gfs.html\
+ 	rotate/rotate.gfs.html\
  	diffusion/diffusion.gfs.html\
+ 	diffusion/concentration/concentration.gfs.html\
  	conservation/conservation.gfs.html\
  	reynolds/reynolds.gfs.html\
  	reynolds/box/box.gfs.html\
+ 	reynolds/skew/skew.gfs.html\
+ 	reynolds/stream/stream.gfs.html\
+ 	reynolds/skewbox/skewbox.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.gfs.html\
  	merging/merging.gfs.html\
  	source/source.gfs.html\
@@@ -21,17 -29,23 +39,34 @@@
  	axi/viscous/viscous.gfs.html\
  	axiadvection/axiadvection.gfs.html\
  	axiadvection/solid/solid.gfs.html\
++<<<<<<< HEAD
++	lid/lid.gfs.html\
++	lid/stretch/stretch.gfs.html\
++	lid/explicit/explicit.gfs.html\
++	poiseuille/poiseuille.gfs.html\
++	poiseuille/bagnold/bagnold.gfs.html\
++=======
+ 	swirl/swirl.gfs.html\
  	lid/lid.gfs.html\
  	lid/stretch/stretch.gfs.html\
  	lid/explicit/explicit.gfs.html\
+ 	lid/metric/metric.gfs.html\
  	poiseuille/poiseuille.gfs.html\
  	poiseuille/bagnold/bagnold.gfs.html\
+ 	poiseuille/metric/metric.gfs.html\
+ 	poiseuille/river/river.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.gfs.html\
  	kinetic/kinetic.gfs.html\
  	hydrostatic/hydrostatic.gfs.html\
  	hydrostatic/quadratic/quadratic.gfs.html\
  	coriolis/coriolis.gfs.html\
  	lake/lake.gfs.html\
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs.html\
+ 	lake/river/river.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs.html\
  	channel/channel.gfs.html\
  	plate/plate.gfs.html\
@@@ -44,25 -58,50 +79,65 @@@
  	capwave/air-water/air-water.gfs.html\
  	capwave/density/density.gfs.html\
  	oscillation/oscillation.gfs.html\
++<<<<<<< HEAD
 +	geo/geo.gfs.html\
 +	geo/beta/beta.gfs.html\
++=======
+ 	height/height.gfs.html\
+ 	plateau/plateau.gfs.html\
+ 	plateau/plateau.mpg\
+ 	sessile/sessile.gfs.html\
+ 	geo/geo.gfs.html\
+ 	geo/beta/beta.gfs.html\
+ 	geo/river/river.gfs.html\
+ 	nonlinear/nonlinear.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs.html\
  	waves/adaptive/adaptive.gfs.html\
  	nz/nz.gfs.html\
  	parabola/parabola.gfs.html\
++<<<<<<< HEAD
++	lonlat/lonlat.gfs.html\
++=======
+ 	parabola/solid/solid.gfs.html\
+ 	shock/shock.gfs.html\
+ 	shock/layered/layered.gfs.html\
+ 	shore/shore.gfs.html\
+ 	still/still.gfs.html\
+ 	still/bipolar/bipolar.gfs.html\
+ 	terrain/terrain.gfs.html\
  	lonlat/lonlat.gfs.html\
+ 	lonlat/cubed/cubed.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/coriolis.gfs.html\
  	cosine/cosine.gfs.html\
  	harmonic/harmonic.gfs.html\
  	harmonic/lonlat/lonlat.gfs.html\
  	gaussian/gaussian.gfs.html\
  	gaussian/lonlat/lonlat.gfs.html\
++<<<<<<< HEAD
++=======
+ 	annulus/annulus.gfs.html\
+ 	wannier/wannier.gfs.html\
+ 	wannier/bipolar/bipolar.gfs.html\
+ 	wannier/stretch/stretch.gfs.html\
+ 	rossby/rossby.gfs.html\
+ 	rossby/ocean/ocean.gfs.html\
+ 	rossby/river/river.gfs.html\
+ 	injectionaxi/injectionaxi.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	planar/planar.gfs.html\
  	planar/solid/solid.gfs.html\
  	bump/bump.gfs.html\
  	cylinder/cylinder.gfs.html\
  	cylinder/planar/planar.gfs.html\
  	electro/electro.gfs.html\
++<<<<<<< HEAD
++=======
+ 	debye/debye.gfs.html\
+ 	groundwater/groundwater.gfs.html\
+ 	groundwater/piecewise/piecewise.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	poisson/poisson.gfs\
  	poisson/poisson.sh\
  	poisson/res-7.ref\
@@@ -110,8 -149,26 +185,31 @@@
  	shear/curvature/../shear.sh\
  	shear/curvature/norms.ref\
  	shear/curvature/curvature.gfv\
++<<<<<<< HEAD
++	diffusion/diffusion.gfs\
++	diffusion/diffusion.sh\
++=======
+ 	shear/concentration/concentration.gfs\
+ 	shear/concentration/concentration.sh\
+ 	shear/concentration/convergence.ref\
+ 	shear/concentration/convergence1.ref\
+ 	shear/concentration/convergence2.ref\
+ 	shear/concentration/t1.gfv\
+ 	shear/concentration/t2.gfv\
+ 	rotate/rotate.gfs\
+ 	rotate/rotate.gfv\
+ 	rotate/cells.gfv\
+ 	rotate/error.ref\
+ 	rotate/n1-0.gnu\
+ 	rotate/n1-1.gnu\
+ 	rotate/n1-2.gnu\
+ 	rotate/n1-5.gnu\
+ 	rotate/error.n1\
  	diffusion/diffusion.gfs\
  	diffusion/diffusion.sh\
+ 	diffusion/concentration/concentration.gfs\
+ 	diffusion/concentration/concentration.sh\
++>>>>>>> upstream/20131206+dfsg
  	conservation/conservation.gfs\
  	reynolds/reynolds.gfs\
  	reynolds/reynolds.sh\
@@@ -125,6 -182,20 +223,23 @@@
  	reynolds/box/div6.ref\
  	reynolds/box/div7.ref\
  	reynolds/box/reynolds.ref\
++<<<<<<< HEAD
++=======
+ 	reynolds/skew/skew.gfs\
+ 	reynolds/skew/skew.sh\
+ 	reynolds/skew/div5.ref\
+ 	reynolds/skew/div6.ref\
+ 	reynolds/skew/div7.ref\
+ 	reynolds/skew/reynolds.ref\
+ 	reynolds/stream/stream.gfs\
+ 	reynolds/stream/div5.ref\
+ 	reynolds/stream/div6.ref\
+ 	reynolds/stream/div7.ref\
+ 	reynolds/stream/reynolds.ref\
+ 	reynolds/skewbox/skewbox.gfs\
+ 	reynolds/skewbox/skew.sh\
+ 	reynolds/skewbox/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.gfs\
  	periodic/periodic.sh\
  	periodic/r0.ref\
@@@ -164,6 -235,8 +279,11 @@@
  	axiadvection/vof.gfv\
  	axiadvection/solid/solid.gfs\
  	axiadvection/solid/axi.sh\
++<<<<<<< HEAD
++=======
+ 	swirl/swirl.gfs\
+ 	swirl/analytical\
++>>>>>>> upstream/20131206+dfsg
  	lid/lid.gfs\
  	lid/lid.sh\
  	lid/xprofile\
@@@ -177,11 -250,22 +297,28 @@@
  	lid/stretch/yprof.ghia\
  	lid/explicit/explicit.gfs\
  	lid/explicit/lid.sh\
++<<<<<<< HEAD
++=======
+ 	lid/metric/metric.gfs\
+ 	lid/metric/isolines.gfv\
+ 	lid/metric/xprofile\
+ 	lid/metric/yprofile\
+ 	lid/metric/xprof.ghia\
+ 	lid/metric/yprof.ghia\
++>>>>>>> upstream/20131206+dfsg
  	poiseuille/poiseuille.gfs\
  	poiseuille/poiseuille.sh\
  	poiseuille/error.ref\
  	poiseuille/bagnold/bagnold.gfs\
  	poiseuille/bagnold/error.ref\
++<<<<<<< HEAD
++=======
+ 	poiseuille/metric/metric.gfs\
+ 	poiseuille/metric/error.ref\
+ 	poiseuille/river/river.gfs\
+ 	poiseuille/river/river.sh\
+ 	poiseuille/river/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.gfs\
  	couette/couette.sh\
  	couette/profile\
@@@ -198,6 -282,14 +335,17 @@@
  	coriolis/coriolis.sh\
  	lake/lake.gfs\
  	lake/lake.gfv\
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs\
+ 	lake/stratified/stratified.sh\
+ 	lake/stratified/error.ref\
+ 	lake/stratified/field.awk\
+ 	lake/stratified/thermo.awk\
+ 	lake/river/river.gfs\
+ 	lake/river/river.sh\
+ 	lake/river/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs\
  	boundaries/boundaries.sh\
  	boundaries/orderU.ref\
@@@ -249,6 -341,19 +397,22 @@@
  	oscillation/oscillation.gfs\
  	oscillation/oscillation.sh\
  	oscillation/fit.ref\
++<<<<<<< HEAD
++=======
+ 	height/height.gfs\
+ 	height/height.sh\
+ 	height/height1.gfs\
+ 	height/height2.gfs\
+ 	height/height3.gfs\
+ 	height/height4.gfs\
+ 	height/height5.gfs\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.gfv\
+ 	plateau/zoom.gfv\
+ 	sessile/sessile.gfs\
+ 	sessile/sessile.sh\
+ 	sessile/error-6.ref\
++>>>>>>> upstream/20131206+dfsg
  	geo/geo.gfs\
  	geo/geo.sh\
  	geo/geo.gfv\
@@@ -262,6 -367,19 +426,22 @@@
  	geo/beta/llw\
  	geo/beta/energy.ref\
  	geo/beta/energy-nonlinear.ref\
++<<<<<<< HEAD
++=======
+ 	geo/river/river.gfs\
+ 	geo/river/geo.sh\
+ 	geo/river/geo.gfv\
+ 	geo/river/e.ref\
+ 	nonlinear/nonlinear.gfs\
+ 	nonlinear/nonlinear.sh\
+ 	nonlinear/river.gfs\
+ 	nonlinear/ocean.gfs\
+ 	nonlinear/error.gfv\
+ 	nonlinear/error-ocean.gfv\
+ 	nonlinear/error-1.ref\
+ 	nonlinear/error-ocean-1.ref\
+ 	nonlinear/error-river-1.ref\
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs\
  	waves/waves.sh\
  	waves/solution.gfv\
@@@ -275,8 -393,36 +455,41 @@@
  	parabola/parabola.gfs\
  	parabola/parabola.sh\
  	parabola/error.ref\
++<<<<<<< HEAD
 +	lonlat/lonlat.gfs\
 +	lonlat/isolines.gfv\
++=======
+ 	parabola/solid/solid.gfs\
+ 	parabola/solid/error.ref\
+ 	shock/shock.gfs\
+ 	shock/shock.sh\
+ 	shock/error.ref\
+ 	shock/layered/layered.gfs\
+ 	shock/layered/layered.sh\
+ 	shock/layered/uprof.awk\
+ 	shock/layered/field.awk\
+ 	shock/layered/prof.ref\
+ 	shore/shore.gfs\
+ 	shore/shore.sh\
+ 	shore/init.cgd\
+ 	shore/t160.csv\
+ 	shore/t175.csv\
+ 	shore/t220.csv\
+ 	shore/convergence.ref\
+ 	still/still.gfs\
+ 	still/still.gfv\
+ 	still/bipolar/bipolar.gfs\
+ 	still/bipolar/p.gfv\
+ 	still/bipolar/mesh.gfv\
+ 	terrain/terrain.gfs\
+ 	terrain/terrain.sh\
+ 	terrain/error-t.ref\
+ 	terrain/error-h.ref\
+ 	lonlat/lonlat.gfs\
+ 	lonlat/isolines.gfv\
+ 	lonlat/cubed/cubed.gfs\
+ 	lonlat/cubed/isolines.gfv\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/coriolis.gfs\
  	lonlat/coriolis/isolines.gfv\
  	cosine/cosine.gfs\
@@@ -304,11 -450,57 +517,64 @@@
  	gaussian/prof.ref\
  	gaussian/lonlat/lonlat.gfs\
  	gaussian/lonlat/prof.ref\
++<<<<<<< HEAD
++=======
+ 	annulus/annulus.gfs\
+ 	annulus/annulus.sh\
+ 	annulus/error.ref\
+ 	wannier/wannier.gfs\
+ 	wannier/wannier.c\
+ 	wannier/wannier.sh\
+ 	wannier/error.ref\
+ 	wannier/streamlines.gfv\
+ 	wannier/bipolar/bipolar.gfs\
+ 	wannier/bipolar/bipolar.sh\
+ 	wannier/bipolar/error.ref\
+ 	wannier/bipolar/mesh.gfv\
+ 	wannier/stretch/stretch.gfs\
+ 	wannier/stretch/error.ref\
+ 	wannier/stretch/streamlines.gfv\
+ 	rossby/rossby.gfs\
+ 	rossby/rossby.sh\
+ 	rossby/ehp.gfv\
+ 	rossby/ehm.gfv\
+ 	rossby/h.gfv\
+ 	rossby/href.gfv\
+ 	rossby/ec-6\
+ 	rossby/eh-4.ref\
+ 	rossby/eh-5.ref\
+ 	rossby/eh-6.ref\
+ 	rossby/ocean/ocean.gfs\
+ 	rossby/ocean/ehp.gfv\
+ 	rossby/ocean/ehm.gfv\
+ 	rossby/ocean/h.gfv\
+ 	rossby/ocean/href.gfv\
+ 	rossby/ocean/ec-6\
+ 	rossby/ocean/eh-4.ref\
+ 	rossby/ocean/eh-5.ref\
+ 	rossby/ocean/eh-6.ref\
+ 	rossby/river/river.gfs\
+ 	rossby/river/ehp.gfv\
+ 	rossby/river/ehm.gfv\
+ 	rossby/river/h.gfv\
+ 	rossby/river/href.gfv\
+ 	rossby/river/ec-6\
+ 	rossby/river/eh-4.ref\
+ 	rossby/river/eh-5.ref\
+ 	rossby/river/eh-6.ref\
+ 	injectionaxi/injectionaxi.gfs\
+ 	injectionaxi/injectionaxi.gfs\
++>>>>>>> upstream/20131206+dfsg
  	planar/planar.gfs\
  	planar/solid/solid.gfs\
  	bump/bump.gfs\
  	bump/bump.sh\
++<<<<<<< HEAD
 +	bump/norms.ref\
++=======
+ 	bump/norms-explicit.ref\
+ 	bump/norms-implicit.ref\
++>>>>>>> upstream/20131206+dfsg
  	cylinder/cylinder.gfs\
  	cylinder/cylinder.sh\
  	cylinder/norms.ref\
@@@ -317,9 -509,81 +583,87 @@@
  	electro/electro.gfs\
  	electro/electro.sh\
  	electro/figure.gfv\
++<<<<<<< HEAD
 +	electro/convergence.ref
 +
 +EXTRA_DIST += \
++=======
+ 	electro/convergence.ref\
+ 	debye/debye.gfs\
+ 	debye/debye.sh\
+ 	debye/points\
+ 	debye/analytical\
+ 	groundwater/groundwater.gfs\
+ 	groundwater/groundwater.sh\
+ 	groundwater/groundwater.gfv\
+ 	groundwater/p.ref\
+ 	groundwater/U.ref\
+ 	groundwater/piecewise/piecewise.gfs\
+ 	groundwater/piecewise/piecewise.gfv\
+ 	groundwater/piecewise/p.ref\
+ 	groundwater/piecewise/U.ref
+ 
+ TESTS = \
+ 	poisson.sh\
+ 	circle.sh\
+ 	dumbell.sh\
+ 	advection.sh\
+ 	shear.sh\
+ 	rotate.sh\
+ 	diffusion.sh\
+ 	conservation.sh\
+ 	reynolds.sh\
+ 	periodic.sh\
+ 	merging.sh\
+ 	source.sh\
+ 	axi.sh\
+ 	axiadvection.sh\
+ 	swirl.sh\
+ 	lid.sh\
+ 	poiseuille.sh\
+ 	couette.sh\
+ 	kinetic.sh\
+ 	hydrostatic.sh\
+ 	coriolis.sh\
+ 	lake.sh\
+ 	boundaries.sh\
+ 	channel.sh\
+ 	plate.sh\
+ 	hexagon.sh\
+ 	strouhal.sh\
+ 	spurious.sh\
+ 	capwave.sh\
+ 	oscillation.sh\
+ 	height.sh\
+ 	plateau.sh\
+ 	sessile.sh\
+ 	geo.sh\
+ 	nonlinear.sh\
+ 	waves.sh\
+ 	nz.sh\
+ 	parabola.sh\
+ 	shock.sh\
+ 	shore.sh\
+ 	still.sh\
+ 	terrain.sh\
+ 	lonlat.sh\
+ 	cosine.sh\
+ 	harmonic.sh\
+ 	gaussian.sh\
+ 	annulus.sh\
+ 	wannier.sh\
+ 	rossby.sh\
+ 	injectionaxi.sh\
+ 	planar.sh\
+ 	bump.sh\
+ 	cylinder.sh\
+ 	electro.sh\
+ 	debye.sh\
+ 	groundwater.sh\
+ 	summary.sh
+ 
+ EXTRA_DIST += $(TESTS)\
++>>>>>>> upstream/20131206+dfsg
  	poisson/poisson.gfs\
  	poisson/poisson.sh\
  	poisson/res-7.ref\
@@@ -367,8 -631,26 +711,31 @@@
  	shear/curvature/../shear.sh\
  	shear/curvature/norms.ref\
  	shear/curvature/curvature.gfv\
++<<<<<<< HEAD
++	diffusion/diffusion.gfs\
++	diffusion/diffusion.sh\
++=======
+ 	shear/concentration/concentration.gfs\
+ 	shear/concentration/concentration.sh\
+ 	shear/concentration/convergence.ref\
+ 	shear/concentration/convergence1.ref\
+ 	shear/concentration/convergence2.ref\
+ 	shear/concentration/t1.gfv\
+ 	shear/concentration/t2.gfv\
+ 	rotate/rotate.gfs\
+ 	rotate/rotate.gfv\
+ 	rotate/cells.gfv\
+ 	rotate/error.ref\
+ 	rotate/n1-0.gnu\
+ 	rotate/n1-1.gnu\
+ 	rotate/n1-2.gnu\
+ 	rotate/n1-5.gnu\
+ 	rotate/error.n1\
  	diffusion/diffusion.gfs\
  	diffusion/diffusion.sh\
+ 	diffusion/concentration/concentration.gfs\
+ 	diffusion/concentration/concentration.sh\
++>>>>>>> upstream/20131206+dfsg
  	conservation/conservation.gfs\
  	reynolds/reynolds.gfs\
  	reynolds/reynolds.sh\
@@@ -382,6 -664,20 +749,23 @@@
  	reynolds/box/div6.ref\
  	reynolds/box/div7.ref\
  	reynolds/box/reynolds.ref\
++<<<<<<< HEAD
++=======
+ 	reynolds/skew/skew.gfs\
+ 	reynolds/skew/skew.sh\
+ 	reynolds/skew/div5.ref\
+ 	reynolds/skew/div6.ref\
+ 	reynolds/skew/div7.ref\
+ 	reynolds/skew/reynolds.ref\
+ 	reynolds/stream/stream.gfs\
+ 	reynolds/stream/div5.ref\
+ 	reynolds/stream/div6.ref\
+ 	reynolds/stream/div7.ref\
+ 	reynolds/stream/reynolds.ref\
+ 	reynolds/skewbox/skewbox.gfs\
+ 	reynolds/skewbox/skew.sh\
+ 	reynolds/skewbox/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.gfs\
  	periodic/periodic.sh\
  	periodic/r0.ref\
@@@ -421,6 -717,8 +805,11 @@@
  	axiadvection/vof.gfv\
  	axiadvection/solid/solid.gfs\
  	axiadvection/solid/axi.sh\
++<<<<<<< HEAD
++=======
+ 	swirl/swirl.gfs\
+ 	swirl/analytical\
++>>>>>>> upstream/20131206+dfsg
  	lid/lid.gfs\
  	lid/lid.sh\
  	lid/xprofile\
@@@ -434,11 -732,22 +823,28 @@@
  	lid/stretch/yprof.ghia\
  	lid/explicit/explicit.gfs\
  	lid/explicit/lid.sh\
++<<<<<<< HEAD
++=======
+ 	lid/metric/metric.gfs\
+ 	lid/metric/isolines.gfv\
+ 	lid/metric/xprofile\
+ 	lid/metric/yprofile\
+ 	lid/metric/xprof.ghia\
+ 	lid/metric/yprof.ghia\
++>>>>>>> upstream/20131206+dfsg
  	poiseuille/poiseuille.gfs\
  	poiseuille/poiseuille.sh\
  	poiseuille/error.ref\
  	poiseuille/bagnold/bagnold.gfs\
  	poiseuille/bagnold/error.ref\
++<<<<<<< HEAD
++=======
+ 	poiseuille/metric/metric.gfs\
+ 	poiseuille/metric/error.ref\
+ 	poiseuille/river/river.gfs\
+ 	poiseuille/river/river.sh\
+ 	poiseuille/river/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.gfs\
  	couette/couette.sh\
  	couette/profile\
@@@ -455,6 -764,14 +861,17 @@@
  	coriolis/coriolis.sh\
  	lake/lake.gfs\
  	lake/lake.gfv\
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs\
+ 	lake/stratified/stratified.sh\
+ 	lake/stratified/error.ref\
+ 	lake/stratified/field.awk\
+ 	lake/stratified/thermo.awk\
+ 	lake/river/river.gfs\
+ 	lake/river/river.sh\
+ 	lake/river/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs\
  	boundaries/boundaries.sh\
  	boundaries/orderU.ref\
@@@ -506,6 -823,19 +923,22 @@@
  	oscillation/oscillation.gfs\
  	oscillation/oscillation.sh\
  	oscillation/fit.ref\
++<<<<<<< HEAD
++=======
+ 	height/height.gfs\
+ 	height/height.sh\
+ 	height/height1.gfs\
+ 	height/height2.gfs\
+ 	height/height3.gfs\
+ 	height/height4.gfs\
+ 	height/height5.gfs\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.gfv\
+ 	plateau/zoom.gfv\
+ 	sessile/sessile.gfs\
+ 	sessile/sessile.sh\
+ 	sessile/error-6.ref\
++>>>>>>> upstream/20131206+dfsg
  	geo/geo.gfs\
  	geo/geo.sh\
  	geo/geo.gfv\
@@@ -519,6 -849,19 +952,22 @@@
  	geo/beta/llw\
  	geo/beta/energy.ref\
  	geo/beta/energy-nonlinear.ref\
++<<<<<<< HEAD
++=======
+ 	geo/river/river.gfs\
+ 	geo/river/geo.sh\
+ 	geo/river/geo.gfv\
+ 	geo/river/e.ref\
+ 	nonlinear/nonlinear.gfs\
+ 	nonlinear/nonlinear.sh\
+ 	nonlinear/river.gfs\
+ 	nonlinear/ocean.gfs\
+ 	nonlinear/error.gfv\
+ 	nonlinear/error-ocean.gfv\
+ 	nonlinear/error-1.ref\
+ 	nonlinear/error-ocean-1.ref\
+ 	nonlinear/error-river-1.ref\
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs\
  	waves/waves.sh\
  	waves/solution.gfv\
@@@ -532,8 -875,36 +981,41 @@@
  	parabola/parabola.gfs\
  	parabola/parabola.sh\
  	parabola/error.ref\
++<<<<<<< HEAD
++	lonlat/lonlat.gfs\
++	lonlat/isolines.gfv\
++=======
+ 	parabola/solid/solid.gfs\
+ 	parabola/solid/error.ref\
+ 	shock/shock.gfs\
+ 	shock/shock.sh\
+ 	shock/error.ref\
+ 	shock/layered/layered.gfs\
+ 	shock/layered/layered.sh\
+ 	shock/layered/uprof.awk\
+ 	shock/layered/field.awk\
+ 	shock/layered/prof.ref\
+ 	shore/shore.gfs\
+ 	shore/shore.sh\
+ 	shore/init.cgd\
+ 	shore/t160.csv\
+ 	shore/t175.csv\
+ 	shore/t220.csv\
+ 	shore/convergence.ref\
+ 	still/still.gfs\
+ 	still/still.gfv\
+ 	still/bipolar/bipolar.gfs\
+ 	still/bipolar/p.gfv\
+ 	still/bipolar/mesh.gfv\
+ 	terrain/terrain.gfs\
+ 	terrain/terrain.sh\
+ 	terrain/error-t.ref\
+ 	terrain/error-h.ref\
  	lonlat/lonlat.gfs\
  	lonlat/isolines.gfv\
+ 	lonlat/cubed/cubed.gfs\
+ 	lonlat/cubed/isolines.gfv\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/coriolis.gfs\
  	lonlat/coriolis/isolines.gfv\
  	cosine/cosine.gfs\
@@@ -561,11 -932,57 +1043,64 @@@
  	gaussian/prof.ref\
  	gaussian/lonlat/lonlat.gfs\
  	gaussian/lonlat/prof.ref\
++<<<<<<< HEAD
++=======
+ 	annulus/annulus.gfs\
+ 	annulus/annulus.sh\
+ 	annulus/error.ref\
+ 	wannier/wannier.gfs\
+ 	wannier/wannier.c\
+ 	wannier/wannier.sh\
+ 	wannier/error.ref\
+ 	wannier/streamlines.gfv\
+ 	wannier/bipolar/bipolar.gfs\
+ 	wannier/bipolar/bipolar.sh\
+ 	wannier/bipolar/error.ref\
+ 	wannier/bipolar/mesh.gfv\
+ 	wannier/stretch/stretch.gfs\
+ 	wannier/stretch/error.ref\
+ 	wannier/stretch/streamlines.gfv\
+ 	rossby/rossby.gfs\
+ 	rossby/rossby.sh\
+ 	rossby/ehp.gfv\
+ 	rossby/ehm.gfv\
+ 	rossby/h.gfv\
+ 	rossby/href.gfv\
+ 	rossby/ec-6\
+ 	rossby/eh-4.ref\
+ 	rossby/eh-5.ref\
+ 	rossby/eh-6.ref\
+ 	rossby/ocean/ocean.gfs\
+ 	rossby/ocean/ehp.gfv\
+ 	rossby/ocean/ehm.gfv\
+ 	rossby/ocean/h.gfv\
+ 	rossby/ocean/href.gfv\
+ 	rossby/ocean/ec-6\
+ 	rossby/ocean/eh-4.ref\
+ 	rossby/ocean/eh-5.ref\
+ 	rossby/ocean/eh-6.ref\
+ 	rossby/river/river.gfs\
+ 	rossby/river/ehp.gfv\
+ 	rossby/river/ehm.gfv\
+ 	rossby/river/h.gfv\
+ 	rossby/river/href.gfv\
+ 	rossby/river/ec-6\
+ 	rossby/river/eh-4.ref\
+ 	rossby/river/eh-5.ref\
+ 	rossby/river/eh-6.ref\
+ 	injectionaxi/injectionaxi.gfs\
+ 	injectionaxi/injectionaxi.gfs\
++>>>>>>> upstream/20131206+dfsg
  	planar/planar.gfs\
  	planar/solid/solid.gfs\
  	bump/bump.gfs\
  	bump/bump.sh\
++<<<<<<< HEAD
 +	bump/norms.ref\
++=======
+ 	bump/norms-explicit.ref\
+ 	bump/norms-implicit.ref\
++>>>>>>> upstream/20131206+dfsg
  	cylinder/cylinder.gfs\
  	cylinder/cylinder.sh\
  	cylinder/norms.ref\
@@@ -574,52 -991,22 +1109,71 @@@
  	electro/electro.gfs\
  	electro/electro.sh\
  	electro/figure.gfv\
++<<<<<<< HEAD
 +	electro/convergence.ref
 +
 +TESTS = \
 +	poisson.sh\
 +	circle.sh\
 +	dumbell.sh\
 +	advection.sh\
 +	shear.sh\
 +	diffusion.sh\
 +	conservation.sh\
 +	reynolds.sh\
 +	periodic.sh\
 +	merging.sh\
 +	source.sh\
 +	axi.sh\
 +	axiadvection.sh\
 +	lid.sh\
 +	poiseuille.sh\
 +	couette.sh\
 +	kinetic.sh\
 +	hydrostatic.sh\
 +	coriolis.sh\
 +	lake.sh\
 +	boundaries.sh\
 +	channel.sh\
 +	plate.sh\
 +	hexagon.sh\
 +	strouhal.sh\
 +	spurious.sh\
 +	capwave.sh\
 +	oscillation.sh\
 +	geo.sh\
 +	waves.sh\
 +	nz.sh\
 +	parabola.sh\
 +	lonlat.sh\
 +	cosine.sh\
 +	harmonic.sh\
 +	gaussian.sh\
 +	planar.sh\
 +	bump.sh\
 +	cylinder.sh\
 +	electro.sh\
 +	summary.sh
 +
 +TESTS_ENVIRONMENT = TESTS=" poisson circle dumbell advection shear diffusion conservation reynolds periodic merging source axi axiadvection lid poiseuille couette kinetic hydrostatic coriolis lake boundaries channel plate hexagon strouhal spurious capwave oscillation geo waves nz parabola lonlat cosine harmonic gaussian planar bump cylinder electro"
++=======
+ 	electro/convergence.ref\
+ 	debye/debye.gfs\
+ 	debye/debye.sh\
+ 	debye/points\
+ 	debye/analytical\
+ 	groundwater/groundwater.gfs\
+ 	groundwater/groundwater.sh\
+ 	groundwater/groundwater.gfv\
+ 	groundwater/p.ref\
+ 	groundwater/U.ref\
+ 	groundwater/piecewise/piecewise.gfs\
+ 	groundwater/piecewise/piecewise.gfv\
+ 	groundwater/piecewise/p.ref\
+ 	groundwater/piecewise/U.ref
+ 
+ TESTS_ENVIRONMENT = TESTS=" poisson circle dumbell advection shear rotate diffusion conservation reynolds periodic merging source axi axiadvection swirl lid poiseuille couette kinetic hydrostatic coriolis lake boundaries channel plate hexagon strouhal spurious capwave oscillation height plateau sessile geo nonlinear waves nz parabola shock shore still terrain lonlat cosine harmonic gaussian annulus wannier rossby injectionaxi planar bump cylinder electro debye groundwater"
++>>>>>>> upstream/20131206+dfsg
  TEST_EXTENSIONS = .sh
  summary.log:\
  	poisson.log\
@@@ -627,6 -1014,7 +1181,10 @@@
  	dumbell.log\
  	advection.log\
  	shear.log\
++<<<<<<< HEAD
++=======
+ 	rotate.log\
++>>>>>>> upstream/20131206+dfsg
  	diffusion.log\
  	conservation.log\
  	reynolds.log\
@@@ -635,6 -1023,7 +1193,10 @@@
  	source.log\
  	axi.log\
  	axiadvection.log\
++<<<<<<< HEAD
++=======
+ 	swirl.log\
++>>>>>>> upstream/20131206+dfsg
  	lid.log\
  	poiseuille.log\
  	couette.log\
@@@ -650,18 -1039,32 +1212,46 @@@
  	spurious.log\
  	capwave.log\
  	oscillation.log\
++<<<<<<< HEAD
 +	geo.log\
 +	waves.log\
 +	nz.log\
 +	parabola.log\
++=======
+ 	height.log\
+ 	plateau.log\
+ 	sessile.log\
+ 	geo.log\
+ 	nonlinear.log\
+ 	waves.log\
+ 	nz.log\
+ 	parabola.log\
+ 	shock.log\
+ 	shore.log\
+ 	still.log\
+ 	terrain.log\
++>>>>>>> upstream/20131206+dfsg
  	lonlat.log\
  	cosine.log\
  	harmonic.log\
  	gaussian.log\
++<<<<<<< HEAD
 +	planar.log\
 +	bump.log\
 +	cylinder.log\
 +	electro.log
++=======
+ 	annulus.log\
+ 	wannier.log\
+ 	rossby.log\
+ 	injectionaxi.log\
+ 	planar.log\
+ 	bump.log\
+ 	cylinder.log\
+ 	electro.log\
+ 	debye.log\
+ 	groundwater.log
++>>>>>>> upstream/20131206+dfsg
  
  tests.tex: \
  	poisson/poisson.gfs\
@@@ -719,19 -1122,49 +1309,60 @@@
  	shear/curvature/dt-5.eps\
  	shear/curvature/norms\
  	shear/curvature/norms.tex\
++<<<<<<< HEAD
++	diffusion/diffusion.gfs\
++	diffusion/profile.eps\
++=======
+ 	shear/concentration/concentration.gfs\
+ 	shear/concentration/convergence.eps\
+ 	shear/concentration/t1-end.eps\
+ 	shear/concentration/t1-half.eps\
+ 	shear/concentration/t2-end.eps\
+ 	shear/concentration/t2-half.eps\
+ 	rotate/rotate.gfs\
+ 	rotate/error.eps\
+ 	rotate/rotate-0.eps\
+ 	rotate/rotate-1.eps\
+ 	rotate/rotate-2.eps\
+ 	rotate/rotate-5.eps\
  	diffusion/diffusion.gfs\
  	diffusion/profile.eps\
+ 	diffusion/concentration/concentration.gfs\
+ 	diffusion/concentration/profile.eps\
++>>>>>>> upstream/20131206+dfsg
  	conservation/conservation.gfs\
  	reynolds/reynolds.gfs\
  	reynolds/divmax.eps\
  	reynolds/reynolds.eps\
  	reynolds/divL2.eps\
  	reynolds/kinetic.eps\
++<<<<<<< HEAD
++=======
+ 	reynolds/accuracy.eps\
++>>>>>>> upstream/20131206+dfsg
  	reynolds/box/box.gfs\
  	reynolds/box/divmax.eps\
  	reynolds/box/reynolds.eps\
  	reynolds/box/divL2.eps\
  	reynolds/box/kinetic.eps\
++<<<<<<< HEAD
++=======
+ 	reynolds/box/accuracy.eps\
+ 	reynolds/skew/skew.gfs\
+ 	reynolds/skew/divmax.eps\
+ 	reynolds/skew/divL2.eps\
+ 	reynolds/skew/kinetic.eps\
+ 	reynolds/skew/accuracy.eps\
+ 	reynolds/stream/stream.gfs\
+ 	reynolds/stream/divmax.eps\
+ 	reynolds/stream/reynolds.eps\
+ 	reynolds/stream/divL2.eps\
+ 	reynolds/stream/kinetic.eps\
+ 	reynolds/stream/accuracy.eps\
+ 	reynolds/skewbox/skewbox.gfs\
+ 	reynolds/skewbox/kinetic.eps\
+ 	reynolds/skewbox/accuracy.eps\
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.gfs\
  	periodic/minion1.tex\
  	merging/merging.gfs\
@@@ -757,6 -1190,8 +1388,11 @@@
  	axiadvection/axiadvection.gfs\
  	axiadvection/vof.eps\
  	axiadvection/solid/solid.gfs\
++<<<<<<< HEAD
++=======
+ 	swirl/swirl.gfs\
+ 	swirl/profiles.eps\
++>>>>>>> upstream/20131206+dfsg
  	lid/lid.gfs\
  	lid/xprof\
  	lid/yprof\
@@@ -764,8 -1199,6 +1400,11 @@@
  	lid/yprof.eps\
  	lid/velocity.eps\
  	lid/stretch/stretch.gfs\
++<<<<<<< HEAD
 +	lid/stretch/xprof\
 +	lid/stretch/yprof\
++=======
++>>>>>>> upstream/20131206+dfsg
  	lid/stretch/xprof.eps\
  	lid/stretch/yprof.eps\
  	lid/stretch/velocity.eps\
@@@ -775,10 -1208,18 +1414,24 @@@
  	lid/explicit/xprof.eps\
  	lid/explicit/yprof.eps\
  	lid/explicit/velocity.eps\
++<<<<<<< HEAD
++=======
+ 	lid/metric/metric.gfs\
+ 	lid/metric/xprof.eps\
+ 	lid/metric/yprof.eps\
+ 	lid/metric/velocity.eps\
++>>>>>>> upstream/20131206+dfsg
  	poiseuille/poiseuille.gfs\
  	poiseuille/convergence.eps\
  	poiseuille/bagnold/bagnold.gfs\
  	poiseuille/bagnold/convergence.eps\
++<<<<<<< HEAD
++=======
+ 	poiseuille/metric/metric.gfs\
+ 	poiseuille/metric/convergence.eps\
+ 	poiseuille/river/river.gfs\
+ 	poiseuille/river/convergence.eps\
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.gfs\
  	couette/prof.eps\
  	kinetic/kinetic.gfs\
@@@ -790,6 -1231,15 +1443,18 @@@
  	coriolis/error.dat\
  	lake/lake.gfs\
  	lake/lake.eps\
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs\
+ 	lake/stratified/uprof.eps\
+ 	lake/stratified/error.eps\
+ 	lake/stratified/drho.eps\
+ 	lake/stratified/free.eps\
+ 	lake/stratified/thermo.eps\
+ 	lake/river/river.gfs\
+ 	lake/river/uprof.eps\
+ 	lake/river/error.eps\
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs\
  	boundaries/convergence.tex\
  	channel/channel.gfs\
@@@ -833,6 -1283,19 +1498,22 @@@
  	oscillation/frequency.eps\
  	oscillation/k.eps\
  	oscillation/laplace.eps\
++<<<<<<< HEAD
++=======
+ 	height/height.gfs\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau-0.2.eps\
+ 	plateau/plateau-0.6.eps\
+ 	plateau/plateau-t0.eps\
+ 	plateau/plateau-0.8.eps\
+ 	plateau/u.eps\
+ 	plateau/y.eps\
+ 	plateau/plateau.mpg\
+ 	plateau/zoom-t0.eps\
+ 	sessile/sessile.gfs\
+ 	sessile/rk.eps\
+ 	sessile/convergence.eps\
++>>>>>>> upstream/20131206+dfsg
  	geo/geo.gfs\
  	geo/geo_error.eps\
  	geo/error-100.eps\
@@@ -842,6 -1305,22 +1523,25 @@@
  	geo/error-1500.eps\
  	geo/beta/beta.gfs\
  	geo/beta/energy.eps\
++<<<<<<< HEAD
++=======
+ 	geo/river/river.gfs\
+ 	geo/river/geo_error.eps\
+ 	geo/river/error-100.eps\
+ 	geo/river/error-200.eps\
+ 	geo/river/error-300.eps\
+ 	geo/river/error-400.eps\
+ 	geo/river/error-1500.eps\
+ 	nonlinear/nonlinear.gfs\
+ 	nonlinear/end-0.eps\
+ 	nonlinear/end-ocean-0.eps\
+ 	nonlinear/end-river-0.eps\
+ 	nonlinear/end-1.eps\
+ 	nonlinear/end-ocean-1.eps\
+ 	nonlinear/end-river-1.eps\
+ 	nonlinear/error-0.eps\
+ 	nonlinear/error-1.eps\
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs\
  	waves/correlation\
  	waves/correlation.tex\
@@@ -858,6 -1337,29 +1558,32 @@@
  	parabola/u0.eps\
  	parabola/convergence.eps\
  	parabola/convergence-u.eps\
++<<<<<<< HEAD
++=======
+ 	parabola/solid/solid.gfs\
+ 	parabola/solid/u0.eps\
+ 	parabola/solid/convergence.eps\
+ 	parabola/solid/convergence-u.eps\
+ 	shock/shock.gfs\
+ 	shock/error.eps\
+ 	shock/h-8.eps\
+ 	shock/layered/layered.gfs\
+ 	shock/layered/prof.eps\
+ 	shock/layered/u.eps\
+ 	shock/layered/uprof-10.eps\
+ 	shock/layered/uprof-15.eps\
+ 	shock/layered/uprof-20.eps\
+ 	shore/shore.gfs\
+ 	shore/profile.eps\
+ 	shore/order.eps\
+ 	still/still.gfs\
+ 	still/still.eps\
+ 	still/bipolar/bipolar.gfs\
+ 	still/bipolar/still.eps\
+ 	terrain/terrain.gfs\
+ 	terrain/error-t.eps\
+ 	terrain/error-h.eps\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/lonlat.gfs\
  	lonlat/isolines-0.3.eps\
  	lonlat/isolines-0.6.eps\
@@@ -865,6 -1367,17 +1591,20 @@@
  	lonlat/p-0.3.eps\
  	lonlat/p-0.6.eps\
  	lonlat/p-0.9.eps\
++<<<<<<< HEAD
++=======
+ 	lonlat/cubed/cubed.gfs\
+ 	lonlat/cubed/isolines-0.3.eps\
+ 	lonlat/cubed/isolines-0.6.eps\
+ 	lonlat/cubed/isolines-0.9.eps\
+ 	lonlat/cubed/isolines-1.2.eps\
+ 	lonlat/cubed/isolines-1.5.eps\
+ 	lonlat/cubed/p-0.3.eps\
+ 	lonlat/cubed/p-0.6.eps\
+ 	lonlat/cubed/p-0.9.eps\
+ 	lonlat/cubed/p-1.2.eps\
+ 	lonlat/cubed/p-1.5.eps\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/coriolis.gfs\
  	lonlat/coriolis/isolines-0.4.eps\
  	lonlat/coriolis/isolines-0.8.eps\
@@@ -880,6 -1393,8 +1620,11 @@@
  	cosine/isolines-5-45.eps\
  	cosine/isolines-6-90.eps\
  	cosine/order-45.eps\
++<<<<<<< HEAD
++=======
+ 	cosine/error-90.eps\
+ 	cosine/error-45.eps\
++>>>>>>> upstream/20131206+dfsg
  	harmonic/harmonic.gfs\
  	harmonic/gerris.eps\
  	harmonic/residual.eps\
@@@ -896,6 -1411,49 +1641,52 @@@
  	gaussian/profile.eps\
  	gaussian/lonlat/lonlat.gfs\
  	gaussian/lonlat/profile.eps\
++<<<<<<< HEAD
++=======
+ 	annulus/annulus.gfs\
+ 	annulus/convergence.eps\
+ 	annulus/profile.eps\
+ 	wannier/wannier.gfs\
+ 	wannier/convergence.eps\
+ 	wannier/streamlines.eps\
+ 	wannier/bipolar/bipolar.gfs\
+ 	wannier/bipolar/convergence.eps\
+ 	wannier/bipolar/mesh.eps\
+ 	wannier/stretch/stretch.gfs\
+ 	wannier/stretch/convergence.eps\
+ 	rossby/rossby.gfs\
+ 	rossby/ehpm-4.eps\
+ 	rossby/ehpm-5.eps\
+ 	rossby/ehpm-6.eps\
+ 	rossby/h-4.eps\
+ 	rossby/h-5.eps\
+ 	rossby/h-6.eps\
+ 	rossby/ec.eps\
+ 	rossby/eh.eps\
+ 	rossby/order.eps\
+ 	rossby/ocean/ocean.gfs\
+ 	rossby/ocean/ehpm-4.eps\
+ 	rossby/ocean/ehpm-5.eps\
+ 	rossby/ocean/ehpm-6.eps\
+ 	rossby/ocean/h-4.eps\
+ 	rossby/ocean/h-5.eps\
+ 	rossby/ocean/h-6.eps\
+ 	rossby/ocean/ec.eps\
+ 	rossby/ocean/eh.eps\
+ 	rossby/ocean/order.eps\
+ 	rossby/river/river.gfs\
+ 	rossby/river/ehpm-4.eps\
+ 	rossby/river/ehpm-5.eps\
+ 	rossby/river/ehpm-6.eps\
+ 	rossby/river/h-4.eps\
+ 	rossby/river/h-5.eps\
+ 	rossby/river/h-6.eps\
+ 	rossby/river/ec.eps\
+ 	rossby/river/eh.eps\
+ 	rossby/river/order.eps\
+ 	injectionaxi/injectionaxi.gfs\
+ 	injectionaxi/profile.eps\
++>>>>>>> upstream/20131206+dfsg
  	planar/planar.gfs\
  	planar/solid/solid.gfs\
  	bump/bump.gfs\
@@@ -912,4 -1470,14 +1703,18 @@@
  	cylinder/planar/error.eps\
  	electro/electro.gfs\
  	electro/profile.eps\
++<<<<<<< HEAD
 +	electro/figure.eps
++=======
+ 	electro/figure.eps\
+ 	debye/debye.gfs\
+ 	debye/profile.eps\
+ 	groundwater/groundwater.gfs\
+ 	groundwater/solution.eps\
+ 	groundwater/convergence.eps\
+ 	groundwater/piecewise/piecewise.gfs\
+ 	groundwater/piecewise/convergence.eps\
+ 	groundwater/piecewise/solution.eps
+ 
+ TESTDIRS = poisson circle dumbell advection shear rotate diffusion conservation reynolds periodic merging source axi axiadvection swirl lid poiseuille couette kinetic hydrostatic coriolis lake boundaries channel plate hexagon strouhal spurious capwave oscillation height plateau sessile geo nonlinear waves nz parabola shock shore still terrain lonlat cosine harmonic gaussian annulus wannier rossby injectionaxi planar bump cylinder electro debye groundwater
++>>>>>>> upstream/20131206+dfsg
diff --cc test/Makefile.in
index d122065,3961332..1b1ad4a
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -15,6 -15,23 +24,26 @@@
  
  @SET_MAKE@
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -37,10 -54,8 +66,15 @@@ DIST_COMMON = $(srcdir)/Makefile.am $(s
  	$(srcdir)/Makefile.in
  subdir = test
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -49,6 -64,11 +83,14 @@@ CONFIG_CLEAN_FILES 
  CONFIG_CLEAN_VPATH_FILES =
  SOURCES =
  DIST_SOURCES =
++<<<<<<< HEAD
++=======
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  am__tty_colors = \
  red=; grn=; lgn=; blu=; std=
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@@ -72,22 -92,34 +114,52 @@@ am__nobase_list = $(am__nobase_strip_se
  am__base_list = \
    sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++<<<<<<< HEAD
++=======
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
++>>>>>>> upstream/20131206+dfsg
  # Restructured Text title and section.
  am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
  am__rst_section = sed 'p;s/./=/g;p;g'
  # Put stdin (possibly several lines separated by ".  ") in a box.
++<<<<<<< HEAD
 +am__text_box = $(AWK) '{				\
 +  n = split($$0, lines, "\\.  "); max = 0;		\
 +  for (i = 1; i <= n; ++i)				\
 +    if (max < length(lines[i]))				\
 +      max = length(lines[i]);				\
 +  for (i = 0; i < max; ++i) line = line "=";		\
 +  print line;						\
 +  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
 +  print line;						\
 +}'
 +# Solaris 10 'make', and several other traditional 'make' implementations,
 +# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
++=======
+ # Prefix each line by 'col' and terminate each with 'std', for coloring.
+ # Multi line coloring is problematic with "less -R", so we really need
+ # to color each line individually.
+ am__text_box = $(AWK) '{			\
+   n = split($$0, lines, "\\.  "); max = 0;	\
+   for (i = 1; i <= n; ++i)			\
+     if (max < length(lines[i]))			\
+       max = length(lines[i]);			\
+   for (i = 0; i < max; ++i)			\
+     line = line "=";				\
+   print col line std;				\
+   for (i = 1; i <= n; ++i)			\
+     if (lines[i])				\
+       print col lines[i] std;			\
+   print col line std;				\
+ }'
+ # Solaris 10 'make', and several other traditional 'make' implementations,
+ # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
++>>>>>>> upstream/20131206+dfsg
  # by disabling -e (using the XSI extension "set +e") if it's set.
  am__sh_e_setup = case $$- in *e*) set +e;; esac
  # To be inserted before the command running the test.  Creates the
@@@ -100,8 -132,9 +172,14 @@@ $(am__sh_e_setup);					
  $(am__vpath_adj_setup) $(am__vpath_adj)			\
  srcdir=$(srcdir); export srcdir;			\
  rm -f $@-t;						\
++<<<<<<< HEAD
 +trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \
 +  1 2 13 15;						\
++=======
+ am__trap='rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st'; \
+ trap "st=129; $$am__trap" 1; trap "st=130; $$am__trap" 2;	\
+ trap "st=141; $$am__trap" 13; trap "st=143; $$am__trap" 15; \
++>>>>>>> upstream/20131206+dfsg
  am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;		\
  test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?;	\
  if test -f "./$$f"; then dir=./;			\
@@@ -109,10 -142,39 +187,46 @@@ elif test -f "$$f"; then dir=;				
  else dir="$(srcdir)/"; fi;				\
  tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;		\
  $(TESTS_ENVIRONMENT)
++<<<<<<< HEAD
 +RECHECK_LOGS = $(TEST_LOGS)
 +AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 +TEST_SUITE_LOG = test-suite.log
 +TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
++=======
+ # To be appended to the command running the test.  Handle the stdout
+ # and stderr redirection, and catch the exit status.
+ am__check_post = \
+ >$@-t 2>&1;						\
+ estatus=$$?;						\
+ if test -n '$(DISABLE_HARD_ERRORS)'			\
+    && test $$estatus -eq 99; then			\
+   estatus=1;						\
+ fi;							\
+ TERM=$$__SAVED_TERM; export TERM;			\
+ $(am__tty_colors);					\
+ xfailed=PASS;						\
+ case " $(XFAIL_TESTS) " in				\
+   *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
+     xfailed=XFAIL;;					\
+ esac;							\
+ case $$estatus.$$xfailed in				\
+     0.XFAIL) col=$$red; res=XPASS;;			\
+     0.*)     col=$$grn; res=PASS ;;			\
+     77.*)    col=$$blu; res=SKIP ;;			\
+     99.*)    col=$$red; res=FAIL ;;			\
+     *.XFAIL) col=$$lgn; res=XFAIL;;			\
+     *.*)     col=$$red; res=FAIL ;;			\
+ esac;							\
+ echo "$${col}$$res$${std}: $$f";			\
+ echo "$$res: $$f (exit: $$estatus)" |			\
+   $(am__rst_section) >$@;				\
+ cat $@-t >>$@;						\
+ rm -f $@-t
+ RECHECK_LOGS = $(TEST_LOGS)
+ AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
+ TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+ TEST_SUITE_LOG = test-suite.log
++>>>>>>> upstream/20131206+dfsg
  am__test_logs1 = $(TESTS:=.log)
  am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
  TEST_LOGS = $(am__test_logs2:.sh.log=.log)
@@@ -147,7 -209,10 +261,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
 +FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
+ FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -160,8 -225,6 +281,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -184,7 -247,6 +308,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -202,6 -264,9 +329,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -209,6 -274,7 +342,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -235,10 -301,6 +372,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -272,54 -334,8 +412,59 @@@ top_builddir = @top_builddir
  top_srcdir = @top_srcdir@
  use_mpicc = @use_mpicc@
  AUTOMAKE_OPTIONS = parallel-tests
++<<<<<<< HEAD
 +
 +# new test cases need to be added to this list in the order in which
 +# they appear in template.tex
 +TESTDIRS = \
 +	poisson \
 +	circle \
 +	dumbell \
 +	advection \
 +	shear \
 +	diffusion \
 +	conservation \
 +	reynolds \
 +	periodic \
 +	merging \
 +	source \
 +	axi \
 +	axiadvection \
 +	lid \
 +	poiseuille \
 +	couette \
 +	kinetic \
 +	hydrostatic \
 +	coriolis \
 +	lake \
 +	boundaries \
 +	channel \
 +	plate \
 +	hexagon \
 +	strouhal \
 +	spurious \
 +	capwave \
 +	oscillation \
 +	geo \
 +	waves \
 +	nz \
 +	parabola \
 +	lonlat \
 +	cosine \
 +	harmonic \
 +	gaussian \
 +	planar \
 +	bump \
 +	cylinder \
 +	electro
 +
 +WEBROOT = /var/www/gerris
 +EXTRA_DIST = template.tex tests.bib depend.py test.py check.py gfs2tex \
 +	summary.sh Makefile.deps poisson/poisson.gfs \
++=======
+ EXTRA_DIST = template.tex depend.py test.py check.py gfs2tex \
+ 	summary.sh Makefile.deps $(TESTS) poisson/poisson.gfs \
++>>>>>>> upstream/20131206+dfsg
  	poisson/poisson.sh poisson/res-7.ref poisson/error.ref \
  	poisson/order.ref poisson/dirichlet/dirichlet.gfs \
  	poisson/dirichlet/res-7.ref poisson/dirichlet/error.ref \
@@@ -340,13 -356,31 +485,39 @@@
  	shear/shear.gfs shear/shear.sh shear/norms.ref \
  	shear/curvature/curvature.gfs shear/curvature/../shear.sh \
  	shear/curvature/norms.ref shear/curvature/curvature.gfv \
++<<<<<<< HEAD
++	diffusion/diffusion.gfs diffusion/diffusion.sh \
++=======
+ 	shear/concentration/concentration.gfs \
+ 	shear/concentration/concentration.sh \
+ 	shear/concentration/convergence.ref \
+ 	shear/concentration/convergence1.ref \
+ 	shear/concentration/convergence2.ref \
+ 	shear/concentration/t1.gfv shear/concentration/t2.gfv \
+ 	rotate/rotate.gfs rotate/rotate.gfv rotate/cells.gfv \
+ 	rotate/error.ref rotate/n1-0.gnu rotate/n1-1.gnu \
+ 	rotate/n1-2.gnu rotate/n1-5.gnu rotate/error.n1 \
  	diffusion/diffusion.gfs diffusion/diffusion.sh \
+ 	diffusion/concentration/concentration.gfs \
+ 	diffusion/concentration/concentration.sh \
++>>>>>>> upstream/20131206+dfsg
  	conservation/conservation.gfs reynolds/reynolds.gfs \
  	reynolds/reynolds.sh reynolds/div5.ref reynolds/div6.ref \
  	reynolds/div7.ref reynolds/reynolds.ref reynolds/box/box.gfs \
  	reynolds/box/../reynolds.sh reynolds/box/div5.ref \
  	reynolds/box/div6.ref reynolds/box/div7.ref \
++<<<<<<< HEAD
 +	reynolds/box/reynolds.ref periodic/periodic.gfs \
++=======
+ 	reynolds/box/reynolds.ref reynolds/skew/skew.gfs \
+ 	reynolds/skew/skew.sh reynolds/skew/div5.ref \
+ 	reynolds/skew/div6.ref reynolds/skew/div7.ref \
+ 	reynolds/skew/reynolds.ref reynolds/stream/stream.gfs \
+ 	reynolds/stream/div5.ref reynolds/stream/div6.ref \
+ 	reynolds/stream/div7.ref reynolds/stream/reynolds.ref \
+ 	reynolds/skewbox/skewbox.gfs reynolds/skewbox/skew.sh \
+ 	reynolds/skewbox/error.ref periodic/periodic.gfs \
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.sh periodic/r0.ref periodic/r1.ref \
  	periodic/r2.ref merging/merging.gfs merging/merging.sh \
  	merging/levels.gfv merging/vorticity.gfv merging/sim.err.ref \
@@@ -362,14 -396,20 +533,31 @@@
  	axiadvection/axiadvection.gfs axiadvection/axi.sh \
  	axiadvection/vectors.gfv axiadvection/vof.gfv \
  	axiadvection/solid/solid.gfs axiadvection/solid/axi.sh \
++<<<<<<< HEAD
 +	lid/lid.gfs lid/lid.sh lid/xprofile lid/yprofile \
 +	lid/xprof.ghia lid/yprof.ghia lid/stretch/stretch.gfs \
 +	lid/stretch/xprofile lid/stretch/yprofile \
 +	lid/stretch/xprof.ghia lid/stretch/yprof.ghia \
 +	lid/explicit/explicit.gfs lid/explicit/lid.sh \
 +	poiseuille/poiseuille.gfs poiseuille/poiseuille.sh \
 +	poiseuille/error.ref poiseuille/bagnold/bagnold.gfs \
 +	poiseuille/bagnold/error.ref couette/couette.gfs \
++=======
+ 	swirl/swirl.gfs swirl/analytical lid/lid.gfs lid/lid.sh \
+ 	lid/xprofile lid/yprofile lid/xprof.ghia lid/yprof.ghia \
+ 	lid/stretch/stretch.gfs lid/stretch/xprofile \
+ 	lid/stretch/yprofile lid/stretch/xprof.ghia \
+ 	lid/stretch/yprof.ghia lid/explicit/explicit.gfs \
+ 	lid/explicit/lid.sh lid/metric/metric.gfs \
+ 	lid/metric/isolines.gfv lid/metric/xprofile \
+ 	lid/metric/yprofile lid/metric/xprof.ghia \
+ 	lid/metric/yprof.ghia poiseuille/poiseuille.gfs \
+ 	poiseuille/poiseuille.sh poiseuille/error.ref \
+ 	poiseuille/bagnold/bagnold.gfs poiseuille/bagnold/error.ref \
+ 	poiseuille/metric/metric.gfs poiseuille/metric/error.ref \
+ 	poiseuille/river/river.gfs poiseuille/river/river.sh \
+ 	poiseuille/river/error.ref couette/couette.gfs \
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.sh couette/profile couette/prof-0.ref \
  	couette/prof-1.ref couette/prof-2.ref couette/prof-3.ref \
  	kinetic/kinetic.gfs kinetic/kinetic.gfs \
@@@ -377,6 -417,10 +565,13 @@@
  	hydrostatic/quadratic/quadratic.gfs \
  	hydrostatic/quadratic/quadratic.gfs coriolis/coriolis.gfs \
  	coriolis/coriolis.sh lake/lake.gfs lake/lake.gfv \
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs lake/stratified/stratified.sh \
+ 	lake/stratified/error.ref lake/stratified/field.awk \
+ 	lake/stratified/thermo.awk lake/river/river.gfs \
+ 	lake/river/river.sh lake/river/error.ref \
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs boundaries/boundaries.sh \
  	boundaries/orderU.ref boundaries/orderfU.ref \
  	boundaries/orderV.ref boundaries/orderfV.ref \
@@@ -399,16 -443,36 +594,48 @@@
  	capwave/air-water/prosperetti capwave/density/density.gfs \
  	capwave/density/convergence.ref capwave/density/prosperetti \
  	oscillation/oscillation.gfs oscillation/oscillation.sh \
++<<<<<<< HEAD
 +	oscillation/fit.ref geo/geo.gfs geo/geo.sh geo/geo.gfv \
 +	geo/e.ref geo/beta/beta.gfs geo/beta/beta.sh geo/beta/c \
 +	geo/beta/dlw geo/beta/lls geo/beta/pzm geo/beta/llw \
 +	geo/beta/energy.ref geo/beta/energy-nonlinear.ref \
++=======
+ 	oscillation/fit.ref height/height.gfs height/height.sh \
+ 	height/height1.gfs height/height2.gfs height/height3.gfs \
+ 	height/height4.gfs height/height5.gfs plateau/plateau.gfs \
+ 	plateau/plateau.gfv plateau/zoom.gfv sessile/sessile.gfs \
+ 	sessile/sessile.sh sessile/error-6.ref geo/geo.gfs geo/geo.sh \
+ 	geo/geo.gfv geo/e.ref geo/beta/beta.gfs geo/beta/beta.sh \
+ 	geo/beta/c geo/beta/dlw geo/beta/lls geo/beta/pzm geo/beta/llw \
+ 	geo/beta/energy.ref geo/beta/energy-nonlinear.ref \
+ 	geo/river/river.gfs geo/river/geo.sh geo/river/geo.gfv \
+ 	geo/river/e.ref nonlinear/nonlinear.gfs nonlinear/nonlinear.sh \
+ 	nonlinear/river.gfs nonlinear/ocean.gfs nonlinear/error.gfv \
+ 	nonlinear/error-ocean.gfv nonlinear/error-1.ref \
+ 	nonlinear/error-ocean-1.ref nonlinear/error-river-1.ref \
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs waves/waves.sh waves/solution.gfv \
  	waves/correlation.ref waves/adaptive/adaptive.gfs \
  	waves/adaptive/solution.gfv waves/adaptive/correlation.ref \
  	nz/nz.gfs nz/nz.gfs nz/bath.gts parabola/parabola.gfs \
++<<<<<<< HEAD
 +	parabola/parabola.sh parabola/error.ref lonlat/lonlat.gfs \
 +	lonlat/isolines.gfv lonlat/coriolis/coriolis.gfs \
++=======
+ 	parabola/parabola.sh parabola/error.ref \
+ 	parabola/solid/solid.gfs parabola/solid/error.ref \
+ 	shock/shock.gfs shock/shock.sh shock/error.ref \
+ 	shock/layered/layered.gfs shock/layered/layered.sh \
+ 	shock/layered/uprof.awk shock/layered/field.awk \
+ 	shock/layered/prof.ref shore/shore.gfs shore/shore.sh \
+ 	shore/init.cgd shore/t160.csv shore/t175.csv shore/t220.csv \
+ 	shore/convergence.ref still/still.gfs still/still.gfv \
+ 	still/bipolar/bipolar.gfs still/bipolar/p.gfv \
+ 	still/bipolar/mesh.gfv terrain/terrain.gfs terrain/terrain.sh \
+ 	terrain/error-t.ref terrain/error-h.ref lonlat/lonlat.gfs \
+ 	lonlat/isolines.gfv lonlat/cubed/cubed.gfs \
+ 	lonlat/cubed/isolines.gfv lonlat/coriolis/coriolis.gfs \
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/isolines.gfv cosine/cosine.gfs \
  	cosine/cosine.sh cosine/isolines.gfv cosine/reference.gfv \
  	cosine/zero.gfv cosine/error-45.ref cosine/error-90.ref \
@@@ -420,16 -484,41 +647,53 @@@
  	harmonic/lonlat/order.ref gaussian/gaussian.gfs \
  	gaussian/gaussian.sh gaussian/prof.ref \
  	gaussian/lonlat/lonlat.gfs gaussian/lonlat/prof.ref \
++<<<<<<< HEAD
 +	planar/planar.gfs planar/solid/solid.gfs bump/bump.gfs \
 +	bump/bump.sh bump/norms.ref cylinder/cylinder.gfs \
 +	cylinder/cylinder.sh cylinder/norms.ref \
 +	cylinder/planar/planar.gfs cylinder/planar/norms.ref \
 +	electro/electro.gfs electro/electro.sh electro/figure.gfv \
 +	electro/convergence.ref
++=======
+ 	annulus/annulus.gfs annulus/annulus.sh annulus/error.ref \
+ 	wannier/wannier.gfs wannier/wannier.c wannier/wannier.sh \
+ 	wannier/error.ref wannier/streamlines.gfv \
+ 	wannier/bipolar/bipolar.gfs wannier/bipolar/bipolar.sh \
+ 	wannier/bipolar/error.ref wannier/bipolar/mesh.gfv \
+ 	wannier/stretch/stretch.gfs wannier/stretch/error.ref \
+ 	wannier/stretch/streamlines.gfv rossby/rossby.gfs \
+ 	rossby/rossby.sh rossby/ehp.gfv rossby/ehm.gfv rossby/h.gfv \
+ 	rossby/href.gfv rossby/ec-6 rossby/eh-4.ref rossby/eh-5.ref \
+ 	rossby/eh-6.ref rossby/ocean/ocean.gfs rossby/ocean/ehp.gfv \
+ 	rossby/ocean/ehm.gfv rossby/ocean/h.gfv rossby/ocean/href.gfv \
+ 	rossby/ocean/ec-6 rossby/ocean/eh-4.ref rossby/ocean/eh-5.ref \
+ 	rossby/ocean/eh-6.ref rossby/river/river.gfs \
+ 	rossby/river/ehp.gfv rossby/river/ehm.gfv rossby/river/h.gfv \
+ 	rossby/river/href.gfv rossby/river/ec-6 rossby/river/eh-4.ref \
+ 	rossby/river/eh-5.ref rossby/river/eh-6.ref \
+ 	injectionaxi/injectionaxi.gfs injectionaxi/injectionaxi.gfs \
+ 	planar/planar.gfs planar/solid/solid.gfs bump/bump.gfs \
+ 	bump/bump.sh bump/norms-explicit.ref bump/norms-implicit.ref \
+ 	cylinder/cylinder.gfs cylinder/cylinder.sh cylinder/norms.ref \
+ 	cylinder/planar/planar.gfs cylinder/planar/norms.ref \
+ 	electro/electro.gfs electro/electro.sh electro/figure.gfv \
+ 	electro/convergence.ref debye/debye.gfs debye/debye.sh \
+ 	debye/points debye/analytical groundwater/groundwater.gfs \
+ 	groundwater/groundwater.sh groundwater/groundwater.gfv \
+ 	groundwater/p.ref groundwater/U.ref \
+ 	groundwater/piecewise/piecewise.gfs \
+ 	groundwater/piecewise/piecewise.gfv \
+ 	groundwater/piecewise/p.ref groundwater/piecewise/U.ref
++>>>>>>> upstream/20131206+dfsg
  DOC = tests
  
  # we need this for gfs.sty
  TEXINPUTS = .:$(top_srcdir)/doc/examples:
++<<<<<<< HEAD
++=======
+ # and this for bibtex
+ BIBINPUTS = $(top_srcdir)/doc
++>>>>>>> upstream/20131206+dfsg
  DOCS = \
  	poisson/poisson.gfs.html\
  	poisson/dirichlet/dirichlet.gfs.html\
@@@ -442,10 -531,16 +706,23 @@@
  	advection/advection.gfs.html\
  	shear/shear.gfs.html\
  	shear/curvature/curvature.gfs.html\
++<<<<<<< HEAD
 +	diffusion/diffusion.gfs.html\
 +	conservation/conservation.gfs.html\
 +	reynolds/reynolds.gfs.html\
 +	reynolds/box/box.gfs.html\
++=======
+ 	shear/concentration/concentration.gfs.html\
+ 	rotate/rotate.gfs.html\
+ 	diffusion/diffusion.gfs.html\
+ 	diffusion/concentration/concentration.gfs.html\
+ 	conservation/conservation.gfs.html\
+ 	reynolds/reynolds.gfs.html\
+ 	reynolds/box/box.gfs.html\
+ 	reynolds/skew/skew.gfs.html\
+ 	reynolds/stream/stream.gfs.html\
+ 	reynolds/skewbox/skewbox.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.gfs.html\
  	merging/merging.gfs.html\
  	source/source.gfs.html\
@@@ -453,17 -548,23 +730,34 @@@
  	axi/viscous/viscous.gfs.html\
  	axiadvection/axiadvection.gfs.html\
  	axiadvection/solid/solid.gfs.html\
++<<<<<<< HEAD
 +	lid/lid.gfs.html\
 +	lid/stretch/stretch.gfs.html\
 +	lid/explicit/explicit.gfs.html\
 +	poiseuille/poiseuille.gfs.html\
 +	poiseuille/bagnold/bagnold.gfs.html\
++=======
+ 	swirl/swirl.gfs.html\
+ 	lid/lid.gfs.html\
+ 	lid/stretch/stretch.gfs.html\
+ 	lid/explicit/explicit.gfs.html\
+ 	lid/metric/metric.gfs.html\
+ 	poiseuille/poiseuille.gfs.html\
+ 	poiseuille/bagnold/bagnold.gfs.html\
+ 	poiseuille/metric/metric.gfs.html\
+ 	poiseuille/river/river.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.gfs.html\
  	kinetic/kinetic.gfs.html\
  	hydrostatic/hydrostatic.gfs.html\
  	hydrostatic/quadratic/quadratic.gfs.html\
  	coriolis/coriolis.gfs.html\
  	lake/lake.gfs.html\
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs.html\
+ 	lake/river/river.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs.html\
  	channel/channel.gfs.html\
  	plate/plate.gfs.html\
@@@ -476,25 -577,50 +770,65 @@@
  	capwave/air-water/air-water.gfs.html\
  	capwave/density/density.gfs.html\
  	oscillation/oscillation.gfs.html\
++<<<<<<< HEAD
 +	geo/geo.gfs.html\
 +	geo/beta/beta.gfs.html\
++=======
+ 	height/height.gfs.html\
+ 	plateau/plateau.gfs.html\
+ 	plateau/plateau.mpg\
+ 	sessile/sessile.gfs.html\
+ 	geo/geo.gfs.html\
+ 	geo/beta/beta.gfs.html\
+ 	geo/river/river.gfs.html\
+ 	nonlinear/nonlinear.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs.html\
  	waves/adaptive/adaptive.gfs.html\
  	nz/nz.gfs.html\
  	parabola/parabola.gfs.html\
++<<<<<<< HEAD
++	lonlat/lonlat.gfs.html\
++=======
+ 	parabola/solid/solid.gfs.html\
+ 	shock/shock.gfs.html\
+ 	shock/layered/layered.gfs.html\
+ 	shore/shore.gfs.html\
+ 	still/still.gfs.html\
+ 	still/bipolar/bipolar.gfs.html\
+ 	terrain/terrain.gfs.html\
  	lonlat/lonlat.gfs.html\
+ 	lonlat/cubed/cubed.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/coriolis.gfs.html\
  	cosine/cosine.gfs.html\
  	harmonic/harmonic.gfs.html\
  	harmonic/lonlat/lonlat.gfs.html\
  	gaussian/gaussian.gfs.html\
  	gaussian/lonlat/lonlat.gfs.html\
++<<<<<<< HEAD
++=======
+ 	annulus/annulus.gfs.html\
+ 	wannier/wannier.gfs.html\
+ 	wannier/bipolar/bipolar.gfs.html\
+ 	wannier/stretch/stretch.gfs.html\
+ 	rossby/rossby.gfs.html\
+ 	rossby/ocean/ocean.gfs.html\
+ 	rossby/river/river.gfs.html\
+ 	injectionaxi/injectionaxi.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	planar/planar.gfs.html\
  	planar/solid/solid.gfs.html\
  	bump/bump.gfs.html\
  	cylinder/cylinder.gfs.html\
  	cylinder/planar/planar.gfs.html\
  	electro/electro.gfs.html\
++<<<<<<< HEAD
++=======
+ 	debye/debye.gfs.html\
+ 	groundwater/groundwater.gfs.html\
+ 	groundwater/piecewise/piecewise.gfs.html\
++>>>>>>> upstream/20131206+dfsg
  	poisson/poisson.gfs\
  	poisson/poisson.sh\
  	poisson/res-7.ref\
@@@ -542,8 -668,26 +876,31 @@@
  	shear/curvature/../shear.sh\
  	shear/curvature/norms.ref\
  	shear/curvature/curvature.gfv\
++<<<<<<< HEAD
 +	diffusion/diffusion.gfs\
 +	diffusion/diffusion.sh\
++=======
+ 	shear/concentration/concentration.gfs\
+ 	shear/concentration/concentration.sh\
+ 	shear/concentration/convergence.ref\
+ 	shear/concentration/convergence1.ref\
+ 	shear/concentration/convergence2.ref\
+ 	shear/concentration/t1.gfv\
+ 	shear/concentration/t2.gfv\
+ 	rotate/rotate.gfs\
+ 	rotate/rotate.gfv\
+ 	rotate/cells.gfv\
+ 	rotate/error.ref\
+ 	rotate/n1-0.gnu\
+ 	rotate/n1-1.gnu\
+ 	rotate/n1-2.gnu\
+ 	rotate/n1-5.gnu\
+ 	rotate/error.n1\
+ 	diffusion/diffusion.gfs\
+ 	diffusion/diffusion.sh\
+ 	diffusion/concentration/concentration.gfs\
+ 	diffusion/concentration/concentration.sh\
++>>>>>>> upstream/20131206+dfsg
  	conservation/conservation.gfs\
  	reynolds/reynolds.gfs\
  	reynolds/reynolds.sh\
@@@ -557,6 -701,20 +914,23 @@@
  	reynolds/box/div6.ref\
  	reynolds/box/div7.ref\
  	reynolds/box/reynolds.ref\
++<<<<<<< HEAD
++=======
+ 	reynolds/skew/skew.gfs\
+ 	reynolds/skew/skew.sh\
+ 	reynolds/skew/div5.ref\
+ 	reynolds/skew/div6.ref\
+ 	reynolds/skew/div7.ref\
+ 	reynolds/skew/reynolds.ref\
+ 	reynolds/stream/stream.gfs\
+ 	reynolds/stream/div5.ref\
+ 	reynolds/stream/div6.ref\
+ 	reynolds/stream/div7.ref\
+ 	reynolds/stream/reynolds.ref\
+ 	reynolds/skewbox/skewbox.gfs\
+ 	reynolds/skewbox/skew.sh\
+ 	reynolds/skewbox/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.gfs\
  	periodic/periodic.sh\
  	periodic/r0.ref\
@@@ -596,6 -754,8 +970,11 @@@
  	axiadvection/vof.gfv\
  	axiadvection/solid/solid.gfs\
  	axiadvection/solid/axi.sh\
++<<<<<<< HEAD
++=======
+ 	swirl/swirl.gfs\
+ 	swirl/analytical\
++>>>>>>> upstream/20131206+dfsg
  	lid/lid.gfs\
  	lid/lid.sh\
  	lid/xprofile\
@@@ -609,11 -769,22 +988,28 @@@
  	lid/stretch/yprof.ghia\
  	lid/explicit/explicit.gfs\
  	lid/explicit/lid.sh\
++<<<<<<< HEAD
++=======
+ 	lid/metric/metric.gfs\
+ 	lid/metric/isolines.gfv\
+ 	lid/metric/xprofile\
+ 	lid/metric/yprofile\
+ 	lid/metric/xprof.ghia\
+ 	lid/metric/yprof.ghia\
++>>>>>>> upstream/20131206+dfsg
  	poiseuille/poiseuille.gfs\
  	poiseuille/poiseuille.sh\
  	poiseuille/error.ref\
  	poiseuille/bagnold/bagnold.gfs\
  	poiseuille/bagnold/error.ref\
++<<<<<<< HEAD
++=======
+ 	poiseuille/metric/metric.gfs\
+ 	poiseuille/metric/error.ref\
+ 	poiseuille/river/river.gfs\
+ 	poiseuille/river/river.sh\
+ 	poiseuille/river/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.gfs\
  	couette/couette.sh\
  	couette/profile\
@@@ -630,6 -801,14 +1026,17 @@@
  	coriolis/coriolis.sh\
  	lake/lake.gfs\
  	lake/lake.gfv\
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs\
+ 	lake/stratified/stratified.sh\
+ 	lake/stratified/error.ref\
+ 	lake/stratified/field.awk\
+ 	lake/stratified/thermo.awk\
+ 	lake/river/river.gfs\
+ 	lake/river/river.sh\
+ 	lake/river/error.ref\
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs\
  	boundaries/boundaries.sh\
  	boundaries/orderU.ref\
@@@ -681,6 -860,19 +1088,22 @@@
  	oscillation/oscillation.gfs\
  	oscillation/oscillation.sh\
  	oscillation/fit.ref\
++<<<<<<< HEAD
++=======
+ 	height/height.gfs\
+ 	height/height.sh\
+ 	height/height1.gfs\
+ 	height/height2.gfs\
+ 	height/height3.gfs\
+ 	height/height4.gfs\
+ 	height/height5.gfs\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau.gfv\
+ 	plateau/zoom.gfv\
+ 	sessile/sessile.gfs\
+ 	sessile/sessile.sh\
+ 	sessile/error-6.ref\
++>>>>>>> upstream/20131206+dfsg
  	geo/geo.gfs\
  	geo/geo.sh\
  	geo/geo.gfv\
@@@ -694,6 -886,19 +1117,22 @@@
  	geo/beta/llw\
  	geo/beta/energy.ref\
  	geo/beta/energy-nonlinear.ref\
++<<<<<<< HEAD
++=======
+ 	geo/river/river.gfs\
+ 	geo/river/geo.sh\
+ 	geo/river/geo.gfv\
+ 	geo/river/e.ref\
+ 	nonlinear/nonlinear.gfs\
+ 	nonlinear/nonlinear.sh\
+ 	nonlinear/river.gfs\
+ 	nonlinear/ocean.gfs\
+ 	nonlinear/error.gfv\
+ 	nonlinear/error-ocean.gfv\
+ 	nonlinear/error-1.ref\
+ 	nonlinear/error-ocean-1.ref\
+ 	nonlinear/error-river-1.ref\
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs\
  	waves/waves.sh\
  	waves/solution.gfv\
@@@ -707,8 -912,36 +1146,41 @@@
  	parabola/parabola.gfs\
  	parabola/parabola.sh\
  	parabola/error.ref\
++<<<<<<< HEAD
++	lonlat/lonlat.gfs\
++	lonlat/isolines.gfv\
++=======
+ 	parabola/solid/solid.gfs\
+ 	parabola/solid/error.ref\
+ 	shock/shock.gfs\
+ 	shock/shock.sh\
+ 	shock/error.ref\
+ 	shock/layered/layered.gfs\
+ 	shock/layered/layered.sh\
+ 	shock/layered/uprof.awk\
+ 	shock/layered/field.awk\
+ 	shock/layered/prof.ref\
+ 	shore/shore.gfs\
+ 	shore/shore.sh\
+ 	shore/init.cgd\
+ 	shore/t160.csv\
+ 	shore/t175.csv\
+ 	shore/t220.csv\
+ 	shore/convergence.ref\
+ 	still/still.gfs\
+ 	still/still.gfv\
+ 	still/bipolar/bipolar.gfs\
+ 	still/bipolar/p.gfv\
+ 	still/bipolar/mesh.gfv\
+ 	terrain/terrain.gfs\
+ 	terrain/terrain.sh\
+ 	terrain/error-t.ref\
+ 	terrain/error-h.ref\
  	lonlat/lonlat.gfs\
  	lonlat/isolines.gfv\
+ 	lonlat/cubed/cubed.gfs\
+ 	lonlat/cubed/isolines.gfv\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/coriolis.gfs\
  	lonlat/coriolis/isolines.gfv\
  	cosine/cosine.gfs\
@@@ -736,11 -969,57 +1208,64 @@@
  	gaussian/prof.ref\
  	gaussian/lonlat/lonlat.gfs\
  	gaussian/lonlat/prof.ref\
++<<<<<<< HEAD
++=======
+ 	annulus/annulus.gfs\
+ 	annulus/annulus.sh\
+ 	annulus/error.ref\
+ 	wannier/wannier.gfs\
+ 	wannier/wannier.c\
+ 	wannier/wannier.sh\
+ 	wannier/error.ref\
+ 	wannier/streamlines.gfv\
+ 	wannier/bipolar/bipolar.gfs\
+ 	wannier/bipolar/bipolar.sh\
+ 	wannier/bipolar/error.ref\
+ 	wannier/bipolar/mesh.gfv\
+ 	wannier/stretch/stretch.gfs\
+ 	wannier/stretch/error.ref\
+ 	wannier/stretch/streamlines.gfv\
+ 	rossby/rossby.gfs\
+ 	rossby/rossby.sh\
+ 	rossby/ehp.gfv\
+ 	rossby/ehm.gfv\
+ 	rossby/h.gfv\
+ 	rossby/href.gfv\
+ 	rossby/ec-6\
+ 	rossby/eh-4.ref\
+ 	rossby/eh-5.ref\
+ 	rossby/eh-6.ref\
+ 	rossby/ocean/ocean.gfs\
+ 	rossby/ocean/ehp.gfv\
+ 	rossby/ocean/ehm.gfv\
+ 	rossby/ocean/h.gfv\
+ 	rossby/ocean/href.gfv\
+ 	rossby/ocean/ec-6\
+ 	rossby/ocean/eh-4.ref\
+ 	rossby/ocean/eh-5.ref\
+ 	rossby/ocean/eh-6.ref\
+ 	rossby/river/river.gfs\
+ 	rossby/river/ehp.gfv\
+ 	rossby/river/ehm.gfv\
+ 	rossby/river/h.gfv\
+ 	rossby/river/href.gfv\
+ 	rossby/river/ec-6\
+ 	rossby/river/eh-4.ref\
+ 	rossby/river/eh-5.ref\
+ 	rossby/river/eh-6.ref\
+ 	injectionaxi/injectionaxi.gfs\
+ 	injectionaxi/injectionaxi.gfs\
++>>>>>>> upstream/20131206+dfsg
  	planar/planar.gfs\
  	planar/solid/solid.gfs\
  	bump/bump.gfs\
  	bump/bump.sh\
++<<<<<<< HEAD
 +	bump/norms.ref\
++=======
+ 	bump/norms-explicit.ref\
+ 	bump/norms-implicit.ref\
++>>>>>>> upstream/20131206+dfsg
  	cylinder/cylinder.gfs\
  	cylinder/cylinder.sh\
  	cylinder/norms.ref\
@@@ -749,7 -1028,20 +1274,24 @@@
  	electro/electro.gfs\
  	electro/electro.sh\
  	electro/figure.gfv\
++<<<<<<< HEAD
 +	electro/convergence.ref
++=======
+ 	electro/convergence.ref\
+ 	debye/debye.gfs\
+ 	debye/debye.sh\
+ 	debye/points\
+ 	debye/analytical\
+ 	groundwater/groundwater.gfs\
+ 	groundwater/groundwater.sh\
+ 	groundwater/groundwater.gfv\
+ 	groundwater/p.ref\
+ 	groundwater/U.ref\
+ 	groundwater/piecewise/piecewise.gfs\
+ 	groundwater/piecewise/piecewise.gfv\
+ 	groundwater/piecewise/p.ref\
+ 	groundwater/piecewise/U.ref
++>>>>>>> upstream/20131206+dfsg
  
  TESTS = \
  	poisson.sh\
@@@ -757,6 -1049,7 +1299,10 @@@
  	dumbell.sh\
  	advection.sh\
  	shear.sh\
++<<<<<<< HEAD
++=======
+ 	rotate.sh\
++>>>>>>> upstream/20131206+dfsg
  	diffusion.sh\
  	conservation.sh\
  	reynolds.sh\
@@@ -765,6 -1058,7 +1311,10 @@@
  	source.sh\
  	axi.sh\
  	axiadvection.sh\
++<<<<<<< HEAD
++=======
+ 	swirl.sh\
++>>>>>>> upstream/20131206+dfsg
  	lid.sh\
  	poiseuille.sh\
  	couette.sh\
@@@ -780,22 -1074,37 +1330,54 @@@
  	spurious.sh\
  	capwave.sh\
  	oscillation.sh\
++<<<<<<< HEAD
 +	geo.sh\
 +	waves.sh\
 +	nz.sh\
 +	parabola.sh\
++=======
+ 	height.sh\
+ 	plateau.sh\
+ 	sessile.sh\
+ 	geo.sh\
+ 	nonlinear.sh\
+ 	waves.sh\
+ 	nz.sh\
+ 	parabola.sh\
+ 	shock.sh\
+ 	shore.sh\
+ 	still.sh\
+ 	terrain.sh\
++>>>>>>> upstream/20131206+dfsg
  	lonlat.sh\
  	cosine.sh\
  	harmonic.sh\
  	gaussian.sh\
++<<<<<<< HEAD
++=======
+ 	annulus.sh\
+ 	wannier.sh\
+ 	rossby.sh\
+ 	injectionaxi.sh\
++>>>>>>> upstream/20131206+dfsg
  	planar.sh\
  	bump.sh\
  	cylinder.sh\
  	electro.sh\
++<<<<<<< HEAD
 +	summary.sh
 +
 +TESTS_ENVIRONMENT = TESTS=" poisson circle dumbell advection shear diffusion conservation reynolds periodic merging source axi axiadvection lid poiseuille couette kinetic hydrostatic coriolis lake boundaries channel plate hexagon strouhal spurious capwave oscillation geo waves nz parabola lonlat cosine harmonic gaussian planar bump cylinder electro"
 +TEST_EXTENSIONS = .sh
++=======
+ 	debye.sh\
+ 	groundwater.sh\
+ 	summary.sh
+ 
+ TESTS_ENVIRONMENT = TESTS=" poisson circle dumbell advection shear rotate diffusion conservation reynolds periodic merging source axi axiadvection swirl lid poiseuille couette kinetic hydrostatic coriolis lake boundaries channel plate hexagon strouhal spurious capwave oscillation height plateau sessile geo nonlinear waves nz parabola shock shore still terrain lonlat cosine harmonic gaussian annulus wannier rossby injectionaxi planar bump cylinder electro debye groundwater"
+ TEST_EXTENSIONS = .sh
+ TESTDIRS = poisson circle dumbell advection shear rotate diffusion conservation reynolds periodic merging source axi axiadvection swirl lid poiseuille couette kinetic hydrostatic coriolis lake boundaries channel plate hexagon strouhal spurious capwave oscillation height plateau sessile geo nonlinear waves nz parabola shock shore still terrain lonlat cosine harmonic gaussian annulus wannier rossby injectionaxi planar bump cylinder electro debye groundwater
++>>>>>>> upstream/20131206+dfsg
  all: all-am
  
  .SUFFIXES:
@@@ -821,6 -1130,7 +1403,10 @@@ Makefile: $(srcdir)/Makefile.in $(top_b
  	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
  	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
  	esac;
++<<<<<<< HEAD
++=======
+ $(srcdir)/Makefile.deps:
++>>>>>>> upstream/20131206+dfsg
  
  $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@@ -843,41 -1153,12 +1429,49 @@@ ctags: CTAG
  CTAGS:
  
  
++<<<<<<< HEAD
 +# To be appended to the command running the test.  Handle the stdout
 +# and stderr redirection, and catch the exit status.
 +am__check_post =					\
 +>$@-t 2>&1;						\
 +estatus=$$?;						\
 +if test -n '$(DISABLE_HARD_ERRORS)'			\
 +   && test $$estatus -eq 99; then			\
 +  estatus=1;						\
 +fi;							\
 +TERM=$$__SAVED_TERM; export TERM;			\
 +$(am__tty_colors);					\
 +xfailed=PASS;						\
 +case " $(XFAIL_TESTS) " in				\
 +  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
 +    xfailed=XFAIL;;					\
 +esac;							\
 +case $$estatus:$$xfailed in				\
 +    0:XFAIL) col=$$red; res=XPASS;;			\
 +    0:*)     col=$$grn; res=PASS ;;			\
 +    77:*)    col=$$blu; res=SKIP ;;			\
 +    99:*)    col=$$red; res=FAIL ;;			\
 +    *:XFAIL) col=$$lgn; res=XFAIL;;			\
 +    *:*)     col=$$red; res=FAIL ;;			\
 +esac;							\
 +echo "$${col}$$res$${std}: $$f";			\
 +echo "$$res: $$f (exit: $$estatus)" |			\
 +  $(am__rst_section) >$@;				\
 +cat $@-t >>$@;						\
 +rm -f $@-t
 +
++=======
++>>>>>>> upstream/20131206+dfsg
  $(TEST_SUITE_LOG): $(TEST_LOGS)
  	@$(am__sh_e_setup);						\
  	list='$(TEST_LOGS)';						\
  	results=`for f in $$list; do					\
++<<<<<<< HEAD
 +		   read line < $$f && echo "$$line" || echo FAIL;	\
++=======
+ 		   test -r $$f && read line < $$f && echo "$$line"	\
+ 		     || echo FAIL;					\
++>>>>>>> upstream/20131206+dfsg
  		 done`;							\
  	all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[	 ]*//'`; \
  	fail=`echo "$$results" | grep -c '^FAIL'`;			\
@@@ -926,7 -1207,7 +1520,11 @@@
  	  echo ".. contents:: :depth: 2";				\
  	  echo;								\
  	  for f in $$list; do						\
++<<<<<<< HEAD
 +	    read line < $$f;						\
++=======
+ 	    test -r $$f && read line < $$f || line=;			\
++>>>>>>> upstream/20131206+dfsg
  	    case $$line in						\
  	      PASS:*|XFAIL:*);;						\
  	      *) echo; cat $$f;;					\
@@@ -943,23 -1224,37 +1541,57 @@@
  	test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);	\
  	$(am__tty_colors);						\
  	if $$exit; then							\
++<<<<<<< HEAD
 +	  echo $(ECHO_N) "$$grn$(ECHO_C)";				\
 +	 else								\
 +	  echo $(ECHO_N) "$$red$(ECHO_C)";				\
 +	fi;								\
 +	echo "$$msg" | $(am__text_box);					\
 +	echo $(ECHO_N) "$$std$(ECHO_C)";				\
 +	$$exit
 +
 +# Run all the tests.
 +check-TESTS:
 +	@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
 +	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 +	@list='$(TEST_LOGS)';						\
 +	list=`for f in $$list; do					\
 +	  test .log = $$f || echo $$f;					\
 +	done | tr '\012\015' '  '`;					\
 +	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
++=======
+ 	  col="$$grn";							\
+ 	 else								\
+ 	  col="$$red";							\
+ 	fi;								\
+ 	echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std";		\
+ 	$$exit || exit 1
+ 
+ check-TESTS recheck:
+ 	@if test $@ != recheck; then \
+ 	   list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list; \
+ 	 fi
+ 	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ 	@list='' list2='$(TEST_LOGS)'; for f in $$list2; do \
+ 	  test .log = $$f && continue; \
+ 	  if test $@ = recheck; then \
+ 	    test -f $$f || continue; \
+ 	    if test -r $$f && read line < $$f; then \
+ 	      case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
+ 	    fi; \
+ 	  fi; \
+ 	  if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
+ 	done; \
+ 	if test $@ = recheck && test -n "$$list"; then \
+ 	  $(am__make_dryrun) || rm -f $$list || exit 1; \
+ 	fi; \
+ 	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+ recheck: 
+ 
+ am--mostlyclean-test-html:
+ 	list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
+ 	rm -f $(TEST_SUITE_HTML)
++>>>>>>> upstream/20131206+dfsg
  
  .log.html:
  	@list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';		\
@@@ -979,22 -1274,11 +1611,30 @@@
  # Beware of concurrent executions.  Run "check" not "check-TESTS", as
  # check-SCRIPTS and other dependencies are rebuilt by the former only.
  # And expect check to fail.
++<<<<<<< HEAD
 +check-html:
 +	@if $(MAKE) $(AM_MAKEFLAGS) check; then			\
 +	  rv=0; else rv=$$?;					\
 +	fi;							\
 +	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;	\
 +	exit $$rv
 +recheck recheck-html:
 +	@target=`echo $@ | sed 's,^re,,'`;				\
 +	list='$(TEST_LOGS)';						\
 +	list=`for f in $$list; do					\
 +	        test -f $$f || continue;				\
 +	        if read line < $$f; then				\
 +	          case $$line in FAIL*|XPASS*) echo $$f;; esac;		\
 +	        else echo $$f; fi;					\
 +	      done | tr '\012\015' '  '`;				\
 +	$(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
++=======
+ check-html recheck-html:
+ 	@target=`echo $@ | sed 's/-html$$//'`; \
+ 	rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
+ 	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
+ 	exit $$rv
++>>>>>>> upstream/20131206+dfsg
  .sh.log:
  	@p='$<'; $(am__check_pre) $(SH_LOG_COMPILE) "$$tst" $(am__check_post)
  @am__EXEEXT_TRUE at .sh$(EXEEXT).log:
@@@ -1045,14 -1329,18 +1685,29 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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:
 +	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
 +	-test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
 +	-test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML)
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
+ mostlyclean-generic:
+ 	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ 	-test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
++>>>>>>> upstream/20131206+dfsg
  	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
  
  distclean-generic:
@@@ -1116,7 -1404,8 +1771,12 @@@ maintainer-clean-am: distclean-am maint
  
  mostlyclean: mostlyclean-am
  
++<<<<<<< HEAD
 +mostlyclean-am: mostlyclean-generic mostlyclean-libtool
++=======
+ mostlyclean-am: am--mostlyclean-test-html mostlyclean-generic \
+ 	mostlyclean-libtool
++>>>>>>> upstream/20131206+dfsg
  
  pdf: pdf-am
  
@@@ -1128,20 -1417,20 +1788,37 @@@ ps-am
  
  uninstall-am:
  
++<<<<<<< HEAD
 +.MAKE: check-am check-html install-am install-strip recheck \
 +	recheck-html
 +
 +.PHONY: all all-am check check-TESTS check-am check-html clean \
 +	clean-generic clean-libtool distclean distclean-generic \
 +	distclean-libtool distdir dvi dvi-am html html-am info info-am \
 +	install install-am install-data install-data-am install-dvi \
 +	install-dvi-am install-exec install-exec-am install-html \
 +	install-html-am install-info install-info-am install-man \
 +	install-pdf install-pdf-am install-ps install-ps-am \
 +	install-strip installcheck installcheck-am installdirs \
 +	maintainer-clean maintainer-clean-generic mostlyclean \
 +	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 +	recheck recheck-html uninstall uninstall-am
++=======
+ .MAKE: check-am check-html install-am install-strip recheck-html
+ 
+ .PHONY: all all-am am--mostlyclean-test-html check check-TESTS \
+ 	check-am check-html clean clean-generic clean-libtool \
+ 	distclean distclean-generic distclean-libtool distdir dvi \
+ 	dvi-am html html-am info info-am install install-am \
+ 	install-data install-data-am install-dvi install-dvi-am \
+ 	install-exec install-exec-am install-html install-html-am \
+ 	install-info install-info-am install-man install-pdf \
+ 	install-pdf-am install-ps install-ps-am install-strip \
+ 	installcheck installcheck-am installdirs maintainer-clean \
+ 	maintainer-clean-generic mostlyclean mostlyclean-generic \
+ 	mostlyclean-libtool pdf pdf-am ps ps-am recheck recheck-html \
+ 	uninstall uninstall-am
++>>>>>>> upstream/20131206+dfsg
  
  
  clean-generic:
@@@ -1149,44 -1438,18 +1826,56 @@@
  	$(RM) *.dvi *.aux *.log *.toc *.out tests.tex *.pyc *.bbl *.blg $(TESTS) Makefile.deps
  	mv -f summary.sh.bak summary.sh
  
++<<<<<<< HEAD
 +tests: tests.dvi
 +	TEXINPUTS=$(TEXINPUTS) hevea -fix -I $(top_srcdir)/doc/examples $(DOC).tex
 +	TEXINPUTS=$(TEXINPUTS) imagen -res 500 -extra "pnmscale 0.24" $(DOC)
 +	hacha $(DOC).html
 +	rm -f $(DOC).html
 +	mv -f $(DOC)[0-9][0-9][0-9].png $(DOC)
 +	for f in *.html; do konwert iso1-utf8 < $$f > $(DOC)/$$f; rm -f $$f; done
 +	cat $(DOC).css ../doc/share/darcs.css > $(DOC)/$(DOC).css
 +	sh ../doc/share/fixnav.sh $(DOC)
 +	cp -f ../doc/share/contents.png ../doc/share/next.png ../doc/share/prev.png $(DOC)
 +	rm -f *_motif.gif $(DOC).h{tml,aux,ind,toc} $(DOC).image.tex $(DOC).css
 +	sh ../doc/examples/crossref.sh --url=http://gerris.dalembert.upmc.fr/gerris/tests/tests $(TESTDIRS)
 +	mv references tests
 +
 +tests.dvi: tests.tex tests.bib
 +	- TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex > /dev/null 2>&1
 +	bibtex tests
 +	- TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex > /dev/null 2>&1
 +	TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex
 +
 +tests.pdf: tests.dvi
 +	dvips -Ppdf -G0 tests.dvi -o tests.ps
 +	ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true tests.ps tests.pdf
 +	rm -f tests.ps
 +
 +tests.tex: template.tex Makefile.deps
 +	rm -r -f tests
 +	python gfs2tex $(TESTDIRS)
 +	cp -f template.tex tests.tex
 +
 +Makefile.deps: depend.py
 +	python depend.py $(TESTDIRS) > Makefile.deps
++=======
+ Makefile.deps: template.tex depend.py Makefile.am
+ 	python depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
+ 	echo "" >> Makefile.deps
+ 	echo -n "TESTDIRS = " >> Makefile.deps
+ 	echo `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` >> Makefile.deps
++>>>>>>> upstream/20131206+dfsg
  summary.log:\
  	poisson.log\
  	circle.log\
  	dumbell.log\
  	advection.log\
  	shear.log\
++<<<<<<< HEAD
++=======
+ 	rotate.log\
++>>>>>>> upstream/20131206+dfsg
  	diffusion.log\
  	conservation.log\
  	reynolds.log\
@@@ -1195,6 -1458,7 +1884,10 @@@
  	source.log\
  	axi.log\
  	axiadvection.log\
++<<<<<<< HEAD
++=======
+ 	swirl.log\
++>>>>>>> upstream/20131206+dfsg
  	lid.log\
  	poiseuille.log\
  	couette.log\
@@@ -1210,18 -1474,32 +1903,46 @@@
  	spurious.log\
  	capwave.log\
  	oscillation.log\
++<<<<<<< HEAD
++	geo.log\
++	waves.log\
++	nz.log\
++	parabola.log\
++=======
+ 	height.log\
+ 	plateau.log\
+ 	sessile.log\
  	geo.log\
+ 	nonlinear.log\
  	waves.log\
  	nz.log\
  	parabola.log\
+ 	shock.log\
+ 	shore.log\
+ 	still.log\
+ 	terrain.log\
++>>>>>>> upstream/20131206+dfsg
  	lonlat.log\
  	cosine.log\
  	harmonic.log\
  	gaussian.log\
++<<<<<<< HEAD
 +	planar.log\
 +	bump.log\
 +	cylinder.log\
 +	electro.log
++=======
+ 	annulus.log\
+ 	wannier.log\
+ 	rossby.log\
+ 	injectionaxi.log\
+ 	planar.log\
+ 	bump.log\
+ 	cylinder.log\
+ 	electro.log\
+ 	debye.log\
+ 	groundwater.log
++>>>>>>> upstream/20131206+dfsg
  
  tests.tex: \
  	poisson/poisson.gfs\
@@@ -1279,19 -1557,49 +2000,60 @@@
  	shear/curvature/dt-5.eps\
  	shear/curvature/norms\
  	shear/curvature/norms.tex\
++<<<<<<< HEAD
 +	diffusion/diffusion.gfs\
 +	diffusion/profile.eps\
++=======
+ 	shear/concentration/concentration.gfs\
+ 	shear/concentration/convergence.eps\
+ 	shear/concentration/t1-end.eps\
+ 	shear/concentration/t1-half.eps\
+ 	shear/concentration/t2-end.eps\
+ 	shear/concentration/t2-half.eps\
+ 	rotate/rotate.gfs\
+ 	rotate/error.eps\
+ 	rotate/rotate-0.eps\
+ 	rotate/rotate-1.eps\
+ 	rotate/rotate-2.eps\
+ 	rotate/rotate-5.eps\
+ 	diffusion/diffusion.gfs\
+ 	diffusion/profile.eps\
+ 	diffusion/concentration/concentration.gfs\
+ 	diffusion/concentration/profile.eps\
++>>>>>>> upstream/20131206+dfsg
  	conservation/conservation.gfs\
  	reynolds/reynolds.gfs\
  	reynolds/divmax.eps\
  	reynolds/reynolds.eps\
  	reynolds/divL2.eps\
  	reynolds/kinetic.eps\
++<<<<<<< HEAD
++=======
+ 	reynolds/accuracy.eps\
++>>>>>>> upstream/20131206+dfsg
  	reynolds/box/box.gfs\
  	reynolds/box/divmax.eps\
  	reynolds/box/reynolds.eps\
  	reynolds/box/divL2.eps\
  	reynolds/box/kinetic.eps\
++<<<<<<< HEAD
++=======
+ 	reynolds/box/accuracy.eps\
+ 	reynolds/skew/skew.gfs\
+ 	reynolds/skew/divmax.eps\
+ 	reynolds/skew/divL2.eps\
+ 	reynolds/skew/kinetic.eps\
+ 	reynolds/skew/accuracy.eps\
+ 	reynolds/stream/stream.gfs\
+ 	reynolds/stream/divmax.eps\
+ 	reynolds/stream/reynolds.eps\
+ 	reynolds/stream/divL2.eps\
+ 	reynolds/stream/kinetic.eps\
+ 	reynolds/stream/accuracy.eps\
+ 	reynolds/skewbox/skewbox.gfs\
+ 	reynolds/skewbox/kinetic.eps\
+ 	reynolds/skewbox/accuracy.eps\
++>>>>>>> upstream/20131206+dfsg
  	periodic/periodic.gfs\
  	periodic/minion1.tex\
  	merging/merging.gfs\
@@@ -1317,6 -1625,8 +2079,11 @@@
  	axiadvection/axiadvection.gfs\
  	axiadvection/vof.eps\
  	axiadvection/solid/solid.gfs\
++<<<<<<< HEAD
++=======
+ 	swirl/swirl.gfs\
+ 	swirl/profiles.eps\
++>>>>>>> upstream/20131206+dfsg
  	lid/lid.gfs\
  	lid/xprof\
  	lid/yprof\
@@@ -1324,8 -1634,6 +2091,11 @@@
  	lid/yprof.eps\
  	lid/velocity.eps\
  	lid/stretch/stretch.gfs\
++<<<<<<< HEAD
 +	lid/stretch/xprof\
 +	lid/stretch/yprof\
++=======
++>>>>>>> upstream/20131206+dfsg
  	lid/stretch/xprof.eps\
  	lid/stretch/yprof.eps\
  	lid/stretch/velocity.eps\
@@@ -1335,10 -1643,18 +2105,24 @@@
  	lid/explicit/xprof.eps\
  	lid/explicit/yprof.eps\
  	lid/explicit/velocity.eps\
++<<<<<<< HEAD
++=======
+ 	lid/metric/metric.gfs\
+ 	lid/metric/xprof.eps\
+ 	lid/metric/yprof.eps\
+ 	lid/metric/velocity.eps\
++>>>>>>> upstream/20131206+dfsg
  	poiseuille/poiseuille.gfs\
  	poiseuille/convergence.eps\
  	poiseuille/bagnold/bagnold.gfs\
  	poiseuille/bagnold/convergence.eps\
++<<<<<<< HEAD
++=======
+ 	poiseuille/metric/metric.gfs\
+ 	poiseuille/metric/convergence.eps\
+ 	poiseuille/river/river.gfs\
+ 	poiseuille/river/convergence.eps\
++>>>>>>> upstream/20131206+dfsg
  	couette/couette.gfs\
  	couette/prof.eps\
  	kinetic/kinetic.gfs\
@@@ -1350,6 -1666,15 +2134,18 @@@
  	coriolis/error.dat\
  	lake/lake.gfs\
  	lake/lake.eps\
++<<<<<<< HEAD
++=======
+ 	lake/stratified/stratified.gfs\
+ 	lake/stratified/uprof.eps\
+ 	lake/stratified/error.eps\
+ 	lake/stratified/drho.eps\
+ 	lake/stratified/free.eps\
+ 	lake/stratified/thermo.eps\
+ 	lake/river/river.gfs\
+ 	lake/river/uprof.eps\
+ 	lake/river/error.eps\
++>>>>>>> upstream/20131206+dfsg
  	boundaries/boundaries.gfs\
  	boundaries/convergence.tex\
  	channel/channel.gfs\
@@@ -1393,6 -1718,19 +2189,22 @@@
  	oscillation/frequency.eps\
  	oscillation/k.eps\
  	oscillation/laplace.eps\
++<<<<<<< HEAD
++=======
+ 	height/height.gfs\
+ 	plateau/plateau.gfs\
+ 	plateau/plateau-0.2.eps\
+ 	plateau/plateau-0.6.eps\
+ 	plateau/plateau-t0.eps\
+ 	plateau/plateau-0.8.eps\
+ 	plateau/u.eps\
+ 	plateau/y.eps\
+ 	plateau/plateau.mpg\
+ 	plateau/zoom-t0.eps\
+ 	sessile/sessile.gfs\
+ 	sessile/rk.eps\
+ 	sessile/convergence.eps\
++>>>>>>> upstream/20131206+dfsg
  	geo/geo.gfs\
  	geo/geo_error.eps\
  	geo/error-100.eps\
@@@ -1402,6 -1740,22 +2214,25 @@@
  	geo/error-1500.eps\
  	geo/beta/beta.gfs\
  	geo/beta/energy.eps\
++<<<<<<< HEAD
++=======
+ 	geo/river/river.gfs\
+ 	geo/river/geo_error.eps\
+ 	geo/river/error-100.eps\
+ 	geo/river/error-200.eps\
+ 	geo/river/error-300.eps\
+ 	geo/river/error-400.eps\
+ 	geo/river/error-1500.eps\
+ 	nonlinear/nonlinear.gfs\
+ 	nonlinear/end-0.eps\
+ 	nonlinear/end-ocean-0.eps\
+ 	nonlinear/end-river-0.eps\
+ 	nonlinear/end-1.eps\
+ 	nonlinear/end-ocean-1.eps\
+ 	nonlinear/end-river-1.eps\
+ 	nonlinear/error-0.eps\
+ 	nonlinear/error-1.eps\
++>>>>>>> upstream/20131206+dfsg
  	waves/waves.gfs\
  	waves/correlation\
  	waves/correlation.tex\
@@@ -1418,6 -1772,29 +2249,32 @@@
  	parabola/u0.eps\
  	parabola/convergence.eps\
  	parabola/convergence-u.eps\
++<<<<<<< HEAD
++=======
+ 	parabola/solid/solid.gfs\
+ 	parabola/solid/u0.eps\
+ 	parabola/solid/convergence.eps\
+ 	parabola/solid/convergence-u.eps\
+ 	shock/shock.gfs\
+ 	shock/error.eps\
+ 	shock/h-8.eps\
+ 	shock/layered/layered.gfs\
+ 	shock/layered/prof.eps\
+ 	shock/layered/u.eps\
+ 	shock/layered/uprof-10.eps\
+ 	shock/layered/uprof-15.eps\
+ 	shock/layered/uprof-20.eps\
+ 	shore/shore.gfs\
+ 	shore/profile.eps\
+ 	shore/order.eps\
+ 	still/still.gfs\
+ 	still/still.eps\
+ 	still/bipolar/bipolar.gfs\
+ 	still/bipolar/still.eps\
+ 	terrain/terrain.gfs\
+ 	terrain/error-t.eps\
+ 	terrain/error-h.eps\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/lonlat.gfs\
  	lonlat/isolines-0.3.eps\
  	lonlat/isolines-0.6.eps\
@@@ -1425,6 -1802,17 +2282,20 @@@
  	lonlat/p-0.3.eps\
  	lonlat/p-0.6.eps\
  	lonlat/p-0.9.eps\
++<<<<<<< HEAD
++=======
+ 	lonlat/cubed/cubed.gfs\
+ 	lonlat/cubed/isolines-0.3.eps\
+ 	lonlat/cubed/isolines-0.6.eps\
+ 	lonlat/cubed/isolines-0.9.eps\
+ 	lonlat/cubed/isolines-1.2.eps\
+ 	lonlat/cubed/isolines-1.5.eps\
+ 	lonlat/cubed/p-0.3.eps\
+ 	lonlat/cubed/p-0.6.eps\
+ 	lonlat/cubed/p-0.9.eps\
+ 	lonlat/cubed/p-1.2.eps\
+ 	lonlat/cubed/p-1.5.eps\
++>>>>>>> upstream/20131206+dfsg
  	lonlat/coriolis/coriolis.gfs\
  	lonlat/coriolis/isolines-0.4.eps\
  	lonlat/coriolis/isolines-0.8.eps\
@@@ -1440,6 -1828,8 +2311,11 @@@
  	cosine/isolines-5-45.eps\
  	cosine/isolines-6-90.eps\
  	cosine/order-45.eps\
++<<<<<<< HEAD
++=======
+ 	cosine/error-90.eps\
+ 	cosine/error-45.eps\
++>>>>>>> upstream/20131206+dfsg
  	harmonic/harmonic.gfs\
  	harmonic/gerris.eps\
  	harmonic/residual.eps\
@@@ -1456,6 -1846,49 +2332,52 @@@
  	gaussian/profile.eps\
  	gaussian/lonlat/lonlat.gfs\
  	gaussian/lonlat/profile.eps\
++<<<<<<< HEAD
++=======
+ 	annulus/annulus.gfs\
+ 	annulus/convergence.eps\
+ 	annulus/profile.eps\
+ 	wannier/wannier.gfs\
+ 	wannier/convergence.eps\
+ 	wannier/streamlines.eps\
+ 	wannier/bipolar/bipolar.gfs\
+ 	wannier/bipolar/convergence.eps\
+ 	wannier/bipolar/mesh.eps\
+ 	wannier/stretch/stretch.gfs\
+ 	wannier/stretch/convergence.eps\
+ 	rossby/rossby.gfs\
+ 	rossby/ehpm-4.eps\
+ 	rossby/ehpm-5.eps\
+ 	rossby/ehpm-6.eps\
+ 	rossby/h-4.eps\
+ 	rossby/h-5.eps\
+ 	rossby/h-6.eps\
+ 	rossby/ec.eps\
+ 	rossby/eh.eps\
+ 	rossby/order.eps\
+ 	rossby/ocean/ocean.gfs\
+ 	rossby/ocean/ehpm-4.eps\
+ 	rossby/ocean/ehpm-5.eps\
+ 	rossby/ocean/ehpm-6.eps\
+ 	rossby/ocean/h-4.eps\
+ 	rossby/ocean/h-5.eps\
+ 	rossby/ocean/h-6.eps\
+ 	rossby/ocean/ec.eps\
+ 	rossby/ocean/eh.eps\
+ 	rossby/ocean/order.eps\
+ 	rossby/river/river.gfs\
+ 	rossby/river/ehpm-4.eps\
+ 	rossby/river/ehpm-5.eps\
+ 	rossby/river/ehpm-6.eps\
+ 	rossby/river/h-4.eps\
+ 	rossby/river/h-5.eps\
+ 	rossby/river/h-6.eps\
+ 	rossby/river/ec.eps\
+ 	rossby/river/eh.eps\
+ 	rossby/river/order.eps\
+ 	injectionaxi/injectionaxi.gfs\
+ 	injectionaxi/profile.eps\
++>>>>>>> upstream/20131206+dfsg
  	planar/planar.gfs\
  	planar/solid/solid.gfs\
  	bump/bump.gfs\
@@@ -1472,7 -1905,47 +2394,51 @@@
  	cylinder/planar/error.eps\
  	electro/electro.gfs\
  	electro/profile.eps\
++<<<<<<< HEAD
 +	electro/figure.eps
++=======
+ 	electro/figure.eps\
+ 	debye/debye.gfs\
+ 	debye/profile.eps\
+ 	groundwater/groundwater.gfs\
+ 	groundwater/solution.eps\
+ 	groundwater/convergence.eps\
+ 	groundwater/piecewise/piecewise.gfs\
+ 	groundwater/piecewise/convergence.eps\
+ 	groundwater/piecewise/solution.eps
+ 
+ tests.tex: template.tex Makefile.deps
+ 	rm -r -f tests
+ 	python gfs2tex $(TESTDIRS)
+ 	sed -e 's/\\test{\(.*\)\/\(.*\)}/\\input{\1\/\2\/\2.tex}/g' \
+ 	    -e 's/\\test{\(.*\)}/\\input{\1\/\1.tex}/g' < template.tex > tests.tex
+ 
+ tests: tests.dvi
+ 	if ! test -d $(DOC); then mkdir $(DOC); fi
+ 	TEXINPUTS=$(TEXINPUTS) hevea -fix -I $(top_srcdir)/doc/examples $(DOC).tex
+ 	TEXINPUTS=$(TEXINPUTS) imagen -res 500 -extra "pnmscale 0.24" $(DOC)
+ 	hacha $(DOC).html
+ 	rm -f $(DOC).html
+ 	mv -f $(DOC)[0-9][0-9][0-9].png $(DOC)
+ 	for f in *.html; do konwert iso1-utf8 < $$f > $(DOC)/$$f; rm -f $$f; done
+ 	cat $(DOC).css ../doc/share/darcs.css > $(DOC)/$(DOC).css
+ 	sh ../doc/share/fixnav.sh $(DOC)
+ 	cp -f ../doc/share/contents.png ../doc/share/next.png ../doc/share/prev.png $(DOC)
+ 	rm -f *_motif.gif $(DOC).h{tml,aux,ind,toc} $(DOC).image.tex $(DOC).css
+ 	sh ../doc/examples/crossref.sh --url=http://gerris.dalembert.upmc.fr/gerris/tests/tests $(TESTDIRS)
+ 	mv references tests
+ 
+ tests.dvi: tests.tex $(top_srcdir)/doc/gerris.bib
+ 	- TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex > /dev/null 2>&1
+ 	BIBINPUTS=$(BIBINPUTS) bibtex tests
+ 	- TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex > /dev/null 2>&1
+ 	TEXINPUTS=$(TEXINPUTS) latex -interaction=nonstopmode tests.tex
+ 
+ tests.pdf: tests.dvi
+ 	dvips -Ppdf -G0 tests.dvi -o tests.ps
+ 	ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true tests.ps tests.pdf
+ 	rm -f tests.ps
++>>>>>>> upstream/20131206+dfsg
  
  tests.tar.gz: tests $(DOCS)
  	tar czf tests.tar.gz tests $(DOCS)
diff --cc test/bump/bump.gfs
index d2c37e3,ce8fa42..a6ef720
--- a/test/bump/bump.gfs
+++ b/test/bump/bump.gfs
@@@ -14,6 -14,9 +14,12 @@@
  # $$
  # while preserving the initial geometry (see figure \ref{profile}).
  #
++<<<<<<< HEAD
++=======
+ # A more detailed discussion of this simulation is given in
+ # \cite{lopez-herrera2011}.
+ #
++>>>>>>> upstream/20131206+dfsg
  # \begin{figure}[htbp]
  # \caption{\label{decay} Temporal decay of the charge density at
  # (0,0). (Continuous) analytical solution, (symbols)
@@@ -43,7 -46,7 +49,11 @@@
  # Author: Jose M. L\'opez-Herrera S\'anchez
  # Command: sh bump.sh
  # Version: 100610
++<<<<<<< HEAD
 +# Required files: bump.sh norms.ref
++=======
+ # Required files: bump.sh norms-explicit.ref norms-implicit.ref
++>>>>>>> upstream/20131206+dfsg
  # Running time: 30 seconds
  # Generated files: profile.eps figure.eps error.eps
  
@@@ -61,29 -64,30 +71,54 @@@ GModule electrohydr
  	  return exp(-alpha)/beta*exp(-t/te);
          }
      }
++<<<<<<< HEAD
 +    Refine 7*(1. - 4.*(x*x + y*y))
 +    Time { end = 6 dtmax = 1e-2 }
 +    PhysicalParams{ L = 1 }
++=======
+     VariableTracer Rhoe
+     Refine 7*(1. - 4.*(x*x + y*y))
+     Time { end = 6 dtmax = 1e-2 }
++>>>>>>> upstream/20131206+dfsg
      Init {} { Rhoe = gaussbell(x,y,0) }
  
  #    OutputTime { istep = 5 } stderr
  #    OutputScalarNorm { istep = 5 } stderr { v = Rhoe }
      SourceDiffusionExplicit Rhoe 1 Phi
++<<<<<<< HEAD
 +
 +    OutputSimulation { start = 0 } {
 +	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$9 > "t_0"; }'
 +    } { format = text }
 +    OutputSimulation { start = 2 } {
 +	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$9 > "t_2"; }'
 +    } { format = text }
 +    OutputSimulation { start = 4 } {
 +	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$9 > "t_4"; }'
 +    } { format = text }
 +    OutputSimulation { start = 6 } {
 +	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$9 > "t_6"; }'
 +    } { format = text }
 +
 +    OutputErrorNorm { istep = 10 } norms { v = Rhoe } { s = gaussbell(x,y,t) }
++=======
+ #    SourceDiffusion Rhoe 1 { beta = 0.5 } Phi
+ 
+     OutputSimulation { start = 0 } {
+ 	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$11 > "t_0-SCHEME"; }'
+     } { format = text }
+     OutputSimulation { start = 2 } {
+ 	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$11 > "t_2-SCHEME"; }'
+     } { format = text }
+     OutputSimulation { start = 4 } {
+ 	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$11 > "t_4-SCHEME"; }'
+     } { format = text }
+     OutputSimulation { start = 6 } {
+ 	awk '{ if ($1 != "#") print sqrt($1*$1+$2*$2),$11 > "t_6-SCHEME"; }'
+     } { format = text }
+ 
+     OutputErrorNorm { istep = 10 } norms-SCHEME { v = Rhoe } { s = gaussbell(x,y,t) }
++>>>>>>> upstream/20131206+dfsg
      OutputLocation { istep = 10 } { 
          awk '
           BEGIN {
@@@ -94,12 -98,13 +129,21 @@@
           } 
           {
              if ($1 != "#")
++<<<<<<< HEAD
 +                print $1, rhoinic*exp(-$1*K/perm), $10;
 +         }' > timevol
++=======
+                 print $1, rhoinic*exp(-$1*K/perm), $12;
+          }' > timevol-SCHEME
++>>>>>>> upstream/20131206+dfsg
      } { 0. 0. 0. }
  } {
      # Electric parameters
      perm = 2
++<<<<<<< HEAD
++=======
+     charge = Rhoe
++>>>>>>> upstream/20131206+dfsg
      GfsElectricProjectionParams { tolerance = 1e-7 }
  }
  GfsBox {
diff --cc test/bump/bump.sh
index a763d45,1944c48..18088b0
--- a/test/bump/bump.sh
+++ b/test/bump/bump.sh
@@@ -1,5 -1,11 +1,15 @@@
  if test x$donotrun != xtrue; then
++<<<<<<< HEAD
 +    if gerris2D bump.gfs; then :
++=======
+     if gerris2D -DSCHEME=explicit bump.gfs; then :
+     else
+ 	exit 1
+     fi
+     if sed -e 's/SourceDiffusionExplicit Rhoe/#/' \
+ 	-e 's/#    SourceDiffusion/    SourceDiffusion/' < bump.gfs | \
+ 	gerris2D -DSCHEME=implicit -; then :
++>>>>>>> upstream/20131206+dfsg
      else
  	exit 1
      fi
@@@ -21,7 -27,8 +31,12 @@@ K=1
  rhoinic=1./a/sqrt(2*pi)
  rho(x)=(rhoinic*exp(-x*K/perm))
  plot \
++<<<<<<< HEAD
 +          'timevol' u 1:3 t '', \
++=======
+           'timevol-explicit' u 1:3 t 'explicit', \
+           'timevol-implicit' u 1:3 t 'implicit', \
++>>>>>>> upstream/20131206+dfsg
            rho(x) t '{/Symbol r}_{e}(0,t)'
  
  #
@@@ -41,10 -48,14 +56,21 @@@ rho2(x)=(rhoinic*exp(-0.5*x*x/a/a)*exp(
  rho4(x)=(rhoinic*exp(-0.5*x*x/a/a)*exp(-time4*K/perm))
  rho6(x)=(rhoinic*exp(-0.5*x*x/a/a)*exp(-time6*K/perm))
  plot [0:0.2]\
++<<<<<<< HEAD
 +          't_0' u 1:2 t '' lt 1, \
 +          't_2' u 1:2 t '' lt 2, \
 +          't_4' u 1:2 t '' lt 3, \
 +          't_6' u 1:2 t '' lt 4, \
++=======
+           't_0-explicit' u 1:2 t '' lt 1, \
+           't_0-implicit' u 1:2 t '' lt 1, \
+           't_2-explicit' u 1:2 t '' lt 2, \
+           't_2-implicit' u 1:2 t '' lt 2, \
+           't_4-explicit' u 1:2 t '' lt 3, \
+           't_4-implicit' u 1:2 t '' lt 3, \
+           't_6-explicit' u 1:2 t '' lt 4, \
+           't_6-implicit' u 1:2 t '' lt 4, \
++>>>>>>> upstream/20131206+dfsg
            rho0(x) t '{/Symbol r}_{e}(x,0)' lt 1,\
            rho2(x) t '{/Symbol r}_{e}(x,2)' lt 2,\
            rho4(x) t '{/Symbol r}_{e}(x,4)' lt 3,\
@@@ -57,8 -68,12 +83,17 @@@
  set output 'error.eps'
  set xlabel 't'
  set ylabel 'Error'
++<<<<<<< HEAD
 +plot 'norms.ref' u 3:9 w l t 'Max (ref)', 'norms' u 3:9 w p t 'Max', \
 +     'norms.ref' u 3:7 w l t 'L2 (ref)',  'norms' u 3:7 w p t 'L2'
++=======
+ plot 'norms-explicit.ref' u 3:9 w l t 'Max (ref Explicit)', \
+      'norms-implicit.ref' u 3:9 w l t 'Max (ref Implicit)', \
+      'norms-implicit' u 3:9  w p t '', 'norms-explicit' u 3:9  w p t '', \
+      'norms-explicit.ref' u 3:7 w l t 'L2 (ref Explicit)', \
+      'norms-implicit.ref' u 3:7 w l t 'L2 (ref Implicit)', \
+      'norms-implicit' u 3:7  w p t '', 'norms-explicit' u 3:7  w p t ''
++>>>>>>> upstream/20131206+dfsg
  EOF
  else
      exit 1
@@@ -66,10 -81,16 +101,23 @@@ f
  
  if cat <<EOF | python ; then :
  from check import *
++<<<<<<< HEAD
 +if (Curve('norms.ref',3,7) - Curve('norms',3,7)).max() > 1e-5 or \
 +   (Curve('norms.ref',3,9) - Curve('norms',3,9)).max() > 1e-5:
 +    print (Curve('norms.ref',3,7) - Curve('norms',3,7)).max()
 +    print (Curve('norms.ref',3,9) - Curve('norms',3,9)).max()
++=======
+ if (Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max() > 1e-5 or \
+    (Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max() > 1e-5 or \
+    (Curve('norms-implicit',3,7) - Curve('norms-implicit.ref',3,7)).max() > 1e-5 or \
+    (Curve('norms-implicit',3,9) - Curve('norms-implicit.ref',3,9)).max() > 1e-5:
+     print (Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max()
+     print (Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max()
+     print (Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max()
+     print (Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max()
+     print (Curve('norms-implicit',3,7) - Curve('norms-implicit.ref',3,7)).max()
+     print (Curve('norms-implicit',3,9) - Curve('norms-implicit.ref',3,9)).max()
++>>>>>>> upstream/20131206+dfsg
      exit(1)
  EOF
  else
diff --cc test/circle/error.ref
index d5e2bb6,bed7ca0..70e6f2e
--- a/test/circle/error.ref
+++ b/test/circle/error.ref
@@@ -1,6 -1,6 +1,15 @@@
++<<<<<<< HEAD
 +3 7.982e-02 1.068e-01 2.972e-01	3 7.982e-02 1.068e-01 2.972e-01
 +4 1.773e-02 2.227e-02 4.846e-02	4 1.773e-02 2.227e-02 4.846e-02
 +5 4.494e-03 5.566e-03 1.338e-02	5 4.494e-03 5.566e-03 1.338e-02
 +6 1.088e-03 1.356e-03 3.951e-03	6 1.088e-03 1.356e-03 3.951e-03
 +7 2.809e-04 3.504e-04 1.802e-03	7 2.809e-04 3.504e-04 1.802e-03
 +8 6.908e-05 8.573e-05 3.554e-04	8 6.908e-05 8.573e-05 3.554e-04
++=======
+ 3 7.692e-02 9.918e-02 2.467e-01	3 7.692e-02 9.918e-02 2.467e-01
+ 4 1.751e-02 2.182e-02 4.332e-02	4 1.751e-02 2.182e-02 4.332e-02
+ 5 4.480e-03 5.538e-03 1.281e-02	5 4.480e-03 5.538e-03 1.281e-02
+ 6 1.085e-03 1.349e-03 3.229e-03	6 1.085e-03 1.349e-03 3.229e-03
+ 7 2.805e-04 3.493e-04 1.698e-03	7 2.805e-04 3.493e-04 1.698e-03
+ 8 6.904e-05 8.562e-05 3.310e-04	8 6.904e-05 8.562e-05 3.310e-04
++>>>>>>> upstream/20131206+dfsg
diff --cc test/circle/refined/error.ref
index ae64f5a,38cdad5..42abcac
--- a/test/circle/refined/error.ref
+++ b/test/circle/refined/error.ref
@@@ -1,6 -1,6 +1,15 @@@
++<<<<<<< HEAD
 +3 1.031e-01 1.423e-01 3.652e-01	3 1.031e-01 1.423e-01 3.652e-01
 +4 2.943e-02 3.575e-02 7.316e-02	4 2.943e-02 3.575e-02 7.316e-02
 +5 6.323e-03 7.547e-03 1.639e-02	5 6.324e-03 7.547e-03 1.639e-02
 +6 1.471e-03 1.767e-03 3.910e-03	6 1.471e-03 1.767e-03 3.910e-03
 +7 3.349e-04 4.078e-04 9.344e-04	7 3.349e-04 4.078e-04 9.341e-04
 +8 8.131e-05 9.959e-05 3.322e-04	8 8.133e-05 9.962e-05 3.327e-04
++=======
+ 3 8.477e-02 1.317e-01 3.652e-01	3 8.477e-02 1.317e-01 3.652e-01
+ 4 2.963e-02 3.609e-02 7.316e-02	4 2.963e-02 3.609e-02 7.316e-02
+ 5 6.559e-03 7.752e-03 1.639e-02	5 6.559e-03 7.752e-03 1.639e-02
+ 6 1.514e-03 1.810e-03 3.912e-03	6 1.514e-03 1.810e-03 3.911e-03
+ 7 3.404e-04 4.129e-04 9.345e-04	7 3.404e-04 4.129e-04 9.345e-04
+ 8 8.202e-05 1.002e-04 3.338e-04	8 8.203e-05 1.002e-04 3.342e-04
++>>>>>>> upstream/20131206+dfsg
diff --cc test/circle/refined/order.ref
index 2bf88c1,3bc2046..8430c05
--- a/test/circle/refined/order.ref
+++ b/test/circle/refined/order.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +4 1.80868 1.99292 2.31956	4 1.80868 1.99292 2.31956
 +5 2.21861 2.24397 2.15824	5 2.21838 2.24397 2.15824
 +6 2.10381 2.0946 2.06758	6 2.10404 2.0946 2.06758
 +7 2.13499 2.11537 2.06506	7 2.13499 2.11537 2.06552
 +8 2.04223 2.03379 1.49199	8 2.04187 2.03335 1.48936
++=======
+ 4 1.5165 1.86758 2.31956	4 1.5165 1.86758 2.31956
+ 5 2.17551 2.21896 2.15824	5 2.17551 2.21896 2.15824
+ 6 2.11511 2.09858 2.06684	6 2.11511 2.09858 2.06721
+ 7 2.15306 2.13213 2.06564	7 2.15306 2.13213 2.06527
+ 8 2.05318 2.04291 1.48521	8 2.05301 2.04291 1.48348
++>>>>>>> upstream/20131206+dfsg
diff --cc test/circle/refined/res-7.ref
index 39f44d5,f2aec84..1e40a7b
--- a/test/circle/refined/res-7.ref
+++ b/test/circle/refined/res-7.ref
@@@ -1,10 -1,10 +1,23 @@@
++<<<<<<< HEAD
 +1 0.44000000 7.972e+01 2.2	1 0.52000000 5.513e+02 0.32
 +2 0.53000000 3.402e+01 2.3	2 0.53000000 8.422e+01 1.5
 +3 0.59000000 4.238e+00 3.5	3 0.53000000 1.222e+01 2.4
 +4 0.71000000 1.090e+00 3.6	4 0.56000000 1.777e+00 3.2
 +5 0.76000000 3.417e-01 3.5	5 0.59000000 2.927e-01 3.6
 +6 0.88000000 1.004e-01 3.5	6 0.59000000 4.905e-02 3.9
 +7 0.94000000 2.743e-02 3.5	7 0.62000000 8.336e-03 4.2
 +8 1.08000000 8.272e-03 3.5	8 0.62000000 1.417e-03 4.3
 +9 1.09000000 2.219e-03 3.5	9 0.63000000 3.209e-04 4.3
 +10 1.23000000 6.788e-04 3.5	10 0.66000000 8.164e-05 4.3
++=======
+ 1 0.42000000 7.967e+01 2.2	1 0.47000000 4.088e+02 0.43
+ 2 0.53000000 3.404e+01 2.3	2 0.48000000 7.751e+01 1.5
+ 3 0.81000000 4.312e+00 3.5	3 0.49000000 1.283e+01 2.4
+ 4 0.92000000 1.104e+00 3.6	4 0.51000000 2.025e+00 3.1
+ 5 1.14000000 3.463e-01 3.5	5 0.54000000 3.244e-01 3.5
+ 6 1.04000000 1.017e-01 3.5	6 0.55000000 5.464e-02 3.8
+ 7 1.09000000 2.778e-02 3.5	7 0.55000000 9.848e-03 4.1
+ 8 1.17000000 8.372e-03 3.5	8 0.57000000 1.903e-03 4.2
+ 9 1.24000000 2.247e-03 3.5	9 0.58000000 3.899e-04 4.3
+ 10 1.41000000 6.869e-04 3.5	10 0.61000000 8.343e-05 4.3
++>>>>>>> upstream/20131206+dfsg
diff --cc test/circle/res-7.ref
index de6ceb6,2fce959..b0d7dbb
--- a/test/circle/res-7.ref
+++ b/test/circle/res-7.ref
@@@ -1,10 -1,10 +1,23 @@@
++<<<<<<< HEAD
 +1 0.12000000 4.896e+00 36	1 0.19000000 1.627e+01 11
 +2 0.18000000 1.515e-01 34	2 0.22000000 5.601e-01 18
 +3 0.22000000 5.779e-03 31	3 0.22000000 2.143e-02 20
 +4 0.25000000 2.182e-04 30	4 0.24000000 1.340e-03 19
 +5 0.28000000 7.214e-06 30	5 0.25000000 1.110e-04 17
 +6 0.34000000 2.307e-07 30	6 0.27000000 1.068e-05 16
 +7 0.37000000 7.176e-09 31	7 0.27000000 1.110e-06 15
 +8 0.40000000 2.910e-10 30	8 0.28000000 1.304e-07 14
 +9 0.45000000 2.558e-11 27	9 0.29000000 1.559e-08 13
 +10 0.48000000 3.502e-11 19	10 0.31000000 1.862e-09 13
++=======
+ 1 0.17000000 4.896e+00 36	1 0.28000000 1.639e+01 11
+ 2 0.23000000 1.524e-01 34	2 0.29000000 7.106e-01 16
+ 3 0.28000000 5.873e-03 31	3 0.30000000 3.688e-02 17
+ 4 0.34000000 2.203e-04 30	4 0.31000000 2.544e-03 16
+ 5 0.41000000 7.269e-06 30	5 0.31000000 2.213e-04 15
+ 6 0.44000000 2.317e-07 30	6 0.32000000 2.223e-05 14
+ 7 0.48000000 7.092e-09 31	7 0.34000000 2.445e-06 13
+ 8 0.52000000 2.873e-10 30	8 0.35000000 2.857e-07 13
+ 9 0.65000000 2.882e-11 26	9 0.36000000 3.478e-08 12
+ 10 0.72000000 3.223e-11 19	10 0.36000000 4.337e-09 12
++>>>>>>> upstream/20131206+dfsg
diff --cc test/circle/star/error.ref
index d1a8ca0,5ac4d5a..1b1a63c
--- a/test/circle/star/error.ref
+++ b/test/circle/star/error.ref
@@@ -1,6 -1,6 +1,15 @@@
++<<<<<<< HEAD
 +3 1.467e-01 1.691e-01 2.966e-01	3 1.467e-01 1.691e-01 2.966e-01
 +4 1.987e-02 2.465e-02 5.349e-02	4 1.987e-02 2.465e-02 5.349e-02
 +5 6.993e-03 8.183e-03 1.644e-02	5 6.993e-03 8.183e-03 1.644e-02
 +6 1.120e-03 1.413e-03 3.203e-03	6 1.120e-03 1.413e-03 3.203e-03
 +7 2.713e-04 3.451e-04 1.543e-03	7 2.713e-04 3.451e-04 1.543e-03
 +8 1.184e-04 1.382e-04 5.969e-04	8 1.184e-04 1.382e-04 5.969e-04
++=======
+ 3 1.454e-01 1.681e-01 2.966e-01	3 1.454e-01 1.681e-01 2.966e-01
+ 4 1.963e-02 2.447e-02 5.349e-02	4 1.963e-02 2.447e-02 5.349e-02
+ 5 6.981e-03 8.182e-03 1.644e-02	5 6.981e-03 8.182e-03 1.644e-02
+ 6 1.119e-03 1.412e-03 3.202e-03	6 1.119e-03 1.412e-03 3.202e-03
+ 7 2.712e-04 3.448e-04 1.468e-03	7 2.712e-04 3.448e-04 1.468e-03
+ 8 1.185e-04 1.383e-04 6.070e-04	8 1.185e-04 1.383e-04 6.070e-04
++>>>>>>> upstream/20131206+dfsg
diff --cc test/circle/star/res-7.ref
index cc9ecc9,85dfe24..db52c09
--- a/test/circle/star/res-7.ref
+++ b/test/circle/star/res-7.ref
@@@ -1,10 -1,10 +1,23 @@@
++<<<<<<< HEAD
 +1 0.14000000 2.218e+01 8	1 0.22000000 2.140e+01 8.3
 +2 0.18000000 7.922e-01 15	2 0.23000000 1.928e+00 9.6
 +3 0.22000000 2.020e-02 21	3 0.24000000 2.376e-01 9.1
 +4 0.26000000 9.981e-04 21	4 0.24000000 2.875e-02 8.9
 +5 0.29000000 3.120e-05 22	5 0.27000000 3.597e-03 8.7
 +6 0.34000000 1.313e-06 23	6 0.25000000 4.721e-04 8.5
 +7 0.37000000 6.383e-08 22	7 0.27000000 6.497e-05 8.3
 +8 0.41000000 2.329e-09 23	8 0.29000000 9.303e-06 8.1
 +9 0.46000000 1.379e-10 22	9 0.30000000 1.374e-06 8
 +10 0.48000000 2.910e-11 19	10 0.31000000 2.074e-07 7.8
++=======
+ 1 0.19000000 2.218e+01 8	1 0.27000000 2.403e+01 7.4
+ 2 0.23000000 7.923e-01 15	2 0.29000000 1.314e+00 12
+ 3 0.30000000 2.020e-02 21	3 0.28000000 7.628e-02 13
+ 4 0.34000000 9.980e-04 21	4 0.31000000 7.682e-03 12
+ 5 0.40000000 3.119e-05 22	5 0.30000000 9.982e-04 11
+ 6 0.43000000 1.313e-06 23	6 0.32000000 1.630e-04 10
+ 7 0.51000000 6.384e-08 22	7 0.34000000 2.649e-05 9.4
+ 8 0.55000000 2.329e-09 23	8 0.34000000 4.296e-06 9
+ 9 0.59000000 1.336e-10 22	9 0.36000000 6.967e-07 8.6
+ 10 0.65000000 3.254e-11 19	10 0.36000000 1.131e-07 8.3
++>>>>>>> upstream/20131206+dfsg
diff --cc test/conservation/conservation.gfs
index e7ffca8,ba010c4..014ce3c
--- a/test/conservation/conservation.gfs
+++ b/test/conservation/conservation.gfs
@@@ -18,7 -18,7 +18,11 @@@
      VariableTracer Te
      InitFraction T (0.01 - (x*x + y*y + z*z))
      InitFraction Te (0.01 - (x*x + y*y + z*z))
++<<<<<<< HEAD
 +    SourceDiffusion T 1e-4
++=======
+     SourceDiffusion T 1e-4 { beta = 0.5 }
++>>>>>>> upstream/20131206+dfsg
      SourceDiffusionExplicit Te 1e-4
      AdaptGradient { istep = 1 } { minlevel = 3 maxlevel = 5 cmax = 1e-2 } T
      OutputScalarSum { istep = 1 } st { v = T }
@@@ -27,7 -27,7 +31,11 @@@
      OutputScalarStats { istep = 1 } te { v = T }
      OutputScalarNorm { istep = 1 } diff { v = (T - Te) }
      EventScript { start = end } {
++<<<<<<< HEAD
 +	if awk '{if ($9 > 6e-3) { 
++=======
+ 	if awk '{if ($9 > 8e-3) { 
++>>>>>>> upstream/20131206+dfsg
                     print "diff: " $9 > "/dev/stderr"; exit (1); 
                  }}' < diff &&
  	   awk 'BEGIN{ s=-1 } {
diff --cc test/coriolis/coriolis.gfs
index 26e6230,4a349ad..772e46a
--- a/test/coriolis/coriolis.gfs
+++ b/test/coriolis/coriolis.gfs
@@@ -73,13 -73,16 +73,23 @@@ Define Usol0 (A0*cos(2*Omega*t)+B0*sin(
  Define Vsol0 (-A0*sin(Phi)*sin(2*Omega*t) + B0*sin(Phi)*cos(2*Omega*t) + C0)
  Define Wsol0 (A0*cos(Phi)*sin(2*Omega*t) - B0*cos(Phi)*cos(2*Omega*t) + D0)
  
++<<<<<<< HEAD
 +1 3 GfsSimulation GfsBox GfsGEdge { ly = 2 lz = 4 } {
++=======
+ 1 3 GfsSimulation GfsBox GfsGEdge {} {
++>>>>>>> upstream/20131206+dfsg
    Time { end = 30000  }
  
    Refine 2
    
    # The reference length is set to 60 m
    PhysicalParams { L = 60 }
++<<<<<<< HEAD
++=======
+ 
+   # The domain is 60 x 30 x 15 m with an anisotropic mesh
+   MetricStretch {} { sy = 0.5 sz = 0.25 }
++>>>>>>> upstream/20131206+dfsg
    
    # Initialisation of the velocity field
    Init {} {
diff --cc test/cosine/cosine.gfs
index 127de78,dc4b408..fc0f7bc
--- a/test/cosine/cosine.gfs
+++ b/test/cosine/cosine.gfs
@@@ -84,18 -84,37 +84,47 @@@
  # \end{center}
  # \end{figure}
  #
++<<<<<<< HEAD
++=======
+ # \begin{figure}[htbp] 
+ # \caption{\label{error-t}Maximum relative errors as functions of
+ # time. (a) $\alpha=45^\circ$. (b) $\alpha=90^\circ$.}
+ # \begin{center}
+ # \begin{tabular}{c}
+ # (a) \includegraphics[width=0.7\hsize]{error-45.eps} \\
+ # (b) \includegraphics[width=0.7\hsize]{error-90.eps}
+ # \end{tabular}
+ # \end{center}
+ # \end{figure}
+ #
++>>>>>>> upstream/20131206+dfsg
  # Author: St\'ephane Popinet
  # Command: sh cosine.sh
  # Version: 091029
  # Required files: cosine.sh isolines.gfv reference.gfv zero.gfv error-45.ref error-90.ref rossmanith45 rossmanith90
  # Running time: 6 minutes
++<<<<<<< HEAD
 +# Generated files: isolines-4-45.eps  isolines-5-90.eps  isolines-7-45.eps  order-90.eps isolines-4-90.eps  isolines-6-45.eps  isolines-7-90.eps isolines-5-45.eps  isolines-6-90.eps  order-45.eps
++=======
+ # Generated files: isolines-4-45.eps isolines-5-90.eps isolines-7-45.eps order-90.eps isolines-4-90.eps isolines-6-45.eps isolines-7-90.eps isolines-5-45.eps isolines-6-90.eps order-45.eps error-90.eps error-45.eps
++>>>>>>> upstream/20131206+dfsg
  #
  Define U0 (2.*M_PI)
  
  6 12 GfsAdvection GfsBox GfsGEdge {} {
    PhysicalParams { L = 2.*M_PI/4. }
    MetricCubed M LEVEL
++<<<<<<< HEAD
++=======
+ 
+   # Use alternative implementation
+   # MetricCubed1 M
+   # MapFunction {
+   #     x = atan2 (X, Z)*180./M_PI
+   #     y = asin (CLAMP(Y,-1.,1.))*180./M_PI
+   # }
+ 
++>>>>>>> upstream/20131206+dfsg
    Time { end = 1 }
    Refine LEVEL
    VariableTracer T { 
@@@ -104,23 -123,37 +133,54 @@@
    }
    Global {
        #define DTR (M_PI/180.)
++<<<<<<< HEAD
 +      double bell (double x, double y, double t) {
 +	  double h0 = 1.;
 +	  double R = 1./3.;
 +	  double lc = 3.*M_PI/2. + U0*t, tc = 0.;
 +	  x *= DTR; y *= DTR;
 +	  double r = acos (sin(tc)*sin(y) + cos (tc)*cos (y)*cos (x - lc));
 +	  return r >= R ? 0. : (h0/2.)*(1. + cos (M_PI*r/R));
 +      }
 +  }
 +  Init {} { T = bell(x,y,0) }
++=======
+       double lambda1 (double lambda, double theta, double lambdap, double thetap) {
+ 	  /* eq. (8) */
+ 	  return atan2 (cos (theta)*sin (lambda - lambdap),
+ 	                cos (theta)*sin (thetap)*cos (lambda - lambdap) - 
+                         cos (thetap)* sin (theta));
+       }
+       double theta1 (double lambda, double theta, double lambdap, double thetap) {
+ 	  /* eq. (9) */
+ 	  return asin (sin (theta)*sin (thetap) + cos (theta)*cos (thetap)*cos (lambda - lambdap));
+       }
+       double bell (double lambda, double theta, double lc, double tc) {
+ 	  double h0 = 1.;
+ 	  double R = 1./3.;
+ 	  double r = acos (sin(tc)*sin(theta) + cos (tc)*cos (theta)*cos (lambda - lc));
+ 	  return r >= R ? 0. : (h0/2.)*(1. + cos (M_PI*r/R));
+       }
+       double bell_moving (double lambda, double theta, double t) {
+ 	  double lambda2 = lambda1 (lambda, theta, M_PI, M_PI/2. - ALPHA*DTR);
+ 	  double theta2 = theta1 (lambda, theta, M_PI, M_PI/2. - ALPHA*DTR);
+ 	  double lc = 3.*M_PI/2. - U0*t, tc = 0.;
+ 	  return bell (lambda2, theta2, lc, tc);
+       }      
+   }
+   Init {} { T = bell_moving(x*DTR,y*DTR,0) }
++>>>>>>> upstream/20131206+dfsg
    VariableStreamFunction Psi -U0*(sin (y*DTR)*cos (DTR*ALPHA) - cos (x*DTR)*cos (y*DTR)*sin (DTR*ALPHA))
    AdaptGradient { istep = 1 } { cmax = 1e-4 maxlevel = LEVEL } T
    OutputTime { istep = 10 } stderr
  #  OutputSimulation { istep = 10 } stdout
    OutputSimulation { start = end } end-LEVEL-ALPHA.gfs
    OutputErrorNorm { istep = 1 } { awk '{ print LEVEL,$3,$5,$7,$9}' > error-LEVEL-ALPHA } { v = T } {
++<<<<<<< HEAD
 +      s = bell(x,y,t)
++=======
+       s = bell_moving(x*DTR,y*DTR,t)
++>>>>>>> upstream/20131206+dfsg
        v = E
        relative = 1
    }
@@@ -143,7 -176,7 +203,11 @@@
          set xlabel 'Longitude'
          set ylabel 'Latitude'
          unset key
++<<<<<<< HEAD
 +        plot [-120:-60][-30:30]'isolines.gnu' w l, 'reference.gnu' w l, 'zero.gnu' w l
++=======
+         plot [60:120][-30:30]'isolines.gnu' w l, 'reference.gnu' w l, 'zero.gnu' w l
++>>>>>>> upstream/20131206+dfsg
  EOF
        fixbb isolines-LEVEL-ALPHA.eps
        rm -f isolines.gnu reference.gnu zero.gnu
diff --cc test/cosine/cosine.sh
index 55d4fa2,06c9a9f..9672f3c
--- a/test/cosine/cosine.sh
+++ b/test/cosine/cosine.sh
@@@ -35,6 -35,18 +35,21 @@@ plot 'error-$alpha' u (2**\$1):4 t 'L2
       'error-$alpha' u (2**\$1):5 t 'Max' w lp ps 2, exp(fm(log(x))) t ftitle(am,bm), \
       'rossmanith$alpha' u 1:3 t 'L2 (Rossmanith)' w lp ps 2, \
       'rossmanith$alpha' u 1:4 t 'Max (Rossmanith)' w lp ps 2 lt 1
++<<<<<<< HEAD
++=======
+ 
+ set output 'error-$alpha.eps'
+ unset logscale
+ set logscale y
+ set xtics auto
+ set key spacing 1
+ set xlabel 'Time'
+ set ylabel 'Maximum relative error'
+ plot 'error-4-$alpha' u 2:5 t '4 levels' w l,\
+      'error-5-$alpha' u 2:5 t '5 levels' w l,\
+      'error-6-$alpha' u 2:5 t '6 levels' w l,\
+      'error-7-$alpha' u 2:5 t '7 levels' w l
++>>>>>>> upstream/20131206+dfsg
  EOF
      else
  	exit 1
diff --cc test/cosine/error-45.ref
index a8161a6,ba6807e..1bb8228
--- a/test/cosine/error-45.ref
+++ b/test/cosine/error-45.ref
@@@ -1,4 -1,4 +1,11 @@@
++<<<<<<< HEAD
 +4 1 1.007e+00 5.319e-01 5.354e-01
 +5 1 3.621e-01 2.115e-01 1.933e-01
 +6 1 8.120e-02 5.159e-02 4.354e-02
 +7 1 1.558e-02 1.174e-02 1.249e-02
++=======
+ 4 1 1.002e+00 5.311e-01 5.350e-01
+ 5 1 3.549e-01 2.078e-01 1.893e-01
+ 6 1 8.040e-02 5.113e-02 4.316e-02
+ 7 1 1.545e-02 1.166e-02 1.244e-02
++>>>>>>> upstream/20131206+dfsg
diff --cc test/cosine/error-90.ref
index 997d2cb,73eafa0..0920522
--- a/test/cosine/error-90.ref
+++ b/test/cosine/error-90.ref
@@@ -1,4 -1,4 +1,11 @@@
++<<<<<<< HEAD
 +4 1 6.583e-01 4.074e-01 3.517e-01
 +5 1 2.035e-01 1.287e-01 9.475e-02
 +6 1 3.972e-02 2.601e-02 1.589e-02
 +7 1 8.938e-03 6.372e-03 5.956e-03
++=======
+ 4 1 6.534e-01 4.056e-01 3.469e-01
+ 5 1 1.995e-01 1.260e-01 9.310e-02
+ 6 1 3.934e-02 2.576e-02 1.572e-02
+ 7 1 8.878e-03 6.335e-03 5.954e-03
++>>>>>>> upstream/20131206+dfsg
diff --cc test/cosine/isolines.gfv
index 25a2b41,31ee7d2..8a8692c
--- a/test/cosine/isolines.gfv
+++ b/test/cosine/isolines.gfv
@@@ -1,9 -1,9 +1,16 @@@
  # GfsView 2D
  View {
++<<<<<<< HEAD
 +  tx = -2.01967 ty = -2.03136
 +  sx = 1 sy = 1 sz = 1
 +  q0 = 0 q1 = 0 q2 = 0 q3 = 1
 +  fov = 5.09252
++=======
+   tx = -1.52019 ty = -1.01194
+   sx = 1 sy = 1 sz = 1
+   q0 = 0 q1 = 0 q2 = 0 q3 = 1
+   fov = 18.3818
++>>>>>>> upstream/20131206+dfsg
    r = 0.3 g = 0.4 b = 0.6
    res = 1
    lc = 0.001
@@@ -13,6 -13,9 +20,12 @@@ Isoline 
    r = 0 g = 0 b = 0
    shading = Constant
    maxlevel = -1
++<<<<<<< HEAD
++=======
+   font_size = 1
+   raster_font = 1
+   line_width = 1
++>>>>>>> upstream/20131206+dfsg
  } {
    n.x = 0 n.y = 0 n.z = 1
    pos = 0
diff --cc test/cosine/reference.gfv
index 09882fc,943bd6f..b2c4d59
--- a/test/cosine/reference.gfv
+++ b/test/cosine/reference.gfv
@@@ -1,9 -1,9 +1,16 @@@
  # GfsView 2D
  View {
++<<<<<<< HEAD
 +  tx = -2.04454 ty = -2.04048
 +  sx = 1 sy = 1 sz = 1
 +  q0 = 0 q1 = 0 q2 = 0 q3 = 1
 +  fov = 4.18068
++=======
+   tx = -1.52019 ty = -1.01194
+   sx = 1 sy = 1 sz = 1
+   q0 = 0 q1 = 0 q2 = 0 q3 = 1
+   fov = 18.3818
++>>>>>>> upstream/20131206+dfsg
    r = 0.3 g = 0.4 b = 0.6
    res = 1
    lc = 0.001
@@@ -13,10 -13,13 +20,20 @@@ Isoline 
    r = 0 g = 0.733654 b = 0.0148928
    shading = Constant
    maxlevel = -1
++<<<<<<< HEAD
 +} {
 +  n.x = 0 n.y = 0 n.z = 1
 +  pos = 0
 +} bell(x,y,0) {
++=======
+   font_size = 1
+   raster_font = 1
+   line_width = 1
+ } {
+   n.x = 0 n.y = 0 n.z = 1
+   pos = 0
+ } bell_moving(x*DTR,y*DTR,t) {
++>>>>>>> upstream/20131206+dfsg
    amin = 0 min = 0
    amax = 0 max = 1
    cmap = Jet
diff --cc test/cosine/zero.gfv
index 8298c7b,6a04301..d4fab19
--- a/test/cosine/zero.gfv
+++ b/test/cosine/zero.gfv
@@@ -1,9 -1,9 +1,16 @@@
  # GfsView 2D
  View {
++<<<<<<< HEAD
 +  tx = -2.01967 ty = -2.03136
 +  sx = 1 sy = 1 sz = 1
 +  q0 = 0 q1 = 0 q2 = 0 q3 = 1
 +  fov = 5.09252
++=======
+   tx = -1.52019 ty = -1.01194
+   sx = 1 sy = 1 sz = 1
+   q0 = 0 q1 = 0 q2 = 0 q3 = 1
+   fov = 18.3818
++>>>>>>> upstream/20131206+dfsg
    r = 0.3 g = 0.4 b = 0.6
    res = 1
    lc = 0.001
@@@ -13,6 -13,9 +20,12 @@@ Isoline 
    r = 0 g = 0 b = 0
    shading = Constant
    maxlevel = -1
++<<<<<<< HEAD
++=======
+   font_size = 1
+   raster_font = 1
+   line_width = 1
++>>>>>>> upstream/20131206+dfsg
  } {
    n.x = 0 n.y = 0 n.z = 1
    pos = 0
diff --cc test/cylinder/cylinder.gfs
index f99ccf1,ff3c9ec..dae01a9
--- a/test/cylinder/cylinder.gfs
+++ b/test/cylinder/cylinder.gfs
@@@ -10,8 -10,12 +10,17 @@@
  # $$
  # Q(t)= \int_{\Sigma} \rho_e({\bf x},t) \, d \Sigma = Q_o= \pi R_o^2 \, \rho_e({\bf x},0).
  # $$
++<<<<<<< HEAD
 +# The outer electric field reaches a steady-state (Figure
 +# \ref{efield}).
++=======
+ # If a VariableVOFConcentration is used instead of a VariableTracer
+ # the total charge is also preserved.  The outer electric field
+ # reaches a steady-state (Figure \ref{efield}).
+ #
+ # A more detailed discussion of this simulation is given in
+ # \cite{lopez-herrera2011}.
++>>>>>>> upstream/20131206+dfsg
  #
  # \begin{figure}[htbp]
  # \caption{\label{charge}Relative error on the
@@@ -58,20 -62,30 +67,43 @@@ GModule electrohydr
      Time { end = 15 dtmax = 1.0 }
  
      VariableTracerVOF T
++<<<<<<< HEAD
 +    InitFraction T (R0 - y)
 +    AdaptGradient { istep = 1 } { cmax = 1e-4 minlevel = 5 maxlevel = LEVEL } T
 +    Init {} { Rhoe = rhoinic*T }
++=======
+     VariableTracer Rhoe
+     VariableVOFConcentration C T
+     InitFraction T (R0 - y)
+     AdaptGradient { istep = 1 } { cmax = 1e-4 minlevel = 5 maxlevel = LEVEL } T
+     Init {} {
+ 	Rhoe = rhoinic*T
+ 	C = rhoinic*T
+     }
++>>>>>>> upstream/20131206+dfsg
   
      EventStop { istep = 10 } Ex 0.001
  
      SourceDiffusionExplicit Rhoe K*T Phi
++<<<<<<< HEAD
++=======
+     SourceDiffusionExplicit C  K*T/(T+1.e9*(1.-T)) Phi
++>>>>>>> upstream/20131206+dfsg
  
  #    OutputTime { istep = 1 } stderr
      OutputScalarSum { step = 1 } {
  	awk 'BEGIN { R0 = 0.1 ; rhoinic = 0.5 ; L =1.0 ; Q = 0.5*R0*R0*L*rhoinic }
  	     { print $3,$5,100*sqrt((1.0 - $5/Q)*(1.0 - $5/Q)) }' > rhoe-LEVEL 
      } { v = Rhoe }
++<<<<<<< HEAD
 +    OutputSimulation { start = end } {
++=======
+     OutputScalarSum { step = 1 } {
+ 	awk 'BEGIN { R0 = 0.1 ; rhoinic = 0.5 ; L =1.0 ; Q = 0.5*R0*R0*L*rhoinic }
+ 	     { print $3,$5,100*sqrt((1.0 - $5/Q)*(1.0 - $5/Q)) }' > C-LEVEL
+     } { v = C }
+      OutputSimulation { start = end } {
++>>>>>>> upstream/20131206+dfsg
  	awk '{ if ($1 != "#") print $2,sqrt($4*$4+$5*$5); }' > prof-LEVEL
      } { 
  	format = text 
@@@ -84,6 -98,8 +116,11 @@@
  } {
      # Electric parameters
      perm = E1*T+E2*(1.-T)
++<<<<<<< HEAD
++=======
+     charge = Rhoe
+ #    charge = C
++>>>>>>> upstream/20131206+dfsg
      ElectricProjectionParams { tolerance = 1e-7 }
  }
  GfsBox {
diff --cc test/cylinder/cylinder.sh
index 8e073b3,e51c5a2..89de226
--- a/test/cylinder/cylinder.sh
+++ b/test/cylinder/cylinder.sh
@@@ -70,7 -70,7 +70,11 @@@ els
  fi
  
  # check charge conservation
++<<<<<<< HEAD
 +for level in 5 6 7 8; do
++=======
+ for level in 6 7 8; do
++>>>>>>> upstream/20131206+dfsg
      if awk 'BEGIN{ charge = 0. }{
        if (charge == 0.)
          charge = $2;
@@@ -85,10 -85,10 +89,17 @@@ don
  # check error norms
  if cat <<EOF | python ; then :
  from check import *
++<<<<<<< HEAD
 +if (Curve('norms.ref',1,8) - Curve('norms',1,8)).max() > 1e-5 or \
 +   (Curve('norms.ref',1,10) - Curve('norms',1,10)).max() > 1e-5:
 +    print (Curve('norms.ref',1,8) - Curve('norms',1,8)).max()
 +    print (Curve('norms.ref',1,10) - Curve('norms',1,10)).max()
++=======
+ if (Curve('norms',1,8) - Curve('norms.ref',1,8)).max() > 1e-5 or \
+    (Curve('norms',1,10) - Curve('norms.ref',1,10)).max() > 1e-5:
+     print (Curve('norms',1,8) - Curve('norms.ref',1,8)).max()
+     print (Curve('norms',1,10) - Curve('norms.ref',1,10)).max()
++>>>>>>> upstream/20131206+dfsg
      exit(1)
  EOF
  else
diff --cc test/cylinder/norms.ref
index f205dc6,57d51c8..8c99525
--- a/test/cylinder/norms.ref
+++ b/test/cylinder/norms.ref
@@@ -1,4 -1,4 +1,11 @@@
++<<<<<<< HEAD
 +5 Ey time: 9 first:  3.051e-04 second:  2.033e-03 infty:  2.230e-02 bias: -1.597e-04
 +6 Ey time: 9 first:  1.633e-04 second:  1.601e-03 infty:  2.457e-02 bias: -8.962e-05
 +7 Ey time: 9 first:  4.158e-05 second:  5.942e-04 infty:  1.455e-02 bias: -6.382e-06
 +8 Ey time: 9 first:  2.289e-05 second:  3.521e-04 infty:  1.229e-02 bias:  3.014e-06
++=======
+ 5 Ey time: 9 first:  3.050e-04 second:  2.033e-03 infty:  2.230e-02 bias: -1.598e-04
+ 6 Ey time: 9 first:  1.632e-04 second:  1.601e-03 infty:  2.457e-02 bias: -8.971e-05
+ 7 Ey time: 9 first:  4.149e-05 second:  5.942e-04 infty:  1.455e-02 bias: -6.469e-06
+ 8 Ey time: 9 first:  2.281e-05 second:  3.521e-04 infty:  1.229e-02 bias:  2.924e-06
++>>>>>>> upstream/20131206+dfsg
diff --cc test/cylinder/planar/planar.gfs
index c725856,767bc5d..d8275f8
--- a/test/cylinder/planar/planar.gfs
+++ b/test/cylinder/planar/planar.gfs
@@@ -49,6 -49,7 +49,10 @@@ GModule electrohydr
      Time { end = 35 dtmax=1.0 }
  
      VariableTracerVOF T
++<<<<<<< HEAD
++=======
+     GfsVariableTracer Rhoe
++>>>>>>> upstream/20131206+dfsg
      InitFraction T (R0*R0 - y*y - x*x)
      AdaptGradient { istep = 1 } { cmax = 1e-4 minlevel = 5 maxlevel = LEVEL + 1 } T
      PhysicalParams { L = 2 }
@@@ -80,6 -81,7 +84,10 @@@
  } {
      # Electric parameters
      perm = E1*T+E2*(1.-T)
++<<<<<<< HEAD
++=======
+     charge = Rhoe
++>>>>>>> upstream/20131206+dfsg
      GfsElectricProjectionParams { tolerance = 1e-7 }
  }
  GfsBox {
diff --cc test/depend.py
index 32fb172,fc2eeb6..ace0aa1
--- a/test/depend.py
+++ b/test/depend.py
@@@ -35,13 -40,13 +40,20 @@@ for start in sys.argv[1:]
  
  print "DOCS = " + docs + dists
  print ""
- print "EXTRA_DIST += " + dists
+ print "TESTS = " + tests + "\\\n\tsummary.sh"
+ os.chmod("summary.sh",0755)
+ print ""
+ print "EXTRA_DIST += $(TESTS)" + dists
+ print ""
+ print "TESTS_ENVIRONMENT = TESTS=\"" + reps + "\""
+ print "TEST_EXTENSIONS = .sh"
+ print "summary.log:" + logs
  print ""
 +print "TESTS = " + tests + "\\\n\tsummary.sh"
 +os.chmod("summary.sh",0755)
 +print ""
 +print "TESTS_ENVIRONMENT = TESTS=\"" + reps + "\""
 +print "TEST_EXTENSIONS = .sh"
 +print "summary.log:" + logs
 +print ""
  print "tests.tex: " + depends
diff --cc test/diffusion/diffusion.gfs
index b2b1e1a,9cafcad..ca80a94
--- a/test/diffusion/diffusion.gfs
+++ b/test/diffusion/diffusion.gfs
@@@ -30,6 -30,9 +30,12 @@@
      Refine 5
      SurfaceBc T Dirichlet 1
  
++<<<<<<< HEAD
++=======
+     # Just checks that it works with hypre
+     GModule hypre
+ 
++>>>>>>> upstream/20131206+dfsg
      Time { end = 0.02 dtmax = 9e-5 }
  #    OutputTime { istep = 1 } stderr
      OutputSimulation { start = 0.01 } end.gfs
diff --cc test/electro/convergence.ref
index d00b180,cce7be4..16ac736
--- a/test/electro/convergence.ref
+++ b/test/electro/convergence.ref
@@@ -1,4 -1,4 +1,11 @@@
++<<<<<<< HEAD
 +8 0.00137739 0.00195571
 +9 0.000857596 0.00124434
 +10 0.00051165 0.000746346
 +11 0.000353937 0.000509824
++=======
+ 8 0.00141608 0.00178271
+ 9 0.000818828 0.00105673
+ 10 0.000511782 0.000621844
+ 11 0.000373595 0.000462139
++>>>>>>> upstream/20131206+dfsg
diff --cc test/electro/electro.gfs
index cab4266,9610f4a..1a57998
--- a/test/electro/electro.gfs
+++ b/test/electro/electro.gfs
@@@ -24,6 -24,9 +24,12 @@@
  # results for the radial and azimuthal components of the velocity
  # along a transect inclined at 45 degrees.
  #
++<<<<<<< HEAD
++=======
+ # A more detailed discussion of this simulation is given in 
+ # \cite{lopez-herrera2011}.
+ #
++>>>>>>> upstream/20131206+dfsg
  # \begin{figure}[htbp] 
  # \caption{\label{profile}Radial and azimuthal components of the
  # velocity along a 45 degrees transect. The lines show the theoretical
@@@ -59,10 -62,11 +65,18 @@@ GModule electrohydr
      
      Time { end = 1 }
  
++<<<<<<< HEAD
 +    VariableTracerVOF T
 +    VariableCurvature K T
 +    SourceTension T 1 K
 +    SourceViscosity Cmu { beta = 1 }
++=======
+     VariableTracer Rhoe
+     VariableTracerVOF T
+     VariableCurvature K T
+     SourceTension T 1 K
+     SourceViscosity Cmu
++>>>>>>> upstream/20131206+dfsg
  
      InitFraction T (R0*R0 - (x*x + y*y))
      AdaptGradient { istep = 1 } { cmax = 1e-4 minlevel = 4 maxlevel = 7 } T
@@@ -147,6 -151,7 +161,10 @@@
  } {
      # Electric parameters
      perm = (Q*T + (1. - T))
++<<<<<<< HEAD
++=======
+     charge = Rhoe
++>>>>>>> upstream/20131206+dfsg
      ElectricProjectionParams { tolerance = 1e-4 }
  }
  GfsBox {
diff --cc test/electro/electro.sh
index 4abcc3e,51e6dec..cc60a7d
--- a/test/electro/electro.sh
+++ b/test/electro/electro.sh
@@@ -63,7 -63,7 +63,11 @@@ print (Curve('convergence',1,3) - Curve
  print Curve('rhoe',3,5).max()
  if (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max() > 1e-6 or\
     (Curve('convergence',1,3) - Curve('convergence.ref',1,3)).max() > 1e-6 or\
++<<<<<<< HEAD
 +    Curve('rhoe',3,5).max() > 1e-6:
++=======
+     Curve('rhoe',3,5).max() > 1e-9:
++>>>>>>> upstream/20131206+dfsg
      exit(1)
  EOF
  else
diff --cc test/geo/e.ref
index 84536c1,102a141..3b4e976
--- a/test/geo/e.ref
+++ b/test/geo/e.ref
@@@ -1,1581 -1,1581 +1,3165 @@@
++<<<<<<< HEAD
 +0 0
 +0.0115741 5.11875e-05
 +0.0231481 0.000108532
 +0.0347222 0.000176337
 +0.0462963 0.000335961
 +0.0578704 0.000540965
 +0.0694444 0.000786695
 +0.0810185 0.00106839
 +0.0925926 0.00137833
 +0.104167 0.00171154
 +0.115741 0.00206062
 +0.127315 0.00241816
 +0.138889 0.0027757
 +0.150463 0.00312689
 +0.162037 0.00346434
 +0.173611 0.00378062
 +0.185185 0.0040694
 +0.196759 0.00432434
 +0.208333 0.00454225
 +0.219907 0.00471678
 +0.231481 0.0048469
 +0.243056 0.00492835
 +0.25463 0.00496114
 +0.266204 0.00494421
 +0.277778 0.00487969
 +0.289352 0.00476862
 +0.300926 0.00461312
 +0.3125 0.00441742
 +0.324074 0.00418576
 +0.335648 0.00392343
 +0.347222 0.0036357
 +0.358796 0.00332788
 +0.37037 0.00300842
 +0.381944 0.00268155
 +0.393519 0.00235469
 +0.405093 0.00203312
 +0.416667 0.00172423
 +0.428241 0.00143228
 +0.439815 0.00116359
 +0.451389 0.000922095
 +0.462963 0.000711273
 +0.474537 0.000534618
 +0.486111 0.000394352
 +0.497685 0.000319248
 +0.509259 0.000289841
 +0.520833 0.000258
 +0.532407 0.000268896
 +0.543981 0.00030867
 +0.555556 0.000350242
 +0.56713 0.000464485
 +0.578704 0.000606973
 +0.590278 0.000773367
 +0.601852 0.000959753
 +0.613426 0.00116148
 +0.625 0.0013741
 +0.636574 0.00159307
 +0.648148 0.00181309
 +0.659722 0.002031
 +0.671296 0.00224256
 +0.68287 0.00244249
 +0.694444 0.00262761
 +0.706019 0.0027958
 +0.717593 0.00294389
 +0.729167 0.00306977
 +0.740741 0.00317132
 +0.752315 0.00324748
 +0.763889 0.00329826
 +0.775463 0.00332365
 +0.787037 0.00332259
 +0.798611 0.00329826
 +0.810185 0.0032496
 +0.821759 0.00317978
 +0.833333 0.00309093
 +0.844907 0.00298409
 +0.856481 0.00286244
 +0.868056 0.00272916
 +0.87963 0.00258635
 +0.891204 0.0024372
 +0.902778 0.00228276
 +0.914352 0.00212832
 +0.925926 0.00197494
 +0.9375 0.00182473
 +0.949074 0.00168086
 +0.960648 0.00154546
 +0.972222 0.00141958
 +0.983796 0.00130428
 +0.99537 0.00120167
 +1.00694 0.00111176
 +1.01852 0.00103655
 +1.03009 0.000975409
 +1.04167 0.000928653
 +1.05324 0.000896179
 +1.06481 0.000877561
 +1.07639 0.000872166
 +1.08796 0.000879148
 +1.09954 0.000897765
 +1.11111 0.000926749
 +1.12269 0.000964936
 +1.13426 0.00101116
 +1.14584 0.00106416
 +1.15741 0.00112234
 +1.16899 0.00118369
 +1.18056 0.00124822
 +1.19214 0.00131486
 +1.2037 0.00138044
 +1.21528 0.00144497
 +1.22685 0.00150738
 +1.23843 0.00156662
 +1.25 0.00162163
 +1.26158 0.0016724
 +1.27315 0.00171789
 +1.28473 0.00175597
 +1.2963 0.00178876
 +1.30788 0.00181521
 +1.31944 0.00183425
 +1.33102 0.00184694
 +1.34259 0.00185223
 +1.35417 0.00185117
 +1.36574 0.00184271
 +1.37732 0.00182896
 +1.38889 0.00180992
 +1.40047 0.00178453
 +1.41204 0.00175491
 +1.42362 0.00172
 +1.43519 0.00168192
 +1.44676 0.00164067
 +1.45833 0.00159624
 +1.46991 0.00155075
 +1.48148 0.00150209
 +1.49306 0.00145343
 +1.50463 0.00140477
 +1.51621 0.00135506
 +1.52778 0.0013064
 +1.53936 0.0012588
 +1.55093 0.00121225
 +1.56251 0.00116782
 +1.57407 0.00112551
 +1.58565 0.00108637
 +1.59722 0.00104882
 +1.6088 0.00101455
 +1.62037 0.000983236
 +1.63195 0.000955204
 +1.64352 0.00093024
 +1.6551 0.000908555
 +1.66667 0.000890149
 +1.67825 0.000874917
 +1.68981 0.000862752
 +1.70139 0.000853549
 +1.71296 0.000847202
 +1.72454 0.000843499
 +1.73611 0.000842336
 +1.74769 0.000843288
 +1.75926 0.00084625
 +1.77084 0.00085101
 +1.78241 0.000857251
 +1.79399 0.000864656
 +1.80556 0.000873012
 +1.81714 0.00088211
 +1.8287 0.00089163
 +1.84028 0.000901362
 +1.85185 0.000910988
 +1.86343 0.000920191
 +1.875 0.000928971
 +1.88658 0.00093701
 +1.89815 0.000943992
 +1.90973 0.000949915
 +1.9213 0.00095457
 +1.93288 0.000957849
 +1.94444 0.000959541
 +1.95602 0.000959647
 +1.96759 0.000958061
 +1.97917 0.000954781
 +1.99074 0.00094981
 +2.00232 0.00094304
 +2.01389 0.000934471
 +2.02547 0.000924316
 +2.03704 0.000912469
 +2.04862 0.000899035
 +2.06019 0.000884014
 +2.07176 0.000867723
 +2.08333 0.000850164
 +2.09491 0.000831335
 +2.10648 0.000811554
 +2.11806 0.00079082
 +2.12963 0.000769347
 +2.14121 0.000747344
 +2.15278 0.000724813
 +2.16436 0.000701964
 +2.17593 0.00067901
 +2.18751 0.000656055
 +2.19907 0.000633101
 +2.21065 0.000610463
 +2.22222 0.000588249
 +2.2338 0.000566458
 +2.24537 0.000545302
 +2.25695 0.000524781
 +2.26852 0.000505105
 +2.2801 0.000486276
 +2.29167 0.000468399
 +2.30325 0.000451368
 +2.31481 0.000437405
 +2.32639 0.000437405
 +2.33796 0.000435501
 +2.34954 0.00043529
 +2.36111 0.000435607
 +2.37269 0.000433068
 +2.38426 0.000427991
 +2.39584 0.000426933
 +2.40741 0.000424077
 +2.41899 0.000421221
 +2.43056 0.000421538
 +2.44214 0.000423548
 +2.4537 0.000429895
 +2.46528 0.000433915
 +2.47685 0.000448936
 +2.48843 0.000457398
 +2.5 0.000459725
 +2.51158 0.000472736
 +2.52315 0.000480353
 +2.53473 0.000482574
 +2.5463 0.000480881
 +2.55788 0.000476333
 +2.56944 0.000469669
 +2.58102 0.000461523
 +2.59259 0.000453484
 +2.60417 0.000444598
 +2.61574 0.000434443
 +2.62732 0.000422384
 +2.63889 0.000413605
 +2.65047 0.000402286
 +2.66204 0.00039065
 +2.67362 0.000380812
 +2.68519 0.000367484
 +2.69676 0.000358387
 +2.70833 0.000400911
 +2.71991 0.000454753
 +2.73148 0.000500874
 +2.74306 0.000538638
 +2.75463 0.000567516
 +2.76621 0.000586028
 +2.77778 0.000594596
 +2.78936 0.000594385
 +2.80093 0.00058772
 +2.81251 0.0005782
 +2.82407 0.000566776
 +2.83565 0.000554082
 +2.84722 0.000540859
 +2.8588 0.000527214
 +2.87037 0.000513039
 +2.88195 0.000497912
 +2.89352 0.000483632
 +2.9051 0.000470726
 +2.91667 0.000456446
 +2.92825 0.000447137
 +2.93981 0.000435184
 +2.95139 0.000426721
 +2.96296 0.000412441
 +2.97454 0.000472948
 +2.98611 0.000533137
 +2.99769 0.000583701
 +3.00926 0.000624109
 +3.02084 0.000653728
 +3.03241 0.000671076
 +3.04399 0.000677952
 +3.05556 0.000675625
 +3.06714 0.000668008
 +3.0787 0.00065669
 +3.09028 0.000644419
 +3.10185 0.000631197
 +3.11343 0.000616916
 +3.125 0.000601895
 +3.13658 0.00058624
 +3.14815 0.000572488
 +3.15973 0.00055789
 +3.1713 0.000541494
 +3.18288 0.000525415
 +3.19444 0.000512193
 +3.20602 0.000495373
 +3.21759 0.00048141
 +3.22917 0.000468611
 +3.24074 0.000484584
 +3.25232 0.000544244
 +3.26389 0.000593644
 +3.27547 0.000632254
 +3.28704 0.000659969
 +3.29862 0.000675413
 +3.31019 0.000680808
 +3.32176 0.000678269
 +3.33333 0.000670124
 +3.34491 0.000660498
 +3.35648 0.000648968
 +3.36806 0.000636486
 +3.37963 0.000623475
 +3.39121 0.000609935
 +3.40278 0.000596077
 +3.41436 0.000580633
 +3.42593 0.000564343
 +3.43751 0.000550697
 +3.44907 0.000536099
 +3.46065 0.000532608
 +3.47222 0.000545091
 +3.4838 0.000557679
 +3.49537 0.000570478
 +3.50695 0.000583489
 +3.51852 0.000596606
 +3.5301 0.000609829
 +3.54167 0.000623157
 +3.55325 0.000636486
 +3.56481 0.000649814
 +3.57639 0.000663142
 +3.58796 0.000676365
 +3.59954 0.000689588
 +3.61111 0.000702599
 +3.62269 0.000715504
 +3.63426 0.000728198
 +3.64584 0.000740786
 +3.65741 0.000753162
 +3.66899 0.000765327
 +3.68056 0.000777175
 +3.69214 0.000788916
 +3.7037 0.000800447
 +3.71527 0.000811659
 +3.72685 0.000822661
 +3.73842 0.000833556
 +3.75 0.000844134
 +3.76157 0.000854607
 +3.77315 0.000864867
 +3.78472 0.000875022
 +3.7963 0.000884966
 +3.80786 0.000894909
 +3.81944 0.000904747
 +3.83101 0.000914479
 +3.84259 0.000924211
 +3.85416 0.000933837
 +3.86574 0.000943569
 +3.87731 0.0009533
 +3.88889 0.000963138
 +3.90046 0.00097287
 +3.91204 0.000982813
 +3.92361 0.000992757
 +3.93519 0.00100281
 +3.94675 0.00101296
 +3.95833 0.00102322
 +3.9699 0.00103348
 +3.98148 0.00104374
 +3.99305 0.00105411
 +4.00463 0.00106416
 +4.0162 0.00107474
 +4.02778 0.00108532
 +4.03935 0.00109589
 +4.05093 0.00110647
 +4.06249 0.00111599
 +4.07407 0.00112657
 +4.08564 0.00113609
 +4.09722 0.00114561
 +4.10879 0.00115619
 +4.12037 0.00116571
 +4.13194 0.00117417
 +4.14352 0.00118369
 +4.15509 0.00119215
 +4.16667 0.00120167
 +4.17824 0.00121014
 +4.18981 0.0012186
 +4.20138 0.00122706
 +4.21296 0.00123552
 +4.22453 0.00124399
 +4.23611 0.00125351
 +4.24768 0.00126197
 +4.25926 0.00127043
 +4.27083 0.00127995
 +4.28241 0.00128947
 +4.29398 0.00130005
 +4.30556 0.00131063
 +4.31712 0.00132121
 +4.3287 0.00133284
 +4.34027 0.00134554
 +4.35185 0.00135823
 +4.36342 0.00137198
 +4.375 0.00138573
 +4.38657 0.00140054
 +4.39815 0.00141641
 +4.40972 0.00143334
 +4.4213 0.00145026
 +4.43286 0.00146719
 +4.44444 0.00148517
 +4.45601 0.00150315
 +4.46759 0.00152113
 +4.47916 0.00154017
 +4.49074 0.00155816
 +4.50231 0.00157614
 +4.51389 0.00159412
 +4.52546 0.00161105
 +4.53704 0.00162692
 +4.54861 0.00164278
 +4.56019 0.00165653
 +4.57175 0.00166923
 +4.58333 0.00168192
 +4.5949 0.00169144
 +4.60648 0.0016999
 +4.61805 0.00170731
 +4.62963 0.0017126
 +4.6412 0.00171577
 +4.65278 0.00171789
 +4.66435 0.00171789
 +4.67593 0.00171683
 +4.68749 0.00171471
 +4.69907 0.00171048
 +4.71064 0.00170625
 +4.72222 0.00170096
 +4.73379 0.00169567
 +4.74537 0.00168933
 +4.75694 0.00168404
 +4.76852 0.00167875
 +4.78009 0.00167557
 +4.79167 0.0016724
 +4.80324 0.00167134
 +4.81481 0.0016724
 +4.82638 0.00167557
 +4.83796 0.00168086
 +4.84953 0.00168933
 +4.86111 0.00170096
 +4.87268 0.00171577
 +4.88426 0.00173375
 +4.89583 0.00175491
 +4.90741 0.00177924
 +4.91898 0.00180569
 +4.93056 0.00183636
 +4.94212 0.00186915
 +4.9537 0.00190406
 +4.96527 0.00194109
 +4.97685 0.00198022
 +4.98842 0.00201936
 +5 0.00205956
 +5.01157 0.00209976
 +5.02315 0.0021389
 +5.03472 0.00217592
 +5.0463 0.00221189
 +5.05786 0.00224468
 +5.06944 0.0022743
 +5.08101 0.00230074
 +5.09259 0.0023219
 +5.10416 0.00233882
 +5.11574 0.00235152
 +5.12731 0.00235786
 +5.13889 0.00235998
 +5.15046 0.00235575
 +5.16204 0.00234623
 +5.17361 0.00233248
 +5.18519 0.00231344
 +5.19675 0.00228911
 +5.20833 0.0022616
 +5.2199 0.00223093
 +5.23148 0.00219813
 +5.24305 0.00216323
 +5.25463 0.00212726
 +5.2662 0.00209129
 +5.27778 0.00205639
 +5.28935 0.00202465
 +5.30093 0.00199503
 +5.31249 0.00196965
 +5.32407 0.00194955
 +5.33564 0.00193474
 +5.34722 0.00192628
 +5.35879 0.00192522
 +5.37037 0.00193157
 +5.38194 0.00194532
 +5.39352 0.00196753
 +5.40509 0.00199821
 +5.41667 0.00203735
 +5.42824 0.00208283
 +5.43981 0.00213678
 +5.45138 0.00219708
 +5.46296 0.00226266
 +5.47453 0.00233248
 +5.48611 0.00240758
 +5.49768 0.00248374
 +5.50926 0.00256202
 +5.52083 0.00263924
 +5.53241 0.0027154
 +5.54398 0.00278839
 +5.55556 0.00285715
 +5.56712 0.00291956
 +5.5787 0.00297563
 +5.59027 0.00302429
 +5.60185 0.00306342
 +5.61342 0.00309199
 +5.625 0.00310997
 +5.63657 0.00311737
 +5.64815 0.0031142
 +5.65972 0.00309939
 +5.6713 0.003074
 +5.68286 0.00303698
 +5.69444 0.00299149
 +5.70601 0.00293649
 +5.71759 0.00287408
 +5.72916 0.00280532
 +5.74074 0.00273233
 +5.75231 0.00265511
 +5.76389 0.00257683
 +5.77546 0.00249961
 +5.78704 0.00242345
 +5.79861 0.00235257
 +5.81019 0.00228593
 +5.82175 0.00222775
 +5.83333 0.00217804
 +5.8449 0.0021389
 +5.85648 0.00211139
 +5.86805 0.00209553
 +5.87963 0.00209447
 +5.8912 0.0021061
 +5.90278 0.00213255
 +5.91435 0.00217169
 +5.92593 0.00222564
 +5.93749 0.00229122
 +5.94907 0.0023695
 +5.96064 0.00245836
 +5.97222 0.00255673
 +5.98379 0.00266251
 +5.99537 0.00277358
 +6.00694 0.00288889
 +6.01852 0.0030063
 +6.03009 0.00312266
 +6.04167 0.00323691
 +6.05324 0.00334586
 +6.06481 0.00344847
 +6.07638 0.00354367
 +6.08796 0.00362724
 +6.09953 0.00369917
 +6.11111 0.00375841
 +6.12268 0.00380284
 +6.13426 0.00383245
 +6.14583 0.00384621
 +6.15741 0.00384409
 +6.16898 0.00382716
 +6.18056 0.00379437
 +6.19212 0.00374783
 +6.2037 0.00368859
 +6.21527 0.00361666
 +6.22685 0.00353415
 +6.23842 0.00344424
 +6.25 0.00334692
 +6.26157 0.00324537
 +6.27315 0.0031417
 +6.28472 0.00303804
 +6.2963 0.00293649
 +6.30786 0.00283917
 +6.31944 0.00274925
 +6.33101 0.00266674
 +6.34259 0.00259481
 +6.35416 0.00253558
 +6.36574 0.00248903
 +6.37731 0.00245624
 +6.38889 0.00243826
 +6.40046 0.00243614
 +6.41204 0.00244989
 +6.42361 0.00247951
 +6.43519 0.00252394
 +6.44675 0.00258212
 +6.45833 0.00265405
 +6.4699 0.00273762
 +6.48148 0.00283176
 +6.49305 0.00293543
 +6.50463 0.00304544
 +6.5162 0.0031618
 +6.52778 0.00328028
 +6.53935 0.00339981
 +6.55093 0.00351828
 +6.56249 0.00363464
 +6.57407 0.00374466
 +6.58564 0.00384938
 +6.59722 0.00394564
 +6.60879 0.00403132
 +6.62037 0.00410748
 +6.63194 0.00417095
 +6.64352 0.00422173
 +6.65509 0.00425875
 +6.66667 0.00428308
 +6.67824 0.00429366
 +6.68981 0.00429154
 +6.70138 0.00427568
 +6.71296 0.00424817
 +6.72453 0.00421009
 +6.73611 0.00416038
 +6.74768 0.00410325
 +6.75926 0.00403767
 +6.77083 0.0039668
 +6.78241 0.00389063
 +6.79398 0.0038113
 +6.80556 0.0037309
 +6.81712 0.00365051
 +6.8287 0.00357117
 +6.84027 0.00349607
 +6.85185 0.00342414
 +6.86342 0.0033575
 +6.875 0.00329826
 +6.88657 0.00324643
 +6.89815 0.003202
 +6.90972 0.00316815
 +6.9213 0.00314276
 +6.93286 0.00312689
 +6.94444 0.0031216
 +6.95601 0.00312689
 +6.96759 0.00314064
 +6.97916 0.00316497
 +6.99074 0.00319882
 +7.00231 0.00324008
 +7.01389 0.00329085
 +7.02546 0.00334798
 +7.03704 0.00341144
 +7.04861 0.00348126
 +7.06019 0.00355531
 +7.07175 0.00363359
 +7.08333 0.00371504
 +7.0949 0.00379755
 +7.10648 0.00388217
 +7.11805 0.00396574
 +7.12963 0.00404825
 +7.1412 0.00412864
 +7.15278 0.00420692
 +7.16435 0.00428097
 +7.17593 0.00434972
 +7.18749 0.00441425
 +7.19907 0.00447243
 +7.21064 0.00452321
 +7.22222 0.00456763
 +7.23379 0.0046036
 +7.24537 0.00463216
 +7.25694 0.00465226
 +7.26852 0.00466389
 +7.28009 0.00466707
 +7.29167 0.00466178
 +7.30324 0.00464908
 +7.31481 0.00462687
 +7.32638 0.00459725
 +7.33796 0.00456129
 +7.34953 0.00451792
 +7.36111 0.00446926
 +7.37268 0.00441531
 +7.38426 0.00435713
 +7.39583 0.00429472
 +7.40741 0.00423125
 +7.41898 0.00416566
 +7.43056 0.00410114
 +7.44212 0.00403661
 +7.4537 0.00397526
 +7.46527 0.00391708
 +7.47685 0.00386313
 +7.48842 0.00381447
 +7.5 0.00377216
 +7.51157 0.00373831
 +7.52315 0.00371186
 +7.53472 0.00369494
 +7.5463 0.00368648
 +7.55786 0.00368859
 +7.56944 0.00370129
 +7.58101 0.0037235
 +7.59259 0.00375629
 +7.60416 0.0037986
 +7.61574 0.00385044
 +7.62731 0.00391179
 +7.63889 0.00397949
 +7.65046 0.00405565
 +7.66204 0.0041371
 +7.67361 0.00422384
 +7.68519 0.00431482
 +7.69675 0.0044079
 +7.70833 0.00450099
 +7.7199 0.00459408
 +7.73148 0.00468505
 +7.74305 0.00477391
 +7.75463 0.00485747
 +7.7662 0.00493469
 +7.77778 0.00500557
 +7.78935 0.00506798
 +7.80093 0.00512193
 +7.81249 0.0051653
 +7.82407 0.00519915
 +7.83564 0.00522242
 +7.84722 0.00523511
 +7.85879 0.00523723
 +7.87037 0.00522771
 +7.88194 0.00520867
 +7.89352 0.00518011
 +7.90509 0.00514308
 +7.91667 0.0050976
 +7.92824 0.00504471
 +7.93981 0.00498547
 +7.95138 0.004922
 +7.96296 0.00485536
 +7.97453 0.0047866
 +7.98611 0.00471784
 +7.99768 0.00464908
 +8.00926 0.00458138
 +8.02083 0.00451792
 +8.03241 0.00445974
 +8.04398 0.00440579
 +8.05556 0.00435924
 +8.06712 0.00432011
 +8.0787 0.00428943
 +8.09027 0.00426721
 +8.10185 0.00425452
 +8.11342 0.00425135
 +8.125 0.00425875
 +8.13657 0.00427462
 +8.14815 0.00430001
 +8.15972 0.00433491
 +8.1713 0.00437723
 +8.18286 0.004428
 +8.19444 0.00448618
 +8.20601 0.00454965
 +8.21759 0.00461841
 +8.22916 0.0046914
 +8.24074 0.00476756
 +8.25231 0.00484584
 +8.26389 0.00492412
 +8.27546 0.00500345
 +8.28704 0.00507961
 +8.29861 0.00515472
 +8.31019 0.00522559
 +8.32175 0.00529223
 +8.33333 0.00535359
 +8.3449 0.00540859
 +8.35648 0.00545725
 +8.36805 0.00549957
 +8.37963 0.00553342
 +8.3912 0.00555986
 +8.40278 0.0055789
 +8.41435 0.00558948
 +8.42593 0.00559265
 +8.43749 0.00558842
 +8.44907 0.00557679
 +8.46064 0.00555986
 +8.47222 0.00553553
 +8.48379 0.00550591
 +8.49537 0.00547206
 +8.50694 0.00543398
 +8.51852 0.00539378
 +8.53009 0.00535041
 +8.54167 0.00530599
 +8.55324 0.00526156
 +8.56481 0.00521713
 +8.57638 0.00517482
 +8.58796 0.00513462
 +8.59953 0.00509654
 +8.61111 0.00506269
 +8.62268 0.00503307
 +8.63426 0.00500768
 +8.64583 0.00498864
 +8.65741 0.00497489
 +8.66898 0.00496643
 +8.68056 0.00496431
 +8.69212 0.00496854
 +8.7037 0.00497912
 +8.71527 0.00499605
 +8.72685 0.00501826
 +8.73842 0.00504576
 +8.75 0.00507856
 +8.76157 0.00511664
 +8.77315 0.00515789
 +8.78472 0.00520338
 +8.7963 0.00525204
 +8.80786 0.00530281
 +8.81944 0.00535465
 +8.83101 0.00540754
 +8.84259 0.00546043
 +8.85416 0.00551332
 +8.86574 0.00556515
 +8.87731 0.00561487
 +8.88889 0.00566141
 +8.90046 0.0057069
 +8.91204 0.00574815
 +8.92361 0.00578518
 +8.93519 0.00581903
 +8.94675 0.00584759
 +8.95833 0.00587192
 +8.9699 0.00589201
 +8.98148 0.00590788
 +8.99305 0.00591846
 +9.00463 0.00592375
 +9.0162 0.00592586
 +9.02778 0.00592375
 +9.03935 0.0059174
 +9.05093 0.00590788
 +9.06249 0.00589519
 +9.07407 0.00588038
 +9.08564 0.00586345
 +9.09722 0.00584441
 +9.10879 0.00582431
 +9.12037 0.00580316
 +9.13194 0.00578306
 +9.14352 0.0057619
 +9.15509 0.00574286
 +9.16667 0.00572488
 +9.17824 0.00570795
 +9.18981 0.00569315
 +9.20138 0.00568045
 +9.21296 0.00567093
 +9.22453 0.00566458
 +9.23611 0.00566141
 +9.24768 0.00566035
 +9.25926 0.00566353
 +9.27083 0.00566987
 +9.28241 0.00567939
 +9.29398 0.00569209
 +9.30556 0.00570795
 +9.31712 0.005727
 +9.3287 0.00574815
 +9.34027 0.00577142
 +9.35185 0.00579787
 +9.36342 0.00582537
 +9.375 0.00585499
 +9.38657 0.00588567
 +9.39815 0.0059174
 +9.40972 0.00594914
 +9.4213 0.00598193
 +9.43286 0.00601366
 +9.44444 0.00604434
 +9.45601 0.00607502
 +9.46759 0.00610463
 +9.47916 0.0061332
 +9.49074 0.00615964
 +9.50231 0.00618397
 +9.51389 0.00620618
 +9.52546 0.00622734
 +9.53704 0.00624532
 +9.54861 0.00626119
 +9.56019 0.00627494
 +9.57175 0.00628658
 +9.58333 0.0062961
 +9.5949 0.0063035
 +9.60648 0.00630879
 +9.61805 0.00631197
 +9.62963 0.00631408
 +9.6412 0.00631408
 +9.65278 0.00631302
 +9.66435 0.00631197
 +9.67593 0.00630879
 +9.68749 0.00630562
 +9.69907 0.00630139
 +9.71064 0.00629821
 +9.72222 0.00629398
 +9.73379 0.00629081
 +9.74537 0.00628869
 +9.75694 0.00628658
 +9.76852 0.00628552
 +9.78009 0.00628552
 +9.79167 0.00628658
 +9.80324 0.00628869
 +9.81481 0.00629187
 +9.82638 0.00629716
 +9.83796 0.0063035
 +9.84953 0.00631197
 +9.86111 0.00632149
 +9.87268 0.00633206
 +9.88426 0.0063437
 +9.89583 0.00635639
 +9.90741 0.0063712
 +9.91898 0.00638601
 +9.93056 0.00640188
 +9.94212 0.0064188
 +9.9537 0.00643679
 +9.96527 0.00645477
 +9.97685 0.00647275
 +9.98842 0.00649074
 +10 0.00650978
 +10.0116 0.00652776
 +10.0231 0.0065468
 +10.0347 0.00656478
 +10.0463 0.00658277
 +10.0579 0.00659969
 +10.0694 0.00661662
 +10.081 0.00663354
 +10.0926 0.00664941
 +10.1042 0.00666422
 +10.1157 0.00667903
 +10.1273 0.00669172
 +10.1389 0.00670547
 +10.1505 0.00671711
 +10.162 0.00672874
 +10.1736 0.00673932
 +10.1852 0.0067499
 +10.1968 0.00675942
 +10.2083 0.00676788
 +10.2199 0.00677635
 +10.2315 0.00678375
 +10.243 0.00679115
 +10.2546 0.0067975
 +10.2662 0.00680385
 +10.2778 0.0068102
 +10.2893 0.00681548
 +10.3009 0.00682183
 +10.3125 0.00682606
 +10.3241 0.00683135
 +10.3356 0.00683664
 +10.3472 0.00684087
 +10.3588 0.00684616
 +10.3704 0.00685039
 +10.3819 0.00685568
 +10.3935 0.00685991
 +10.4051 0.0068652
 +10.4167 0.00687049
 +10.4282 0.00687684
 +10.4398 0.00688318
 +10.4514 0.00688953
 +10.463 0.00689694
 +10.4745 0.0069054
 +10.4861 0.00691386
 +10.4977 0.00692338
 +10.5093 0.0069329
 +10.5208 0.00694454
 +10.5324 0.00695617
 +10.544 0.00696887
 +10.5556 0.00698262
 +10.5671 0.00699743
 +10.5787 0.00701224
 +10.5903 0.00702916
 +10.6019 0.00704609
 +10.6134 0.00706407
 +10.625 0.00708205
 +10.6366 0.00710215
 +10.6481 0.00712119
 +10.6597 0.00714129
 +10.6713 0.00716033
 +10.6829 0.00718043
 +10.6944 0.00720053
 +10.706 0.00721957
 +10.7176 0.00723755
 +10.7292 0.00725553
 +10.7407 0.00727246
 +10.7523 0.00728727
 +10.7639 0.00730208
 +10.7755 0.00731477
 +10.787 0.00732535
 +10.7986 0.00733487
 +10.8102 0.00734227
 +10.8218 0.00734756
 +10.8333 0.0073518
 +10.8449 0.00735285
 +10.8565 0.00735391
 +10.8681 0.0073518
 +10.8796 0.00734968
 +10.8912 0.00734545
 +10.9028 0.00734016
 +10.9144 0.00733381
 +10.9259 0.00732747
 +10.9375 0.00732112
 +10.9491 0.00731477
 +10.9607 0.00730948
 +10.9722 0.00730419
 +10.9838 0.00730102
 +10.9954 0.0072989
 +11.007 0.0072989
 +11.0185 0.00730102
 +11.0301 0.00730631
 +11.0417 0.00731371
 +11.0532 0.00732429
 +11.0648 0.00733804
 +11.0764 0.00735497
 +11.088 0.00737401
 +11.0995 0.00739728
 +11.1111 0.00742267
 +11.1227 0.00745123
 +11.1343 0.00748191
 +11.1458 0.0075147
 +11.1574 0.00754855
 +11.169 0.00758451
 +11.1806 0.00762048
 +11.1921 0.0076575
 +11.2037 0.00769347
 +11.2153 0.00772838
 +11.2269 0.00776223
 +11.2384 0.00779502
 +11.25 0.00782358
 +11.2616 0.00785002
 +11.2732 0.0078733
 +11.2848 0.00789234
 +11.2963 0.00790715
 +11.3078 0.00791772
 +11.3194 0.00792407
 +11.331 0.00792619
 +11.3426 0.00792301
 +11.3542 0.00791667
 +11.3658 0.00790503
 +11.3774 0.00789022
 +11.3888 0.00787224
 +11.4004 0.00785108
 +11.412 0.00782887
 +11.4236 0.00780454
 +11.4352 0.00777915
 +11.4468 0.00775376
 +11.4584 0.00772838
 +11.4699 0.0077051
 +11.4815 0.00768395
 +11.493 0.00766597
 +11.5046 0.00765116
 +11.5162 0.00764058
 +11.5278 0.00763529
 +11.5393 0.00763423
 +11.5509 0.00763952
 +11.5625 0.00764904
 +11.5741 0.00766597
 +11.5857 0.00768712
 +11.5973 0.00771462
 +11.6088 0.00774742
 +11.6203 0.00778444
 +11.6319 0.00782675
 +11.6435 0.00787224
 +11.6551 0.00791984
 +11.6667 0.00797062
 +11.6783 0.00802245
 +11.6899 0.00807428
 +11.7013 0.00812611
 +11.7129 0.00817689
 +11.7245 0.00822555
 +11.7361 0.00826998
 +11.7477 0.00831123
 +11.7593 0.00834825
 +11.7708 0.00837893
 +11.7824 0.00840432
 +11.794 0.00842442
 +11.8056 0.00843817
 +11.8171 0.00844452
 +11.8287 0.00844557
 +11.8403 0.00844028
 +11.8518 0.00842865
 +11.8634 0.00841278
 +11.875 0.00839162
 +11.8866 0.00836729
 +11.8982 0.00833873
 +11.9098 0.00830912
 +11.9214 0.00827738
 +11.9328 0.00824565
 +11.9444 0.00821391
 +11.956 0.00818429
 +11.9676 0.00815679
 +11.9792 0.00813352
 +11.9908 0.00811342
 +12.0023 0.00809861
 +12.0139 0.00808909
 +12.0254 0.00808486
 +12.037 0.00808697
 +12.0486 0.00809544
 +12.0602 0.00810919
 +12.0718 0.00813034
 +12.0833 0.00815573
 +12.0949 0.00818641
 +12.1065 0.00822237
 +12.1181 0.00826257
 +12.1297 0.00830488
 +12.1412 0.00834931
 +12.1528 0.00839586
 +12.1643 0.0084424
 +12.1759 0.00848894
 +12.1875 0.00853337
 +12.1991 0.00857568
 +12.2107 0.00861482
 +12.2223 0.00864973
 +12.2337 0.00868041
 +12.2453 0.00870579
 +12.2569 0.00872695
 +12.2685 0.00874176
 +12.2801 0.00875128
 +12.2917 0.00875551
 +12.3033 0.00875445
 +12.3148 0.00874917
 +12.3264 0.00873964
 +12.338 0.00872589
 +12.3495 0.00871003
 +12.3611 0.00869204
 +12.3727 0.008673
 +12.3843 0.00865396
 +12.3958 0.00863492
 +12.4074 0.008618
 +12.419 0.00860319
 +12.4306 0.00859155
 +12.4422 0.00858415
 +12.4537 0.00858097
 +12.4652 0.00858309
 +12.4768 0.00858944
 +12.4884 0.00860213
 +12.5 0.00861905
 +12.5116 0.00864127
 +12.5232 0.00866771
 +12.5348 0.00869945
 +12.5463 0.00873436
 +12.5578 0.00877138
 +12.5694 0.00881052
 +12.581 0.00885177
 +12.5926 0.00889303
 +12.6042 0.00893217
 +12.6158 0.00897131
 +12.6273 0.00900621
 +12.6389 0.00903901
 +12.6505 0.00906651
 +12.662 0.00908978
 +12.6736 0.00910671
 +12.6852 0.00911834
 +12.6967 0.00912363
 +12.7083 0.00912257
 +12.7199 0.00911517
 +12.7315 0.00910247
 +12.7431 0.00908449
 +12.7547 0.00906228
 +12.7663 0.00903583
 +12.7777 0.00900621
 +12.7893 0.00897554
 +12.8009 0.00894274
 +12.8125 0.00891101
 +12.8241 0.00888033
 +12.8357 0.00885283
 +12.8473 0.0088285
 +12.8588 0.00880946
 +12.8703 0.00879571
 +12.8819 0.0087883
 +12.8935 0.0087883
 +12.9051 0.00879677
 +12.9167 0.00881158
 +12.9282 0.00883591
 +12.9398 0.00886764
 +12.9514 0.00890678
 +12.963 0.00895227
 +12.9746 0.00900516
 +12.9861 0.00906334
 +12.9977 0.00912575
 +13.0092 0.00919133
 +13.0208 0.00926009
 +13.0324 0.00932779
 +13.044 0.00939549
 +13.0556 0.00946107
 +13.0672 0.00952243
 +13.0788 0.00957955
 +13.0902 0.00963032
 +13.1018 0.00967369
 +13.1134 0.00970966
 +13.125 0.0097361
 +13.1366 0.00975303
 +13.1482 0.00976043
 +13.1597 0.00975726
 +13.1713 0.00974457
 +13.1829 0.00972341
 +13.1944 0.00969273
 +13.206 0.00965359
 +13.2176 0.00960811
 +13.2292 0.00955628
 +13.2407 0.00950021
 +13.2523 0.00944097
 +13.2639 0.00938068
 +13.2755 0.00932038
 +13.2871 0.0092622
 +13.2987 0.00920614
 +13.3102 0.00915537
 +13.3217 0.00911094
 +13.3333 0.00907391
 +13.3449 0.00904535
 +13.3565 0.00902631
 +13.3681 0.00901679
 +13.3797 0.00901891
 +13.3912 0.0090316
 +13.4027 0.00905487
 +13.4143 0.00908978
 +13.4259 0.00913421
 +13.4375 0.00918816
 +13.4491 0.00925163
 +13.4607 0.00932144
 +13.4722 0.00939866
 +13.4838 0.00948011
 +13.4954 0.00956474
 +13.507 0.00965148
 +13.5185 0.00973822
 +13.5301 0.0098239
 +13.5417 0.00990535
 +13.5532 0.00998363
 +13.5648 0.0100545
 +13.5764 0.010119
 +13.588 0.0101751
 +13.5996 0.0102216
 +13.6112 0.0102576
 +13.6226 0.010283
 +13.6342 0.0102978
 +13.6458 0.010302
 +13.6574 0.0102946
 +13.669 0.0102777
 +13.6806 0.0102502
 +13.6922 0.0102132
 +13.7037 0.0101698
 +13.7152 0.010118
 +13.7268 0.0100609
 +13.7384 0.0099995
 +13.75 0.00993603
 +13.7616 0.00987045
 +13.7732 0.00980592
 +13.7847 0.00974245
 +13.7963 0.0096811
 +13.8079 0.00962503
 +13.8195 0.00957532
 +13.831 0.00953195
 +13.8426 0.00949598
 +13.8541 0.00946848
 +13.8657 0.00945049
 +13.8773 0.00944203
 +13.8889 0.00944415
 +13.9005 0.00945578
 +13.9121 0.009478
 +13.9237 0.00950867
 +13.9351 0.00954887
 +13.9467 0.00959859
 +13.9583 0.00965465
 +13.9699 0.00971812
 +13.9815 0.00978794
 +13.9931 0.00986093
 +14.0047 0.00993815
 +14.0162 0.0100175
 +14.0278 0.0100979
 +14.0393 0.0101783
 +14.0509 0.0102565
 +14.0625 0.0103327
 +14.0741 0.0104046
 +14.0856 0.0104723
 +14.0972 0.0105337
 +14.1088 0.0105887
 +14.1204 0.010631
 +14.132 0.0106733
 +14.1436 0.0107051
 +14.1551 0.0107262
 +14.1666 0.0107368
 +14.1782 0.0107474
 +14.1898 0.0107368
 +14.2014 0.0107262
 +14.213 0.0107051
 +14.2246 0.0106839
 +14.2362 0.0106416
 +14.2476 0.0106099
 +14.2592 0.0105591
 +14.2708 0.0105083
 +14.2824 0.0104554
 +14.294 0.0104004
 +14.3056 0.0103433
 +14.3171 0.0102872
 +14.3287 0.0102312
 +14.3403 0.0101772
 +14.3519 0.0101275
 +14.3634 0.010081
 +14.375 0.0100397
 +14.3866 0.0100037
 +14.3981 0.00997517
 +14.4097 0.00995296
 +14.4213 0.0099392
 +14.4329 0.00993286
 +14.4445 0.00993497
 +14.4561 0.00994661
 +14.4676 0.00996565
 +14.4791 0.00999421
 +14.4907 0.0100302
 +14.5023 0.0100746
 +14.5139 0.0101264
 +14.5255 0.0101846
 +14.5371 0.0102481
 +14.5486 0.0103179
 +14.5602 0.0103909
 +14.5717 0.0104681
 +14.5833 0.0105474
 +14.5949 0.010631
 +14.6065 0.0107051
 +14.6181 0.0107897
 +14.6296 0.0108637
 +14.6412 0.0109378
 +14.6528 0.0110012
 +14.6644 0.0110647
 +14.6759 0.0111282
 +14.6875 0.0111705
 +14.6991 0.0112128
 +14.7106 0.0112551
 +14.7222 0.0112763
 +14.7338 0.0112869
 +14.7454 0.0112974
 +14.757 0.0112974
 +14.7686 0.0112869
 +14.78 0.0112551
 +14.7916 0.011234
 +14.8032 0.0111917
 +14.8148 0.0111493
 +14.8264 0.0110965
 +14.838 0.0110436
 +14.8496 0.0109801
 +14.8611 0.0109166
 +14.8727 0.0108532
 +14.8842 0.0107897
 +14.8958 0.0107156
 +14.9074 0.0106522
 +14.919 0.0105993
 +14.9306 0.01054
 +14.9421 0.0104893
 +14.9537 0.0104448
 +14.9653 0.0104078
 +14.9769 0.0103793
 +14.9885 0.0103592
 +15 0.0103486
 +15.0115 0.0103475
 +15.0231 0.010357
 +15.0347 0.0103761
 +15.0463 0.0104057
 +15.0579 0.0104438
 +15.0695 0.0104914
 +15.0811 0.0105485
 +15.0925 0.0106099
 +15.1041 0.0106839
 +15.1157 0.010758
 +15.1273 0.0108426
 +15.1389 0.0109272
 +15.1505 0.0110118
 +15.1621 0.011107
 +15.1736 0.0111917
 +15.1852 0.0112869
 +15.1968 0.0113715
 +15.2083 0.0114455
 +15.2199 0.0115196
 +15.2315 0.0115936
 +15.243 0.0116571
 +15.2546 0.01171
 +15.2662 0.0117523
 +15.2778 0.0117946
 +15.2894 0.0118158
 +15.301 0.0118369
 +15.3126 0.0118475
 +15.324 0.0118369
 +15.3356 0.0118263
 +15.3472 0.0118052
 +15.3588 0.0117735
 +15.3704 0.0117311
 +15.382 0.0116888
 +15.3936 0.0116359
 +15.4051 0.011583
 +15.4166 0.0115196
 +15.4282 0.0114561
 +15.4398 0.0113821
 +15.4514 0.0113186
 +15.463 0.0112551
 +15.4745 0.0111917
 +15.4861 0.0111282
 +15.4977 0.0110647
 +15.5093 0.0110118
 +15.5209 0.0109695
 +15.5324 0.0109272
 +15.544 0.0108955
 +15.5555 0.0108743
 +15.5671 0.0108637
 +15.5787 0.0108532
 +15.5903 0.0108637
 +15.6019 0.0108743
 +15.6135 0.0108955
 +15.6251 0.0109272
 +15.6365 0.0109695
 +15.6481 0.0110118
 +15.6597 0.0110753
 +15.6713 0.0111388
 +15.6829 0.0112022
 +15.6945 0.0112763
 +15.706 0.0113503
 +15.7176 0.011435
 +15.7291 0.011509
 +15.7407 0.0115936
 +15.7523 0.0116782
 +15.7639 0.0117523
 +15.7755 0.0118369
 +15.787 0.011911
 +15.7986 0.0119744
 +15.8102 0.0120379
 +15.8218 0.0121014
 +15.8334 0.0121437
 +15.8449 0.012186
 +15.8564 0.0122283
 +15.868 0.0122495
 +15.8796 0.0122706
 +15.8912 0.0122812
 +15.9028 0.0122812
 +15.9144 0.0122706
 +15.926 0.01226
 +15.9374 0.0122389
 +15.949 0.0122072
 +15.9606 0.0121754
 +15.9722 0.0121331
 +15.9838 0.0120908
 +15.9954 0.0120485
 +16.007 0.0119956
 +16.0185 0.0119427
 +16.0301 0.0118898
 +16.0417 0.0118369
 +16.0532 0.011784
 +16.0648 0.0117311
 +16.0764 0.0116888
 +16.0879 0.0116359
 +16.0995 0.0116042
 +16.1111 0.0115619
 +16.1227 0.0115407
 +16.1343 0.011509
 +16.1459 0.0114984
 +16.1575 0.0114878
 +16.1689 0.0114773
 +16.1805 0.0114878
 +16.1921 0.0114984
 +16.2037 0.011509
 +16.2153 0.0115407
 +16.2269 0.0115725
 +16.2385 0.0116042
 +16.25 0.0116465
 +16.2615 0.0116994
 +16.2731 0.0117417
 +16.2847 0.0118052
 +16.2963 0.0118581
 +16.3079 0.0119215
 +16.3194 0.011985
 +16.331 0.0120485
 +16.3426 0.012112
 +16.3542 0.0121754
 +16.3658 0.0122389
 +16.3773 0.0122918
 +16.3889 0.0123552
 +16.4004 0.0124081
 +16.412 0.012461
 +16.4236 0.0125033
 +16.4352 0.0125457
 +16.4468 0.0125774
 +16.4584 0.0126091
 +16.47 0.0126409
 +16.4814 0.012662
 +16.493 0.0126726
 +16.5046 0.0126832
 +16.5162 0.0126832
 +16.5278 0.0126832
 +16.5394 0.0126832
 +16.5509 0.012662
 +16.5625 0.0126514
 +16.5741 0.0126303
 +16.5856 0.0125985
 +16.5972 0.0125774
 +16.6088 0.0125457
 +16.6204 0.0125033
 +16.6319 0.0124716
 +16.6435 0.0124293
 +16.6551 0.0123976
 +16.6667 0.0123552
 +16.6783 0.0123235
 +16.6898 0.0122812
 +16.7014 0.0122495
 +16.7129 0.0122177
 +16.7245 0.012186
 +16.7361 0.0121648
 +16.7477 0.0121437
 +16.7593 0.0121225
 +16.7709 0.012112
 +16.7824 0.0121014
 +16.7939 0.0121014
 +16.8055 0.0121014
 +16.8171 0.012112
 +16.8287 0.0121225
 +16.8403 0.0121437
 +16.8519 0.0121648
 +16.8634 0.0121966
 +16.875 0.0122283
 +16.8866 0.0122706
 +16.8981 0.0123129
 +16.9097 0.0123658
 +16.9213 0.0124187
 +16.9329 0.0124716
 +16.9444 0.0125245
 +16.956 0.012588
 +16.9676 0.0126409
 +16.9792 0.0127043
 +16.9908 0.0127678
 +17.0024 0.0128207
 +17.0138 0.0128842
 +17.0254 0.012937
 +17.037 0.0129899
 +17.0486 0.0130428
 +17.0602 0.0130851
 +17.0718 0.0131275
 +17.0834 0.0131592
 +17.0949 0.0131803
 +17.1064 0.0132015
 +17.118 0.0132227
 +17.1296 0.0132332
 +17.1412 0.0132332
 +17.1528 0.0132332
 +17.1644 0.0132227
 +17.1759 0.0132015
 +17.1875 0.0131803
 +17.1991 0.0131486
 +17.2107 0.0131169
 +17.2222 0.0130851
 +17.2338 0.0130428
 +17.2453 0.0130005
 +17.2569 0.0129476
 +17.2685 0.0129053
 +17.2801 0.012863
 +17.2917 0.0128101
 +17.3033 0.0127678
 +17.3149 0.0127255
 +17.3263 0.0126937
 +17.3379 0.012662
 +17.3495 0.0126303
 +17.3611 0.0126091
 +17.3727 0.012588
 +17.3843 0.012588
 +17.3959 0.0125774
 +17.4074 0.012588
 +17.419 0.0125985
 +17.4305 0.0126197
 +17.4421 0.0126514
 +17.4537 0.0126832
 +17.4653 0.0127255
 +17.4768 0.0127784
 +17.4884 0.0128313
 +17.5 0.0128842
 +17.5116 0.0129476
 +17.5232 0.0130111
 +17.5348 0.0130746
 +17.5463 0.0131486
 +17.5578 0.0132121
 +17.5694 0.0132755
 +17.581 0.013339
 +17.5926 0.0134025
 +17.6042 0.0134554
 +17.6158 0.0135083
 +17.6274 0.0135506
 +17.6388 0.0135929
 +17.6504 0.0136246
 +17.662 0.0136458
 +17.6736 0.0136669
 +17.6852 0.0136669
 +17.6968 0.0136775
 +17.7083 0.0136669
 +17.7199 0.0136458
 +17.7315 0.0136246
 +17.743 0.0136035
 +17.7546 0.0135717
 +17.7662 0.0135294
 +17.7778 0.0134977
 +17.7893 0.0134554
 +17.8009 0.0134131
 +17.8125 0.0133707
 +17.8241 0.0133284
 +17.8357 0.0132861
 +17.8473 0.0132544
 +17.8588 0.0132227
 +17.8703 0.0131909
 +17.8819 0.0131698
 +17.8935 0.0131592
 +17.9051 0.0131486
 +17.9167 0.0131486
 +17.9283 0.0131592
 +17.9398 0.0131698
 +17.9513 0.0132015
 +17.9629 0.0132332
 +17.9745 0.013265
 +17.9861 0.0133073
 +17.9977 0.0133602
 +18.0093 0.0134025
 +18.0208 0.0134659
 +18.0324 0.0135188
 +18.044 0.0135717
 +18.0556 0.0136352
 +18.0671 0.0136881
 +18.0787 0.013741
 +18.0903 0.0137939
 +18.1018 0.0138362
 +18.1134 0.0138785
 +18.125 0.0139102
 +18.1366 0.0139314
 +18.1482 0.0139525
 +18.1598 0.0139631
 +18.1712 0.0139631
 +18.1828 0.0139525
 +18.1944 0.013942
 +18.206 0.0139208
 +18.2176 0.0138997
 +18.2292 0.0138679
 +18.2408 0.0138256
 +18.2523 0.0137833
 +18.2639 0.013741
 +18.2754 0.0136987
 +18.287 0.0136564
++=======
+ 0 1.137e-13
+ 0.0115741 5.119e-02
+ 0.0231481 1.085e-01
+ 0.0347222 1.764e-01
+ 0.0462963 3.360e-01
+ 0.0578704 5.409e-01
+ 0.0694444 7.867e-01
+ 0.0810185 1.068e+00
+ 0.0925926 1.379e+00
+ 0.104167 1.712e+00
+ 0.115741 2.061e+00
+ 0.127315 2.418e+00
+ 0.138889 2.776e+00
+ 0.150463 3.127e+00
+ 0.162037 3.464e+00
+ 0.173611 3.780e+00
+ 0.185185 4.069e+00
+ 0.196759 4.324e+00
+ 0.208333 4.542e+00
+ 0.219907 4.717e+00
+ 0.231481 4.847e+00
+ 0.243056 4.928e+00
+ 0.25463 4.961e+00
+ 0.266204 4.945e+00
+ 0.277778 4.880e+00
+ 0.289352 4.768e+00
+ 0.300926 4.613e+00
+ 0.3125 4.417e+00
+ 0.324074 4.185e+00
+ 0.335648 3.923e+00
+ 0.347222 3.635e+00
+ 0.358796 3.328e+00
+ 0.37037 3.008e+00
+ 0.381944 2.681e+00
+ 0.393519 2.354e+00
+ 0.405093 2.033e+00
+ 0.416667 1.724e+00
+ 0.428241 1.433e+00
+ 0.439815 1.164e+00
+ 0.451389 9.220e-01
+ 0.462963 7.112e-01
+ 0.474537 5.346e-01
+ 0.486111 3.944e-01
+ 0.497685 3.192e-01
+ 0.509259 2.898e-01
+ 0.520833 2.580e-01
+ 0.532407 2.689e-01
+ 0.543981 3.087e-01
+ 0.555556 3.502e-01
+ 0.56713 4.645e-01
+ 0.578704 6.069e-01
+ 0.590278 7.734e-01
+ 0.601852 9.597e-01
+ 0.613426 1.161e+00
+ 0.625 1.374e+00
+ 0.636574 1.593e+00
+ 0.648148 1.813e+00
+ 0.659722 2.031e+00
+ 0.671296 2.242e+00
+ 0.68287 2.442e+00
+ 0.694444 2.628e+00
+ 0.706019 2.796e+00
+ 0.717593 2.944e+00
+ 0.729167 3.069e+00
+ 0.740741 3.171e+00
+ 0.752315 3.247e+00
+ 0.763889 3.298e+00
+ 0.775463 3.323e+00
+ 0.787037 3.323e+00
+ 0.798611 3.298e+00
+ 0.810185 3.249e+00
+ 0.821759 3.180e+00
+ 0.833333 3.091e+00
+ 0.844907 2.984e+00
+ 0.856481 2.863e+00
+ 0.868056 2.729e+00
+ 0.87963 2.586e+00
+ 0.891204 2.437e+00
+ 0.902778 2.283e+00
+ 0.914352 2.128e+00
+ 0.925926 1.975e+00
+ 0.9375 1.825e+00
+ 0.949074 1.681e+00
+ 0.960648 1.545e+00
+ 0.972222 1.419e+00
+ 0.983796 1.304e+00
+ 0.99537 1.201e+00
+ 1.00694 1.112e+00
+ 1.01852 1.037e+00
+ 1.03009 9.754e-01
+ 1.04167 9.287e-01
+ 1.05324 8.962e-01
+ 1.06481 8.775e-01
+ 1.07639 8.721e-01
+ 1.08796 8.791e-01
+ 1.09954 8.977e-01
+ 1.11111 9.267e-01
+ 1.12269 9.649e-01
+ 1.13426 1.011e+00
+ 1.14583 1.064e+00
+ 1.15741 1.122e+00
+ 1.16898 1.184e+00
+ 1.18056 1.249e+00
+ 1.19213 1.314e+00
+ 1.2037 1.380e+00
+ 1.21528 1.445e+00
+ 1.22685 1.507e+00
+ 1.23843 1.567e+00
+ 1.25 1.622e+00
+ 1.26157 1.672e+00
+ 1.27315 1.717e+00
+ 1.28472 1.756e+00
+ 1.2963 1.789e+00
+ 1.30787 1.815e+00
+ 1.31944 1.834e+00
+ 1.33102 1.846e+00
+ 1.34259 1.852e+00
+ 1.35417 1.851e+00
+ 1.36574 1.843e+00
+ 1.37731 1.829e+00
+ 1.38889 1.809e+00
+ 1.40046 1.784e+00
+ 1.41204 1.754e+00
+ 1.42361 1.720e+00
+ 1.43519 1.682e+00
+ 1.44676 1.641e+00
+ 1.45833 1.596e+00
+ 1.46991 1.550e+00
+ 1.48148 1.502e+00
+ 1.49306 1.454e+00
+ 1.50463 1.404e+00
+ 1.5162 1.355e+00
+ 1.52778 1.306e+00
+ 1.53935 1.259e+00
+ 1.55093 1.213e+00
+ 1.5625 1.168e+00
+ 1.57407 1.126e+00
+ 1.58565 1.086e+00
+ 1.59722 1.049e+00
+ 1.6088 1.015e+00
+ 1.62037 9.832e-01
+ 1.63194 9.551e-01
+ 1.64352 9.302e-01
+ 1.65509 9.086e-01
+ 1.66667 8.901e-01
+ 1.67824 8.749e-01
+ 1.68981 8.627e-01
+ 1.70139 8.536e-01
+ 1.71296 8.472e-01
+ 1.72454 8.435e-01
+ 1.73611 8.423e-01
+ 1.74769 8.432e-01
+ 1.75926 8.462e-01
+ 1.77083 8.510e-01
+ 1.78241 8.572e-01
+ 1.79398 8.646e-01
+ 1.80556 8.730e-01
+ 1.81713 8.821e-01
+ 1.8287 8.916e-01
+ 1.84028 9.013e-01
+ 1.85185 9.109e-01
+ 1.86343 9.202e-01
+ 1.875 9.289e-01
+ 1.88657 9.369e-01
+ 1.89815 9.440e-01
+ 1.90972 9.499e-01
+ 1.9213 9.545e-01
+ 1.93287 9.578e-01
+ 1.94444 9.595e-01
+ 1.95602 9.596e-01
+ 1.96759 9.581e-01
+ 1.97917 9.548e-01
+ 1.99074 9.498e-01
+ 2.00231 9.430e-01
+ 2.01389 9.345e-01
+ 2.02546 9.243e-01
+ 2.03704 9.124e-01
+ 2.04861 8.990e-01
+ 2.06019 8.840e-01
+ 2.07176 8.677e-01
+ 2.08333 8.501e-01
+ 2.09491 8.313e-01
+ 2.10648 8.115e-01
+ 2.11806 7.908e-01
+ 2.12963 7.694e-01
+ 2.1412 7.473e-01
+ 2.15278 7.248e-01
+ 2.16435 7.020e-01
+ 2.17593 6.790e-01
+ 2.1875 6.560e-01
+ 2.19907 6.331e-01
+ 2.21065 6.105e-01
+ 2.22222 5.882e-01
+ 2.2338 5.664e-01
+ 2.24537 5.453e-01
+ 2.25694 5.248e-01
+ 2.26852 5.051e-01
+ 2.28009 4.863e-01
+ 2.29167 4.683e-01
+ 2.30324 4.514e-01
+ 2.31481 4.374e-01
+ 2.32639 4.374e-01
+ 2.33796 4.355e-01
+ 2.34954 4.353e-01
+ 2.36111 4.356e-01
+ 2.37269 4.331e-01
+ 2.38426 4.280e-01
+ 2.39583 4.269e-01
+ 2.40741 4.240e-01
+ 2.41898 4.212e-01
+ 2.43056 4.215e-01
+ 2.44213 4.235e-01
+ 2.4537 4.299e-01
+ 2.46528 4.339e-01
+ 2.47685 4.489e-01
+ 2.48843 4.573e-01
+ 2.5 4.597e-01
+ 2.51157 4.727e-01
+ 2.52315 4.803e-01
+ 2.53472 4.825e-01
+ 2.5463 4.808e-01
+ 2.55787 4.763e-01
+ 2.56944 4.697e-01
+ 2.58102 4.616e-01
+ 2.59259 4.535e-01
+ 2.60417 4.446e-01
+ 2.61574 4.344e-01
+ 2.62731 4.224e-01
+ 2.63889 4.136e-01
+ 2.65046 4.023e-01
+ 2.66204 3.906e-01
+ 2.67361 3.808e-01
+ 2.68519 3.674e-01
+ 2.69676 3.584e-01
+ 2.70833 4.009e-01
+ 2.71991 4.547e-01
+ 2.73148 5.008e-01
+ 2.74306 5.386e-01
+ 2.75463 5.675e-01
+ 2.7662 5.860e-01
+ 2.77778 5.946e-01
+ 2.78935 5.944e-01
+ 2.80093 5.877e-01
+ 2.8125 5.782e-01
+ 2.82407 5.667e-01
+ 2.83565 5.541e-01
+ 2.84722 5.408e-01
+ 2.8588 5.272e-01
+ 2.87037 5.130e-01
+ 2.88194 4.979e-01
+ 2.89352 4.836e-01
+ 2.90509 4.707e-01
+ 2.91667 4.564e-01
+ 2.92824 4.472e-01
+ 2.93981 4.352e-01
+ 2.95139 4.267e-01
+ 2.96296 4.124e-01
+ 2.97454 4.730e-01
+ 2.98611 5.331e-01
+ 2.99769 5.837e-01
+ 3.00926 6.241e-01
+ 3.02083 6.536e-01
+ 3.03241 6.711e-01
+ 3.04398 6.779e-01
+ 3.05556 6.755e-01
+ 3.06713 6.680e-01
+ 3.0787 6.566e-01
+ 3.09028 6.444e-01
+ 3.10185 6.311e-01
+ 3.11343 6.169e-01
+ 3.125 6.019e-01
+ 3.13657 5.862e-01
+ 3.14815 5.724e-01
+ 3.15972 5.578e-01
+ 3.1713 5.415e-01
+ 3.18287 5.254e-01
+ 3.19444 5.122e-01
+ 3.20602 4.953e-01
+ 3.21759 4.814e-01
+ 3.22917 4.686e-01
+ 3.24074 4.845e-01
+ 3.25231 5.442e-01
+ 3.26389 5.936e-01
+ 3.27546 6.323e-01
+ 3.28704 6.599e-01
+ 3.29861 6.754e-01
+ 3.31019 6.807e-01
+ 3.32176 6.782e-01
+ 3.33333 6.701e-01
+ 3.34491 6.605e-01
+ 3.35648 6.490e-01
+ 3.36806 6.364e-01
+ 3.37963 6.234e-01
+ 3.3912 6.100e-01
+ 3.40278 5.960e-01
+ 3.41435 5.806e-01
+ 3.42593 5.643e-01
+ 3.4375 5.507e-01
+ 3.44907 5.361e-01
+ 3.46065 5.326e-01
+ 3.47222 5.450e-01
+ 3.4838 5.577e-01
+ 3.49537 5.705e-01
+ 3.50694 5.835e-01
+ 3.51852 5.966e-01
+ 3.53009 6.098e-01
+ 3.54167 6.231e-01
+ 3.55324 6.365e-01
+ 3.56481 6.498e-01
+ 3.57639 6.631e-01
+ 3.58796 6.764e-01
+ 3.59954 6.895e-01
+ 3.61111 7.025e-01
+ 3.62269 7.154e-01
+ 3.63426 7.282e-01
+ 3.64583 7.407e-01
+ 3.65741 7.531e-01
+ 3.66898 7.652e-01
+ 3.68056 7.772e-01
+ 3.69213 7.889e-01
+ 3.7037 8.004e-01
+ 3.71528 8.116e-01
+ 3.72685 8.227e-01
+ 3.73843 8.335e-01
+ 3.75 8.441e-01
+ 3.76157 8.546e-01
+ 3.77315 8.648e-01
+ 3.78472 8.750e-01
+ 3.7963 8.850e-01
+ 3.80787 8.948e-01
+ 3.81944 9.047e-01
+ 3.83102 9.144e-01
+ 3.84259 9.241e-01
+ 3.85417 9.338e-01
+ 3.86574 9.435e-01
+ 3.87731 9.533e-01
+ 3.88889 9.630e-01
+ 3.90046 9.729e-01
+ 3.91204 9.828e-01
+ 3.92361 9.927e-01
+ 3.93519 1.003e+00
+ 3.94676 1.013e+00
+ 3.95833 1.023e+00
+ 3.96991 1.033e+00
+ 3.98148 1.044e+00
+ 3.99306 1.054e+00
+ 4.00463 1.064e+00
+ 4.0162 1.075e+00
+ 4.02778 1.085e+00
+ 4.03935 1.096e+00
+ 4.05093 1.106e+00
+ 4.0625 1.116e+00
+ 4.07407 1.126e+00
+ 4.08565 1.136e+00
+ 4.09722 1.146e+00
+ 4.1088 1.156e+00
+ 4.12037 1.165e+00
+ 4.13194 1.174e+00
+ 4.14352 1.184e+00
+ 4.15509 1.193e+00
+ 4.16667 1.201e+00
+ 4.17824 1.210e+00
+ 4.18981 1.219e+00
+ 4.20139 1.227e+00
+ 4.21296 1.236e+00
+ 4.22454 1.244e+00
+ 4.23611 1.253e+00
+ 4.24769 1.262e+00
+ 4.25926 1.271e+00
+ 4.27083 1.280e+00
+ 4.28241 1.290e+00
+ 4.29398 1.300e+00
+ 4.30556 1.310e+00
+ 4.31713 1.321e+00
+ 4.3287 1.333e+00
+ 4.34028 1.345e+00
+ 4.35185 1.358e+00
+ 4.36343 1.372e+00
+ 4.375 1.386e+00
+ 4.38657 1.401e+00
+ 4.39815 1.417e+00
+ 4.40972 1.433e+00
+ 4.4213 1.450e+00
+ 4.43287 1.467e+00
+ 4.44444 1.485e+00
+ 4.45602 1.503e+00
+ 4.46759 1.521e+00
+ 4.47917 1.540e+00
+ 4.49074 1.558e+00
+ 4.50231 1.576e+00
+ 4.51389 1.594e+00
+ 4.52546 1.611e+00
+ 4.53704 1.627e+00
+ 4.54861 1.642e+00
+ 4.56019 1.657e+00
+ 4.57176 1.670e+00
+ 4.58333 1.681e+00
+ 4.59491 1.691e+00
+ 4.60648 1.700e+00
+ 4.61806 1.707e+00
+ 4.62963 1.712e+00
+ 4.6412 1.716e+00
+ 4.65278 1.718e+00
+ 4.66435 1.718e+00
+ 4.67593 1.717e+00
+ 4.6875 1.714e+00
+ 4.69907 1.711e+00
+ 4.71065 1.706e+00
+ 4.72222 1.701e+00
+ 4.7338 1.695e+00
+ 4.74537 1.689e+00
+ 4.75694 1.684e+00
+ 4.76852 1.679e+00
+ 4.78009 1.675e+00
+ 4.79167 1.672e+00
+ 4.80324 1.671e+00
+ 4.81481 1.672e+00
+ 4.82639 1.675e+00
+ 4.83796 1.681e+00
+ 4.84954 1.689e+00
+ 4.86111 1.701e+00
+ 4.87269 1.716e+00
+ 4.88426 1.733e+00
+ 4.89583 1.754e+00
+ 4.90741 1.779e+00
+ 4.91898 1.806e+00
+ 4.93056 1.836e+00
+ 4.94213 1.869e+00
+ 4.9537 1.904e+00
+ 4.96528 1.941e+00
+ 4.97685 1.980e+00
+ 4.98843 2.020e+00
+ 5 2.060e+00
+ 5.01157 2.099e+00
+ 5.02315 2.138e+00
+ 5.03472 2.176e+00
+ 5.0463 2.212e+00
+ 5.05787 2.244e+00
+ 5.06944 2.274e+00
+ 5.08102 2.300e+00
+ 5.09259 2.322e+00
+ 5.10417 2.339e+00
+ 5.11574 2.351e+00
+ 5.12731 2.358e+00
+ 5.13889 2.360e+00
+ 5.15046 2.356e+00
+ 5.16204 2.346e+00
+ 5.17361 2.332e+00
+ 5.18519 2.313e+00
+ 5.19676 2.289e+00
+ 5.20833 2.262e+00
+ 5.21991 2.231e+00
+ 5.23148 2.198e+00
+ 5.24306 2.163e+00
+ 5.25463 2.127e+00
+ 5.2662 2.091e+00
+ 5.27778 2.057e+00
+ 5.28935 2.024e+00
+ 5.30093 1.995e+00
+ 5.3125 1.969e+00
+ 5.32407 1.949e+00
+ 5.33565 1.934e+00
+ 5.34722 1.926e+00
+ 5.3588 1.925e+00
+ 5.37037 1.931e+00
+ 5.38194 1.945e+00
+ 5.39352 1.968e+00
+ 5.40509 1.998e+00
+ 5.41667 2.037e+00
+ 5.42824 2.083e+00
+ 5.43981 2.136e+00
+ 5.45139 2.197e+00
+ 5.46296 2.262e+00
+ 5.47454 2.333e+00
+ 5.48611 2.407e+00
+ 5.49769 2.484e+00
+ 5.50926 2.561e+00
+ 5.52083 2.639e+00
+ 5.53241 2.715e+00
+ 5.54398 2.788e+00
+ 5.55556 2.857e+00
+ 5.56713 2.920e+00
+ 5.5787 2.976e+00
+ 5.59028 3.024e+00
+ 5.60185 3.063e+00
+ 5.61343 3.092e+00
+ 5.625 3.110e+00
+ 5.63657 3.118e+00
+ 5.64815 3.114e+00
+ 5.65972 3.099e+00
+ 5.6713 3.073e+00
+ 5.68287 3.037e+00
+ 5.69444 2.991e+00
+ 5.70602 2.936e+00
+ 5.71759 2.874e+00
+ 5.72917 2.805e+00
+ 5.74074 2.732e+00
+ 5.75231 2.655e+00
+ 5.76389 2.577e+00
+ 5.77546 2.499e+00
+ 5.78704 2.424e+00
+ 5.79861 2.352e+00
+ 5.81019 2.286e+00
+ 5.82176 2.227e+00
+ 5.83333 2.178e+00
+ 5.84491 2.139e+00
+ 5.85648 2.111e+00
+ 5.86806 2.096e+00
+ 5.87963 2.094e+00
+ 5.8912 2.106e+00
+ 5.90278 2.132e+00
+ 5.91435 2.172e+00
+ 5.92593 2.225e+00
+ 5.9375 2.291e+00
+ 5.94907 2.370e+00
+ 5.96065 2.458e+00
+ 5.97222 2.556e+00
+ 5.9838 2.662e+00
+ 5.99537 2.773e+00
+ 6.00694 2.889e+00
+ 6.01852 3.006e+00
+ 6.03009 3.122e+00
+ 6.04167 3.236e+00
+ 6.05324 3.346e+00
+ 6.06481 3.449e+00
+ 6.07639 3.543e+00
+ 6.08796 3.627e+00
+ 6.09954 3.699e+00
+ 6.11111 3.758e+00
+ 6.12269 3.802e+00
+ 6.13426 3.832e+00
+ 6.14583 3.846e+00
+ 6.15741 3.844e+00
+ 6.16898 3.827e+00
+ 6.18056 3.795e+00
+ 6.19213 3.748e+00
+ 6.2037 3.688e+00
+ 6.21528 3.616e+00
+ 6.22685 3.534e+00
+ 6.23843 3.444e+00
+ 6.25 3.347e+00
+ 6.26157 3.245e+00
+ 6.27315 3.141e+00
+ 6.28472 3.038e+00
+ 6.2963 2.936e+00
+ 6.30787 2.839e+00
+ 6.31944 2.749e+00
+ 6.33102 2.667e+00
+ 6.34259 2.595e+00
+ 6.35417 2.535e+00
+ 6.36574 2.488e+00
+ 6.37731 2.456e+00
+ 6.38889 2.439e+00
+ 6.40046 2.437e+00
+ 6.41204 2.450e+00
+ 6.42361 2.479e+00
+ 6.43519 2.523e+00
+ 6.44676 2.582e+00
+ 6.45833 2.654e+00
+ 6.46991 2.738e+00
+ 6.48148 2.832e+00
+ 6.49306 2.935e+00
+ 6.50463 3.046e+00
+ 6.5162 3.161e+00
+ 6.52778 3.280e+00
+ 6.53935 3.400e+00
+ 6.55093 3.518e+00
+ 6.5625 3.634e+00
+ 6.57407 3.745e+00
+ 6.58565 3.849e+00
+ 6.59722 3.945e+00
+ 6.6088 4.032e+00
+ 6.62037 4.107e+00
+ 6.63194 4.171e+00
+ 6.64352 4.221e+00
+ 6.65509 4.259e+00
+ 6.66667 4.283e+00
+ 6.67824 4.294e+00
+ 6.68981 4.291e+00
+ 6.70139 4.276e+00
+ 6.71296 4.248e+00
+ 6.72454 4.209e+00
+ 6.73611 4.161e+00
+ 6.74769 4.103e+00
+ 6.75926 4.038e+00
+ 6.77083 3.966e+00
+ 6.78241 3.890e+00
+ 6.79398 3.811e+00
+ 6.80556 3.731e+00
+ 6.81713 3.650e+00
+ 6.8287 3.571e+00
+ 6.84028 3.496e+00
+ 6.85185 3.424e+00
+ 6.86343 3.358e+00
+ 6.875 3.298e+00
+ 6.88657 3.246e+00
+ 6.89815 3.202e+00
+ 6.90972 3.168e+00
+ 6.9213 3.142e+00
+ 6.93287 3.127e+00
+ 6.94444 3.122e+00
+ 6.95602 3.126e+00
+ 6.96759 3.141e+00
+ 6.97917 3.165e+00
+ 6.99074 3.198e+00
+ 7.00231 3.240e+00
+ 7.01389 3.290e+00
+ 7.02546 3.348e+00
+ 7.03704 3.412e+00
+ 7.04861 3.481e+00
+ 7.06019 3.556e+00
+ 7.07176 3.634e+00
+ 7.08333 3.715e+00
+ 7.09491 3.798e+00
+ 7.10648 3.882e+00
+ 7.11806 3.966e+00
+ 7.12963 4.048e+00
+ 7.1412 4.129e+00
+ 7.15278 4.207e+00
+ 7.16435 4.281e+00
+ 7.17593 4.350e+00
+ 7.1875 4.414e+00
+ 7.19907 4.472e+00
+ 7.21065 4.523e+00
+ 7.22222 4.567e+00
+ 7.2338 4.604e+00
+ 7.24537 4.632e+00
+ 7.25694 4.652e+00
+ 7.26852 4.664e+00
+ 7.28009 4.667e+00
+ 7.29167 4.662e+00
+ 7.30324 4.648e+00
+ 7.31481 4.627e+00
+ 7.32639 4.598e+00
+ 7.33796 4.561e+00
+ 7.34954 4.518e+00
+ 7.36111 4.469e+00
+ 7.37269 4.415e+00
+ 7.38426 4.357e+00
+ 7.39583 4.295e+00
+ 7.40741 4.231e+00
+ 7.41898 4.166e+00
+ 7.43056 4.101e+00
+ 7.44213 4.037e+00
+ 7.4537 3.975e+00
+ 7.46528 3.916e+00
+ 7.47685 3.863e+00
+ 7.48843 3.814e+00
+ 7.5 3.772e+00
+ 7.51157 3.738e+00
+ 7.52315 3.712e+00
+ 7.53472 3.694e+00
+ 7.5463 3.687e+00
+ 7.55787 3.689e+00
+ 7.56944 3.701e+00
+ 7.58102 3.724e+00
+ 7.59259 3.756e+00
+ 7.60417 3.799e+00
+ 7.61574 3.851e+00
+ 7.62731 3.911e+00
+ 7.63889 3.980e+00
+ 7.65046 4.056e+00
+ 7.66204 4.137e+00
+ 7.67361 4.224e+00
+ 7.68519 4.315e+00
+ 7.69676 4.407e+00
+ 7.70833 4.501e+00
+ 7.71991 4.594e+00
+ 7.73148 4.685e+00
+ 7.74306 4.773e+00
+ 7.75463 4.857e+00
+ 7.7662 4.934e+00
+ 7.77778 5.005e+00
+ 7.78935 5.068e+00
+ 7.80093 5.121e+00
+ 7.8125 5.165e+00
+ 7.82407 5.199e+00
+ 7.83565 5.223e+00
+ 7.84722 5.235e+00
+ 7.8588 5.237e+00
+ 7.87037 5.228e+00
+ 7.88194 5.209e+00
+ 7.89352 5.180e+00
+ 7.90509 5.143e+00
+ 7.91667 5.097e+00
+ 7.92824 5.044e+00
+ 7.93981 4.986e+00
+ 7.95139 4.922e+00
+ 7.96296 4.855e+00
+ 7.97454 4.787e+00
+ 7.98611 4.717e+00
+ 7.99769 4.648e+00
+ 8.00926 4.582e+00
+ 8.02083 4.518e+00
+ 8.03241 4.459e+00
+ 8.04398 4.406e+00
+ 8.05556 4.359e+00
+ 8.06713 4.320e+00
+ 8.0787 4.289e+00
+ 8.09028 4.267e+00
+ 8.10185 4.255e+00
+ 8.11343 4.252e+00
+ 8.125 4.258e+00
+ 8.13657 4.274e+00
+ 8.14815 4.300e+00
+ 8.15972 4.334e+00
+ 8.1713 4.377e+00
+ 8.18287 4.428e+00
+ 8.19444 4.486e+00
+ 8.20602 4.549e+00
+ 8.21759 4.618e+00
+ 8.22917 4.691e+00
+ 8.24074 4.768e+00
+ 8.25231 4.846e+00
+ 8.26389 4.924e+00
+ 8.27546 5.003e+00
+ 8.28704 5.080e+00
+ 8.29861 5.154e+00
+ 8.31019 5.225e+00
+ 8.32176 5.292e+00
+ 8.33333 5.353e+00
+ 8.34491 5.409e+00
+ 8.35648 5.457e+00
+ 8.36806 5.499e+00
+ 8.37963 5.533e+00
+ 8.3912 5.560e+00
+ 8.40278 5.579e+00
+ 8.41435 5.589e+00
+ 8.42593 5.593e+00
+ 8.4375 5.588e+00
+ 8.44907 5.577e+00
+ 8.46065 5.559e+00
+ 8.47222 5.535e+00
+ 8.4838 5.506e+00
+ 8.49537 5.472e+00
+ 8.50694 5.434e+00
+ 8.51852 5.393e+00
+ 8.53009 5.350e+00
+ 8.54167 5.306e+00
+ 8.55324 5.261e+00
+ 8.56481 5.217e+00
+ 8.57639 5.175e+00
+ 8.58796 5.134e+00
+ 8.59954 5.096e+00
+ 8.61111 5.062e+00
+ 8.62269 5.033e+00
+ 8.63426 5.008e+00
+ 8.64583 4.988e+00
+ 8.65741 4.974e+00
+ 8.66898 4.966e+00
+ 8.68056 4.964e+00
+ 8.69213 4.969e+00
+ 8.7037 4.979e+00
+ 8.71528 4.996e+00
+ 8.72685 5.018e+00
+ 8.73843 5.046e+00
+ 8.75 5.079e+00
+ 8.76157 5.116e+00
+ 8.77315 5.158e+00
+ 8.78472 5.203e+00
+ 8.7963 5.252e+00
+ 8.80787 5.302e+00
+ 8.81944 5.354e+00
+ 8.83102 5.407e+00
+ 8.84259 5.460e+00
+ 8.85417 5.513e+00
+ 8.86574 5.564e+00
+ 8.87731 5.614e+00
+ 8.88889 5.662e+00
+ 8.90046 5.706e+00
+ 8.91204 5.747e+00
+ 8.92361 5.785e+00
+ 8.93519 5.818e+00
+ 8.94676 5.847e+00
+ 8.95833 5.872e+00
+ 8.96991 5.892e+00
+ 8.98148 5.907e+00
+ 8.99306 5.918e+00
+ 9.00463 5.924e+00
+ 9.0162 5.926e+00
+ 9.02778 5.923e+00
+ 9.03935 5.917e+00
+ 9.05093 5.908e+00
+ 9.0625 5.895e+00
+ 9.07407 5.880e+00
+ 9.08565 5.863e+00
+ 9.09722 5.844e+00
+ 9.1088 5.824e+00
+ 9.12037 5.803e+00
+ 9.13194 5.783e+00
+ 9.14352 5.762e+00
+ 9.15509 5.742e+00
+ 9.16667 5.724e+00
+ 9.17824 5.707e+00
+ 9.18981 5.693e+00
+ 9.20139 5.681e+00
+ 9.21296 5.671e+00
+ 9.22454 5.664e+00
+ 9.23611 5.661e+00
+ 9.24769 5.660e+00
+ 9.25926 5.663e+00
+ 9.27083 5.670e+00
+ 9.28241 5.679e+00
+ 9.29398 5.692e+00
+ 9.30556 5.708e+00
+ 9.31713 5.726e+00
+ 9.3287 5.748e+00
+ 9.34028 5.772e+00
+ 9.35185 5.798e+00
+ 9.36343 5.826e+00
+ 9.375 5.855e+00
+ 9.38657 5.886e+00
+ 9.39815 5.917e+00
+ 9.40972 5.949e+00
+ 9.4213 5.981e+00
+ 9.43287 6.013e+00
+ 9.44444 6.045e+00
+ 9.45602 6.075e+00
+ 9.46759 6.105e+00
+ 9.47917 6.133e+00
+ 9.49074 6.159e+00
+ 9.50231 6.184e+00
+ 9.51389 6.206e+00
+ 9.52546 6.227e+00
+ 9.53704 6.245e+00
+ 9.54861 6.261e+00
+ 9.56019 6.275e+00
+ 9.57176 6.287e+00
+ 9.58333 6.296e+00
+ 9.59491 6.303e+00
+ 9.60648 6.309e+00
+ 9.61806 6.312e+00
+ 9.62963 6.314e+00
+ 9.6412 6.314e+00
+ 9.65278 6.313e+00
+ 9.66435 6.311e+00
+ 9.67593 6.309e+00
+ 9.6875 6.305e+00
+ 9.69907 6.302e+00
+ 9.71065 6.298e+00
+ 9.72222 6.294e+00
+ 9.7338 6.291e+00
+ 9.74537 6.288e+00
+ 9.75694 6.286e+00
+ 9.76852 6.285e+00
+ 9.78009 6.285e+00
+ 9.79167 6.286e+00
+ 9.80324 6.288e+00
+ 9.81481 6.292e+00
+ 9.82639 6.297e+00
+ 9.83796 6.304e+00
+ 9.84954 6.312e+00
+ 9.86111 6.321e+00
+ 9.87269 6.331e+00
+ 9.88426 6.343e+00
+ 9.89583 6.356e+00
+ 9.90741 6.371e+00
+ 9.91898 6.386e+00
+ 9.93056 6.402e+00
+ 9.94213 6.419e+00
+ 9.9537 6.436e+00
+ 9.96528 6.454e+00
+ 9.97685 6.472e+00
+ 9.98843 6.491e+00
+ 10 6.509e+00
+ 10.0116 6.528e+00
+ 10.0231 6.546e+00
+ 10.0347 6.565e+00
+ 10.0463 6.582e+00
+ 10.0579 6.600e+00
+ 10.0694 6.617e+00
+ 10.081 6.633e+00
+ 10.0926 6.649e+00
+ 10.1042 6.664e+00
+ 10.1157 6.678e+00
+ 10.1273 6.692e+00
+ 10.1389 6.705e+00
+ 10.1505 6.717e+00
+ 10.162 6.729e+00
+ 10.1736 6.739e+00
+ 10.1852 6.749e+00
+ 10.1968 6.759e+00
+ 10.2083 6.768e+00
+ 10.2199 6.776e+00
+ 10.2315 6.784e+00
+ 10.2431 6.791e+00
+ 10.2546 6.798e+00
+ 10.2662 6.804e+00
+ 10.2778 6.810e+00
+ 10.2894 6.816e+00
+ 10.3009 6.821e+00
+ 10.3125 6.826e+00
+ 10.3241 6.831e+00
+ 10.3356 6.836e+00
+ 10.3472 6.841e+00
+ 10.3588 6.845e+00
+ 10.3704 6.850e+00
+ 10.3819 6.855e+00
+ 10.3935 6.860e+00
+ 10.4051 6.865e+00
+ 10.4167 6.871e+00
+ 10.4282 6.876e+00
+ 10.4398 6.883e+00
+ 10.4514 6.889e+00
+ 10.463 6.897e+00
+ 10.4745 6.905e+00
+ 10.4861 6.913e+00
+ 10.4977 6.923e+00
+ 10.5093 6.933e+00
+ 10.5208 6.944e+00
+ 10.5324 6.956e+00
+ 10.544 6.968e+00
+ 10.5556 6.982e+00
+ 10.5671 6.997e+00
+ 10.5787 7.012e+00
+ 10.5903 7.029e+00
+ 10.6019 7.046e+00
+ 10.6134 7.064e+00
+ 10.625 7.082e+00
+ 10.6366 7.101e+00
+ 10.6481 7.121e+00
+ 10.6597 7.141e+00
+ 10.6713 7.161e+00
+ 10.6829 7.180e+00
+ 10.6944 7.200e+00
+ 10.706 7.219e+00
+ 10.7176 7.238e+00
+ 10.7292 7.255e+00
+ 10.7407 7.272e+00
+ 10.7523 7.287e+00
+ 10.7639 7.301e+00
+ 10.7755 7.314e+00
+ 10.787 7.325e+00
+ 10.7986 7.334e+00
+ 10.8102 7.342e+00
+ 10.8218 7.347e+00
+ 10.8333 7.351e+00
+ 10.8449 7.353e+00
+ 10.8565 7.353e+00
+ 10.8681 7.352e+00
+ 10.8796 7.349e+00
+ 10.8912 7.345e+00
+ 10.9028 7.340e+00
+ 10.9144 7.334e+00
+ 10.9259 7.327e+00
+ 10.9375 7.321e+00
+ 10.9491 7.315e+00
+ 10.9606 7.309e+00
+ 10.9722 7.304e+00
+ 10.9838 7.301e+00
+ 10.9954 7.299e+00
+ 11.0069 7.299e+00
+ 11.0185 7.301e+00
+ 11.0301 7.306e+00
+ 11.0417 7.314e+00
+ 11.0532 7.324e+00
+ 11.0648 7.338e+00
+ 11.0764 7.354e+00
+ 11.088 7.374e+00
+ 11.0995 7.397e+00
+ 11.1111 7.422e+00
+ 11.1227 7.451e+00
+ 11.1343 7.481e+00
+ 11.1458 7.514e+00
+ 11.1574 7.548e+00
+ 11.169 7.584e+00
+ 11.1806 7.620e+00
+ 11.1921 7.657e+00
+ 11.2037 7.693e+00
+ 11.2153 7.728e+00
+ 11.2269 7.762e+00
+ 11.2384 7.794e+00
+ 11.25 7.824e+00
+ 11.2616 7.850e+00
+ 11.2731 7.873e+00
+ 11.2847 7.892e+00
+ 11.2963 7.907e+00
+ 11.3079 7.918e+00
+ 11.3194 7.924e+00
+ 11.331 7.926e+00
+ 11.3426 7.923e+00
+ 11.3542 7.916e+00
+ 11.3657 7.905e+00
+ 11.3773 7.890e+00
+ 11.3889 7.872e+00
+ 11.4005 7.851e+00
+ 11.412 7.828e+00
+ 11.4236 7.804e+00
+ 11.4352 7.778e+00
+ 11.4468 7.753e+00
+ 11.4583 7.728e+00
+ 11.4699 7.705e+00
+ 11.4815 7.684e+00
+ 11.4931 7.666e+00
+ 11.5046 7.651e+00
+ 11.5162 7.641e+00
+ 11.5278 7.635e+00
+ 11.5394 7.634e+00
+ 11.5509 7.639e+00
+ 11.5625 7.649e+00
+ 11.5741 7.665e+00
+ 11.5856 7.687e+00
+ 11.5972 7.714e+00
+ 11.6088 7.747e+00
+ 11.6204 7.784e+00
+ 11.6319 7.826e+00
+ 11.6435 7.871e+00
+ 11.6551 7.920e+00
+ 11.6667 7.970e+00
+ 11.6782 8.022e+00
+ 11.6898 8.074e+00
+ 11.7014 8.126e+00
+ 11.713 8.177e+00
+ 11.7245 8.225e+00
+ 11.7361 8.270e+00
+ 11.7477 8.311e+00
+ 11.7593 8.347e+00
+ 11.7708 8.379e+00
+ 11.7824 8.404e+00
+ 11.794 8.424e+00
+ 11.8056 8.437e+00
+ 11.8171 8.444e+00
+ 11.8287 8.445e+00
+ 11.8403 8.440e+00
+ 11.8519 8.429e+00
+ 11.8634 8.413e+00
+ 11.875 8.392e+00
+ 11.8866 8.367e+00
+ 11.8981 8.339e+00
+ 11.9097 8.308e+00
+ 11.9213 8.277e+00
+ 11.9329 8.245e+00
+ 11.9444 8.214e+00
+ 11.956 8.184e+00
+ 11.9676 8.157e+00
+ 11.9792 8.133e+00
+ 11.9907 8.113e+00
+ 12.0023 8.098e+00
+ 12.0139 8.088e+00
+ 12.0255 8.084e+00
+ 12.037 8.087e+00
+ 12.0486 8.095e+00
+ 12.0602 8.109e+00
+ 12.0718 8.129e+00
+ 12.0833 8.155e+00
+ 12.0949 8.187e+00
+ 12.1065 8.222e+00
+ 12.1181 8.262e+00
+ 12.1296 8.305e+00
+ 12.1412 8.349e+00
+ 12.1528 8.396e+00
+ 12.1644 8.442e+00
+ 12.1759 8.488e+00
+ 12.1875 8.533e+00
+ 12.1991 8.575e+00
+ 12.2106 8.614e+00
+ 12.2222 8.649e+00
+ 12.2338 8.680e+00
+ 12.2454 8.706e+00
+ 12.2569 8.726e+00
+ 12.2685 8.741e+00
+ 12.2801 8.751e+00
+ 12.2917 8.755e+00
+ 12.3032 8.754e+00
+ 12.3148 8.749e+00
+ 12.3264 8.739e+00
+ 12.338 8.726e+00
+ 12.3495 8.710e+00
+ 12.3611 8.692e+00
+ 12.3727 8.673e+00
+ 12.3843 8.653e+00
+ 12.3958 8.635e+00
+ 12.4074 8.618e+00
+ 12.419 8.603e+00
+ 12.4306 8.592e+00
+ 12.4421 8.584e+00
+ 12.4537 8.581e+00
+ 12.4653 8.583e+00
+ 12.4769 8.589e+00
+ 12.4884 8.601e+00
+ 12.5 8.619e+00
+ 12.5116 8.641e+00
+ 12.5231 8.668e+00
+ 12.5347 8.699e+00
+ 12.5463 8.734e+00
+ 12.5579 8.771e+00
+ 12.5694 8.811e+00
+ 12.581 8.851e+00
+ 12.5926 8.892e+00
+ 12.6042 8.932e+00
+ 12.6157 8.971e+00
+ 12.6273 9.006e+00
+ 12.6389 9.038e+00
+ 12.6505 9.066e+00
+ 12.662 9.089e+00
+ 12.6736 9.106e+00
+ 12.6852 9.118e+00
+ 12.6968 9.123e+00
+ 12.7083 9.122e+00
+ 12.7199 9.115e+00
+ 12.7315 9.103e+00
+ 12.7431 9.085e+00
+ 12.7546 9.062e+00
+ 12.7662 9.036e+00
+ 12.7778 9.006e+00
+ 12.7894 8.975e+00
+ 12.8009 8.943e+00
+ 12.8125 8.911e+00
+ 12.8241 8.880e+00
+ 12.8356 8.853e+00
+ 12.8472 8.828e+00
+ 12.8588 8.809e+00
+ 12.8704 8.795e+00
+ 12.8819 8.788e+00
+ 12.8935 8.788e+00
+ 12.9051 8.796e+00
+ 12.9167 8.812e+00
+ 12.9282 8.835e+00
+ 12.9398 8.867e+00
+ 12.9514 8.906e+00
+ 12.963 8.952e+00
+ 12.9745 9.005e+00
+ 12.9861 9.063e+00
+ 12.9977 9.126e+00
+ 13.0093 9.191e+00
+ 13.0208 9.259e+00
+ 13.0324 9.328e+00
+ 13.044 9.395e+00
+ 13.0556 9.461e+00
+ 13.0671 9.522e+00
+ 13.0787 9.579e+00
+ 13.0903 9.630e+00
+ 13.1019 9.674e+00
+ 13.1134 9.709e+00
+ 13.125 9.735e+00
+ 13.1366 9.752e+00
+ 13.1481 9.760e+00
+ 13.1597 9.757e+00
+ 13.1713 9.744e+00
+ 13.1829 9.723e+00
+ 13.1944 9.692e+00
+ 13.206 9.653e+00
+ 13.2176 9.608e+00
+ 13.2292 9.556e+00
+ 13.2407 9.500e+00
+ 13.2523 9.441e+00
+ 13.2639 9.381e+00
+ 13.2755 9.320e+00
+ 13.287 9.261e+00
+ 13.2986 9.206e+00
+ 13.3102 9.155e+00
+ 13.3218 9.110e+00
+ 13.3333 9.073e+00
+ 13.3449 9.045e+00
+ 13.3565 9.026e+00
+ 13.3681 9.017e+00
+ 13.3796 9.018e+00
+ 13.3912 9.031e+00
+ 13.4028 9.055e+00
+ 13.4144 9.089e+00
+ 13.4259 9.134e+00
+ 13.4375 9.188e+00
+ 13.4491 9.251e+00
+ 13.4606 9.321e+00
+ 13.4722 9.398e+00
+ 13.4838 9.480e+00
+ 13.4954 9.565e+00
+ 13.5069 9.651e+00
+ 13.5185 9.738e+00
+ 13.5301 9.823e+00
+ 13.5417 9.905e+00
+ 13.5532 9.983e+00
+ 13.5648 1.005e+01
+ 13.5764 1.012e+01
+ 13.588 1.017e+01
+ 13.5995 1.022e+01
+ 13.6111 1.026e+01
+ 13.6227 1.028e+01
+ 13.6343 1.030e+01
+ 13.6458 1.030e+01
+ 13.6574 1.029e+01
+ 13.669 1.028e+01
+ 13.6806 1.025e+01
+ 13.6921 1.021e+01
+ 13.7037 1.017e+01
+ 13.7153 1.012e+01
+ 13.7269 1.006e+01
+ 13.7384 1.000e+01
+ 13.75 9.936e+00
+ 13.7616 9.870e+00
+ 13.7731 9.805e+00
+ 13.7847 9.742e+00
+ 13.7963 9.681e+00
+ 13.8079 9.625e+00
+ 13.8194 9.575e+00
+ 13.831 9.531e+00
+ 13.8426 9.495e+00
+ 13.8542 9.468e+00
+ 13.8657 9.450e+00
+ 13.8773 9.442e+00
+ 13.8889 9.444e+00
+ 13.9005 9.456e+00
+ 13.912 9.477e+00
+ 13.9236 9.509e+00
+ 13.9352 9.549e+00
+ 13.9468 9.598e+00
+ 13.9583 9.655e+00
+ 13.9699 9.718e+00
+ 13.9815 9.787e+00
+ 13.9931 9.861e+00
+ 14.0046 9.938e+00
+ 14.0162 1.002e+01
+ 14.0278 1.010e+01
+ 14.0394 1.018e+01
+ 14.0509 1.026e+01
+ 14.0625 1.033e+01
+ 14.0741 1.040e+01
+ 14.0856 1.047e+01
+ 14.0972 1.053e+01
+ 14.1088 1.059e+01
+ 14.1204 1.063e+01
+ 14.1319 1.067e+01
+ 14.1435 1.070e+01
+ 14.1551 1.073e+01
+ 14.1667 1.074e+01
+ 14.1782 1.074e+01
+ 14.1898 1.074e+01
+ 14.2014 1.073e+01
+ 14.213 1.071e+01
+ 14.2245 1.068e+01
+ 14.2361 1.064e+01
+ 14.2477 1.060e+01
+ 14.2593 1.056e+01
+ 14.2708 1.051e+01
+ 14.2824 1.046e+01
+ 14.294 1.040e+01
+ 14.3056 1.034e+01
+ 14.3171 1.029e+01
+ 14.3287 1.023e+01
+ 14.3403 1.018e+01
+ 14.3519 1.013e+01
+ 14.3634 1.008e+01
+ 14.375 1.004e+01
+ 14.3866 1.000e+01
+ 14.3981 9.974e+00
+ 14.4097 9.953e+00
+ 14.4213 9.939e+00
+ 14.4329 9.933e+00
+ 14.4444 9.935e+00
+ 14.456 9.946e+00
+ 14.4676 9.966e+00
+ 14.4792 9.994e+00
+ 14.4907 1.003e+01
+ 14.5023 1.007e+01
+ 14.5139 1.013e+01
+ 14.5255 1.018e+01
+ 14.537 1.025e+01
+ 14.5486 1.032e+01
+ 14.5602 1.039e+01
+ 14.5718 1.047e+01
+ 14.5833 1.055e+01
+ 14.5949 1.063e+01
+ 14.6065 1.071e+01
+ 14.6181 1.079e+01
+ 14.6296 1.086e+01
+ 14.6412 1.094e+01
+ 14.6528 1.100e+01
+ 14.6644 1.107e+01
+ 14.6759 1.112e+01
+ 14.6875 1.117e+01
+ 14.6991 1.122e+01
+ 14.7106 1.125e+01
+ 14.7222 1.128e+01
+ 14.7338 1.129e+01
+ 14.7454 1.130e+01
+ 14.7569 1.129e+01
+ 14.7685 1.128e+01
+ 14.7801 1.126e+01
+ 14.7917 1.123e+01
+ 14.8032 1.119e+01
+ 14.8148 1.115e+01
+ 14.8264 1.110e+01
+ 14.838 1.104e+01
+ 14.8495 1.098e+01
+ 14.8611 1.092e+01
+ 14.8727 1.085e+01
+ 14.8843 1.079e+01
+ 14.8958 1.072e+01
+ 14.9074 1.066e+01
+ 14.919 1.060e+01
+ 14.9306 1.054e+01
+ 14.9421 1.049e+01
+ 14.9537 1.044e+01
+ 14.9653 1.041e+01
+ 14.9769 1.038e+01
+ 14.9884 1.036e+01
+ 15 1.035e+01
+ 15.0116 1.035e+01
+ 15.0231 1.036e+01
+ 15.0347 1.038e+01
+ 15.0463 1.040e+01
+ 15.0579 1.044e+01
+ 15.0694 1.049e+01
+ 15.081 1.055e+01
+ 15.0926 1.061e+01
+ 15.1042 1.068e+01
+ 15.1157 1.076e+01
+ 15.1273 1.084e+01
+ 15.1389 1.093e+01
+ 15.1505 1.102e+01
+ 15.162 1.110e+01
+ 15.1736 1.119e+01
+ 15.1852 1.128e+01
+ 15.1968 1.137e+01
+ 15.2083 1.145e+01
+ 15.2199 1.152e+01
+ 15.2315 1.159e+01
+ 15.2431 1.165e+01
+ 15.2546 1.171e+01
+ 15.2662 1.175e+01
+ 15.2778 1.179e+01
+ 15.2894 1.182e+01
+ 15.3009 1.184e+01
+ 15.3125 1.184e+01
+ 15.3241 1.184e+01
+ 15.3356 1.183e+01
+ 15.3472 1.181e+01
+ 15.3588 1.177e+01
+ 15.3704 1.174e+01
+ 15.3819 1.169e+01
+ 15.3935 1.164e+01
+ 15.4051 1.158e+01
+ 15.4167 1.152e+01
+ 15.4282 1.145e+01
+ 15.4398 1.139e+01
+ 15.4514 1.132e+01
+ 15.463 1.125e+01
+ 15.4745 1.119e+01
+ 15.4861 1.113e+01
+ 15.4977 1.107e+01
+ 15.5093 1.102e+01
+ 15.5208 1.097e+01
+ 15.5324 1.093e+01
+ 15.544 1.090e+01
+ 15.5556 1.088e+01
+ 15.5671 1.086e+01
+ 15.5787 1.086e+01
+ 15.5903 1.086e+01
+ 15.6019 1.087e+01
+ 15.6134 1.090e+01
+ 15.625 1.093e+01
+ 15.6366 1.097e+01
+ 15.6481 1.102e+01
+ 15.6597 1.107e+01
+ 15.6713 1.113e+01
+ 15.6829 1.120e+01
+ 15.6944 1.128e+01
+ 15.706 1.135e+01
+ 15.7176 1.143e+01
+ 15.7292 1.151e+01
+ 15.7407 1.160e+01
+ 15.7523 1.168e+01
+ 15.7639 1.176e+01
+ 15.7755 1.183e+01
+ 15.787 1.191e+01
+ 15.7986 1.198e+01
+ 15.8102 1.204e+01
+ 15.8218 1.210e+01
+ 15.8333 1.215e+01
+ 15.8449 1.219e+01
+ 15.8565 1.222e+01
+ 15.8681 1.225e+01
+ 15.8796 1.227e+01
+ 15.8912 1.228e+01
+ 15.9028 1.228e+01
+ 15.9144 1.227e+01
+ 15.9259 1.226e+01
+ 15.9375 1.224e+01
+ 15.9491 1.221e+01
+ 15.9606 1.217e+01
+ 15.9722 1.214e+01
+ 15.9838 1.209e+01
+ 15.9954 1.204e+01
+ 16.0069 1.199e+01
+ 16.0185 1.194e+01
+ 16.0301 1.189e+01
+ 16.0417 1.183e+01
+ 16.0532 1.178e+01
+ 16.0648 1.173e+01
+ 16.0764 1.168e+01
+ 16.088 1.164e+01
+ 16.0995 1.160e+01
+ 16.1111 1.156e+01
+ 16.1227 1.154e+01
+ 16.1343 1.151e+01
+ 16.1458 1.149e+01
+ 16.1574 1.148e+01
+ 16.169 1.148e+01
+ 16.1806 1.149e+01
+ 16.1921 1.150e+01
+ 16.2037 1.151e+01
+ 16.2153 1.154e+01
+ 16.2269 1.157e+01
+ 16.2384 1.160e+01
+ 16.25 1.165e+01
+ 16.2616 1.169e+01
+ 16.2731 1.175e+01
+ 16.2847 1.180e+01
+ 16.2963 1.186e+01
+ 16.3079 1.192e+01
+ 16.3194 1.198e+01
+ 16.331 1.205e+01
+ 16.3426 1.211e+01
+ 16.3542 1.217e+01
+ 16.3657 1.224e+01
+ 16.3773 1.229e+01
+ 16.3889 1.235e+01
+ 16.4005 1.241e+01
+ 16.412 1.246e+01
+ 16.4236 1.250e+01
+ 16.4352 1.255e+01
+ 16.4468 1.258e+01
+ 16.4583 1.261e+01
+ 16.4699 1.264e+01
+ 16.4815 1.266e+01
+ 16.4931 1.267e+01
+ 16.5046 1.268e+01
+ 16.5162 1.269e+01
+ 16.5278 1.269e+01
+ 16.5394 1.268e+01
+ 16.5509 1.267e+01
+ 16.5625 1.265e+01
+ 16.5741 1.263e+01
+ 16.5856 1.260e+01
+ 16.5972 1.257e+01
+ 16.6088 1.254e+01
+ 16.6204 1.251e+01
+ 16.6319 1.247e+01
+ 16.6435 1.243e+01
+ 16.6551 1.240e+01
+ 16.6667 1.236e+01
+ 16.6782 1.232e+01
+ 16.6898 1.228e+01
+ 16.7014 1.225e+01
+ 16.713 1.222e+01
+ 16.7245 1.219e+01
+ 16.7361 1.216e+01
+ 16.7477 1.214e+01
+ 16.7593 1.212e+01
+ 16.7708 1.211e+01
+ 16.7824 1.210e+01
+ 16.794 1.210e+01
+ 16.8056 1.210e+01
+ 16.8171 1.211e+01
+ 16.8287 1.212e+01
+ 16.8403 1.214e+01
+ 16.8519 1.216e+01
+ 16.8634 1.219e+01
+ 16.875 1.223e+01
+ 16.8866 1.227e+01
+ 16.8981 1.231e+01
+ 16.9097 1.236e+01
+ 16.9213 1.241e+01
+ 16.9329 1.247e+01
+ 16.9444 1.253e+01
+ 16.956 1.258e+01
+ 16.9676 1.264e+01
+ 16.9792 1.271e+01
+ 16.9907 1.277e+01
+ 17.0023 1.282e+01
+ 17.0139 1.288e+01
+ 17.0255 1.294e+01
+ 17.037 1.299e+01
+ 17.0486 1.304e+01
+ 17.0602 1.308e+01
+ 17.0718 1.312e+01
+ 17.0833 1.316e+01
+ 17.0949 1.318e+01
+ 17.1065 1.321e+01
+ 17.1181 1.322e+01
+ 17.1296 1.323e+01
+ 17.1412 1.323e+01
+ 17.1528 1.323e+01
+ 17.1644 1.322e+01
+ 17.1759 1.320e+01
+ 17.1875 1.318e+01
+ 17.1991 1.315e+01
+ 17.2106 1.312e+01
+ 17.2222 1.308e+01
+ 17.2338 1.304e+01
+ 17.2454 1.300e+01
+ 17.2569 1.295e+01
+ 17.2685 1.291e+01
+ 17.2801 1.286e+01
+ 17.2917 1.281e+01
+ 17.3032 1.277e+01
+ 17.3148 1.273e+01
+ 17.3264 1.269e+01
+ 17.338 1.266e+01
+ 17.3495 1.263e+01
+ 17.3611 1.261e+01
+ 17.3727 1.259e+01
+ 17.3843 1.258e+01
+ 17.3958 1.258e+01
+ 17.4074 1.259e+01
+ 17.419 1.260e+01
+ 17.4306 1.262e+01
+ 17.4421 1.265e+01
+ 17.4537 1.268e+01
+ 17.4653 1.272e+01
+ 17.4769 1.277e+01
+ 17.4884 1.283e+01
+ 17.5 1.288e+01
+ 17.5116 1.295e+01
+ 17.5231 1.301e+01
+ 17.5347 1.308e+01
+ 17.5463 1.315e+01
+ 17.5579 1.321e+01
+ 17.5694 1.328e+01
+ 17.581 1.334e+01
+ 17.5926 1.340e+01
+ 17.6042 1.346e+01
+ 17.6157 1.351e+01
+ 17.6273 1.355e+01
+ 17.6389 1.359e+01
+ 17.6505 1.362e+01
+ 17.662 1.365e+01
+ 17.6736 1.366e+01
+ 17.6852 1.367e+01
+ 17.6968 1.367e+01
+ 17.7083 1.366e+01
+ 17.7199 1.365e+01
+ 17.7315 1.363e+01
+ 17.7431 1.360e+01
+ 17.7546 1.357e+01
+ 17.7662 1.353e+01
+ 17.7778 1.349e+01
+ 17.7894 1.345e+01
+ 17.8009 1.341e+01
+ 17.8125 1.337e+01
+ 17.8241 1.332e+01
+ 17.8356 1.329e+01
+ 17.8472 1.325e+01
+ 17.8588 1.322e+01
+ 17.8704 1.319e+01
+ 17.8819 1.317e+01
+ 17.8935 1.316e+01
+ 17.9051 1.315e+01
+ 17.9167 1.315e+01
+ 17.9282 1.316e+01
+ 17.9398 1.317e+01
+ 17.9514 1.320e+01
+ 17.963 1.323e+01
+ 17.9745 1.326e+01
+ 17.9861 1.331e+01
+ 17.9977 1.335e+01
+ 18.0093 1.341e+01
+ 18.0208 1.346e+01
+ 18.0324 1.352e+01
+ 18.044 1.358e+01
+ 18.0556 1.363e+01
+ 18.0671 1.369e+01
+ 18.0787 1.374e+01
+ 18.0903 1.379e+01
+ 18.1019 1.384e+01
+ 18.1134 1.387e+01
+ 18.125 1.391e+01
+ 18.1366 1.393e+01
+ 18.1481 1.395e+01
+ 18.1597 1.396e+01
+ 18.1713 1.396e+01
+ 18.1829 1.395e+01
+ 18.1944 1.394e+01
+ 18.206 1.392e+01
+ 18.2176 1.389e+01
+ 18.2292 1.386e+01
+ 18.2407 1.383e+01
+ 18.2523 1.379e+01
+ 18.2639 1.374e+01
+ 18.2755 1.370e+01
+ 18.287 1.366e+01
++>>>>>>> upstream/20131206+dfsg
diff --cc test/geo/geo.gfs
index f5815c2,7e0db60..5f8f244
--- a/test/geo/geo.gfs
+++ b/test/geo/geo.gfs
@@@ -73,46 -73,47 +73,85 @@@
  # Generated files: geo_error.eps error-100.eps error-200.eps error-300.eps error-400.eps error-1500.eps
  #
  1 0 GfsOcean GfsBox GfsGEdge {} {
-   # dt = 1000 s
-   Time { iend = 1580 dtmax = 0.10285 }
+   Time { iend = 1580 dtmax = 1000 }
    Refine 6
++<<<<<<< HEAD
 +  # Lx = Ly = 1000 km
 +  # H0 = 1000 m
 +  # g = 0.01 m/s^2
 +  PhysicalParams { g = 9.4534734306584e-4 }
 +  AdvectionParams { scheme = none }
 +  ApproxProjectionParams { tolerance = 1e-6 }
 +  Solid (z + 1.)
 +  Init {} {
 +    # e-folding radius = 100 km
 +    # umax = 0.5 m/s = sqrt(200)*exp(-1/2)
 +    U = (5.667583815e-4*200.*y*exp (-100.*(x*x + y*y)))
 +    V = (- 5.667583815e-4*200.*x*exp (-100.*(x*x + y*y)))
 +    P = (5.667583815e-4*exp (-100.*(x*x + y*y)))
 +  }
 +  # f0 = 1.0285e-4 s-1
 +  SourceCoriolis 1
 +
 +  OutputErrorNorm { istep = 1 } { 
 +      awk '{print $3/1.0285e-4/3600./24. " " $9*1000e6*1.0285e-4*1.0285e-4/0.01;}' > e 
 +  } { v = P } {
 +    s = (5.667583815e-4*exp (-100.*(x*x + y*y)))
 +    unbiased = 1
 +    v = E
 +  }
 +  OutputSimulation { istart = 100 iend = 500 istep = 100 } stdout
 +  EventScript { istart = 100 iend = 500 istep = 100 } { 
 +      echo "Save error-$GfsIter.eps { format = EPS }"
 +  }
 +  OutputSimulation { istart = 1500 } stdout
 +  EventScript { istart = 1500 } { echo "Save error-$GfsIter.eps { format = EPS }"}
++=======
+   Global {
+       #define L0 1000e3
+       #define H0 1000
+       #define G 0.01
+       #define R0 100e3
+       #define ETA0 599.5
+       #define F0 1.0285e-4
+   }
+   PhysicalParams { L = L0 g = G }
+   Solid (z + H0)
+   Init {} {
+     # e-folding radius = 100 km
+     # umax = 0.5 m/s = sqrt(200)*exp(-1/2)
+     P = ETA0*exp (-(x*x + y*y)/(R0*R0))*G
+     U = 2.*G*ETA0*y/(F0*R0*R0)*exp (-(x*x + y*y)/(R0*R0))
+     V = - 2.*G*ETA0*x/(F0*R0*R0)*exp (-(x*x + y*y)/(R0*R0))
+   }
+   SourceCoriolis F0
+  
+   AdvectionParams { scheme = none }
+   ApproxProjectionParams { tolerance = 1e-6 }
+ 
+   OutputErrorNorm { istep = 1 } { 
+       awk '{print $3/86400. " " $9; fflush (stdout); }' > e
+   } { v = P/G } {
+     s = ETA0*exp (-(x*x + y*y)/(R0*R0))
+     unbiased = 1
+     v = E
+   }
+   GModule gfsview
+   OutputView {  istart = 100 iend = 500 istep = 100 } error-%ld.eps { format = EPS } geo.gfv
+   OutputView {  istart = 1500 } error-%ld.eps { format = EPS } geo.gfv
++>>>>>>> upstream/20131206+dfsg
    EventScript { start = end } {
      cat <<EOF | gnuplot
      set term postscript eps lw 3 color solid 20
      set output 'geo_error.eps'
      set xlabel 'Time (days)'
++<<<<<<< HEAD
 +    set ylabel 'Maximum error on surface height (cm)'
 +    plot 'e.ref' u 1:(\$2*100.) t 'ref' w l, 'e' u 1:(\$2*100.) t '' w l
++=======
+     set ylabel 'Maximum error on surface height (m)'
+     plot 'e.ref' t 'ref' w l, 'e' t '' w l
++>>>>>>> upstream/20131206+dfsg
  EOF
    }
  }
diff --cc test/geo/geo.sh
index edc578b,e3f6f65..3e8da13
--- a/test/geo/geo.sh
+++ b/test/geo/geo.sh
@@@ -1,11 -1,11 +1,19 @@@
++<<<<<<< HEAD
 +if test x$donotrun != xtrue; then
 +    if gerris3D $1 | gfsview-batch3D geo.gfv; then :
 +    else
 +	exit 1
 +    fi
++=======
+ # catch errors
+ set -e
+ 
+ if test x$donotrun != xtrue; then
+     gerris3D $1
++>>>>>>> upstream/20131206+dfsg
  fi
  
- if cat <<EOF | python ; then :
+ python <<EOF
  from check import *
  from sys import *
  if (Curve('e',1,2) - Curve('e.ref',1,2)).max() > 1e-3:
diff --cc test/harmonic/error.ref
index 4eeecca,2e853dd..8218ebd
--- a/test/harmonic/error.ref
+++ b/test/harmonic/error.ref
@@@ -1,6 -1,6 +1,15 @@@
++<<<<<<< HEAD
 +3 7.512e-03 9.626e-03 2.099e-02
 +4 1.842e-03 2.360e-03 5.345e-03
 +5 4.599e-04 5.879e-04 1.355e-03
 +6 1.149e-04 1.469e-04 3.402e-04
 +7 2.868e-05 3.668e-05 8.517e-05
 +8 7.104e-06 9.113e-06 2.184e-05
++=======
+ 3 7.511e-03 9.626e-03 2.099e-02
+ 4 1.842e-03 2.360e-03 5.345e-03
+ 5 4.600e-04 5.880e-04 1.355e-03
+ 6 1.150e-04 1.470e-04 3.402e-04
+ 7 2.877e-05 3.678e-05 8.518e-05
+ 8 7.197e-06 9.201e-06 2.178e-05
++>>>>>>> upstream/20131206+dfsg
diff --cc test/harmonic/harmonic.gfs
index 04423ee,5b1be0c..49b95b6
--- a/test/harmonic/harmonic.gfs
+++ b/test/harmonic/harmonic.gfs
@@@ -95,6 -95,14 +95,17 @@@
    Time { iend = 1 }
    PhysicalParams { L = 2.*M_PI/4. }
    MetricCubed M LEVEL
++<<<<<<< HEAD
++=======
+ 
+   # Use alternative implementation
+   # MetricCubed1 M
+   # MapFunction {
+   #     x = atan2 (X, Z)*180./M_PI
+   #     y = asin (CLAMP(Y,-1.,1.))*180./M_PI
+   # }
+ 
++>>>>>>> upstream/20131206+dfsg
    Refine LEVEL
  
    GModule hypre
diff --cc test/harmonic/lonlat/res-7.ref
index a9e87b9,1cabd70..23a824d
--- a/test/harmonic/lonlat/res-7.ref
+++ b/test/harmonic/lonlat/res-7.ref
@@@ -1,11 -1,11 +1,25 @@@
++<<<<<<< HEAD
 +0 1.02000000 6.688e+00 0
 +1 1.53000000 3.609e+01 0.185314
 +2 1.98000000 7.986e+00 4.51916
 +3 2.41000000 6.922e-01 11.5371
 +4 2.87000000 1.298e+00 0.533282
 +5 3.32000000 7.206e-01 1.80128
 +6 3.78000000 6.818e-01 1.05691
 +7 4.21000000 5.035e-01 1.35412
 +8 4.65000000 4.426e-01 1.1376
 +9 5.12000000 3.688e-01 1.20011
 +10 5.62000000 3.219e-01 1.1457
++=======
+ 0 0.58000000 8.601e+00 0
+ 1 0.85000000 5.881e+03 0.00146251
+ 2 1.12000000 1.302e+03 4.5169
+ 3 1.36000000 1.128e+02 11.5426
+ 4 1.59000000 2.116e+02 0.533081
+ 5 1.84000000 1.174e+02 1.80239
+ 6 2.11000000 1.111e+02 1.05671
+ 7 2.35000000 8.205e+01 1.35405
+ 8 2.67000000 7.214e+01 1.13737
+ 9 2.81000000 6.010e+01 1.20033
+ 10 3.14000000 5.245e+01 1.14585
++>>>>>>> upstream/20131206+dfsg
diff --cc test/harmonic/order.ref
index c638c03,47a49c7..6d59cc9
--- a/test/harmonic/order.ref
+++ b/test/harmonic/order.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +4 2.02792 2.02815 1.97344
 +5 2.00188 2.00514 1.9799
 +6 2.00094 2.00074 1.99384
 +7 2.00226 2.00177 1.99797
 +8 2.01334 2.009 1.96337
++=======
+ 4 2.02773 2.02815 1.97344
+ 5 2.00157 2.0049 1.9799
+ 6 2 2 1.99384
+ 7 1.999 1.99882 1.9978
+ 8 1.9991 1.99906 1.96751
++>>>>>>> upstream/20131206+dfsg
diff --cc test/harmonic/res-7.ref
index 7807b1b,e5b328a..5cb2a7d
--- a/test/harmonic/res-7.ref
+++ b/test/harmonic/res-7.ref
@@@ -1,11 -1,11 +1,25 @@@
++<<<<<<< HEAD
 +0 10.83000000 8.020e+00 0
 +1 12.42000000 1.025e+00 7.82439
 +2 13.74000000 4.168e-02 24.5921
 +3 15.16000000 5.354e-03 7.78483
 +4 16.61000000 5.680e-04 9.42606
 +5 18.11000000 4.311e-05 13.1756
 +6 19.54000000 3.449e-06 12.4993
 +7 20.72000000 2.997e-07 11.5082
 +8 22.68000000 2.230e-08 13.4395
 +9 23.36000000 1.740e-09 12.8161
 +10 24.43000000 1.365e-10 12.7473
++=======
+ 0 6.31000000 8.601e+00 0
+ 1 7.24000000 1.461e+01 0.588706
+ 2 8.05000000 6.215e-01 23.5076
+ 3 8.69000000 1.531e-01 4.05944
+ 4 9.47000000 6.228e-03 24.5825
+ 5 11.31000000 6.476e-04 9.61705
+ 6 11.12000000 4.544e-05 14.2518
+ 7 11.83000000 5.436e-06 8.35909
+ 8 12.65000000 3.028e-07 17.9524
+ 9 13.66000000 1.888e-08 16.0381
+ 10 14.11000000 8.626e-10 21.8873
++>>>>>>> upstream/20131206+dfsg
diff --cc test/hydrostatic/hydrostatic.gfs
index 9cf64a9,f77b662..2c59ea2
--- a/test/hydrostatic/hydrostatic.gfs
+++ b/test/hydrostatic/hydrostatic.gfs
@@@ -20,7 -20,7 +20,11 @@@
  
      OutputScalarNorm { istep = 1 } v { v = V }
      EventScript { start = end } { 
++<<<<<<< HEAD
 +        if awk '{if ($9 > 1e-12) { print $9 > "/dev/stderr"; exit (1); }}' < v ; then
++=======
+         if awk '{if ($9 > 1.5e-12) { print $9 > "/dev/stderr"; exit (1); }}' < v ; then
++>>>>>>> upstream/20131206+dfsg
              exit 0;
          else
              exit $GFS_STOP;
diff --cc test/lake/lake.gfs
index 6482092,67363d7..5ae7d19
--- a/test/lake/lake.gfs
+++ b/test/lake/lake.gfs
@@@ -4,10 -4,10 +4,17 @@@
  #
  # A simple test of a wind-driven lake with a 1/10 mesh stretching
  # ratio. Due to the anisotropy of stretching, the hypre module needs
++<<<<<<< HEAD
 +# to be used to solve the Poisson problem efficiently. Further, with
 +# Neumman boundary conditions everywhere for the pressure, the
 +# resulting linear system is rank-deficient and needs to be "fixed" to
 +# avoid drift problems in HYPRE.
++=======
+ # to be used to solve the Poisson and diffusion problems
+ # efficiently. Further, with Neumann boundary conditions everywhere
+ # for the pressure, the resulting linear system is rank-deficient and
+ # needs to be "fixed" to avoid drift problems in HYPRE.
++>>>>>>> upstream/20131206+dfsg
  #
  # \begin{figure}[htbp]
  # \caption{\label{vectors}Norm of the velocity and vectors for the
@@@ -29,9 -29,7 +36,13 @@@
      GModule hypre
      MetricStretch {} { sy = 0.1 }
      Time { end = 5 dtmax = 0.1 }
++<<<<<<< HEAD
 +    # fixme: we need to limit the cost of the implicit diffusion
 +    # solver (which does not use hypre yet)
 +    SourceViscosity 1./400. { beta = 1. nitermax = 4 tolerance = 1. }
++=======
+     SourceViscosity 1./400.
++>>>>>>> upstream/20131206+dfsg
      Refine 6
      OutputTime { istep = 1 } stderr
      OutputProjectionStats { istep = 1 } stderr
@@@ -39,6 -37,7 +50,10 @@@
      OutputScalarStats { istep = 1 } p { v = P }
      GModule gfsview
      OutputView { start = end } lake.eps { format = EPS } lake.gfv
++<<<<<<< HEAD
++=======
+     OutputSimulation { start = end } end.gfs
++>>>>>>> upstream/20131206+dfsg
  }
  GfsBox {
      top = Boundary {
diff --cc test/lid/stretch/stretch.gfs
index 443fcfa,92742b2..20c5a10
--- a/test/lid/stretch/stretch.gfs
+++ b/test/lid/stretch/stretch.gfs
@@@ -40,7 -40,7 +40,11 @@@
  # Version: 100208
  # Required files: xprofile yprofile xprof.ghia yprof.ghia
  # Running time: 10 minutes
++<<<<<<< HEAD
 +# Generated files: xprof yprof xprof.eps yprof.eps velocity.eps
++=======
+ # Generated files: xprof.eps yprof.eps velocity.eps
++>>>>>>> upstream/20131206+dfsg
  #
  # The simulation domain has 1 GfsBox
  2 1 GfsSimulation GfsBox GfsGEdge {
diff --cc test/lonlat/lonlat.gfs
index 9a2361e,3045c2f..c824083
--- a/test/lonlat/lonlat.gfs
+++ b/test/lonlat/lonlat.gfs
@@@ -89,7 -89,7 +89,11 @@@ Define LENGTH (150./180.*M_PI
                  sum += d*d;
                }
                scatter = sqrt(sum/n1);
++<<<<<<< HEAD
 +              if (scatter > 0.012) {
++=======
+               if (scatter > 0.013) {
++>>>>>>> upstream/20131206+dfsg
                  print scatter > "/dev/stderr";
                  exit (1);
                }
diff --cc test/merging/sim.err.ref
index fd69cc3,a767716..6662916
--- a/test/merging/sim.err.ref
+++ b/test/merging/sim.err.ref
@@@ -1,3 -1,3 +1,9 @@@
++<<<<<<< HEAD
 +6 2.585e-02 4.468e-01
 +7 1.094e-02 1.987e-01
 +8 2.712e-03 4.279e-02
++=======
+ 6 2.559e-02 4.461e-01
+ 7 1.079e-02 1.956e-01
+ 8 2.822e-03 4.942e-02
++>>>>>>> upstream/20131206+dfsg
diff --cc test/oscillation/fit.ref
index 2f58270,fe663ad..a0dc6d6
--- a/test/oscillation/fit.ref
+++ b/test/oscillation/fit.ref
@@@ -1,4 -1,4 +1,11 @@@
++<<<<<<< HEAD
 +5 0.000254559538777311 2.07938930474139 150.565907314679
 +6 0.000277045771161813 0.594372644793368 153.0828792034
 +7 0.00028855358427227 0.235605392652058 154.391924587016
 +8 0.000293340113067955 0.159054572826588 154.809924688988
++=======
+ 5 0.000276595182282654 1.11960906407876 152.8007090142 0.2
+ 6 0.000280266038036201 0.859136331029788 153.984082564985 0.2
+ 7 0.000291289116579224 0.188677707390986 154.591134336735 0.2
+ 8 0.000291718821611221 0.0590312376540213 154.785123946933 0.2
++>>>>>>> upstream/20131206+dfsg
diff --cc test/oscillation/oscillation.sh
index 2600f33,b3ed1f9..4ef6526
--- a/test/oscillation/oscillation.sh
+++ b/test/oscillation/oscillation.sh
@@@ -1,14 -1,38 +1,42 @@@
  levels="5 6 7 8"
  
++<<<<<<< HEAD
 +if test x$donotrun != xtrue; then
++=======
+ rm -f error laplace
+ 
+ # try several small perturbations of the interface position
+ # the results are quite sensitive to interface configurations
+ # for i in 4 3 2 1 0; do
+ for i in 0; do
+     diameter=`awk -v i=$i 'BEGIN { print 0.2 - i/512.}'`
++>>>>>>> upstream/20131206+dfsg
      rm -f fit
-     for level in $levels; do
- 	if gerris2D -D LEVEL=$level oscillation.gfs >> fit; then :
- 	else
- 	    exit 1
- 	fi
-     done
- fi
+     if test x$donotrun != xtrue; then
+ 	for level in $levels; do
+ 	    if gerris2D -D LEVEL=$level -D DIAMETER=$diameter oscillation.gfs >> fit; then :
+ 	    else
+ 		exit 1
+ 	    fi
+ 	done
+     fi
+ 
+     if awk -v D=$diameter 'BEGIN {
+               n = 2.
+               sigma = 1.
+               rhol = 1.
+               rhog = 1./1000.
+               r0 = D/2.
+               omega0 = sqrt((n**3-n)*sigma/((rhol+rhog)*r0**3))
+               empirical_constant = 30.
+             }{
+               print D*2.**$1, $4/2./omega0-1., D >> "error"
+               print D*2.**$1, (1./($3**2.*D**3.))*empirical_constant**2, D >> "laplace"
+             }' < fit; then :
+     else
+ 	exit 1
+     fi
+ done
  
  rm -f fit-*
  if awk '{
diff --cc test/parabola/error.ref
index 7080c2c,358f405..01631e8
--- a/test/parabola/error.ref
+++ b/test/parabola/error.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +5 0.00663514 0.0113431 0.08298
 +6 0.00199306 0.00364201 0.04435
 +7 0.000675489 0.00129513 0.0236
 +8 0.000212051 0.000448004 0.01228
 +9 7.40002e-05 0.000168225 0.00626
++=======
+ 5 0.00687295 0.0121984 0.08313
+ 6 0.00218884 0.00417614 0.04465
+ 7 0.000790721 0.00154719 0.02417
+ 8 0.000275948 0.000570273 0.0127
+ 9 0.000110573 0.000227006 0.006487
++>>>>>>> upstream/20131206+dfsg
diff --cc test/parabola/parabola.gfs
index 471981a,31a59c5..84bebd3
--- a/test/parabola/parabola.gfs
+++ b/test/parabola/parabola.gfs
@@@ -17,6 -17,8 +17,11 @@@
  #
  # The errors are small and larger-than-first-order convergence rates
  # are obtained.
++<<<<<<< HEAD
++=======
+ #
+ # See also \cite{popinet2011c} for details.
++>>>>>>> upstream/20131206+dfsg
  #
  # \begin{figure}[htbp]
  # \caption{\label{elevation}Solution at $t = 1500$ seconds. Six levels of refinement.}
@@@ -75,8 -77,8 +80,13 @@@ Define G 9.8
      }
  
      PhysicalParams { L = 10000 }
++<<<<<<< HEAD
 +    RefineSolid LEVEL
 +    Solid (y - 4999.)
++=======
+     RefineSurface LEVEL (y - 10000.*(0.5 - 1./pow(2,LEVEL)))
+     InitMask {} (y < 10000.*(0.5 - 1./pow(2,LEVEL)))
++>>>>>>> upstream/20131206+dfsg
      Init {} {
  	Zb = h0*(x/a)*(x/a)
  	P = MAX (0., h0 + Psi (x, 0.) - Zb)
diff --cc test/poiseuille/bagnold/bagnold.gfs
index c66dba1,4e864b6..1df8381
--- a/test/poiseuille/bagnold/bagnold.gfs
+++ b/test/poiseuille/bagnold/bagnold.gfs
@@@ -35,10 -35,9 +35,16 @@@ Define UB(x) ((1. - pow(1. - x, 1.5))*2
  1 1 GfsSimulation GfsBox GfsGEdge { y = 0.5 } {
      Time { iend = 1000 dtmax = 5 }
  
++<<<<<<< HEAD
 +    # We need to tune the solver
 +    AdvectionParams {
 +	scheme = none
 +	gc = 1 
++=======
+     # Ignore inertia
+     AdvectionParams {
+ 	scheme = none
++>>>>>>> upstream/20131206+dfsg
      }
      ApproxProjectionParams { tolerance = 1e-8 }
      ProjectionParams { tolerance = 1e-8 }
diff --cc test/poiseuille/poiseuille.gfs
index 3539fa1,2e92456..a727b01
--- a/test/poiseuille/poiseuille.gfs
+++ b/test/poiseuille/poiseuille.gfs
@@@ -30,10 -30,6 +30,13 @@@
      Source U 1
      # add a transverse source term to also test hydrostatic balance
      Source V 1
++<<<<<<< HEAD
 +
 +    # we need this so that acceleration can be balanced by viscous stress
 +    # and yes, fixme, this is a mess...
 +    AdvectionParams { gc = 1 }
++=======
++>>>>>>> upstream/20131206+dfsg
  
      EventStop { istep = 1 } U 1e-6 DU
      ProjectionParams { tolerance = 1e-6 }
diff --cc test/poisson/dirichlet/error.ref
index c5678d7,9f00c07..8b6bc2d
--- a/test/poisson/dirichlet/error.ref
+++ b/test/poisson/dirichlet/error.ref
@@@ -1,6 -1,6 +1,15 @@@
++<<<<<<< HEAD
 +3 8.249e-04 1.222e-03 3.324e-03
 +4 3.879e-04 7.277e-04 2.514e-03
 +5 2.206e-04 4.080e-04 1.780e-03
 +6 1.105e-04 2.087e-04 1.439e-03
 +7 5.164e-05 1.001e-04 6.567e-04
 +8 2.537e-05 5.079e-05 3.906e-04
++=======
+ 3 8.248e-04 1.222e-03 3.324e-03
+ 4 3.879e-04 7.277e-04 2.514e-03
+ 5 2.206e-04 4.080e-04 1.780e-03
+ 6 1.105e-04 2.087e-04 1.439e-03
+ 7 5.164e-05 1.001e-04 6.566e-04
+ 8 2.537e-05 5.081e-05 3.908e-04
++>>>>>>> upstream/20131206+dfsg
diff --cc test/poisson/dirichlet/order.ref
index b008685,5064b00..8e88a91
--- a/test/poisson/dirichlet/order.ref
+++ b/test/poisson/dirichlet/order.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +4 1.08853 0.747829 0.402936
 +5 0.814252 0.834775 0.498107
 +6 0.997386 0.967139 0.306811
 +7 1.09749 1.05999 1.13176
 +8 1.02537 0.978826 0.749543
++=======
+ 4 1.08836 0.747829 0.402936
+ 5 0.814252 0.834775 0.498107
+ 6 0.997386 0.967139 0.306811
+ 7 1.09749 1.05999 1.13198
+ 8 1.02537 0.978258 0.748584
++>>>>>>> upstream/20131206+dfsg
diff --cc test/poisson/dirichlet/res-7.ref
index 88ae90e,97e9493..3bda320
--- a/test/poisson/dirichlet/res-7.ref
+++ b/test/poisson/dirichlet/res-7.ref
@@@ -1,11 -1,11 +1,25 @@@
++<<<<<<< HEAD
 +0 0.34000000 4.997e+03 0	0 0.32000000 4.997e+03 0
 +1 0.52000000 1.104e+03 4.52627	1 0.58000000 1.069e+02 46.7446
 +2 0.66000000 2.302e+02 4.79583	2 0.59000000 1.017e+01 10.5113
 +3 0.81000000 7.197e+01 3.19855	3 0.60000000 1.432e+00 7.10196
 +4 0.98000000 2.182e+01 3.29835	4 0.64000000 1.985e-01 7.21411
 +5 1.10000000 6.436e+00 3.3903	5 0.65000000 2.734e-02 7.26042
 +6 1.28000000 1.887e+00 3.4107	6 0.66000000 3.753e-03 7.28484
 +7 1.43000000 5.497e-01 3.43278	7 0.70000000 5.146e-04 7.29304
 +8 1.59000000 1.597e-01 3.44208	8 0.71000000 7.055e-05 7.29412
 +9 1.73000000 4.637e-02 3.44404	9 0.74000000 9.671e-06 7.29501
 +10 1.88000000 1.346e-02 3.44502	10 0.76000000 1.326e-06 7.29336
++=======
+ 0 0.41000000 5.000e+03 0	0 0.48000000 5.000e+03 0
+ 1 0.58000000 1.104e+03 4.52899	1 0.84000000 1.071e+02 46.6853
+ 2 0.79000000 2.302e+02 4.79583	2 0.89000000 1.001e+01 10.6993
+ 3 0.97000000 7.197e+01 3.19855	3 0.89000000 1.390e+00 7.20144
+ 4 1.14000000 2.182e+01 3.29835	4 0.93000000 1.905e-01 7.29659
+ 5 1.30000000 6.435e+00 3.39083	5 0.95000000 2.592e-02 7.34954
+ 6 1.68000000 1.886e+00 3.41198	6 1.01000000 3.516e-03 7.37201
+ 7 1.94000000 5.495e-01 3.43221	7 1.01000000 4.765e-04 7.3788
+ 8 2.00000000 1.597e-01 3.44083	8 1.03000000 6.456e-05 7.38073
+ 9 1.99000000 4.636e-02 3.44478	9 1.09000000 8.745e-06 7.3825
+ 10 2.31000000 1.345e-02 3.44684	10 1.12000000 1.184e-06 7.38598
++>>>>>>> upstream/20131206+dfsg
diff --cc test/shear/curvature/curvature.gfs
index de04280,3fbc782..48edac0
--- a/test/shear/curvature/curvature.gfs
+++ b/test/shear/curvature/curvature.gfs
@@@ -32,8 -32,8 +32,13 @@@
  # \end{table}
  #
  # Author: St\'ephane Popinet
++<<<<<<< HEAD
 +# Command: sh ../shear.sh curvature.gfs | gfsview-batch2D curvature.gfv
 +# Version: 091022
++=======
+ # Command: sh ../shear.sh curvature.gfs
+ # Version: 110917
++>>>>>>> upstream/20131206+dfsg
  # Required files: ../shear.sh norms.ref curvature.gfv
  # Running time: 2 minutes
  # Generated files: t-2.5.eps dt-5.eps norms norms.tex
@@@ -65,12 -65,14 +70,20 @@@
      # the interface).
      # The maximum cost is set to 0.1 i.e. the radius of curvature must be
      # resolved with at least 10 cells.
++<<<<<<< HEAD
 +    AdaptFunction { istep = 1 } { cmax = 0.1 maxlevel = 8 } {
 +        return T > 0. && T < 1. ? ftt_cell_size (cell)*fabs (K) : 0.;
 +    }
++=======
+     AdaptFunction { istep = 1 } {
+     	cmax = 0.1 maxlevel = 8
+     	cfactor = 2. 
+     } (T > 0. && T < 1.)*dL*fabs(K)
+     AdaptThickness { istep = 1 } { maxlevel = 8 } T
++>>>>>>> upstream/20131206+dfsg
  
-     OutputSimulation { start = 2.5 } stdout
-     EventScript { start = 2.5 } { echo "Save t-2.5.eps { format = EPS line_width = 0.5 }" }
+     GModule gfsview
+     OutputView { start = 2.5 } t-2.5.eps { format = EPS line_width = 0.5 } curvature.gfv
      
      # Add a new variable 
      Variable Tref
diff --cc test/shear/curvature/norms.ref
index 5a0d8f8,75f818d..ef4d74e
--- a/test/shear/curvature/norms.ref
+++ b/test/shear/curvature/norms.ref
@@@ -1,1 -1,1 +1,5 @@@
++<<<<<<< HEAD
 +T time: 5 first:  1.021e-03 second:  1.143e-02 infty:  6.401e-01 bias: -4.271e-05
++=======
+ T time: 5 first:  8.775e-04 second:  8.309e-03 infty:  1.965e-01 bias: -8.140e-05
++>>>>>>> upstream/20131206+dfsg
diff --cc test/shear/norms.ref
index 96996bf,52a3abe..ec066f4
--- a/test/shear/norms.ref
+++ b/test/shear/norms.ref
@@@ -1,1 -1,1 +1,5 @@@
++<<<<<<< HEAD
 +T time: 5 first:  1.734e-04 second:  5.716e-03 infty:  3.770e-01 bias:  1.053e-05
++=======
+ T time: 5 first:  1.672e-04 second:  5.458e-03 infty:  3.626e-01 bias:  1.060e-05
++>>>>>>> upstream/20131206+dfsg
diff --cc test/shear/shear.gfs
index 3937a0c,7ad2fc7..9a54210
--- a/test/shear/shear.gfs
+++ b/test/shear/shear.gfs
@@@ -72,8 -72,8 +72,13 @@@
      } Psi (t < 2.5 ? 1. : -1.)*sin((x + 0.5)*M_PI)*sin((y + 0.5)*M_PI)/M_PI
      
      # Adapt the mesh dynamically so that at any time the maximum of the gradient
++<<<<<<< HEAD
 +    # of T is less than 1e-2 per cell length
 +    AdaptGradient { istep = 1 } { cmax = 1e-2 maxlevel = 8 } T
++=======
+     # of T is less than or equal to zero per cell length
+     AdaptGradient { istart = 1 istep = 1 } { cmax = 0 maxlevel = 8 } T
++>>>>>>> upstream/20131206+dfsg
      
      OutputPPM { start = 0 } { convert ppm:- t-0.eps } { v = T }
      OutputPPM { start = 2.5 } { convert ppm:- t-2.5.eps } { v = T }
diff --cc test/spurious/axi/axi.gfs
index 3303a1d,39cd236..8a37c37
--- a/test/spurious/axi/axi.gfs
+++ b/test/spurious/axi/axi.gfs
@@@ -44,7 -44,7 +44,11 @@@
  # \end{figure}
  #
  # Author: St\'ephane Popinet
++<<<<<<< HEAD
 +# Command: sh ../spurious.sh axi.gfs 1e-7
++=======
+ # Command: sh ../spurious.sh axi.gfs 5e-8
++>>>>>>> upstream/20131206+dfsg
  # Version: 1.3.1
  # Required files: convergence.ref kconvergence.ref
  # Generated files: laplace.eps curvature.eps convergence.eps kconvergence.eps
diff --cc test/spurious/axi/convergence.ref
index 8b02e86,7d55ee5..7efa5b1
--- a/test/spurious/axi/convergence.ref
+++ b/test/spurious/axi/convergence.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +6.4 6.745e-03 7.079e-02
 +12.8 2.641e-03 3.854e-02
 +25.6 9.115e-04 1.646e-02
 +51.2 2.468e-04 7.262e-03
 +102.4 9.157e-05 3.702e-03
++=======
+ 6.4 5.731e-03 4.121e-02
+ 12.8 2.312e-03 2.395e-02
+ 25.6 1.125e-03 1.841e-02
+ 51.2 3.300e-04 7.489e-03
+ 102.4 1.077e-04 3.827e-03
++>>>>>>> upstream/20131206+dfsg
diff --cc test/spurious/axi/kconvergence.ref
index 5919635,3b53ffc..47902a6
--- a/test/spurious/axi/kconvergence.ref
+++ b/test/spurious/axi/kconvergence.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +6.4 0.010036 0.04012
 +12.8 0.0014992 0.008832
 +25.6 0.00033816 0.0029452
 +51.2 4.72e-05 0.0005896
 +102.4 9.224e-06 0.0001624
++=======
+ 6.4 0.006192 0.025168
+ 12.8 0.0008784 0.005992
+ 25.6 0.00026312 0.0023436
+ 51.2 3.276e-05 0.0004092
+ 102.4 6.372e-06 0.00011224
++>>>>>>> upstream/20131206+dfsg
diff --cc test/spurious/convergence.ref
index c04957c,e3268dc..876c793
--- a/test/spurious/convergence.ref
+++ b/test/spurious/convergence.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +6.4 3.527e-02 2.461e-01
 +12.8 3.736e-04 4.233e-03
 +25.6 9.063e-05 1.266e-03
 +51.2 2.491e-05 4.746e-04
 +102.4 8.560e-06 2.158e-04
++=======
+ 6.4 3.606e-03 2.525e-02
+ 12.8 3.782e-04 4.292e-03
+ 25.6 9.129e-05 1.271e-03
+ 51.2 2.339e-05 4.613e-04
+ 102.4 8.407e-06 2.073e-04
++>>>>>>> upstream/20131206+dfsg
diff --cc test/spurious/kconvergence.ref
index a410514,d486169..cc356d6
--- a/test/spurious/kconvergence.ref
+++ b/test/spurious/kconvergence.ref
@@@ -1,5 -1,5 +1,13 @@@
++<<<<<<< HEAD
 +6.4 0.05632 0.15016
 +12.8 0.0029224 0.012968
 +25.6 0.0004904 0.0030192
 +51.2 8.156e-05 0.0007308
 +102.4 1.4616e-05 0.00018444
++=======
+ 6.4 0.011688 0.035344
+ 12.8 0.003142 0.01298
+ 25.6 0.0004904 0.0030212
+ 51.2 8.06e-05 0.0007224
+ 102.4 1.4432e-05 0.00018268
++>>>>>>> upstream/20131206+dfsg
diff --cc test/strouhal/strouhal.gfs
index daeea08,25dbb71..d77c9a5
--- a/test/strouhal/strouhal.gfs
+++ b/test/strouhal/strouhal.gfs
@@@ -59,7 -59,7 +59,11 @@@
    # Adapt the mesh using the vorticity criterion at every timestep
    AdaptVorticity { istep = 1 } { maxlevel = (x > 0.5 - t ? 9 : 10) cmax = 1e-2 }
  
++<<<<<<< HEAD
 +  SourceViscosity 3.125e-5 { beta = 1}
++=======
+   SourceViscosity 3.125e-5
++>>>>>>> upstream/20131206+dfsg
  
    OutputSimulation { start = end } end.gfs 
    OutputSolidForce { istep = 1 } forces.dat
diff --cc test/strouhal/strouhal.ref
index 4e6c22b,60e75bf..593fad9
--- a/test/strouhal/strouhal.ref
+++ b/test/strouhal/strouhal.ref
@@@ -1,1 -1,1 +1,5 @@@
- 400  0.228
++<<<<<<< HEAD
+ 400  0.228
++=======
++400  0.228
++>>>>>>> upstream/20131206+dfsg
diff --cc test/template.tex
index b6eac31,06a4726..6d6a8b2
--- a/test/template.tex
+++ b/test/template.tex
@@@ -37,50 -37,63 +37,104 @@@ branch only
  
  \section{Poisson}
  
++<<<<<<< HEAD
 +\input{poisson/poisson.tex}
 +\input{poisson/circle/circle.tex}
 +\input{poisson/dirichlet/dirichlet.tex}
 +\input{circle/circle.tex}
 +\input{circle/star/star.tex}
 +\input{circle/refined/refined.tex}
 +\input{circle/thin/thin.tex}
 +\input{dumbell/dumbell.tex}
 +
 +\section{Advection and diffusion}
 +
 +\input{advection/advection.tex}
 +\input{shear/shear.tex}
 +\input{shear/curvature/curvature.tex}
 +\input{diffusion/diffusion.tex}
 +\input{conservation/conservation.tex}
 +
 +\section{Euler}
 +
 +\input{reynolds/reynolds.tex}
 +\input{reynolds/box/box.tex}
 +\input{periodic/periodic.tex}
 +\input{merging/merging.tex}
 +\input{source/source.tex}
++=======
+ \test{poisson}
+ \test{poisson/circle}
+ \test{poisson/dirichlet}
+ \test{circle}
+ \test{circle/star}
+ \test{circle/refined}
+ \test{circle/thin}
+ \test{dumbell}
+ 
+ \section{Advection and diffusion}
+ 
+ \test{advection}
+ \test{shear}
+ \test{shear/curvature}
+ \test{shear/concentration}
+ \test{rotate}
+ \test{diffusion}
+ \test{diffusion/concentration}
+ \test{conservation}
+ 
+ \section{Euler}
+ 
+ \test{reynolds}
+ \test{reynolds/box}
+ \test{reynolds/stream}
+ \test{reynolds/skew}
+ \test{reynolds/skewbox}
+ \test{periodic}
+ \test{merging}
+ \test{source}
++>>>>>>> upstream/20131206+dfsg
  
  \section{Axisymmetric}
- \input{axi/axi.tex}
- \input{axi/viscous/viscous.tex}
- \input{axiadvection/axiadvection.tex}
- \input{axiadvection/solid/solid.tex}
+ 
+ \test{axi}
+ \test{axi/viscous}
+ \test{axiadvection}
+ \test{axiadvection/solid}
+ \test{swirl}
  
  \section{Navier-Stokes}
  
++<<<<<<< HEAD
 +\input{lid/lid.tex}
 +\input{lid/explicit/explicit.tex}
 +\input{lid/stretch/stretch.tex}
 +\input{poiseuille/poiseuille.tex}
 +\input{poiseuille/bagnold/bagnold.tex}
 +\input{couette/couette.tex}
 +\input{kinetic/kinetic.tex}
 +\input{hydrostatic/hydrostatic.tex}
 +\input{hydrostatic/quadratic/quadratic.tex}
 +\input{coriolis/coriolis.tex}
 +\input{lake/lake.tex}
++=======
+ \test{lid}
+ \test{lid/explicit}
+ \test{lid/stretch}
+ \test{lid/metric}
+ \test{poiseuille}
+ \test{poiseuille/metric}
+ \test{poiseuille/river}
+ \test{poiseuille/bagnold}
+ \test{couette}
+ \test{kinetic}
+ \test{hydrostatic}
+ \test{hydrostatic/quadratic}
+ \test{coriolis}
+ \test{lake}
+ \test{lake/river}
+ \test{lake/stratified}
++>>>>>>> upstream/20131206+dfsg
  
  \section{Solid boundaries}
  
@@@ -90,8 -103,8 +144,13 @@@
  
  \section{Moving solid boundaries}
  
++<<<<<<< HEAD
 +\input{hexagon/hexagon.tex}
 +\input{strouhal/strouhal.tex}
++=======
+ \test{hexagon}
+ \test{strouhal}
++>>>>>>> upstream/20131206+dfsg
  
  \section{Surface tension}
  
@@@ -113,28 -133,50 +179,69 @@@
  
  \section{Saint-Venant}
  
- \input{parabola/parabola.tex}
+ \test{parabola}
+ \test{parabola/solid}
+ \test{shock}
+ \test{shock/layered}
+ \test{shore}
+ \test{still}
+ \test{still/bipolar}
+ \test{terrain}
+ 
+ \section{General Orthogonal Coordinates}
+ 
+ \test{lonlat}
+ \test{lonlat/cubed}
+ \test{lonlat/coriolis}
+ \test{cosine}
+ \test{harmonic}
+ \test{harmonic/lonlat}
+ \test{gaussian}
+ \test{gaussian/lonlat}
+ \test{annulus}
+ \test{wannier}
+ \test{wannier/bipolar}
+ \test{wannier/stretch}
+ \test{rossby}
+ \test{rossby/ocean}
+ \test{rossby/river}
+ \test{injectionaxi}
+ 
+ \section{Electrohydrodynamics}
+ 
+ \test{planar}
+ \test{planar/solid}
+ \test{bump}
+ \test{cylinder}
+ \test{cylinder/planar}
+ \test{electro}
+ \test{debye}
+ 
+ \section{Groundwater}
+ 
+ \test{groundwater}
+ \test{groundwater/piecewise}
  
 +\section{General Orthogonal Coordinates}
 +
 +\input{lonlat/lonlat.tex}
 +\input{lonlat/coriolis/coriolis.tex}
 +\input{cosine/cosine.tex}
 +\input{harmonic/harmonic.tex}
 +\input{harmonic/lonlat/lonlat.tex}
 +\input{gaussian/gaussian.tex}
 +\input{gaussian/lonlat/lonlat.tex}
 +
 +\section{Electrohydrodynamics}
 +
 +\input{planar/planar.tex}
 +\input{planar/solid/solid.tex}
 +\input{bump/bump.tex}
 +\input{cylinder/cylinder.tex}
 +\input{cylinder/planar/planar.tex}
 +\input{electro/electro.tex}
 +
  \bibliographystyle{plain}
- \bibliography{tests}
+ \bibliography{gerris}
  
  \end{document}
diff --cc test/waves/adaptive/correlation.ref
index ee4cba6,2343199..c7e079a
--- a/test/waves/adaptive/correlation.ref
+++ b/test/waves/adaptive/correlation.ref
@@@ -1,3 -1,3 +1,8 @@@
++<<<<<<< HEAD
 +5		2.5			0.9223
 +6		0.5			0.9978
++=======
+ 5		2.6			0.9221
+ 6		0.7			0.9981
++>>>>>>> upstream/20131206+dfsg
  7		0.3			0.9985
diff --cc tools/Makefile.am
index 08a9d9c,b2d2b38..e59ef3c
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@@ -10,6 -10,8 +10,11 @@@ bin_PROGRAMS = 
  	ppmcombine \
  	gfscompare2D \
  	gfscompare3D \
++<<<<<<< HEAD
++=======
+ 	gfscombine2D \
+ 	gfscombine3D \
++>>>>>>> upstream/20131206+dfsg
  	gfsjoin2D \
  	gfsjoin3D \
  	shapes
@@@ -29,6 -32,8 +35,11 @@@ gfs2oogl2D_SOURCES = gfs2oogl.
  gfs2oogl3D_SOURCES = gfs2oogl.c
  gfscompare2D_SOURCES = gfscompare.c
  gfscompare3D_SOURCES = gfscompare.c
++<<<<<<< HEAD
++=======
+ gfscombine2D_SOURCES = gfscombine.c
+ gfscombine3D_SOURCES = gfscombine.c
++>>>>>>> upstream/20131206+dfsg
  gfsjoin2D_SOURCES = gfsjoin2.c
  gfsjoin3D_SOURCES = gfsjoin2.c
  
@@@ -38,6 -43,9 +49,12 @@@ gfs2oogl3D_LDADD = $(GFS3D_LIBS
  gfscompare2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
  gfscompare2D_LDADD = $(GFS2D_LIBS)
  gfscompare3D_LDADD = $(GFS3D_LIBS)
++<<<<<<< HEAD
++=======
+ gfscombine2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ gfscombine2D_LDADD = $(GFS2D_LIBS)
+ gfscombine3D_LDADD = $(GFS3D_LIBS)
++>>>>>>> upstream/20131206+dfsg
  gfsjoin2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
  gfsjoin2D_LDADD = $(GFS2D_LIBS)
  gfsjoin3D_LDADD = $(GFS3D_LIBS)
diff --cc tools/Makefile.in
index 7a7f617,ce37d62..8a8b7ee
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@@ -1,9 -1,9 +1,18 @@@
++<<<<<<< HEAD
 +# Makefile.in generated by automake 1.11.1 from Makefile.am.
 +# @configure_input@
 +
 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 +# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
 +# Inc.
++=======
+ # Makefile.in generated by automake 1.11.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+ # Foundation, Inc.
++>>>>>>> upstream/20131206+dfsg
  # 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.
@@@ -17,6 -17,23 +26,26 @@@
  
  
  VPATH = @srcdir@
++<<<<<<< HEAD
++=======
+ am__make_dryrun = \
+   { \
+     am__dry=no; \
+     case $$MAKEFLAGS in \
+       *\\[\ \	]*) \
+         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+       *) \
+         for am__flg in $$MAKEFLAGS; do \
+           case $$am__flg in \
+             *=*|--*) ;; \
+             *n*) am__dry=yes; break;; \
+           esac; \
+         done;; \
+     esac; \
+     test $$am__dry = yes; \
+   }
++>>>>>>> upstream/20131206+dfsg
  pkgdatadir = $(datadir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
@@@ -37,15 -54,14 +66,25 @@@ build_triplet = @build
  host_triplet = @host@
  bin_PROGRAMS = gfs2oogl2D$(EXEEXT) gfs2oogl3D$(EXEEXT) \
  	streamanime$(EXEEXT) ppmcombine$(EXEEXT) gfscompare2D$(EXEEXT) \
++<<<<<<< HEAD
 +	gfscompare3D$(EXEEXT) gfsjoin2D$(EXEEXT) gfsjoin3D$(EXEEXT) \
++=======
+ 	gfscompare3D$(EXEEXT) gfscombine2D$(EXEEXT) \
+ 	gfscombine3D$(EXEEXT) gfsjoin2D$(EXEEXT) gfsjoin3D$(EXEEXT) \
++>>>>>>> upstream/20131206+dfsg
  	shapes$(EXEEXT)
  subdir = tools
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++<<<<<<< HEAD
 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 +	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 +	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
 +	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
++=======
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ 	$(top_srcdir)/configure.ac
++>>>>>>> upstream/20131206+dfsg
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
  mkinstalldirs = $(install_sh) -d
@@@ -64,6 -80,15 +103,18 @@@ gfs2oogl2D_LINK = $(LIBTOOL) --tag=CC $
  am_gfs2oogl3D_OBJECTS = gfs2oogl.$(OBJEXT)
  gfs2oogl3D_OBJECTS = $(am_gfs2oogl3D_OBJECTS)
  gfs2oogl3D_DEPENDENCIES = $(am__DEPENDENCIES_1)
++<<<<<<< HEAD
++=======
+ am_gfscombine2D_OBJECTS = gfscombine2D-gfscombine.$(OBJEXT)
+ gfscombine2D_OBJECTS = $(am_gfscombine2D_OBJECTS)
+ gfscombine2D_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ gfscombine2D_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(gfscombine2D_CFLAGS) \
+ 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ am_gfscombine3D_OBJECTS = gfscombine.$(OBJEXT)
+ gfscombine3D_OBJECTS = $(am_gfscombine3D_OBJECTS)
+ gfscombine3D_DEPENDENCIES = $(am__DEPENDENCIES_1)
++>>>>>>> upstream/20131206+dfsg
  am_gfscompare2D_OBJECTS = gfscompare2D-gfscompare.$(OBJEXT)
  gfscompare2D_OBJECTS = $(am_gfscompare2D_OBJECTS)
  gfscompare2D_DEPENDENCIES = $(am__DEPENDENCIES_1)
@@@ -115,6 -140,12 +166,15 @@@ am__nobase_list = $(am__nobase_strip_se
  am__base_list = \
    sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++<<<<<<< HEAD
++=======
+ am__uninstall_files_from_dir = { \
+   test -z "$$files" \
+     || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+          $(am__cd) "$$dir" && rm -f $$files; }; \
+   }
++>>>>>>> upstream/20131206+dfsg
  SCRIPTS = $(bin_SCRIPTS)
  DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
  depcomp = $(SHELL) $(top_srcdir)/depcomp
@@@ -130,13 -161,20 +190,29 @@@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOL
  	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
  	$(LDFLAGS) -o $@
  SOURCES = $(gfs2oogl2D_SOURCES) $(gfs2oogl3D_SOURCES) \
++<<<<<<< HEAD
++=======
+ 	$(gfscombine2D_SOURCES) $(gfscombine3D_SOURCES) \
++>>>>>>> upstream/20131206+dfsg
  	$(gfscompare2D_SOURCES) $(gfscompare3D_SOURCES) \
  	$(gfsjoin2D_SOURCES) $(gfsjoin3D_SOURCES) ppmcombine.c \
  	shapes.c streamanime.c
  DIST_SOURCES = $(gfs2oogl2D_SOURCES) $(gfs2oogl3D_SOURCES) \
++<<<<<<< HEAD
 +	$(gfscompare2D_SOURCES) $(gfscompare3D_SOURCES) \
 +	$(gfsjoin2D_SOURCES) $(gfsjoin3D_SOURCES) ppmcombine.c \
 +	shapes.c streamanime.c
++=======
+ 	$(gfscombine2D_SOURCES) $(gfscombine3D_SOURCES) \
+ 	$(gfscompare2D_SOURCES) $(gfscompare3D_SOURCES) \
+ 	$(gfsjoin2D_SOURCES) $(gfsjoin3D_SOURCES) ppmcombine.c \
+ 	shapes.c streamanime.c
+ am__can_run_installinfo = \
+   case $$AM_UPDATE_INFO_DIR in \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++>>>>>>> upstream/20131206+dfsg
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@@ -168,7 -206,10 +244,14 @@@ F77 = @F77
  FC = @FC@
  FCFLAGS = @FCFLAGS@
  FFLAGS = @FFLAGS@
++<<<<<<< HEAD
++FGREP = @FGREP@
++=======
+ FFTW3_CFLAGS = @FFTW3_CFLAGS@
+ FFTW3_LIBS = @FFTW3_LIBS@
  FGREP = @FGREP@
+ FLIBS = @FLIBS@
++>>>>>>> upstream/20131206+dfsg
  GFS2D_LIBS = @GFS2D_LIBS@
  GFS3D_LIBS = @GFS3D_LIBS@
  GFS_COMPILATION_FLAGS = @GFS_COMPILATION_FLAGS@
@@@ -181,8 -222,6 +264,11 @@@ GSL_CFLAGS = @GSL_CFLAGS
  GSL_CONFIG = @GSL_CONFIG@
  GSL_LIBS = @GSL_LIBS@
  GTS_CFLAGS = @GTS_CFLAGS@
++<<<<<<< HEAD
 +GTS_CONFIG = @GTS_CONFIG@
 +GTS_DEPLIBS = @GTS_DEPLIBS@
++=======
++>>>>>>> upstream/20131206+dfsg
  GTS_LIBS = @GTS_LIBS@
  INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
@@@ -205,7 -244,6 +291,10 @@@ MAINT = @MAINT
  MAKEINFO = @MAKEINFO@
  MANIFEST_TOOL = @MANIFEST_TOOL@
  MKDIR_P = @MKDIR_P@
++<<<<<<< HEAD
 +MODULES = @MODULES@
++=======
++>>>>>>> upstream/20131206+dfsg
  NM = @NM@
  NMEDIT = @NMEDIT@
  NO_UNDEFINED = @NO_UNDEFINED@
@@@ -223,6 -261,9 +312,12 @@@ PACKAGE_TARNAME = @PACKAGE_TARNAME
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
++<<<<<<< HEAD
++=======
+ PKG_CONFIG = @PKG_CONFIG@
+ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++>>>>>>> upstream/20131206+dfsg
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
@@@ -230,6 -271,7 +325,10 @@@ SHELL = @SHELL
  STRIP = @STRIP@
  VERSION = @VERSION@
  W3INIT = @W3INIT@
++<<<<<<< HEAD
++=======
+ WEBROOT = @WEBROOT@
++>>>>>>> upstream/20131206+dfsg
  abs_builddir = @abs_builddir@
  abs_srcdir = @abs_srcdir@
  abs_top_builddir = @abs_top_builddir@
@@@ -256,10 -298,6 +355,13 @@@ datarootdir = @datarootdir
  docdir = @docdir@
  dvidir = @dvidir@
  exec_prefix = @exec_prefix@
++<<<<<<< HEAD
 +gts_cflags = @gts_cflags@
 +gts_libs = @gts_libs@
 +have_awk = @have_awk@
 +have_gmodule = @have_gmodule@
++=======
++>>>>>>> upstream/20131206+dfsg
  have_m4 = @have_m4@
  have_pkg_config = @have_pkg_config@
  host = @host@
@@@ -302,13 -340,16 +404,23 @@@ bin_SCRIPTS = 
  	ppm2theora \
  	ppm2video \
  	gfs2gfs \
++<<<<<<< HEAD
 +	gfsjoin
++=======
+ 	gfsjoin \
+ 	gfsplot
++>>>>>>> upstream/20131206+dfsg
  
  EXTRA_DIST = $(bin_SCRIPTS)
  gfs2oogl2D_SOURCES = gfs2oogl.c
  gfs2oogl3D_SOURCES = gfs2oogl.c
  gfscompare2D_SOURCES = gfscompare.c
  gfscompare3D_SOURCES = gfscompare.c
++<<<<<<< HEAD
++=======
+ gfscombine2D_SOURCES = gfscombine.c
+ gfscombine3D_SOURCES = gfscombine.c
++>>>>>>> upstream/20131206+dfsg
  gfsjoin2D_SOURCES = gfsjoin2.c
  gfsjoin3D_SOURCES = gfsjoin2.c
  gfs2oogl2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
@@@ -317,6 -358,9 +429,12 @@@ gfs2oogl3D_LDADD = $(GFS3D_LIBS
  gfscompare2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
  gfscompare2D_LDADD = $(GFS2D_LIBS)
  gfscompare3D_LDADD = $(GFS3D_LIBS)
++<<<<<<< HEAD
++=======
+ gfscombine2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
+ gfscombine2D_LDADD = $(GFS2D_LIBS)
+ gfscombine3D_LDADD = $(GFS3D_LIBS)
++>>>>>>> upstream/20131206+dfsg
  gfsjoin2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
  gfsjoin2D_LDADD = $(GFS2D_LIBS)
  gfsjoin3D_LDADD = $(GFS3D_LIBS)
@@@ -360,8 -404,11 +478,16 @@@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $
  $(am__aclocal_m4_deps):
  install-binPROGRAMS: $(bin_PROGRAMS)
  	@$(NORMAL_INSTALL)
++<<<<<<< HEAD
 +	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 +	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
++=======
+ 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do echo "$$p $$p"; done | \
  	sed 's/$(EXEEXT)$$//' | \
  	while read p p1; do if test -f $$p || test -f $$p1; \
@@@ -401,37 -448,46 +527,79 @@@ clean-binPROGRAMS
  	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
  	echo " rm -f" $$list; \
  	rm -f $$list
++<<<<<<< HEAD
 +gfs2oogl2D$(EXEEXT): $(gfs2oogl2D_OBJECTS) $(gfs2oogl2D_DEPENDENCIES) 
 +	@rm -f gfs2oogl2D$(EXEEXT)
 +	$(gfs2oogl2D_LINK) $(gfs2oogl2D_OBJECTS) $(gfs2oogl2D_LDADD) $(LIBS)
 +gfs2oogl3D$(EXEEXT): $(gfs2oogl3D_OBJECTS) $(gfs2oogl3D_DEPENDENCIES) 
 +	@rm -f gfs2oogl3D$(EXEEXT)
 +	$(LINK) $(gfs2oogl3D_OBJECTS) $(gfs2oogl3D_LDADD) $(LIBS)
 +gfscompare2D$(EXEEXT): $(gfscompare2D_OBJECTS) $(gfscompare2D_DEPENDENCIES) 
 +	@rm -f gfscompare2D$(EXEEXT)
 +	$(gfscompare2D_LINK) $(gfscompare2D_OBJECTS) $(gfscompare2D_LDADD) $(LIBS)
 +gfscompare3D$(EXEEXT): $(gfscompare3D_OBJECTS) $(gfscompare3D_DEPENDENCIES) 
 +	@rm -f gfscompare3D$(EXEEXT)
 +	$(LINK) $(gfscompare3D_OBJECTS) $(gfscompare3D_LDADD) $(LIBS)
 +gfsjoin2D$(EXEEXT): $(gfsjoin2D_OBJECTS) $(gfsjoin2D_DEPENDENCIES) 
 +	@rm -f gfsjoin2D$(EXEEXT)
 +	$(gfsjoin2D_LINK) $(gfsjoin2D_OBJECTS) $(gfsjoin2D_LDADD) $(LIBS)
 +gfsjoin3D$(EXEEXT): $(gfsjoin3D_OBJECTS) $(gfsjoin3D_DEPENDENCIES) 
 +	@rm -f gfsjoin3D$(EXEEXT)
 +	$(LINK) $(gfsjoin3D_OBJECTS) $(gfsjoin3D_LDADD) $(LIBS)
 +ppmcombine$(EXEEXT): $(ppmcombine_OBJECTS) $(ppmcombine_DEPENDENCIES) 
 +	@rm -f ppmcombine$(EXEEXT)
 +	$(ppmcombine_LINK) $(ppmcombine_OBJECTS) $(ppmcombine_LDADD) $(LIBS)
 +shapes$(EXEEXT): $(shapes_OBJECTS) $(shapes_DEPENDENCIES) 
 +	@rm -f shapes$(EXEEXT)
 +	$(LINK) $(shapes_OBJECTS) $(shapes_LDADD) $(LIBS)
 +streamanime$(EXEEXT): $(streamanime_OBJECTS) $(streamanime_DEPENDENCIES) 
++=======
+ gfs2oogl2D$(EXEEXT): $(gfs2oogl2D_OBJECTS) $(gfs2oogl2D_DEPENDENCIES) $(EXTRA_gfs2oogl2D_DEPENDENCIES) 
+ 	@rm -f gfs2oogl2D$(EXEEXT)
+ 	$(gfs2oogl2D_LINK) $(gfs2oogl2D_OBJECTS) $(gfs2oogl2D_LDADD) $(LIBS)
+ gfs2oogl3D$(EXEEXT): $(gfs2oogl3D_OBJECTS) $(gfs2oogl3D_DEPENDENCIES) $(EXTRA_gfs2oogl3D_DEPENDENCIES) 
+ 	@rm -f gfs2oogl3D$(EXEEXT)
+ 	$(LINK) $(gfs2oogl3D_OBJECTS) $(gfs2oogl3D_LDADD) $(LIBS)
+ gfscombine2D$(EXEEXT): $(gfscombine2D_OBJECTS) $(gfscombine2D_DEPENDENCIES) $(EXTRA_gfscombine2D_DEPENDENCIES) 
+ 	@rm -f gfscombine2D$(EXEEXT)
+ 	$(gfscombine2D_LINK) $(gfscombine2D_OBJECTS) $(gfscombine2D_LDADD) $(LIBS)
+ gfscombine3D$(EXEEXT): $(gfscombine3D_OBJECTS) $(gfscombine3D_DEPENDENCIES) $(EXTRA_gfscombine3D_DEPENDENCIES) 
+ 	@rm -f gfscombine3D$(EXEEXT)
+ 	$(LINK) $(gfscombine3D_OBJECTS) $(gfscombine3D_LDADD) $(LIBS)
+ gfscompare2D$(EXEEXT): $(gfscompare2D_OBJECTS) $(gfscompare2D_DEPENDENCIES) $(EXTRA_gfscompare2D_DEPENDENCIES) 
+ 	@rm -f gfscompare2D$(EXEEXT)
+ 	$(gfscompare2D_LINK) $(gfscompare2D_OBJECTS) $(gfscompare2D_LDADD) $(LIBS)
+ gfscompare3D$(EXEEXT): $(gfscompare3D_OBJECTS) $(gfscompare3D_DEPENDENCIES) $(EXTRA_gfscompare3D_DEPENDENCIES) 
+ 	@rm -f gfscompare3D$(EXEEXT)
+ 	$(LINK) $(gfscompare3D_OBJECTS) $(gfscompare3D_LDADD) $(LIBS)
+ gfsjoin2D$(EXEEXT): $(gfsjoin2D_OBJECTS) $(gfsjoin2D_DEPENDENCIES) $(EXTRA_gfsjoin2D_DEPENDENCIES) 
+ 	@rm -f gfsjoin2D$(EXEEXT)
+ 	$(gfsjoin2D_LINK) $(gfsjoin2D_OBJECTS) $(gfsjoin2D_LDADD) $(LIBS)
+ gfsjoin3D$(EXEEXT): $(gfsjoin3D_OBJECTS) $(gfsjoin3D_DEPENDENCIES) $(EXTRA_gfsjoin3D_DEPENDENCIES) 
+ 	@rm -f gfsjoin3D$(EXEEXT)
+ 	$(LINK) $(gfsjoin3D_OBJECTS) $(gfsjoin3D_LDADD) $(LIBS)
+ ppmcombine$(EXEEXT): $(ppmcombine_OBJECTS) $(ppmcombine_DEPENDENCIES) $(EXTRA_ppmcombine_DEPENDENCIES) 
+ 	@rm -f ppmcombine$(EXEEXT)
+ 	$(ppmcombine_LINK) $(ppmcombine_OBJECTS) $(ppmcombine_LDADD) $(LIBS)
+ shapes$(EXEEXT): $(shapes_OBJECTS) $(shapes_DEPENDENCIES) $(EXTRA_shapes_DEPENDENCIES) 
+ 	@rm -f shapes$(EXEEXT)
+ 	$(LINK) $(shapes_OBJECTS) $(shapes_LDADD) $(LIBS)
+ streamanime$(EXEEXT): $(streamanime_OBJECTS) $(streamanime_DEPENDENCIES) $(EXTRA_streamanime_DEPENDENCIES) 
++>>>>>>> upstream/20131206+dfsg
  	@rm -f streamanime$(EXEEXT)
  	$(LINK) $(streamanime_OBJECTS) $(streamanime_LDADD) $(LIBS)
  install-binSCRIPTS: $(bin_SCRIPTS)
  	@$(NORMAL_INSTALL)
++<<<<<<< HEAD
 +	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 +	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
++=======
+ 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ 	if test -n "$$list"; then \
+ 	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ 	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ 	fi; \
++>>>>>>> upstream/20131206+dfsg
  	for p in $$list; do \
  	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@@@ -459,9 -515,7 +627,13 @@@ uninstall-binSCRIPTS
  	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
  	files=`for p in $$list; do echo "$$p"; done | \
  	       sed -e 's,.*/,,;$(transform)'`; \
++<<<<<<< HEAD
 +	test -n "$$list" || exit 0; \
 +	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
 +	cd "$(DESTDIR)$(bindir)" && rm -f $$files
++=======
+ 	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
++>>>>>>> upstream/20131206+dfsg
  
  mostlyclean-compile:
  	-rm -f *.$(OBJEXT)
@@@ -471,6 -525,8 +643,11 @@@ distclean-compile
  
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gfs2oogl.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gfs2oogl2D-gfs2oogl.Po at am__quote@
++<<<<<<< HEAD
++=======
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gfscombine.Po at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gfscombine2D-gfscombine.Po at am__quote@
++>>>>>>> upstream/20131206+dfsg
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gfscompare.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gfscompare2D-gfscompare.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gfsjoin2.Po at am__quote@
@@@ -514,6 -570,20 +691,23 @@@ gfs2oogl2D-gfs2oogl.obj: gfs2oogl.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gfs2oogl2D_CFLAGS) $(CFLAGS) -c -o gfs2oogl2D-gfs2oogl.obj `if test -f 'gfs2oogl.c'; then $(CYGPATH_W) 'gfs2oogl.c'; else $(CYGPATH_W) '$(srcdir)/gfs2oogl.c'; fi`
  
++<<<<<<< HEAD
++=======
+ gfscombine2D-gfscombine.o: gfscombine.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gfscombine2D_CFLAGS) $(CFLAGS) -MT gfscombine2D-gfscombine.o -MD -MP -MF $(DEPDIR)/gfscombine2D-gfscombine.Tpo -c -o gfscombine2D-gfscombine.o `test -f 'gfscombine.c' || echo '$(srcdir)/'`gfscombine.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/gfscombine2D-gfscombine.Tpo $(DEPDIR)/gfscombine2D-gfscombine.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gfscombine.c' object='gfscombine2D-gfscombine.o' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gfscombine2D_CFLAGS) $(CFLAGS) -c -o gfscombine2D-gfscombine.o `test -f 'gfscombine.c' || echo '$(srcdir)/'`gfscombine.c
+ 
+ gfscombine2D-gfscombine.obj: gfscombine.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gfscombine2D_CFLAGS) $(CFLAGS) -MT gfscombine2D-gfscombine.obj -MD -MP -MF $(DEPDIR)/gfscombine2D-gfscombine.Tpo -c -o gfscombine2D-gfscombine.obj `if test -f 'gfscombine.c'; then $(CYGPATH_W) 'gfscombine.c'; else $(CYGPATH_W) '$(srcdir)/gfscombine.c'; fi`
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/gfscombine2D-gfscombine.Tpo $(DEPDIR)/gfscombine2D-gfscombine.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gfscombine.c' object='gfscombine2D-gfscombine.obj' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gfscombine2D_CFLAGS) $(CFLAGS) -c -o gfscombine2D-gfscombine.obj `if test -f 'gfscombine.c'; then $(CYGPATH_W) 'gfscombine.c'; else $(CYGPATH_W) '$(srcdir)/gfscombine.c'; fi`
+ 
++>>>>>>> upstream/20131206+dfsg
  gfscompare2D-gfscompare.o: gfscompare.c
  @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gfscompare2D_CFLAGS) $(CFLAGS) -MT gfscompare2D-gfscompare.o -MD -MP -MF $(DEPDIR)/gfscompare2D-gfscompare.Tpo -c -o gfscompare2D-gfscompare.o `test -f 'gfscompare.c' || echo '$(srcdir)/'`gfscompare.c
  @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/gfscompare2D-gfscompare.Tpo $(DEPDIR)/gfscompare2D-gfscompare.Po
@@@ -661,10 -731,15 +855,22 @@@ install-am: all-a
  
  installcheck: installcheck-am
  install-strip:
++<<<<<<< HEAD
 +	$(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
++=======
+ 	if test -z '$(STRIP)'; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	      install; \
+ 	else \
+ 	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ 	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ 	fi
++>>>>>>> upstream/20131206+dfsg
  mostlyclean-generic:
  
  clean-generic:
diff --cc tools/darcs2dist
index 8e7f26a,bc7844d..8e71844
--- a/tools/darcs2dist
+++ b/tools/darcs2dist
@@@ -60,28 -59,43 +60,64 @@@ url=$
  
  wrkdir=`mktemp -d /tmp/darcs2dist.XXXXXX`
  cd $wrkdir
++<<<<<<< HEAD
 +if ( darcs get --partial $repo $package && \
 +     cd $package && \
 +     version=`darcsversion` && \
 +     login=`echo $url | awk 'BEGIN{FS=":"}{print $1}'` && \
 +     dir=`echo $url | awk 'BEGIN{FS=":"}{print $2}'` && \
 +     sh autogen.sh && \
 +     make && \
 +     make dist && \
 +     tar xzf $package-*.tar.gz && \
 +     cd  $package-[0-9].[0-9].[0-9] && \
 +     ./configure && make && cd .. && \
 +     rm -r -f $package-[0-9].[0-9].[0-9] && tar xzf $package-*.tar.gz && \
 +     mv $package-[0-9].[0-9].[0-9] $package-snapshot-$version && \
 +     tar chof - $package-snapshot-$version | gzip --best -c > $package-snapshot-$version.tar.gz && \
 +     transfer $package $version $login "$dir"
 +) > msg 2>&1; then
 +    rm -f msg
 +    status=0
++=======
+ if darcs get $repo $package > msg 2>&1 ; then
+     cd $package
+     version=`darcsversion`
+     login=`echo $url | awk 'BEGIN{FS=":"}{print $1}'`
+     dir=`echo $url | awk 'BEGIN{FS=":"}{print $2}'`
+     if test x$dir = x; then
+      	if test -f $login/tarballs/$package-snapshot-$version.tar.gz; then
+ 	    # tarball already at latest version
+             rm -r -f $wrkdir
+ 	    exit 0
+ 	fi
+     fi
  else
      cat msg
-     rm -f msg
-     status=1
+     rm -r -f $wrkdir
+     exit 1
+ fi
+ 
+ if ( cd $wrkdir/$package && \
+     version=`darcsversion` && \
+     login=`echo $url | awk 'BEGIN{FS=":"}{print $1}'` && \
+     dir=`echo $url | awk 'BEGIN{FS=":"}{print $2}'` && \
+     sh autogen.sh && \
+     make && \
+     make dist && \
+     tar xzf $package-*.tar.gz && \
+     cd  $package-[0-9].[0-9].[0-9] && \
+     ./configure && make && cd .. && \
+     rm -r -f $package-[0-9].[0-9].[0-9] && tar xzf $package-*.tar.gz && \
+     mv $package-[0-9].[0-9].[0-9] $package-snapshot-$version && \
+     tar chof - $package-snapshot-$version | gzip --best -c > $package-snapshot-$version.tar.gz && \
+     transfer $package $version $login "$dir"
+ 	) > msg 2>&1; then :
++>>>>>>> upstream/20131206+dfsg
+ else
+     cat msg
+     rm -r -f $wrkdir
+     exit 1
  fi
  
  rm -r -f $wrkdir
diff --cc tools/gfscompare.c
index 661c107,0d26070..a99546b
--- a/tools/gfscompare.c
+++ b/tools/gfscompare.c
@@@ -563,6 -569,7 +569,10 @@@ int main (int argc, char * argv[]
      s = gfs_domain_stats_variable (GFS_DOMAIN (s1),
  				   var1, FTT_TRAVERSE_LEAFS, -1,
  				   NULL, NULL);
++<<<<<<< HEAD
++=======
+     gdouble f = pow (s1->physical_params.L, var1->units);
++>>>>>>> upstream/20131206+dfsg
      fprintf (stderr, 
  	     "%s:\n"
  	     "  first: %g second: %g infty: %g w: %g\n"
diff --cc tools/gfsjoin2.c
index 12bbabc,a528ead..8bab2fd
--- a/tools/gfsjoin2.c
+++ b/tools/gfsjoin2.c
@@@ -18,6 -18,7 +18,10 @@@
   */
  
  #include <stdlib.h>
++<<<<<<< HEAD
++=======
+ #include <unistd.h>
++>>>>>>> upstream/20131206+dfsg
  #include "config.h"
  #ifdef HAVE_GETOPT_H
  #  include <getopt.h>

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



More information about the debian-science-commits mailing list